diff --git a/README.txt b/README.txt index b8c4cd439a..2ff2e02190 100644 --- a/README.txt +++ b/README.txt @@ -6,15 +6,10 @@ openair1: 3GPP LTE Rel-8 PHY layer + PHY RF simulation openair2: 3GPP LTE Rel-9 RLC/MAC/PDCP/RRC implementations, eNB application, X2AP. Note that for RLC, the following versions are userL UM_v9.3.0, TM_v9.3.0, and AM_v9.3.0. For PDCP, PDCP_v10.1.0 is used. For RRC, only LITE is used. -openair3: additional networking protocols (PMIP, MIH, Multicasting) and scripts - -openair-cn: 3GPP LTE Rel9 and 10 MME/NAS, S+P-GW, HSS, S1AP (ENB and MME). - -openairITS: IEEE 802.11p software modem (all layers) +openair3: 3GPP LTE Rel9 and 10 MME/NAS, S+P-GW, HSS, S1AP (ENB and MME). common: some common OAI utilities, other tools can be found at openair2/UTILS - targets: scripts to compile and lauch different system targets (simulation, emulation and real-time platforms, user-space tools for these platforms (tbd)) see README files in these subdirectories for more information diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index 6898f21e4f..eb9d4ac8f6 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -20,7 +20,7 @@ # Contact Information # OpenAirInterface Admin: openair_admin@eurecom.fr # OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr +# OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr # # Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE # Author: laurent THOMAS, Lionel GAUTHIER @@ -36,7 +36,7 @@ set (OPENAIR1_DIR ${OPENAIR_DIR}/openair1) set (OPENAIR2_DIR ${OPENAIR_DIR}/openair2) set (OPENAIR3_DIR ${OPENAIR_DIR}/openair3) set (OPENAIR_TARGETS ${OPENAIR_DIR}/targets) -set (OPENAIRCN_DIR ${OPENAIR_DIR}/openair-cn) +set (OPENAIR3_DIR ${OPENAIR_DIR}/openair3) set (OPENAIR_CMAKE ${OPENAIR_DIR}/cmake_targets) set (OPENAIR_BIN_DIR ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}) @@ -144,8 +144,16 @@ else (CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7l") set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -mssse3") endif() endif() + +set(C_FLAGS_PROCESSOR " ${C_FLAGS_PROCESSOR} ${CFLAGS_PROCESSOR_USER}") + Message("C_FLAGS_PROCESSOR is ${C_FLAGS_PROCESSOR}") +if (CMAKE_SYSTEM_PROCESSOR MATCHES "x86") + if ( (NOT( C_FLAGS_PROCESSOR MATCHES "ssse3")) OR (NOT( C_FLAGS_PROCESSOR MATCHES "msse4.1")) OR (NOT( C_FLAGS_PROCESSOR MATCHES "msse4.2")) ) + Message(FATAL_ERROR "For x86 Architecture, you must have following flags: -mssse3 -msse4.1 -msse4.2. The current detected flags are: ${C_FLAGS_PROCESSOR}. You can pass the flags manually in build script, for example: ./build_oai --cflags_processor \"-mssse3 -msse4.1 -msse4.2\" ") + endif() +endif() # set(CMAKE_C_FLAGS @@ -215,7 +223,7 @@ if (${ENABLE_ITTI}) ${ITTI_DIR}/timer.c ) set(ITTI_LIB ITTI) - set(GTPU_need_ITTI ${OPENAIRCN_DIR}/GTPV1-U/gtpv1u_eNB.c) + set(GTPU_need_ITTI ${OPENAIR3_DIR}/GTPV1-U/gtpv1u_eNB.c) endif (${ENABLE_ITTI}) add_boolean_option(RTAI False "Use RTAI") @@ -279,7 +287,7 @@ add_custom_command ( ############## add_list1_option(S1AP_VERSION R10 "S1AP Asn.1 grammar version" R8 R9 R10) -set(S1AP_DIR ${OPENAIRCN_DIR}/S1AP) +set(S1AP_DIR ${OPENAIR3_DIR}/S1AP) if (${S1AP_VERSION} STREQUAL "R10") set (ASN1RELDIR R10.5) add_definitions("-DUPDATE_RELEASE_9 -DUPDATE_RELEASE_10") @@ -341,17 +349,7 @@ add_library(S1AP_ENB ${S1AP_DIR}/s1ap_eNB_ue_context.c ) -add_library(S1AP_EPC - ${S1AP_C_DIR}/s1ap_ies_defs.h - ${S1AP_DIR}/s1ap_mme_encoder.c - ${S1AP_DIR}/s1ap_mme_decoder.c - ${S1AP_DIR}/s1ap_mme_handlers.c - ${S1AP_DIR}/s1ap_mme_nas_procedures.c - ${S1AP_DIR}/s1ap_mme.c - ${S1AP_DIR}/s1ap_mme_itti_messaging.c - ${S1AP_DIR}/s1ap_mme_retransmission.c - ${S1AP_DIR}/s1ap_mme_ta.c - ) + #X2AP # Same limitation as described in RRC/S1AP: unknown generated file list @@ -468,8 +466,6 @@ add_boolean_option(USER_MODE True "????") add_boolean_option(OAI_NW_DRIVER_TYPE_ETHERNET False "????") add_boolean_option(DISABLE_USE_NAS False "???") -add_boolean_option(ENABLE_STANDALONE_EPC True "Compile MME, SGW and PGW in a single executable") -add_boolean_option(EPC_BUILD False "???") add_boolean_option(LOWLATENCY True "Use the Linux scheduler SCHED_DEADLINE: kernel >= 3.14") add_boolean_option(NAS_ADDRESS_FIX False "specific to oaisim: for nasmesh driver") add_boolean_option(NAS_NETLINK False "???? Must be True to compile nasmesh driver without rtai") @@ -483,7 +479,7 @@ add_boolean_option(MESSAGE_CHART_GENERATOR_PHY False "trace some PHY exchang ######################## # Include order ########################## -add_boolean_option(ENB_MODE True "Swap the include directories between openair2 and openair-cn" ) +add_boolean_option(ENB_MODE True "Swap the include directories between openair2 and openair3" ) ########################## # Emulation options @@ -543,10 +539,8 @@ add_boolean_option(USE_3GPP_ADDR_AS_LINK_ADDR False "As per attribute name") # NAS LAYER OPTIONS ########################## add_boolean_option(ENABLE_NAS_UE_LOGGING True "????") -add_boolean_option(NAS_BUILT_IN_EPC False "MME NAS layer not present in this executable") add_boolean_option(NAS_BUILT_IN_UE True "UE NAS layer present in this executable") add_boolean_option(NAS_UE True "NAS UE INSTANCE (<> NAS_MME)") -add_boolean_option(NAS_MME False "NAS_UE and NAS_MME are incompatible options") ########################## @@ -635,11 +629,11 @@ if(ENB_MODE) include_directories("${OPENAIR2_DIR}/COMMON") include_directories("${OPENAIR2_DIR}/UTIL") include_directories("${OPENAIR2_DIR}/UTIL/LOG") - include_directories("${OPENAIRCN_DIR}/COMMON") - include_directories("${OPENAIRCN_DIR}/UTILS") + include_directories("${OPENAIR3_DIR}/COMMON") + include_directories("${OPENAIR3_DIR}/UTILS") else() - include_directories("${OPENAIRCN_DIR}/COMMON") - include_directories("${OPENAIRCN_DIR}/UTILS") + include_directories("${OPENAIR3_DIR}/COMMON") + include_directories("${OPENAIR3_DIR}/UTILS") include_directories("${OPENAIR2_DIR}/COMMON") include_directories("${OPENAIR2_DIR}/UTIL") include_directories("${OPENAIR2_DIR}/UTIL/LOG") @@ -659,18 +653,18 @@ include_directories("${OPENAIR3_DIR}/RAL-LTE/LTE_RAL_ENB/INCLUDE") include_directories("${OPENAIR3_DIR}/RAL-LTE/LTE_RAL_UE/INCLUDE") include_directories("${OPENAIR_DIR}/common/utils") include_directories("${OPENAIR_DIR}/common/utils/itti") -include_directories("${OPENAIRCN_DIR}/NAS/COMMON") -include_directories("${OPENAIRCN_DIR}/NAS/COMMON/API/NETWORK") -include_directories("${OPENAIRCN_DIR}/NAS/COMMON/EMM/MSG") -include_directories("${OPENAIRCN_DIR}/NAS/COMMON/ESM/MSG") -include_directories("${OPENAIRCN_DIR}/NAS/COMMON/IES") -include_directories("${OPENAIRCN_DIR}/NAS/COMMON/UTIL") -include_directories("${OPENAIRCN_DIR}/SECU") -include_directories("${OPENAIRCN_DIR}/SCTP") -include_directories("${OPENAIRCN_DIR}/S1AP") +include_directories("${OPENAIR3_DIR}/NAS/COMMON") +include_directories("${OPENAIR3_DIR}/NAS/COMMON/API/NETWORK") +include_directories("${OPENAIR3_DIR}/NAS/COMMON/EMM/MSG") +include_directories("${OPENAIR3_DIR}/NAS/COMMON/ESM/MSG") +include_directories("${OPENAIR3_DIR}/NAS/COMMON/IES") +include_directories("${OPENAIR3_DIR}/NAS/COMMON/UTIL") +include_directories("${OPENAIR3_DIR}/SECU") +include_directories("${OPENAIR3_DIR}/SCTP") +include_directories("${OPENAIR3_DIR}/S1AP") include_directories("${OPENAIR2_DIR}/X2AP") -include_directories("${OPENAIRCN_DIR}/UDP") -include_directories("${OPENAIRCN_DIR}/GTPV1-U") +include_directories("${OPENAIR3_DIR}/UDP") +include_directories("${OPENAIR3_DIR}/GTPV1-U") include_directories("${OPENAIR_DIR}/targets/COMMON") include_directories("${OPENAIR_DIR}/targets/ARCH/COMMON") include_directories("${OPENAIR_DIR}/targets/ARCH/EXMIMO/USERSPACE/LIB/") @@ -690,11 +684,8 @@ include_directories("${OPENAIR2_DIR}/UTIL/CLI") include_directories("${OPENAIR2_DIR}/UTIL/OPT") include_directories("${OPENAIR2_DIR}/UTIL/OMV") include_directories("${OPENAIR2_DIR}/RRC/LITE/MESSAGES") -include_directories("${OPENAIRCN_DIR}/GTPV1-U/nw-gtpv1u/shared") -include_directories("${OPENAIRCN_DIR}/GTPV1-U/nw-gtpv1u/include") -include_directories("${OPENAIRCN_DIR}/SGW-LITE") -include_directories("${OPENAIRCN_DIR}/MME_APP") -include_directories("${OPENAIRCN_DIR}/S6A") +include_directories("${OPENAIR3_DIR}/GTPV1-U/nw-gtpv1u/shared") +include_directories("${OPENAIR3_DIR}/GTPV1-U/nw-gtpv1u/include") include_directories("${OPENAIR_DIR}") # Utilities Library @@ -767,14 +758,14 @@ set(SECU_OSA_SRC add_library(SECU_OSA ${SECU_OSA_SRC}) set(SECU_CN_SRC - ${OPENAIRCN_DIR}/SECU/kdf.c - ${OPENAIRCN_DIR}/SECU/rijndael.c - ${OPENAIRCN_DIR}/SECU/snow3g.c - ${OPENAIRCN_DIR}/SECU/key_nas_deriver.c - ${OPENAIRCN_DIR}/SECU/nas_stream_eea1.c - ${OPENAIRCN_DIR}/SECU/nas_stream_eia1.c - ${OPENAIRCN_DIR}/SECU/nas_stream_eea2.c - ${OPENAIRCN_DIR}/SECU/nas_stream_eia2.c + ${OPENAIR3_DIR}/SECU/kdf.c + ${OPENAIR3_DIR}/SECU/rijndael.c + ${OPENAIR3_DIR}/SECU/snow3g.c + ${OPENAIR3_DIR}/SECU/key_nas_deriver.c + ${OPENAIR3_DIR}/SECU/nas_stream_eea1.c + ${OPENAIR3_DIR}/SECU/nas_stream_eia1.c + ${OPENAIR3_DIR}/SECU/nas_stream_eea2.c + ${OPENAIR3_DIR}/SECU/nas_stream_eia2.c ) add_library(SECU_CN ${SECU_CN_SRC}) @@ -1008,14 +999,14 @@ endif() ########################## add_library(CN_UTILS - ${OPENAIRCN_DIR}/UTILS/conversions.c - ${OPENAIRCN_DIR}/UTILS/enum_string.c - ${OPENAIRCN_DIR}/UTILS/log.c - ${OPENAIRCN_DIR}/UTILS/mme_config.c - ${OPENAIRCN_DIR}/UTILS/mcc_mnc_itu.c + ${OPENAIR3_DIR}/UTILS/conversions.c + ${OPENAIR3_DIR}/UTILS/enum_string.c + ${OPENAIR3_DIR}/UTILS/log.c + ${OPENAIR3_DIR}/UTILS/mme_config.c + ${OPENAIR3_DIR}/UTILS/mcc_mnc_itu.c ) -set(GTPV1U_DIR ${OPENAIRCN_DIR}/GTPV1-U) +set(GTPV1U_DIR ${OPENAIR3_DIR}/GTPV1-U) set (GTPV1U_SRC ${RRC_DIR}/rrc_eNB_GTPV1U.c ${GTPV1U_DIR}/nw-gtpv1u/src/NwGtpv1uTunnelEndPoint.c @@ -1026,109 +1017,17 @@ set (GTPV1U_SRC ) add_library(GTPV1U ${GTPV1U_SRC}) -set(GTPV2C_DIR ${OPENAIRCN_DIR}/GTPV2-C/nwgtpv2c-0.11/src) -add_library(GTPV2C - ${GTPV2C_DIR}/NwGtpv2cTrxn.c - ${GTPV2C_DIR}/NwGtpv2cTunnel.c - ${GTPV2C_DIR}/NwGtpv2cMsg.c - ${GTPV2C_DIR}/NwGtpv2cMsgIeParseInfo.c - ${GTPV2C_DIR}/NwGtpv2cMsgParser.c - ${GTPV2C_DIR}/NwGtpv2c.c - ) -include_directories(${OPENAIRCN_DIR}/GTPV2-C/nwgtpv2c-0.11/include/) -include_directories(${OPENAIRCN_DIR}/GTPV2-C/nwgtpv2c-0.11/shared/) - -execute_process( - COMMAND /sbin/iptables -V - OUTPUT_VARIABLE iptables_version - ) -string(REGEX REPLACE "[a-zA-Z .\r\n]" "" IPTVERSION ${iptables_version}) -string(REGEX REPLACE "[a-zA-Z \r\n]" "" IPTABLES_VERSION_STRING ${iptables_version}) - -# From original Polaris code, added _lib because cmake doesn't accept two targets with the same name -# and the driver is also named xt_GTPUSP -# the _lib suffix is removed during installation in /lib/xtables -add_library(xt_GTPUSP_lib SHARED ${OPENAIRCN_DIR}/GTPV1-U/GTPU_SP/libxt_GTPUSP.c) -target_compile_definitions(xt_GTPUSP_lib PRIVATE --D_LARGEFILE_SOURCE=1 --D_LARGE_FILES --D_FILE_OFFSET_BITS=64 --D_REENTRANT --D_INIT=libxt_GTPUSP_init --DKVERSION=3 --DPIC -IPTVERSION=${IPTVERSION} -DIPTABLES_VERSION_STRING=\"${IPTABLES_VERSION_STRING}\" -) - - - set(SCTP_SRC - ${OPENAIRCN_DIR}/SCTP/sctp_common.c - ${OPENAIRCN_DIR}/SCTP/sctp_eNB_task.c - ${OPENAIRCN_DIR}/SCTP/sctp_eNB_itti_messaging.c + ${OPENAIR3_DIR}/SCTP/sctp_common.c + ${OPENAIR3_DIR}/SCTP/sctp_eNB_task.c + ${OPENAIR3_DIR}/SCTP/sctp_eNB_itti_messaging.c ) add_library(SCTP_CLIENT ${SCTP_SRC}) -add_library(SCTP_SERVER - ${OPENAIRCN_DIR}/SCTP/sctp_common.c - ${OPENAIRCN_DIR}/SCTP/sctp_itti_messaging.c - ${OPENAIRCN_DIR}/SCTP/sctp_primitives_server.c - ) +add_library(UDP ${OPENAIR3_DIR}/UDP/udp_eNB_task.c) -add_library(UDP ${OPENAIRCN_DIR}/UDP/udp_eNB_task.c) - -add_library(UDP_SERVER ${OPENAIRCN_DIR}/UDP/udp_primitives_server.c) - -set(S11_DIR ${OPENAIRCN_DIR}/S11) -add_library(S11 - ${S11_DIR}/s11_common.c - ${S11_DIR}/s11_ie_formatter.c - ${S11_DIR}/s11_mme_task.c - ${S11_DIR}/s11_sgw.c - ${S11_DIR}/s11_mme_session_manager.c - ${S11_DIR}/s11_sgw_session_manager.c - ${S11_DIR}/s11_sgw_bearer_manager.c -) -include_directories(${S11_DIR}) - -set(S6A_DIR ${OPENAIRCN_DIR}/S6A) -add_library(S6A - ${S6A_DIR}/s6a_auth_info.c - ${S6A_DIR}/s6a_dict.c - ${S6A_DIR}/s6a_error.c - ${S6A_DIR}/s6a_peer.c - ${S6A_DIR}/s6a_subscription_data.c - ${S6A_DIR}/s6a_task.c - ${S6A_DIR}/s6a_up_loc.c - ) - -set(SGW_DIR ${OPENAIRCN_DIR}/SGW-LITE) -add_library (SGW - ${SGW_DIR}/spgw_config.c - ${SGW_DIR}/s11_causes.c - ${SGW_DIR}/sgw_lite_task.c - ${SGW_DIR}/sgw_lite_handlers.c - ${SGW_DIR}/sgw_lite_context_manager.c - ${SGW_DIR}/pgw_lite_paa.c - ) - -set(MME_DIR ${OPENAIRCN_DIR}/MME_APP) -add_library(MME_APP - ${MME_DIR}/mme_app_capabilities.c - ${MME_DIR}/mme_app_context.c - ${MME_DIR}/mme_app_main.c - ${MME_DIR}/mme_app_bearer.c - ${MME_DIR}/mme_app_authentication.c - ${MME_DIR}/mme_app_location.c - ${MME_DIR}/mme_app_statistics.c - ${MME_DIR}/s6a_2_nas_cause.c - ) - - - - -set(NAS_SRC ${OPENAIRCN_DIR}/NAS/) +set(NAS_SRC ${OPENAIR3_DIR}/NAS/) set(libnas_api_OBJS ${NAS_SRC}COMMON/API/NETWORK/as_message.c ${NAS_SRC}COMMON/API/NETWORK/nas_message.c @@ -1386,99 +1285,6 @@ if(NAS_UE) include_directories(${NAS_SRC}UE/ESM/SAP) endif() -if(NAS_MME) - set(libnas_mme_api_OBJS - ${NAS_SRC}MME/API/MME/mme_api.c - ) - set(libnas_mme_emm_OBJS - ${NAS_SRC}MME/EMM/Attach.c - ${NAS_SRC}MME/EMM/Authentication.c - ${NAS_SRC}MME/EMM/Detach.c - ${NAS_SRC}MME/EMM/EmmCommon.c - ${NAS_SRC}MME/EMM/emm_data_ctx.c - ${NAS_SRC}MME/EMM/emm_main.c - ${NAS_SRC}MME/EMM/EmmStatusHdl.c - ${NAS_SRC}MME/EMM/Identification.c - ${NAS_SRC}MME/EMM/IdleMode.c - ${NAS_SRC}MME/EMM/LowerLayer.c - ${NAS_SRC}MME/EMM/SecurityModeControl.c - ${NAS_SRC}MME/EMM/ServiceRequestHdl.c - ${NAS_SRC}MME/EMM/TrackingAreaUpdate.c - ) - set(libnas_mme_emm_sap_OBJS - ${NAS_SRC}MME/EMM/SAP/emm_as.c - ${NAS_SRC}MME/EMM/SAP/emm_cn.c - ${NAS_SRC}MME/EMM/SAP/EmmCommonProcedureInitiated.c - ${NAS_SRC}MME/EMM/SAP/EmmDeregisteredAttachNeeded.c - ${NAS_SRC}MME/EMM/SAP/EmmDeregisteredAttemptingToAttach.c - ${NAS_SRC}MME/EMM/SAP/EmmDeregistered.c - ${NAS_SRC}MME/EMM/SAP/EmmDeregisteredInitiated.c - ${NAS_SRC}MME/EMM/SAP/EmmDeregisteredLimitedService.c - ${NAS_SRC}MME/EMM/SAP/EmmDeregisteredNoCellAvailable.c - ${NAS_SRC}MME/EMM/SAP/EmmDeregisteredNoImsi.c - ${NAS_SRC}MME/EMM/SAP/EmmDeregisteredNormalService.c - ${NAS_SRC}MME/EMM/SAP/EmmDeregisteredPlmnSearch.c - ${NAS_SRC}MME/EMM/SAP/emm_esm.c - ${NAS_SRC}MME/EMM/SAP/emm_fsm.c - ${NAS_SRC}MME/EMM/SAP/EmmNull.c - ${NAS_SRC}MME/EMM/SAP/emm_recv.c - ${NAS_SRC}MME/EMM/SAP/emm_reg.c - ${NAS_SRC}MME/EMM/SAP/EmmRegisteredAttemptingToUpdate.c - ${NAS_SRC}MME/EMM/SAP/EmmRegistered.c - ${NAS_SRC}MME/EMM/SAP/EmmRegisteredImsiDetachInitiated.c - ${NAS_SRC}MME/EMM/SAP/EmmRegisteredInitiated.c - ${NAS_SRC}MME/EMM/SAP/EmmRegisteredLimitedService.c - ${NAS_SRC}MME/EMM/SAP/EmmRegisteredNoCellAvailable.c - ${NAS_SRC}MME/EMM/SAP/EmmRegisteredNormalService.c - ${NAS_SRC}MME/EMM/SAP/EmmRegisteredPlmnSearch.c - ${NAS_SRC}MME/EMM/SAP/EmmRegisteredUpdateNeeded.c - ${NAS_SRC}MME/EMM/SAP/emm_sap.c - ${NAS_SRC}MME/EMM/SAP/emm_send.c - ${NAS_SRC}MME/EMM/SAP/EmmServiceRequestInitiated.c - ${NAS_SRC}MME/EMM/SAP/EmmTrackingAreaUpdatingInitiated.c - ) - set (libnas_mme_esm_OBJS - ${NAS_SRC}MME/ESM/DedicatedEpsBearerContextActivation.c - ${NAS_SRC}MME/ESM/DefaultEpsBearerContextActivation.c - ${NAS_SRC}MME/ESM/EpsBearerContextDeactivation.c - ${NAS_SRC}MME/ESM/esm_ebr.c - ${NAS_SRC}MME/ESM/esm_ebr_context.c - ${NAS_SRC}MME/ESM/esm_ip.c - ${NAS_SRC}MME/ESM/esm_main.c - ${NAS_SRC}MME/ESM/esm_pt.c - ${NAS_SRC}MME/ESM/EsmStatusHdl.c - ${NAS_SRC}MME/ESM/PdnConnectivity.c - ${NAS_SRC}MME/ESM/PdnDisconnect.c - ) - set(libnas_mme_esm_sap_OBJS - ${NAS_SRC}MME/ESM/SAP/esm_recv.c - ${NAS_SRC}MME/ESM/SAP/esm_send.c - ${NAS_SRC}MME/ESM/SAP/esm_sap.c - ) - add_library(LIB_NAS_MME - ${NAS_SRC}MME/nas_itti_messaging.c - ${NAS_SRC}MME/nas_network.c - ${NAS_SRC}MME/nas_parser.c - ${NAS_SRC}MME/nas_proc.c - ${libnas_api_OBJS} - ${libnas_mme_api_OBJS} - ${libnas_emm_msg_OBJS} - ${libnas_esm_msg_OBJS} - ${libnas_ies_OBJS} - ${libnas_utils_OBJS} - ${libnas_mme_emm_OBJS} - ${libnas_mme_emm_sap_OBJS} - ${libnas_mme_esm_OBJS} - ${libnas_mme_esm_sap_OBJS} - ) - include_directories(${NAS_SRC}MME) - include_directories(${NAS_SRC}MME/API/MME) - include_directories(${NAS_SRC}MME/EMM) - include_directories(${NAS_SRC}MME/EMM/SAP) - include_directories(${NAS_SRC}MME/ESM) - include_directories(${NAS_SRC}MME/ESM/SAP) -endif() - # Make lfds as a own source code (even if it is a outside library) @@ -1618,7 +1424,7 @@ add_executable(lte-softmodem ${OPENAIR_TARGETS}/COMMON/create_tasks.c ${OPENAIR_TARGETS}/ARCH/COMMON/common_lib.c ${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c - ${OPENAIRCN_DIR}/NAS/UE/nas_ue_task.c + ${OPENAIR3_DIR}/NAS/UE/nas_ue_task.c ${GTPU_need_ITTI} ${HW_SOURCE} ${RTAI_SOURCE} @@ -1670,112 +1476,6 @@ target_link_libraries (lte-softmodem-nos1 ${LIBBOOST_LIBRARIES}) -# EPC is ??? nodes implementation in one process -################################ -add_executable(mme_gw - ${OPENAIR_BIN_DIR}/messages_xml.h - ${OPENAIRCN_DIR}/OAI_EPC/oai_epc_log.c - ${OPENAIRCN_DIR}/OAI_EPC/oai_epc.c - ${GTPV1U_DIR}/gtpv1u_task.c - ${OPENAIRCN_DIR}/SCTP/sctp_primitives_server.c - ${OPENAIRCN_DIR}/NAS/MME/nas_mme_task.c - ) -target_link_libraries (mme_gw - -Wl,--start-group - LIB_NAS_MME S1AP_LIB S1AP_EPC GTPV1U GTPV2C SCTP_SERVER UDP_SERVER SECU_CN SECU_OSA S6A SGW MME_APP LFDS ${MSC_LIB} ${ITTI_LIB} CN_UTILS HASHTABLE - -Wl,--end-group - pthread m sctp rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIBRARIES} fdproto fdcore - ) - - -# Default parameters -# Does not work on simple install (fqdn in /etc/hosts 127.0.1.1) -#cmake_host_system_information(RESULT HSS_FQDN_STR QUERY FQDN) -#cmake_host_system_information(RESULT MME_FQDN_STR QUERY FQDN) -IF( EPC_BUILD ) - INCLUDE(FindFreeDiameter) - # if standalone eNB or UE no need for FreeDiameter - IF( FREEDIAMETER_FOUND ) - IF( NOT FREEDIAMETER_HSS_S6A_ENABLED ) - MESSAGE( SEND_ERROR "FreeDiameter is not enabled for OPENAIRHSS" ) - ENDIF( NOT FREEDIAMETER_HSS_S6A_ENABLED ) - ENDIF( FREEDIAMETER_FOUND ) - - - execute_process(COMMAND hostname --fqdn OUTPUT_VARIABLE HSS_FQDN_STR TIMEOUT 3) - execute_process(COMMAND hostname --fqdn OUTPUT_VARIABLE MME_FQDN_STR TIMEOUT 3) - string(STRIP ${HSS_FQDN_STR} HSS_FQDN_STR) - string(STRIP ${MME_FQDN_STR} MME_FQDN_STR) - - set(HSS_IP 127.0.1.1 CACHE STRING "HSS IP address, default is local") - set(MME_FQDN ${MME_FQDN_STR} CACHE STRING "MME Fully qualified domain name") - set(HSS_FQDN ${HSS_FQDN_STR} CACHE STRING "HSS Fully qualified domain name") - set(TRANSPORT_option "#No_TCP" CACHE STRING "No_TCP or No_SCTP or comment string, FreeDiameter config option") - set(TRANSPORT_PREFER_TCP_option "#Prefer_TCP" CACHE STRING "Prefer_TCP or comment string, FreeDiameter config option") - IF( NOT DEFINED REALM ) - string(FIND ${MME_FQDN} "." pos) - math(EXPR pos1 "${pos}+1") - string(SUBSTRING ${MME_FQDN} ${pos1} -1 realm_string) - message("REALM extracted from MME FQDN is ${realm_string}") - set(REALM ${realm_string} CACHE STRING "EPC realm") - ENDIF( NOT DEFINED REALM ) - message("REALM is ${REALM}") - IF( NOT DEFINED MME_HOSTNAME ) - string(FIND ${MME_FQDN} "." pos) - string(SUBSTRING ${MME_FQDN} 0 ${pos} mme_hostname_string) - message("MME_HOSTNAME extracted from MME FQDN is ${mme_hostname_string}") - set(MME_HOSTNAME ${mme_hostname_string} CACHE STRING "MME hostname") - ENDIF( NOT DEFINED MME_HOSTNAME ) - IF( NOT DEFINED HSS_HOSTNAME ) - string(FIND ${HSS_FQDN} "." pos) - string(SUBSTRING ${HSS_FQDN} 0 ${pos} hss_hostname_string) - message("HSS_HOSTNAME extracted from HSS FQDN is ${hss_hostname_string}") - set(HSS_HOSTNAME ${hss_hostname_string} CACHE STRING "HSS hostname") - ENDIF( NOT DEFINED HSS_HOSTNAME ) - - if ( ${MME_HOSTNAME} STREQUAL ${HSS_HOSTNAME} ) - set(MME_S6A_IS_SERVER 1 ) - endif( ${MME_HOSTNAME} STREQUAL ${HSS_HOSTNAME} ) - - IF( MME_S6A_IS_SERVER ) - set(ConnectPeer "#ConnectPeer" CACHE STRING "HSS connect to MME") - set(DIAMETER_PORT "Port = 3870" CACHE STRING "Diameter bind port, 3868 is always used by default by HSS, even if HSS client") - set(DIAMETER_SEC_PORT "SecPort = 3871" CACHE STRING "Diameter bind sec port") - ELSE( MME_S6A_IS_SERVER ) - set(ConnectPeer "#ConnectPeer" CACHE STRING "HSS act as a server") - set(DIAMETER_PORT "#Port = 3870" CACHE STRING "Diameter bind port") - set(DIAMETER_SEC_PORT "#SecPort = 3871" CACHE STRING "Diameter bind sec port") - ENDIF( MME_S6A_IS_SERVER ) - - execute_process(COMMAND sudo ${OPENAIR_CMAKE}/tools/check_mme_s6a_certificate ${FREEDIAMETER_PATH}/.. ${MME_FQDN} WORKING_DIRECTORY ${OPENAIR_CMAKE}) - - configure_file( - ${OPENAIR_CMAKE}/tools/s6a.conf.in - ${CMAKE_CURRENT_BINARY_DIR}/mme_fd.conf) - configure_file( - ${OPENAIR_CMAKE}/tools/epc.local.enb.conf.in - ${CMAKE_CURRENT_BINARY_DIR}/epc.local.enb.conf) - configure_file( - ${OPENAIR_CMAKE}/tools/epc.conf.in - ${CMAKE_CURRENT_BINARY_DIR}/epc.conf) -ENDIF( EPC_BUILD ) - -# oai_sgw is SGW node implementation -################################ -add_executable(oai_sgw - ${OPENAIR_BIN_DIR}/messages_xml.h - ${OPENAIRCN_DIR}/OAI_SGW/oai_sgw_log.c - ${OPENAIRCN_DIR}/OAI_SGW/oai_sgw.c - ) -target_link_libraries (oai_sgw - -Wl,--start-group - GTPV1U SECU_CN SECU_OSA S6A SGW CN_UTILS LFDS ${MSC_LIB} ${ITTI_LIB} - -Wl,--end-group - pthread m sctp rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIBRARIES} fdproto fdcore - ) - - - # rrh ################################ set(DRIVER2013) @@ -1807,22 +1507,22 @@ Message("-- HW_SOURCE=${HW_SOURCE}") # USIM process ################# #add_executable(usim -# ${OPENAIRCN_DIR}/NAS/TOOLS/usim_data.c -# ${OPENAIRCN_DIR}/NAS/USER/API/USIM/usim_api.c -# ${OPENAIRCN_DIR}/NAS/USER/API/USIM/aka_functions.c -# ${OPENAIRCN_DIR}/NAS/COMMON/UTIL/memory.c -# ${OPENAIRCN_DIR}/NAS/COMMON/UTIL/nas_log.c -# ${OPENAIRCN_DIR}/NAS/COMMON/UTIL/OctetString.c -# ${OPENAIRCN_DIR}/NAS/COMMON/UTIL/TLVEncoder.c +# ${OPENAIR3_DIR}/NAS/TOOLS/usim_data.c +# ${OPENAIR3_DIR}/NAS/USER/API/USIM/usim_api.c +# ${OPENAIR3_DIR}/NAS/USER/API/USIM/aka_functions.c +# ${OPENAIR3_DIR}/NAS/COMMON/UTIL/memory.c +# ${OPENAIR3_DIR}/NAS/COMMON/UTIL/nas_log.c +# ${OPENAIR3_DIR}/NAS/COMMON/UTIL/OctetString.c +# ${OPENAIR3_DIR}/NAS/COMMON/UTIL/TLVEncoder.c # ) #target_link_libraries (usim ${NAS_LIB} UTIL ${ITTI_LIB} LFDS pthread rt nettle crypto m) # ??? ##################### #add_executable(nvram -# ${OPENAIRCN_DIR}/NAS/TOOLS/ue_data.c -# ${OPENAIRCN_DIR}/NAS/COMMON/UTIL/memory.c -# ${OPENAIRCN_DIR}/NAS/COMMON/UTIL/nas_log.c +# ${OPENAIR3_DIR}/NAS/TOOLS/ue_data.c +# ${OPENAIR3_DIR}/NAS/COMMON/UTIL/memory.c +# ${OPENAIR3_DIR}/NAS/COMMON/UTIL/nas_log.c # ) #target_link_libraries (nvram LIB_NAS_UE UTIL ${ITTI_LIB} LFDS pthread rt nettle crypto m) @@ -1849,7 +1549,7 @@ add_executable(oaisim ${OPENAIR2_DIR}/RRC/NAS/nas_config.c ${OPENAIR2_DIR}/RRC/NAS/rb_config.c ${OPENAIR2_DIR}/UTIL/OMG/sumo.c - ${OPENAIRCN_DIR}/NAS/UE/nas_ue_task.c + ${OPENAIR3_DIR}/NAS/UE/nas_ue_task.c ${GTPU_need_ITTI} ${OPENAIR_TARGETS}/COMMON/create_tasks.c ${HW_SOURCE} @@ -1921,6 +1621,20 @@ foreach(myExe dlsim ulsim pbchsim scansim mbmssim pdcchsim pucchsim prachsim syn ) endforeach(myExe) +add_executable(test_epc_generate_scenario + ${OPENAIR3_DIR}/TEST/EPC_TEST/generate_scenario.c + ${OPENAIR2_DIR}/ENB_APP/enb_config.h + ${OPENAIR2_DIR}/COMMON/commonDef.h + ${OPENAIR2_DIR}/COMMON/messages_def.h + ${OPENAIR2_DIR}/COMMON/messages_types.h + ${OPENAIR3_DIR}/S1AP/s1ap_eNB_defs.h + ${OPENAIR_BIN_DIR}/messages_xml.h + ) +target_link_libraries (test_epc_generate_scenario + -Wl,--start-group RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB GTPV1U LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS ${MSC_LIB} L2 -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIBRARIES} + ) + + #unitary tests for Core NEtwork pieces ################################# foreach(myExe s1ap @@ -1934,55 +1648,19 @@ foreach(myExe s1ap aes128_cmac_encrypt secu_knas_encrypt_eia2) add_executable(test_${myExe} - ${OPENAIRCN_DIR}/TEST/test_util.c - ${OPENAIRCN_DIR}/TEST/test_${myExe}.c + ${OPENAIR3_DIR}/TEST/test_util.c + ${OPENAIR3_DIR}/TEST/test_${myExe}.c ) target_link_libraries (test_${myExe} -Wl,--start-group SECU_CN UTIL LFDS -Wl,--end-group m rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIBRARIES} fdproto fdcore ) endforeach(myExe) -add_executable(test_s1c_mme - ${OPENAIRCN_DIR}/TEST/oaisim_mme_test_s1c.c - ${OPENAIRCN_DIR}/TEST/oaisim_mme_test_s1c_scenario.h - ${OPENAIRCN_DIR}/TEST/oaisim_mme_test_s1c_scenario1.c - ${OPENAIRCN_DIR}/TEST/oaisim_mme_test_s1c_scenario.c - ${OPENAIRCN_DIR}/TEST/oaisim_mme_test_s1c_scenario.h - ${OPENAIRCN_DIR}/TEST/oaisim_mme_test_s1c_s1ap.c - ${OPENAIRCN_DIR}/TEST/oaisim_mme_test_s1c_s1ap.h - ${OPENAIR2_DIR}/ENB_APP/enb_config.c - ${OPENAIR2_DIR}/ENB_APP/enb_config.h - ${OPENAIR2_DIR}/COMMON/commonDef.h - ${OPENAIR2_DIR}/COMMON/messages_def.h - ${OPENAIR2_DIR}/COMMON/messages_types.h - ${OPENAIRCN_DIR}/S1AP/s1ap_eNB_defs.h - ${S1AP_DIR}/s1ap_eNB_management_procedures.c - ${OPENAIR_BIN_DIR}/messages_xml.h - ) -target_link_libraries (test_s1c_mme - -Wl,--start-group SECU_CN S1AP_LIB SCTP_CLIENT UTIL LFDS ${ITTI_LIB} -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIBRARIES} fdproto fdcore - ) - - # to be added #../targets/TEST/PDCP/test_pdcp.c #../targets/TEST/PDCP/with_rlc/test_pdcp_rlc.c -# ??? -########################### -#add_executable(oaisim_mme -# ${OPENAIR_BIN_DIR}/messages_xml.h -# ${OPENAIRCN_DIR}/OAISIM_MME/oai_mme_log.c -# ${OPENAIRCN_DIR}/OAISIM_MME/oaisim_mme.c -# ${OPENAIRCN_DIR}/NAS/nas_main.c -#) -#target_link_libraries (oaisim_mme -# -Wl,--start-group -# NAS S1AP_LIB S1AP_EPC GTPV1U GTPV2C SCTP_SERVER UDP_SERVER SECU_CN SECU_OSA S6A S11 SGW MME_APP LFDS MSC ${ITTI_LIB} CN_UTILS HASHTABLE -# -Wl,--end-group -# pthread m sctp rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIBRARIES} fdproto fdcore -#) ################################################## @@ -2112,15 +1790,6 @@ if(OAI_NW_DRIVER_USE_NETLINK) endif() make_driver(ue_ip ${OPENAIR2_DIR}/NETWORK_DRIVER/UE_IP ${ue_ip_src}) -# GTP -######################## -# KVERSION is not used in the code, but required -set(module_cc_opt "${module_cc_opt} -DKVERSION=3") -make_driver(xt_GTPUSP ${OPENAIRCN_DIR}/GTPV1-U/GTPU_SP "") - -# add the install targets -#install (TARGETS Tutorial DESTINATION bin) -#install (FILES "${PROJECT_BIN_DIR}/TutorialConfig.h" DESTINATION include) # OCTAVE tools ############### diff --git a/cmake_targets/at_commands/CMakeLists.txt b/cmake_targets/at_commands/CMakeLists.txt index cfdb6ec2aa..0b8bfed25b 100755 --- a/cmake_targets/at_commands/CMakeLists.txt +++ b/cmake_targets/at_commands/CMakeLists.txt @@ -20,7 +20,7 @@ # Contact Information # OpenAirInterface Admin: openair_admin@eurecom.fr # OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr +# OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr # # Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE # Author: Lionel GAUTHIER @@ -47,11 +47,11 @@ endif( NOT DEFINED OPENAIR_DIR) set(OPENAIR1_DIR ${OPENAIR_DIR}/openair1) set(OPENAIR2_DIR ${OPENAIR_DIR}/openair2) set(OPENAIR3_DIR ${OPENAIR_DIR}/openair3) -set(OPENAIRCN_DIR ${OPENAIR_DIR}/openair-cn) +set(OPENAIR3_DIR ${OPENAIR_DIR}/openair3) 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) +set(OPENAIR_NAS_DIR ${OPENAIR_DIR}/openair3/NAS) set(CMAKE_MODULE_PATH "${OPENAIR_DIR}/cmake_targets/tools/MODULES" "${CMAKE_MODULE_PATH}") @@ -131,20 +131,20 @@ add_boolean_option(NAS_MME False "NAS_UE and NAS_MME are incompa # SECU LIB ################################################################################ set(secu_cn_SRC - ${OPENAIRCN_DIR}/SECU/kdf.c - ${OPENAIRCN_DIR}/SECU/rijndael.c - ${OPENAIRCN_DIR}/SECU/snow3g.c - ${OPENAIRCN_DIR}/SECU/key_nas_deriver.c - ${OPENAIRCN_DIR}/SECU/nas_stream_eea1.c - ${OPENAIRCN_DIR}/SECU/nas_stream_eia1.c - ${OPENAIRCN_DIR}/SECU/nas_stream_eea2.c - ${OPENAIRCN_DIR}/SECU/nas_stream_eia2.c + ${OPENAIR3_DIR}/SECU/kdf.c + ${OPENAIR3_DIR}/SECU/rijndael.c + ${OPENAIR3_DIR}/SECU/snow3g.c + ${OPENAIR3_DIR}/SECU/key_nas_deriver.c + ${OPENAIR3_DIR}/SECU/nas_stream_eea1.c + ${OPENAIR3_DIR}/SECU/nas_stream_eia1.c + ${OPENAIR3_DIR}/SECU/nas_stream_eea2.c + ${OPENAIR3_DIR}/SECU/nas_stream_eia2.c ) add_library(secu_cn ${secu_cn_SRC}) target_include_directories(secu_cn PRIVATE ${OPENAIR_DIR}/common/utils/itti ${OPENAIR_DIR}/openair2/COMMON - ${OPENAIRCN_DIR}/UTILS + ${OPENAIR3_DIR}/UTILS ) ################################################################################ @@ -657,8 +657,8 @@ target_include_directories(ies PRIVATE ################################################################################ include_directories( ${OPENAIR_DIR}/common/utils/msc - ${OPENAIRCN_DIR}/COMMON - ${OPENAIRCN_DIR}/SECU + ${OPENAIR3_DIR}/COMMON + ${OPENAIR3_DIR}/SECU ${OPENAIR_NAS_DIR}/src ${OPENAIR_NAS_DIR}/COMMON ${OPENAIR_NAS_DIR}/COMMON/API/NETWORK diff --git a/cmake_targets/autotests/test.0101/CMakeLists.txt b/cmake_targets/autotests/010101/CMakeLists.txt similarity index 100% rename from cmake_targets/autotests/test.0101/CMakeLists.txt rename to cmake_targets/autotests/010101/CMakeLists.txt diff --git a/cmake_targets/autotests/test.0102/CMakeLists.txt b/cmake_targets/autotests/010102/CMakeLists.txt similarity index 100% rename from cmake_targets/autotests/test.0102/CMakeLists.txt rename to cmake_targets/autotests/010102/CMakeLists.txt diff --git a/cmake_targets/autotests/test.0103/CMakeLists.txt b/cmake_targets/autotests/010103/CMakeLists.txt similarity index 100% rename from cmake_targets/autotests/test.0103/CMakeLists.txt rename to cmake_targets/autotests/010103/CMakeLists.txt diff --git a/cmake_targets/autotests/test.0103/CMakeLists.txt.Rel10 b/cmake_targets/autotests/010103/CMakeLists.txt.Rel10 similarity index 100% rename from cmake_targets/autotests/test.0103/CMakeLists.txt.Rel10 rename to cmake_targets/autotests/010103/CMakeLists.txt.Rel10 diff --git a/cmake_targets/autotests/test.0103/CMakeLists.txt.Rel8 b/cmake_targets/autotests/010103/CMakeLists.txt.Rel8 similarity index 100% rename from cmake_targets/autotests/test.0103/CMakeLists.txt.Rel8 rename to cmake_targets/autotests/010103/CMakeLists.txt.Rel8 diff --git a/cmake_targets/autotests/test.0103/CMakeLists.txt.USRP b/cmake_targets/autotests/010103/CMakeLists.txt.USRP similarity index 100% rename from cmake_targets/autotests/test.0103/CMakeLists.txt.USRP rename to cmake_targets/autotests/010103/CMakeLists.txt.USRP diff --git a/cmake_targets/autotests/test.0104/CMakeLists.txt b/cmake_targets/autotests/010104/CMakeLists.txt similarity index 64% rename from cmake_targets/autotests/test.0104/CMakeLists.txt rename to cmake_targets/autotests/010104/CMakeLists.txt index eab37127a7..36a9eb75da 100644 --- a/cmake_targets/autotests/test.0104/CMakeLists.txt +++ b/cmake_targets/autotests/010104/CMakeLists.txt @@ -8,10 +8,8 @@ set(DEBUG_PHY False) set(MU_RECIEVER Flase) 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) +set(PERFECT_CE False) +set(NAS_UE False) +set(MESSAGE_CHART_GENERATOR False) include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt) diff --git a/cmake_targets/autotests/test.0106/CMakeLists.txt b/cmake_targets/autotests/010106/CMakeLists.txt similarity index 100% rename from cmake_targets/autotests/test.0106/CMakeLists.txt rename to cmake_targets/autotests/010106/CMakeLists.txt diff --git a/cmake_targets/autotests/test.0107/CMakeLists.txt b/cmake_targets/autotests/010107/CMakeLists.txt similarity index 100% rename from cmake_targets/autotests/test.0107/CMakeLists.txt rename to cmake_targets/autotests/010107/CMakeLists.txt diff --git a/cmake_targets/autotests/test.0108/CMakeLists.txt b/cmake_targets/autotests/010108/CMakeLists.txt similarity index 100% rename from cmake_targets/autotests/test.0108/CMakeLists.txt rename to cmake_targets/autotests/010108/CMakeLists.txt diff --git a/cmake_targets/autotests/test.0113/CMakeLists.txt b/cmake_targets/autotests/010113/CMakeLists.txt similarity index 100% rename from cmake_targets/autotests/test.0113/CMakeLists.txt rename to cmake_targets/autotests/010113/CMakeLists.txt diff --git a/cmake_targets/autotests/test.0114/CMakeLists.txt b/cmake_targets/autotests/010114/CMakeLists.txt similarity index 100% rename from cmake_targets/autotests/test.0114/CMakeLists.txt rename to cmake_targets/autotests/010114/CMakeLists.txt diff --git a/cmake_targets/autotests/test.0115/CMakeLists.txt b/cmake_targets/autotests/010115/CMakeLists.txt similarity index 100% rename from cmake_targets/autotests/test.0115/CMakeLists.txt rename to cmake_targets/autotests/010115/CMakeLists.txt diff --git a/cmake_targets/autotests/test.0120/CMakeLists.txt b/cmake_targets/autotests/010120/CMakeLists.txt similarity index 100% rename from cmake_targets/autotests/test.0120/CMakeLists.txt rename to cmake_targets/autotests/010120/CMakeLists.txt diff --git a/cmake_targets/autotests/test.0130/CMakeLists.txt b/cmake_targets/autotests/010130/CMakeLists.txt similarity index 100% rename from cmake_targets/autotests/test.0130/CMakeLists.txt rename to cmake_targets/autotests/010130/CMakeLists.txt diff --git a/cmake_targets/autotests/0200/CMakeLists.template b/cmake_targets/autotests/010200/CMakeLists.template similarity index 100% rename from cmake_targets/autotests/0200/CMakeLists.template rename to cmake_targets/autotests/010200/CMakeLists.template diff --git a/cmake_targets/autotests/0200/CMakeLists.txt b/cmake_targets/autotests/010200/CMakeLists.txt similarity index 100% rename from cmake_targets/autotests/0200/CMakeLists.txt rename to cmake_targets/autotests/010200/CMakeLists.txt diff --git a/cmake_targets/autotests/0201/CMakeLists.template b/cmake_targets/autotests/010201/CMakeLists.template similarity index 100% rename from cmake_targets/autotests/0201/CMakeLists.template rename to cmake_targets/autotests/010201/CMakeLists.template diff --git a/cmake_targets/autotests/0201/CMakeLists.txt b/cmake_targets/autotests/010201/CMakeLists.txt similarity index 100% rename from cmake_targets/autotests/0201/CMakeLists.txt rename to cmake_targets/autotests/010201/CMakeLists.txt diff --git a/cmake_targets/epc_build_oai/CMakeLists.template b/cmake_targets/autotests/010202/CMakeLists.txt similarity index 51% rename from cmake_targets/epc_build_oai/CMakeLists.template rename to cmake_targets/autotests/010202/CMakeLists.txt index da80f6d4d2..e6c4bdfe47 100644 --- a/cmake_targets/epc_build_oai/CMakeLists.template +++ b/cmake_targets/autotests/010202/CMakeLists.txt @@ -2,87 +2,86 @@ cmake_minimum_required(VERSION 2.8) set ( CMAKE_BUILD_TYPE "RelWithDebInfo" ) set ( ADDR_CONF False ) -set ( BYTE_ORDER=LITTLE_ENDIAN ) set ( DEBUG_OMG False ) -set ( DISABLE_ITTI_DETECT_SUB_TASK_ID True ) set ( DISABLE_XER_PRINT False ) -set ( DRIVER2013 False ) +set ( DRIVER2013 True ) set ( EMOS False ) -set ( ENABLE_FXP False ) +set ( ENABLE_FXP True ) set ( ENABLE_ITTI True ) set ( ENABLE_NAS_UE_LOGGING False ) -set ( ENABLE_NEW_MULTICAST False ) -set ( ENABLE_PGM_TRANSPORT False ) +set ( ENABLE_NEW_MULTICAST True ) +set ( ENABLE_PGM_TRANSPORT True ) set ( ENABLE_RAL False ) set ( ENABLE_SECURITY False ) -set ( ENABLE_STANDALONE_EPC True ) -set ( ENABLE_USE_CPU_EXECUTION_TIME 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 False ) -set ( EPC_BUILD True ) -set ( EXMIMO_IOT False ) -set ( FLAG_GTPV1U_KERNEL_THREAD_SOCK_NO_WAIT False) +set ( ENB_MODE True ) +set ( EXMIMO_IOT True ) set ( HARD_RT False ) -set ( JUMBO_FRAME False ) +set ( JUMBO_FRAME True ) set ( LARGE_SCALE False ) -set ( LINK_ENB_PDCP_TO_GTPV1U False ) +set ( LINK_ENB_PDCP_TO_GTPV1U False) set ( LINUX_LIST False ) -set ( LINUX False ) +set ( LINUX True ) set ( LOCALIZATION False ) -set ( LOG_NO_THREAD False ) +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 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 True ) -set ( NAS_DEBUG True ) -set ( NAS_MME True ) -set ( NAS_NETLINK 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 False ) -set ( NO_RRM False ) -set ( OAI_EMU False ) -set ( OAISIM False ) -set ( OAI_NW_DRIVER_TYPE_ETHERNET False ) -set ( OAI_NW_DRIVER_USE_NETLINK False ) -set ( OPENAIR1 False ) -set ( OPENAIR2 False ) +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 False ) -set ( PACKAGE_NAME "EPC" ) +set ( OPENAIR_LTE True ) +set ( PACKAGE_NAME "oaisim" ) set ( PBS_SIM False ) -set ( PC_DSP False ) -set ( PC_TARGET 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 False ) +set ( PHY_ABSTRACTION True ) set ( PHY_CONTEXT False ) set ( PHY_EMUL False ) -set ( PHYSIM False ) -set ( PUCCH 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 ( S1AP_DEBUG_LIST True ) set ( SECU False ) set ( SMBV False ) set ( SPECTRA False ) set ( TEST_OMG False ) -set ( UPDATE_RELEASE_9 True) -set ( UPDATE_RELEASE_10 True) set ( USE_3GPP_ADDR_AS_LINK_ADDR False ) set ( USE_MME "R10" ) set ( USER_MODE True ) set ( XER_PRINT False ) -set ( XFORMS 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) diff --git a/cmake_targets/autotests/010203/CMakeLists.txt b/cmake_targets/autotests/010203/CMakeLists.txt new file mode 100644 index 0000000000..e6c4bdfe47 --- /dev/null +++ b/cmake_targets/autotests/010203/CMakeLists.txt @@ -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) diff --git a/cmake_targets/autotests/010300/CMakeLists.txt b/cmake_targets/autotests/010300/CMakeLists.txt new file mode 100644 index 0000000000..36a9eb75da --- /dev/null +++ b/cmake_targets/autotests/010300/CMakeLists.txt @@ -0,0 +1,15 @@ +cmake_minimum_required(VERSION 2.8) +set(PACKAGE_NAME "unitary_tests_simulators") +set(PHYSIM True) +set(RF_BOARD None) +set(XFORMS False) + +set(DEBUG_PHY False) +set(MU_RECIEVER Flase) +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) diff --git a/cmake_targets/autotests/010301/CMakeLists.txt b/cmake_targets/autotests/010301/CMakeLists.txt new file mode 100644 index 0000000000..36a9eb75da --- /dev/null +++ b/cmake_targets/autotests/010301/CMakeLists.txt @@ -0,0 +1,15 @@ +cmake_minimum_required(VERSION 2.8) +set(PACKAGE_NAME "unitary_tests_simulators") +set(PHYSIM True) +set(RF_BOARD None) +set(XFORMS False) + +set(DEBUG_PHY False) +set(MU_RECIEVER Flase) +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) diff --git a/cmake_targets/autotests/010302/CMakeLists.txt b/cmake_targets/autotests/010302/CMakeLists.txt new file mode 100644 index 0000000000..36a9eb75da --- /dev/null +++ b/cmake_targets/autotests/010302/CMakeLists.txt @@ -0,0 +1,15 @@ +cmake_minimum_required(VERSION 2.8) +set(PACKAGE_NAME "unitary_tests_simulators") +set(PHYSIM True) +set(RF_BOARD None) +set(XFORMS False) + +set(DEBUG_PHY False) +set(MU_RECIEVER Flase) +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) diff --git a/cmake_targets/autotests/010303/CMakeLists.txt b/cmake_targets/autotests/010303/CMakeLists.txt new file mode 100644 index 0000000000..36a9eb75da --- /dev/null +++ b/cmake_targets/autotests/010303/CMakeLists.txt @@ -0,0 +1,15 @@ +cmake_minimum_required(VERSION 2.8) +set(PACKAGE_NAME "unitary_tests_simulators") +set(PHYSIM True) +set(RF_BOARD None) +set(XFORMS False) + +set(DEBUG_PHY False) +set(MU_RECIEVER Flase) +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) diff --git a/cmake_targets/autotests/010304/CMakeLists.txt b/cmake_targets/autotests/010304/CMakeLists.txt new file mode 100644 index 0000000000..36a9eb75da --- /dev/null +++ b/cmake_targets/autotests/010304/CMakeLists.txt @@ -0,0 +1,15 @@ +cmake_minimum_required(VERSION 2.8) +set(PACKAGE_NAME "unitary_tests_simulators") +set(PHYSIM True) +set(RF_BOARD None) +set(XFORMS False) + +set(DEBUG_PHY False) +set(MU_RECIEVER Flase) +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) diff --git a/cmake_targets/autotests/010305/CMakeLists.txt b/cmake_targets/autotests/010305/CMakeLists.txt new file mode 100644 index 0000000000..36a9eb75da --- /dev/null +++ b/cmake_targets/autotests/010305/CMakeLists.txt @@ -0,0 +1,15 @@ +cmake_minimum_required(VERSION 2.8) +set(PACKAGE_NAME "unitary_tests_simulators") +set(PHYSIM True) +set(RF_BOARD None) +set(XFORMS False) + +set(DEBUG_PHY False) +set(MU_RECIEVER Flase) +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) diff --git a/cmake_targets/autotests/010306/CMakeLists.txt b/cmake_targets/autotests/010306/CMakeLists.txt new file mode 100644 index 0000000000..36a9eb75da --- /dev/null +++ b/cmake_targets/autotests/010306/CMakeLists.txt @@ -0,0 +1,15 @@ +cmake_minimum_required(VERSION 2.8) +set(PACKAGE_NAME "unitary_tests_simulators") +set(PHYSIM True) +set(RF_BOARD None) +set(XFORMS False) + +set(DEBUG_PHY False) +set(MU_RECIEVER Flase) +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) diff --git a/cmake_targets/autotests/010307/CMakeLists.txt b/cmake_targets/autotests/010307/CMakeLists.txt new file mode 100644 index 0000000000..36a9eb75da --- /dev/null +++ b/cmake_targets/autotests/010307/CMakeLists.txt @@ -0,0 +1,15 @@ +cmake_minimum_required(VERSION 2.8) +set(PACKAGE_NAME "unitary_tests_simulators") +set(PHYSIM True) +set(RF_BOARD None) +set(XFORMS False) + +set(DEBUG_PHY False) +set(MU_RECIEVER Flase) +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) diff --git a/cmake_targets/autotests/010308/CMakeLists.txt b/cmake_targets/autotests/010308/CMakeLists.txt new file mode 100644 index 0000000000..36a9eb75da --- /dev/null +++ b/cmake_targets/autotests/010308/CMakeLists.txt @@ -0,0 +1,15 @@ +cmake_minimum_required(VERSION 2.8) +set(PACKAGE_NAME "unitary_tests_simulators") +set(PHYSIM True) +set(RF_BOARD None) +set(XFORMS False) + +set(DEBUG_PHY False) +set(MU_RECIEVER Flase) +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) diff --git a/cmake_targets/autotests/010309/CMakeLists.txt b/cmake_targets/autotests/010309/CMakeLists.txt new file mode 100644 index 0000000000..36a9eb75da --- /dev/null +++ b/cmake_targets/autotests/010309/CMakeLists.txt @@ -0,0 +1,15 @@ +cmake_minimum_required(VERSION 2.8) +set(PACKAGE_NAME "unitary_tests_simulators") +set(PHYSIM True) +set(RF_BOARD None) +set(XFORMS False) + +set(DEBUG_PHY False) +set(MU_RECIEVER Flase) +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) diff --git a/cmake_targets/autotests/README.txt b/cmake_targets/autotests/README.txt new file mode 100644 index 0000000000..24f3a71c8d --- /dev/null +++ b/cmake_targets/autotests/README.txt @@ -0,0 +1,50 @@ +OAI Test PLAN +#UNDER CONSTRUCTION. Not correct at the moment + +Obj.# Case# Test# Description + +01 pre-commit test case +01 01 Build OAI +01 01 00 Check Makefiles and +01 01 01 Build oaisim Rel8 +01 01 02 Build oaisim Rel8 + network device driver(nasmesh_fix) +01 01 03 Build lte-softmode Rel8 +01 01 04 Build dlsim Rel8 +01 01 05 Build ulsim Rel8 +01 01 06 Build oaisim Rel10 +01 01 07 Build oaisim Rel8 with cellular RRC for eNB +01 01 08 Build oaisim Rel8 with cellular RRC for UE +01 01 09 "commented test in targets/TEST/OAI/case01.py" +01 01 10 "commented test in targets/TEST/OAI/case01.py" +01 01 11 "commented test in targets/TEST/OAI/case01.py" +01 01 12 "commented test in targets/TEST/OAI/case01.py" +01 01 13 Build network device driver(oai_nw_drv type ethernet) +01 01 14 Build oaisim Rel8 with RRC lite (new cellular+ITTI) + RAL (802.21) +01 01 15 Build oaisim Rel10 with RRC lite (new cellular+ITTI) + RAL (802.21) + +01 02 Run OAI Rel8, and check the operation +01 02 00 Run OAI Rel8, and search for segmentation fault or exit +01 02 01 Run OAI Rel8, and search for execution errors +01 02 02 Run OAI Rel8 in abstraction mode and check that RRC proc is finished completely for the configured number of eNB and UE +01 02 03 Run OAI Rel8 in abstraction mode, send ping from from one eNB to each UE, and check that there is no packet losses +01 02 04 Run OAI Rel8 with full PHY, and check that the RRC proc for eNBsxUEs +01 02 05 Run OAI Rel8 with full PHY in FDD mode, and check that the RRC proc for eNBsxUEs + +01 03 Run OAI Rel10, and check the operation +01 03 00 Run OAI Rel10, and search for segmentation fault or exit +01 03 01 Run OAI Rel10, and search for execution errors +01 03 02 Run OAI Rel10 in abstraction mode, and check the RRC proc for eNBsxUEs +01 03 03 Run OAI Rel10 in full phy mode, and check the RRC proc for eNBsxUEs +01 03 04 Run OAI Rel10 in full phy mode in FDD mode, and check the RRC proc for eNBsxUEs +01 03 05 Run OAI Rel10 with eMBMS enabled, and check the SIB13 and MCCH +01 03 06 Run OAI Rel10 with eMBMS enabled, and check the MTCH +01 03 07 Run OAI Rel10 with eMBMS enabled and FDD mode, and check the MTCH + +02 Functional test case + +03 Non-Functional test case + +04 Failure test case + +05 Performance test case + diff --git a/cmake_targets/autotests/run_compilation_autotests.bash b/cmake_targets/autotests/run_compilation_autotests.bash index f27d1dcca8..afe7aa4873 100755 --- a/cmake_targets/autotests/run_compilation_autotests.bash +++ b/cmake_targets/autotests/run_compilation_autotests.bash @@ -16,11 +16,11 @@ source $OPENAIR_DIR/cmake_targets/tools/test_helper test_compile() { xUnit_start - test_name=$1 + test_name=$1.$2 compile_prog=$2 exec_prog=$3 build_dir=$tdir/$1/build - log_file=$tdir/log/$1.txt + log_file=$tdir/log/test.$1.txt target=$5 echo "Compiling test case $test_name. Log file = $log_file" rm -fr $build_dir @@ -30,7 +30,7 @@ test_compile() { cmake .. rm -f $exec_prog make -j`nproc` $compile_prog - } > $log_file 2>&1 + } >> $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" @@ -51,46 +51,106 @@ fi cd $tdir test_compile \ - test.0101 oaisim_nos1 \ + 010101 oaisim_nos1 \ oaisim_nos1 $tdir/bin/oaisim.r8 rel8.nos1 test_compile \ - test.0102 oaisim_nos1 \ + 010102 oaisim_nos1 \ oaisim_nos1 $tdir/bin/oaisim.r8.nas rel8.nos1.nas -cp $tdir/test.0103/CMakeLists.txt.Rel8 $tdir/test.0103/CMakeLists.txt +cp $tdir/010103/CMakeLists.txt.Rel8 $tdir/010103/CMakeLists.txt test_compile \ - test.0103 lte-softmodem \ + 010103 lte-softmodem \ lte-softmodem $tdir/bin/lte-softmodem.r8.rf Rel8.EXMIMO -cp $tdir/test.0103/CMakeLists.txt.Rel10 $tdir/test.0103/CMakeLists.txt +cp $tdir/010103/CMakeLists.txt.Rel10 $tdir/010103/CMakeLists.txt test_compile \ - test.0103 lte-softmodem \ + 010103 lte-softmodem \ lte-softmodem $tdir/bin/lte-softmodem.r10.rf Rel10.EXMIMO -cp $tdir/test.0103/CMakeLists.txt.USRP $tdir/test.0103/CMakeLists.txt +cp $tdir/010103/CMakeLists.txt.USRP $tdir/010103/CMakeLists.txt test_compile \ - test.0103 lte-softmodem \ + 010103 lte-softmodem \ lte-softmodem $tdir/bin/lte-softmodem.r10.rf Rel10.USRP test_compile \ - test.0104 dlsim \ + 010104 dlsim \ dlsim $tdir/bin/dlsim dlsim.Rel8 test_compile \ - test.0104 ulsim \ + 010104 ulsim \ ulsim $tdir/bin/ulsim ulsim.Rel8 test_compile \ - test.0106 oaisim \ + 010104 pucchsim \ + pucchsim $tdir/bin/pucchsim pucchsim.Rel8 + +test_compile \ + 010104 prachsim \ + prachsim $tdir/bin/prachsim prachsim.Rel8 + +test_compile \ + 010104 pdcchsim \ + pdcchsim $tdir/bin/pdcchsim pdcchsim.Rel8 + +test_compile \ + 010104 pbchsim \ + pbchsim $tdir/bin/pbchim pbchsim.Rel8 + +test_compile \ + 010104 mbmssim \ + mbmssim $tdir/bin/mbmssim mbmssim.Rel8 + +test_compile \ + 010104 test_secu_knas_encrypt_eia1 \ + test_secu_knas_encrypt_eia1 $tdir/bin/test_secu_knas_encrypt_eia1 test_secu_knas_encrypt_eia1.Rel10 + +test_compile \ + 010104 test_secu_kenb \ + test_secu_kenb $tdir/bin/test_secu_kenb test_secu_kenb.Rel10 + +test_compile \ + 010104 test_aes128_ctr_encrypt \ + test_aes128_ctr_encrypt $tdir/bin/test_aes128_ctr_encrypt test_aes128_ctr_encrypt.Rel10 + +test_compile \ + 010104 test_aes128_ctr_decrypt \ + test_aes128_ctr_decrypt $tdir/bin/test_aes128_ctr_decrypt test_aes128_ctr_decrypt.Rel10 + +test_compile \ + 010104 test_secu_knas_encrypt_eea2 \ + test_secu_knas_encrypt_eea2 $tdir/bin/test_secu_knas_encrypt_eea2 test_secu_knas_encrypt_eea2.Rel10 + +test_compile \ + 010104 test_secu_knas \ + test_secu_knas $tdir/bin/test_secu_knas test_secu_knas.Rel10 + +test_compile \ + 010104 test_secu_knas_encrypt_eea1 \ + test_secu_knas_encrypt_eea1 $tdir/bin/test_secu_knas_encrypt_eea1 test_secu_knas_encrypt_eea1.Rel10 + +test_compile \ + 010104 test_kdf \ + test_kdf $tdir/bin/test_kdf test_kdf.Rel10 + +test_compile \ + 010104 test_aes128_cmac_encrypt \ + test_aes128_cmac_encrypt $tdir/bin/test_aes128_cmac_encrypt test_aes128_cmac_encrypt.Rel10 + +test_compile \ + 010104 test_secu_knas_encrypt_eia2 \ + test_secu_knas_encrypt_eia2 $tdir/bin/test_secu_knas_encrypt_eia2 test_secu_knas_encrypt_eia2.Rel10 + +test_compile \ + 010106 oaisim \ oaisim $tdir/bin/oaisim.r8.itti Rel8.itti test_compile \ - test.0107 oaisim_nos1 \ + 010107 oaisim_nos1 \ oaisim_nos1 $tdir/bin/oaisim.r10 Rel10.nos1 test_compile \ - test.0108 oaisim \ + 010108 oaisim \ oaisim $tdir/bin/oaisim.r10.itti rel10.itti #test_compile \ LG: RAL REMOVED @@ -102,11 +162,11 @@ test_compile \ # oaisim $tdir/bin/oaisim.r10.itti.ral rel10.itti.ral test_compile \ - test.0120 nasmesh \ + 010120 nasmesh \ CMakeFiles/nasmesh/nasmesh.ko $tdir/bin/nasmesh.ko test_compile \ - test.0130 rrh_gw \ + 010130 rrh_gw \ rrh_gw $tdir/bin/rrh_gw # write the test results into a file diff --git a/cmake_targets/autotests/run_exec_autotests.bash b/cmake_targets/autotests/run_exec_autotests.bash index 6731bcc12d..9a2a86ed41 100755 --- a/cmake_targets/autotests/run_exec_autotests.bash +++ b/cmake_targets/autotests/run_exec_autotests.bash @@ -1,14 +1,15 @@ #!/bin/bash -if [ -s $OPENAIR_DIR/cmake_targets/tools/test_helper ] ; then - source $OPENAIR_DIR/cmake_targets/tools/test_helper +if [ -s $OPENAIR_DIR/cmake_targets/tools/build_helper ] ; then + source $OPENAIR_DIR/cmake_targets/tools/build_helper else echo "Error: no file in the file tree: is OPENAIR_DIR variable set?" exit 1 fi +source $OPENAIR_DIR/cmake_targets/tools/test_helper -SUDO="sudo -E " +#SUDO="sudo -E " tdir=$OPENAIR_DIR/cmake_targets/autotests mkdir -p $tdir/bin $tdir/log results_file="$tdir/log/execution_autotests.xml" @@ -29,11 +30,12 @@ cd $tdir #\param $6 -> name of executable #\param $7 -> arguments for running the program #\param $8 -> search expression -#\param $9 -> number of runs +#\param $9 -> search expression which should NOT be found (for ex. segmentation fault) +#\param $10 -> number of runs test_compile_and_run() { xUnit_start - test_case_name=$1 + test_case_name=$1.$2 log_dir=$tdir/log log_file=$tdir/log/test.$1.txt compile_prog=$2 @@ -41,8 +43,9 @@ test_compile_and_run() { pre_exec_file=$4 pre_exec_args=$5 exec_args=$7 - search_expr=$8 - nruns=$9 + search_expr_array=("${!8}") + search_expr_negative=$9 + nruns=${10} build_dir=$tdir/$1/build exec_file=$build_dir/$6 @@ -54,13 +57,17 @@ test_compile_and_run() { 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 "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 "nruns = $nruns" + + + echo "" > $log_file cd $build_dir { @@ -78,18 +85,57 @@ test_compile_and_run() { echo "-----------------------------------------------------------------------------" >> $log_file 2>&1 echo "" >> $log_file 2>&1 + if [ -n "$pre_exec_file" ]; then + { source $pre_exec_file $pre_exec_args; } >> $log_file 2>&1 + fi + + { $exec_file $exec_args ;} > $temp_exec_log 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 "" >> $log_file 2>&1 + + result=1 + for search_expr in "${search_expr_array[@]}" + do + + search_result=`grep -E "$search_expr" $temp_exec_log` - search_result=`grep "$search_expr" $temp_exec_log` + #echo "search_expr = $search_expr" + #echo "search_result = $search_result" - if [ -z "$search_result" ]; then + if [ -z "$search_result" ]; then + let "result = result & 0" + else + let "result = result & 1" + fi + done + + #echo "result = $result" + + test_case_result="" + if [ "$result" -eq "0" ]; then + test_case_result="FAIL" + fi + + if [ "$result" -eq "1" ]; then + test_case_result="PASS" + fi + + #If we find a negative search result then there is crash of program and test case is failed even if above condition is true + + search_result=`grep -iE "$search_expr_negative" $temp_exec_log` + if [ -n "$search_result" ]; then + test_case_result="FAIL" + fi + + if [ "$test_case_result" == "FAIL" ]; then + echo_error "execution $test_case_name FAIL $run_index" xUnit_fail "execution" "$test_case_name" "FAIL" "$run_index" - else - xUnit_success "execution" "$test_case_name" "PASS" "$run_index" + fi + + if [ "$test_case_result" == "PASS" ]; then + echo_success "execution $test_case_name PASS $run_index" + xUnit_success "execution" "$test_case_name" "PASS" "$run_index" fi # End of for loop @@ -130,12 +176,57 @@ fi #$5 -> arguments of pre-executable #$6 -> name of executable #$7 -> arguments for running the program -#$8 -> search expression -#$9 -> number of runs +#$8 -> search expression ARRAY which needs to be found +#$9 -> search expression which should NOT be found (for ex. segmentation fault) +#$10 -> number of runs -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 +#oaisim tests +search_array=("Received RRCConnectionReconfigurationComplete from UE 0") +test_compile_and_run 010200 "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 -n100" "search_array[@]" "segmentation fault|assertion|exiting|fatal" 3 + +search_array=("Received RRCConnectionReconfigurationComplete from UE 0") +test_compile_and_run 010201 "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 -n100" "search_array[@]" "segmentation fault|assertion|exiting|fatal" 3 + +search_array=("Received RRCConnectionReconfigurationComplete from UE 0" "Received RRCConnectionReconfigurationComplete from UE 1" "Received RRCConnectionReconfigurationComplete from UE 2") +test_compile_and_run 010202 "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 -u3 -n100" "search_array[@]" "segmentation fault|assertion|exiting|fatal" 3 + +search_array=("Received RRCConnectionReconfigurationComplete from UE 0" "Received RRCConnectionReconfigurationComplete from UE 1" "Received RRCConnectionReconfigurationComplete from UE 2") +test_compile_and_run 010203 "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 -u3 -a -n100" "search_array[@]" "segmentation fault|assertion|exiting|fatal" 3 + +#PHY unitary simulations for secuirity tests +search_array=("finished with 0 errors") +test_compile_and_run 010300 "test_aes128_cmac_encrypt" "" "" "" "test_aes128_cmac_encrypt" " --verbose" "search_array[@]" "segmentation fault|assertion|exiting|fatal" 3 + +search_array=("finished with 0 errors") +test_compile_and_run 010301 "test_aes128_ctr_decrypt" "" "" "" "test_aes128_ctr_decrypt" " --verbose" "search_array[@]" "segmentation fault|assertion|exiting|fatal" 3 + +search_array=("finished with 0 errors") +test_compile_and_run 010302 "test_aes128_ctr_encrypt" "" "" "" "test_aes128_ctr_encrypt" " --verbose" "search_array[@]" "segmentation fault|assertion|exiting|fatal" 3 + +search_array=("finished with 0 errors") +test_compile_and_run 010303 "test_secu_kenb" "" "" "" "test_secu_kenb" " --verbose" "search_array[@]" "segmentation fault|assertion|exiting|fatal" 3 + +search_array=("finished with 0 errors") +test_compile_and_run 010304 "test_secu_knas" "" "" "" "test_secu_knas" " --verbose" "search_array[@]" "segmentation fault|assertion|exiting|fatal" 3 + +search_array=("finished with 0 errors") +test_compile_and_run 010305 "test_secu_knas_encrypt_eea1" "" "" "" "test_secu_knas_encrypt_eea1" " --verbose" "search_array[@]" "segmentation fault|assertion|exiting|fatal" 3 + +search_array=("finished with 0 errors") +test_compile_and_run 010306 "test_secu_knas_encrypt_eea2" "" "" "" "test_secu_knas_encrypt_eea2" " --verbose" "search_array[@]" "segmentation fault|assertion|exiting|fatal" 3 + +search_array=("finished with 0 errors") +test_compile_and_run 010307 "test_secu_knas_encrypt_eia1" "" "" "" "test_secu_knas_encrypt_eia1" " --verbose" "search_array[@]" "segmentation fault|assertion|exiting|fatal" 3 + +search_array=("finished with 0 errors") +test_compile_and_run 010308 "test_secu_knas_encrypt_eia2" "" "" "" "test_secu_knas_encrypt_eia2" " --verbose" "search_array[@]" "segmentation fault|assertion|exiting|fataln" 3 + +search_array=("finished with 0 errors") +test_compile_and_run 010309 "test_kdf" "" "" "" "test_kdf" " --verbose" "search_array[@]" "segmentation fault|assertion|exiting|fatal" 3 + +#TODO: Add test cases for 10,20 MHz +#TODO: Test and compile seperately for Rel8/Rel10 -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 diff --git a/cmake_targets/build_oai b/cmake_targets/build_oai index c1974f90e8..475100bed8 100755 --- a/cmake_targets/build_oai +++ b/cmake_targets/build_oai @@ -1,30 +1,32 @@ #!/bin/bash ################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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) anylater version. +# Copyright (c) 2015, EURECOM (www.eurecom.fr) +# All rights reserved. # +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: # -# 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. +# 1. Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. # -# 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 . +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -# 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 +# The views and conclusions contained in the software and documentation are those +# of the authors and should not be interpreted as representing official policies, +# either expressed or implied, of the FreeBSD Project. # ################################################################################ # file build_oai @@ -45,8 +47,10 @@ PRINT_STATS="False" VCD_TIMING="False" REL="Rel10" HW="EXMIMO" +NOS1=0 EPC=0 VERBOSE_COMPILE=0 +CFLAGS_PROCESSOR_USER="" function print_help() { echo_info ' @@ -103,6 +107,9 @@ Options Compiles oaisim or lte-softmodem without S1 interface, using direct link to IP instead --verbose-compile Shows detailed compilation instructions in makefile +--cflags_processor + Manually Add CFLAGS of processor if they are not detected correctly by script. Only add these flags if you know your processor supports them. Example flags: -msse3 -msse4.1 -msse4.2 -mavx2 + 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 @@ -209,6 +216,10 @@ function main() { VERBOSE_COMPILE=1 echo_info "Will compile with verbose instructions" shift;; + --cflags_processor) + CFLAGS_PROCESSOR_USER=$2 + echo_info "setting CPU FLAGS from USER to: $CFLAGS_PROCESSOR_USER" + shift 2;; -h | --help) print_help exit 1;; @@ -252,8 +263,6 @@ function main() { if [ "$INSTALL_EXTERNAL" = "1" ] ; then echo_info "Installing packages" check_install_oai_software - echo_info "Making X.509 certificates" - make_certs eur if [ "$HW" == "OAI_USRP" ] ; then echo_info "installing packages for USRP support" check_install_usrp_uhd_driver @@ -302,6 +311,7 @@ function main() { if [ "$NOS1" = "1" ] ; then cat $DIR/$lte_build_dir/CMakeLists.template >> $cmake_file fi + echo "set ( CFLAGS_PROCESSOR_USER \"$CFLAGS_PROCESSOR_USER\" )" >> $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 @@ -312,7 +322,7 @@ function main() { cmake .. fi - if [ "$eNB" = "1" ] ; then + if [ "$eNB" = "1" -o "$UE" = "1" ] ; then echo_info "Compiling $lte_exec" compilations \ $lte_build_dir $lte_exec \ @@ -329,7 +339,7 @@ function main() { fi fi - if [ "$UE" = 1 ] ; then + if [ "$UE" = 1 -a "$NOS1" = "0" ] ; then # ue_ip driver compilation echo_info "Compiling UE specific part" compilations \ @@ -430,6 +440,7 @@ function main() { 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 ( CFLAGS_PROCESSOR_USER \"$CFLAGS_PROCESSOR_USER\" )" >> $cmake_file echo "set ( XFORMS $XFORMS )" >> $cmake_file echo "set ( PRINT_STATS $PRINT_STATS )" >> $cmake_file echo "set ( RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file @@ -564,6 +575,8 @@ function main() { ##################### if [ "$OAI_TEST" = "1" ]; then echo_info "10. Running OAI pre commit tests (pre-ci) ..." + rm -fr $OPENAIR_DIR/cmake_targets/autotests/log + mkdir -p $OPENAIR_DIR/cmake_targets/autotests/log $OPENAIR_DIR/cmake_targets/autotests/run_compilation_autotests.bash $OPENAIR_DIR/cmake_targets/autotests/run_exec_autotests.bash else diff --git a/cmake_targets/epc_test/CMakeLists.template b/cmake_targets/epc_test/CMakeLists.template new file mode 100644 index 0000000000..25d94ea852 --- /dev/null +++ b/cmake_targets/epc_test/CMakeLists.template @@ -0,0 +1,77 @@ +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 True ) +set ( ENABLE_NEW_MULTICAST True ) +set ( ENABLE_PGM_TRANSPORT True ) +set ( ENABLE_SECURITY True ) +set ( ENABLE_STANDALONE_EPC False) +set ( ENABLE_USE_CPU_EXECUTION_TIME True ) +set ( ENABLE_USE_MME True ) +set ( ENABLE_USE_RAW_SOCKET_FOR_SGI True) +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 True) +set ( LINUX_LIST False ) +set ( LINUX True ) +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 ( MIH_C_MEDIEVAL_EXTENSIONS False ) +set ( MSG_PRINT False ) +set ( MU_RECEIVER False ) +set ( NAS_ADDRESS_FIX False ) +set ( NAS_BUILT_IN_UE True) +set ( NAS_MME False ) +set ( NAS_UE True ) +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 ( OAISIM False ) +set ( OAI_NW_DRIVER_TYPE_ETHERNET False ) +set ( OAI_NW_DRIVER_USE_NETLINK True ) +set ( OPENAIR1 False ) +set ( OPENAIR2 False ) +set ( OPENAIR_LTE F ) +set ( PACKAGE_NAME "epc_test" ) +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 ( RLC_STOP_ON_LOST_PDU False ) +set ( RRC_ASN1_VERSION "Rel10" ) +set ( RRC_DEFAULT_RAB_IS_AM True) +set ( RRC_MSG_PRINT False ) +set ( RTAI False ) +set ( SECU False ) +set ( SMBV False ) +set ( TEST_OMG False ) +set ( USE_MME "R10" ) +set ( USER_MODE True ) +set ( XER_PRINT False ) diff --git a/cmake_targets/hss_build/CMakeLists.txt b/cmake_targets/hss_build/CMakeLists.txt deleted file mode 100755 index ae4655be21..0000000000 --- a/cmake_targets/hss_build/CMakeLists.txt +++ /dev/null @@ -1,326 +0,0 @@ -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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 . -# -# 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 -# Author: Lionel GAUTHIER -############################################################################### -cmake_minimum_required(VERSION 2.8) -set(CMAKE_VERBOSE_MAKEFILE ON) - - -project(HSS) - - -ENABLE_LANGUAGE(C) -#Sends the -std=c99 flag to the gcc compiler -#add_definitions(-std=c99) - -ADD_DEFINITIONS(-D_GNU_SOURCE) - -if( NOT DEFINED OPENAIR_DIR) - message(SEND_ERROR "OPENAIR_DIR not set: ${OPENAIR_DIR}") -endif( NOT DEFINED OPENAIR_DIR) - -set(OPENAIR1_DIR ${OPENAIR_DIR}/openair1) -set(OPENAIR2_DIR ${OPENAIR_DIR}/openair2) -set(OPENAIR3_DIR ${OPENAIR_DIR}/openair3) -set(OPENAIRCN_DIR ${OPENAIR_DIR}/openair-cn) -set(OPENAIR_TARGETS ${OPENAIR_DIR}/targets) -set(OPENAIR_CMAKE_SCRIPTS ${OPENAIR_DIR}/cmake_targets/tools) -set(OPENAIRHSS_DIR ${OPENAIRCN_DIR}/OPENAIRHSS) -set(OPENAIR_BIN_DIR ${OPENAIR_TARGETS}/bin) - - -set(CMAKE_MODULE_PATH "${OPENAIR_DIR}/cmake_targets/tools/MODULES" "${CMAKE_MODULE_PATH}") - -macro(add_option name val helpstr) - if(DEFINED ${name}) - set(value ${${name}}) - else(DEFINED ${name}) - set(value ${val}) - endif() - set(${name} ${value} CACHE STRING "${helpstr}") - add_definitions("-D${name}=${value}") -endmacro(add_option) - - -# compilation flags -# added CMAKER conditional compilation to not bother legacy building system -############################################# -if(NOT CMAKE_BUILD_TYPE) -set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel." FORCE) -endif() -set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS Debug Release RelWithDebInfo MinSizeRel) - -# -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse4.2 -std=gnu99 -Wall -Wstrict-prototypes -fno-strict-aliasing -rdynamic -funroll-loops -Wno-packed-bitfield-compat -DCMAKER") -set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -ggdb -DMALLOC_CHECK_=3") -set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -ggdb -DMALLOC_CHECK_=3 -O2") - - -INCLUDE(FindMySQL) -IF( NOT MySQL_FOUND ) - MESSAGE( SEND_ERROR "MySQL Client is required" ) -ENDIF( NOT MySQL_FOUND ) - -INCLUDE(FindNettle) -IF( NOT NETTLE_FOUND ) - MESSAGE( SEND_ERROR "Nettle is required" ) -ENDIF( NOT NETTLE_FOUND ) - - - -INCLUDE(FindFreeDiameter) -IF( NOT FREEDIAMETER_FOUND ) - MESSAGE( SEND_ERROR "FreeDiameter is required (use OAI installer)" ) -ENDIF( NOT FREEDIAMETER_FOUND ) -IF( NOT FREEDIAMETER_HSS_S6A_ENABLED ) - MESSAGE( SEND_ERROR "FreeDiameter is not enabled for OPENAIRHSS" ) -ENDIF( NOT FREEDIAMETER_HSS_S6A_ENABLED ) -add_definitions("-DFREEDIAMETER_VERSION=${FREEDIAMETER_VERSION}") - -find_package(BISON REQUIRED) -find_package(FLEX REQUIRED) - -set(CMAKE_THREAD_PREFER_PTHREAD TRUE) -find_package(Threads REQUIRED) - -#find_package(Subversion) -#if(SUBVERSION_FOUND) -# Subversion_WC_INFO(${OPENAIR_DIR} openair) -# set (PACKAGE_VERSION "${openair_WC_REVISION} - ${openair_WC_LAST_CHANGED_DATE}") -# Subversion_WC_LOG(${OPENAIR_DIR} openair) -# message("Last changed log is ${openair_LAST_CHANGED_LOG}") -# add_definitions("-DPACKAGE_VERSION=\"${PACKAGE_VERSION}\"") -#else() -set (PACKAGE_VERSION "No svn information") -#endif() - -add_definitions("-DPACKAGE_NAME=\"OPENAIRHSS\"") - - -################################################################################ -# ACCESS RESTRICTION LIB -################################################################################ -set(ar_SRC - ${OPENAIRHSS_DIR}/access_restriction/access_restriction.c -) -set(ar_HDR - ${OPENAIRHSS_DIR}/access_restriction/access_restriction.h - ${OPENAIRHSS_DIR}/utils/conversion.h -) - -add_library(hss_access_restriction ${ar_SRC} ${ar_HDR}) -target_include_directories(hss_access_restriction PRIVATE ${OPENAIRHSS_DIR}/utils) - - -################################################################################ -# AUC LIB -################################################################################ -set(auc_SRC - ${OPENAIRHSS_DIR}/auc/fx.c - ${OPENAIRHSS_DIR}/auc/kdf.c - ${OPENAIRHSS_DIR}/auc/random.c - ${OPENAIRHSS_DIR}/auc/rijndael.c - ${OPENAIRHSS_DIR}/auc/sequence_number.c -) -set(auc_HDR - ${OPENAIRHSS_DIR}/auc/auc.h -) - -add_library(hss_auc ${auc_SRC} ${auc_HDR}) - - -################################################################################ -# DB LIB -################################################################################ -set(db_SRC - ${OPENAIRHSS_DIR}/db/db_connector.c - ${OPENAIRHSS_DIR}/db/db_epc_equipment.c - ${OPENAIRHSS_DIR}/db/db_subscription_data.c -) -set(db_HDR - ${OPENAIRHSS_DIR}/db/db_proto.h - ${OPENAIRHSS_DIR}/utils/hss_config.h -) - -add_library(hss_db ${db_SRC} ${db_HDR}) -target_include_directories(hss_db PRIVATE ${OPENAIRHSS_DIR}/utils) - - -################################################################################ -# S6A LIB -################################################################################ -set(s6a_SRC - ${OPENAIRHSS_DIR}/s6a/s6a_auth_info.c - ${OPENAIRHSS_DIR}/s6a/s6a_common.c - ${OPENAIRHSS_DIR}/s6a/s6a_error.c - ${OPENAIRHSS_DIR}/s6a/s6a_fd.c - ${OPENAIRHSS_DIR}/s6a/s6a_in_addr.c - ${OPENAIRHSS_DIR}/s6a/s6a_peers.c - ${OPENAIRHSS_DIR}/s6a/s6a_purge_ue.c - ${OPENAIRHSS_DIR}/s6a/s6a_subscription_data.c - ${OPENAIRHSS_DIR}/s6a/s6a_supported_features.c - ${OPENAIRHSS_DIR}/s6a/s6a_up_loc.c -) -set(s6a_HDR - ${OPENAIRHSS_DIR}/s6a/s6a_proto.h - ${OPENAIRHSS_DIR}/db/db_proto.h - ${OPENAIRHSS_DIR}/utils/hss_config.h - ${OPENAIRHSS_DIR}/auc/auc.h - ${OPENAIRHSS_DIR}/access_restriction/access_restriction.h -) - -add_library(hss_s6a ${s6a_SRC} ${s6a_HDR}) -target_include_directories(hss_s6a PRIVATE ${OPENAIRHSS_DIR}/utils) -target_include_directories(hss_s6a PRIVATE ${OPENAIRHSS_DIR}/db) -target_include_directories(hss_s6a PRIVATE ${OPENAIRHSS_DIR}/auc) -target_include_directories(hss_s6a PRIVATE ${OPENAIRHSS_DIR}/access_restriction) -target_include_directories(hss_s6a PRIVATE ${FREEDIAMETER_INCLUDE_DIR}) - -################################################################################ -# UTILS LIB -################################################################################ -# Create target for the parser - ADD_CUSTOM_TARGET(HSSParser echo "Creating hss_parser.c") - -set(UTILS_GENERATED_DIR ${OPENAIR_BIN_DIR}) - -# Create custom command for flex/lex (note the outputs) - ADD_CUSTOM_COMMAND( - SOURCE ${OPENAIRHSS_DIR}/utils/hss_scanner.l - COMMAND ${FLEX_EXECUTABLE} - ARGS -o${UTILS_GENERATED_DIR}/hss_scanner.c ${OPENAIRHSS_DIR}/utils/hss_scanner.l - TARGET HSSParser - OUTPUTS ${UTILS_GENERATED_DIR}/hss_scanner.c) - -# Create custom command for bison/yacc (note the DEPENDS) - ADD_CUSTOM_COMMAND( - SOURCE ${OPENAIRHSS_DIR}/utils/hss_parser.y - COMMAND ${BISON_EXECUTABLE} - ARGS -y ${OPENAIRHSS_DIR}/utils/hss_parser.y - -o ${UTILS_GENERATED_DIR}/hss_parser.c - TARGET HSSParser - DEPENDS ${UTILS_GENERATED_DIR}/hss_scanner.c - OUTPUTS ${UTILS_GENERATED_DIR}/hss_parser.c) - -set(utils_SRC - ${UTILS_GENERATED_DIR}/hss_scanner.c - ${UTILS_GENERATED_DIR}/hss_parser.c - ${OPENAIRHSS_DIR}/utils/conversion.c - ${OPENAIRHSS_DIR}/utils/hss_config.c -) -set(utils_HDR - ${UTILS_GENERATED_DIR}/hss_parser.h - ${UTILS_GENERATED_DIR}/hss_scanner.h - ${OPENAIRHSS_DIR}/utils/conversion.h - ${OPENAIRHSS_DIR}/utils/hss_config.h - ${OPENAIRHSS_DIR}/utils/queue.h -) -# Since parser.c does not exists yet when cmake is run, mark -# it as generated -SET_SOURCE_FILES_PROPERTIES(${UTILS_GENERATED_DIR}/hss_parser.c GENERATED) -SET_SOURCE_FILES_PROPERTIES(${UTILS_GENERATED_DIR}/hss_scanner.c GENERATED) -SET_SOURCE_FILES_PROPERTIES(${UTILS_GENERATED_DIR}/hss_parser.h GENERATED) -SET_SOURCE_FILES_PROPERTIES(${UTILS_GENERATED_DIR}/hss_scanner.h GENERATED) -SET_SOURCE_FILES_PROPERTIES(${OPENAIRHSS_DIR}/utils/hss_config.c DEPENDS ${UTILS_GENERATED_DIR}/hss_parser.c) -add_library(hss_utils ${utils_SRC} ${utils_HDR}) - -################################################################################ -# EXECUTABLE openair-hss -################################################################################ -include_directories( ${UTILS_GENERATED_DIR} ${OPENAIRHSS_DIR}/utils ${OPENAIRHSS_DIR}/s6a ${OPENAIRHSS_DIR}/db ${OPENAIRHSS_DIR}/auc ${OPENAIRHSS_DIR}/access_restriction) -ADD_EXECUTABLE(openair-hss ${OPENAIRHSS_DIR}/hss_main.c) -target_link_libraries (openair-hss - -Wl,-whole-archive - hss_access_restriction - hss_auc - hss_db - hss_s6a - hss_utils - -Wl,-no-whole-archive - ${MySQL_LIBRARY} - ${NETTLE_LIBRARIES} - ${FREEDIAMETER_LIBRARIES} - ${CMAKE_THREAD_LIBS_INIT} ) - -# Default parameters -# Does not work on simple install (fqdn in /etc/hosts 127.0.1.1) -cmake_host_system_information(RESULT SITE_HSS_FQDN QUERY FQDN) -add_option(HSS_FQDN ${SITE_HSS_FQDN} "HSS Fully qualified domain name") -IF( NOT DEFINED REALM ) - string(FIND ${HSS_FQDN} "." pos) - math(EXPR pos1 "${pos}+1") - string(SUBSTRING ${HSS_FQDN} ${pos1} -1 realm_string) - message("REALM extracted from HSS FQDN is ${realm_string}") - set(REALM ${realm_string} CACHE STRING "HSS realm") -ENDIF( NOT DEFINED REALM ) -set(MYSQL_server "127.0.0.1" CACHE STRING "Database server IP address") -set(MYSQL_admin root CACHE STRING "Database admin login") -set(MYSQL_admin_pass linux CACHE STRING "Database admin password") -set(MYSQL_user hssadmin CACHE STRING "Database username login") -set(MYSQL_pass admin CACHE STRING "Database username password") -set(MYSQL_db oai_db CACHE STRING "Database name") -set(TRANSPORT_option "#No_TCP" CACHE STRING "No_TCP or No_SCTP or comment string, FreeDiameter config option") -set(TRANSPORT_PREFER_TCP_option "#Prefer_TCP" CACHE STRING "Prefer_TCP or comment string, FreeDiameter config option") -set(AppServThreads 2 CACHE STRING "FreeDiameter AppServThreads config option") -set(OPERATOR_key "" CACHE STRING "LTE operator clear text key (hex bytes) example 11111111111111111111111111111111") -set(RANDOM_boolean "true" CACHE STRING "If false, random function returns always 0, else random as usual.") -set(REMOTE_PEER_WHITELIST "*.${REALM}" CACHE STRING "Remote peer whitelist (separated by spaces), for freediameter acl.conf config file") -IF( FD_SERVER_IP_BIND_LIST ) - set(ListenOn "ListenOn = \"${FD_SERVER_IP_BIND_LIST}\"" CACHE STRING "FreeDiameter server IP bind addresses list") -ELSE( FD_SERVER_IP_BIND_LIST ) - set(ListenOn "#ListenOn = \"\"" CACHE STRING "FreeDiameter server IP bind addresses list") -ENDIF( FD_SERVER_IP_BIND_LIST ) - -IF( HSS_CONNECT_TO_MME ) - set(ConnectPeer "ConnectPeer" CACHE STRING "HSS connect to MME") - set(DIAMETER_PORT "#Port = 3868" CACHE STRING "Diameter bind port") - set(DIAMETER_SEC_PORT "#SecPort = 3869" CACHE STRING "Diameter bind sec port") -ELSE( HSS_CONNECT_TO_MME ) - set(ConnectPeer "#ConnectPeer" CACHE STRING "HSS act as a server") - set(DIAMETER_PORT "Port = 3868" CACHE STRING "Diameter bind port") - set(DIAMETER_SEC_PORT "SecPort = 3869" CACHE STRING "Diameter bind sec port") -ENDIF( HSS_CONNECT_TO_MME ) - - -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/hss_fd.conf.in ${CMAKE_CURRENT_BINARY_DIR}/hss_fd.conf) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/hss.conf.in ${CMAKE_CURRENT_BINARY_DIR}/hss.conf) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/acl.conf.in ${CMAKE_CURRENT_BINARY_DIR}/acl.conf) - -execute_process(COMMAND sudo ${OPENAIR_CMAKE_SCRIPTS}/check_hss_s6a_certificate ${FREEDIAMETER_PATH}/.. ${HSS_FQDN} WORKING_DIRECTORY ${OPENAIR_CMAKE_SCRIPTS} TIMEOUT 3) - -# This does not overwrite database if it exist -execute_process(COMMAND ${OPENAIR_CMAKE_SCRIPTS}/create_hss_database - ${MYSQL_admin} ${MYSQL_admin_pass} ${MYSQL_user} ${MYSQL_pass} ${MYSQL_db} - WORKING_DIRECTORY ${OPENAIR_CMAKE_SCRIPTS} - ERROR_VARIABLE ERROR_DB - TIMEOUT 5) - -IF( ERROR_DB ) - MESSAGE( SEND_ERROR "Database setup failed: ${ERROR_DB}" ) -ENDIF( ERROR_DB ) - -install (TARGETS openair-hss DESTINATION ${OPENAIR_TARGETS}/bin) - diff --git a/cmake_targets/hss_build/acl.conf.in b/cmake_targets/hss_build/acl.conf.in deleted file mode 100644 index 7702690f78..0000000000 --- a/cmake_targets/hss_build/acl.conf.in +++ /dev/null @@ -1,19 +0,0 @@ -# Configuration file for the peer whitelist extension. -# -# This extension is meant to allow connection from remote peers, without actively -# maintaining this connection ourselves (as it would be the case by declaring the -# peer in a ConnectPeer directive). -# The format of this file is very simple. It contains a list of peer names -# separated by spaces or newlines. -# -# The peer name must be a fqdn. We allow also a special "*" character as the -# first label of the fqdn, to allow all fqdn with the same domain name. -# Example: *.example.net will allow host1.example.net and host2.example.net -# -# At the beginning of a line, the following flags are allowed (case sensitive) -- either or both can appear: -# ALLOW_OLD_TLS : we accept unprotected CER/CEA exchange with Inband-Security-Id = TLS -# ALLOW_IPSEC : we accept implicitly protected connection with with peer (Inband-Security-Id = IPSec) -# It is specified for example as: -# ALLOW_IPSEC vpn.example.net vpn2.example.net *.vpn.example.net - -ALLOW_OLD_TLS @REMOTE_PEER_WHITELIST@ diff --git a/cmake_targets/hss_build/hss.conf.in b/cmake_targets/hss_build/hss.conf.in deleted file mode 100644 index dd34a117e6..0000000000 --- a/cmake_targets/hss_build/hss.conf.in +++ /dev/null @@ -1,13 +0,0 @@ -## MySQL mandatory options -MYSQL_server = "@MYSQL_server@"; -MYSQL_user = "@MYSQL_user@"; -MYSQL_pass = "@MYSQL_pass@"; -MYSQL_db = "@MYSQL_db@"; - -## HSS options -OPERATOR_key = "@OPERATOR_key@"; - -RANDOM = "@RANDOM_boolean@"; - -## Freediameter options -FD_conf = "@FREEDIAMETER_PATH@/../etc/freeDiameter/hss_fd.conf"; diff --git a/cmake_targets/hss_build/hss_fd.conf.in b/cmake_targets/hss_build/hss_fd.conf.in deleted file mode 100644 index 5d59919c35..0000000000 --- a/cmake_targets/hss_build/hss_fd.conf.in +++ /dev/null @@ -1,106 +0,0 @@ -# -------- Local --------- -# The first parameter in this section is Identity, which will be used to -# identify this peer in the Diameter network. The Diameter protocol mandates -# that the Identity used is a valid FQDN for the peer. This parameter can be -# omitted, in that case the framework will attempt to use system default value -# (as returned by hostname --fqdn). -Identity = "@HSS_FQDN@"; - -# In Diameter, all peers also belong to a Realm. If the realm is not specified, -# the framework uses the part of the Identity after the first dot. -Realm = "@REALM@"; - - -# This parameter is mandatory, even if it is possible to disable TLS for peers -# connections. A valid certificate for this Diameter Identity is expected. -TLS_Cred = "@FREEDIAMETER_PATH@/../etc/freeDiameter/hss.cert.pem", "@FREEDIAMETER_PATH@/../etc/freeDiameter/hss.key.pem"; -TLS_CA = "@FREEDIAMETER_PATH@/../etc/freeDiameter/hss.cacert.pem"; - - -# Disable use of TCP protocol (only listen and connect in SCTP) -# Default : TCP enabled -@TRANSPORT_option@; - - -# This option is ignored if freeDiameter is compiled with DISABLE_SCTP option. -# Prefer TCP instead of SCTP for establishing new connections. -# This setting may be overwritten per peer in peer configuration blocs. -# Default : SCTP is attempted first. -@TRANSPORT_PREFER_TCP_option@; - - -# Disable use of IPv6 addresses (only IP) -# Default : IPv6 enabled -No_IPv6; - - -# Overwrite the number of SCTP streams. This value should be kept low, -# especially if you are using TLS over SCTP, because it consumes a lot of -# resources in that case. See tickets 19 and 27 for some additional details on -# this. -# Limit the number of SCTP streams -SCTP_streams = 3; - - -# By default, freeDiameter acts as a Diameter Relay Agent by forwarding all -# messages it cannot handle locally. This parameter disables this behavior. -NoRelay; - - -TLS_old_method; - - -# Number of parallel threads that will handle incoming application messages. -# This parameter may be deprecated later in favor of a dynamic number of threads -# depending on the load. -AppServThreads = @AppServThreads@; - -# Specify the addresses on which to bind the listening server. This must be -# specified if the framework is unable to auto-detect these addresses, or if the -# auto-detected values are incorrect. Note that the list of addresses is sent -# in CER or CEA message, so one should pay attention to this parameter if some -# adresses should be kept hidden. -@ListenOn@; - -@DIAMETER_PORT@; -@DIAMETER_SEC_PORT@; - - -# -------- Extensions --------- - -# Uncomment (and create rtd.conf) to specify routing table for this peer. -#LoadExtension = "rt_default.fdx" : "rtd.conf"; - -# Uncomment (and create acl.conf) to allow incoming connections from other peers. -LoadExtension = "acl_wl.fdx" : "@FREEDIAMETER_PATH@/../etc/freeDiameter/acl.conf"; - -# Uncomment to display periodic state information -#LoadExtension = "dbg_monitor.fdx"; - -# Uncomment to enable an interactive Python interpreter session. -# (see doc/dbg_interactive.py.sample for more information) -#LoadExtension = "dbg_interactive.fdx"; - -# Load the RFC4005 dictionary objects -#LoadExtension = "dict_nasreq.fdx"; - -LoadExtension = "dict_nas_mipv6.fdx"; -LoadExtension = "dict_s6a.fdx"; - -# Load RFC4072 dictionary objects -#LoadExtension = "dict_eap.fdx"; - -# Load the Diameter EAP server extension (requires diameap.conf) -#LoadExtension = "app_diameap.fdx" : "diameap.conf"; - -# Load the Accounting Server extension (requires app_acct.conf) -#LoadExtension = "app_acct.fdx" : "app_acct.conf"; - -# -------- Peers --------- - -# The framework will actively attempt to establish and maintain a connection -# with the peers listed here. -# For only accepting incoming connections, see the acl_wl.fx extension. - -#ConnectPeer = "ubuntu.localdomain" { ConnectTo = "127.0.0.1"; No_TLS; }; -@ConnectPeer@ = "@MME_FQDN@" { ConnectTo = "@MME_IP@"; Realm = "@REALM@"; No_IPv6; No_TLS ; port = 3870; }; \ No newline at end of file diff --git a/cmake_targets/lte-simulators/CMakeLists.txt b/cmake_targets/lte-simulators/CMakeLists.txt index 50a473dd4b..7a0e84b425 100644 --- a/cmake_targets/lte-simulators/CMakeLists.txt +++ b/cmake_targets/lte-simulators/CMakeLists.txt @@ -5,7 +5,7 @@ set(RF_BOARD None) set(XFORMS False) set(DEBUG_PHY False) -set(MU_RECIEVER Flase) +set(MU_RECIEVER False) set(RANDOM_BF False) set(PBS_SIM False) set(PERFECT_CE False) diff --git a/cmake_targets/nas_sim_tools/CMakeLists.txt b/cmake_targets/nas_sim_tools/CMakeLists.txt index 1894ba6697..732ede3f94 100644 --- a/cmake_targets/nas_sim_tools/CMakeLists.txt +++ b/cmake_targets/nas_sim_tools/CMakeLists.txt @@ -12,7 +12,7 @@ set(OPENAIR_DIR $ENV{OPENAIR_DIR}) set(OPENAIR1_DIR $ENV{OPENAIR_DIR}/openair1) set(OPENAIR2_DIR $ENV{OPENAIR_DIR}/openair2) set(OPENAIR3_DIR $ENV{OPENAIR_DIR}/openair3) -set(OPENAIRCN_DIR $ENV{OPENAIR_DIR}/openair-cn) +set(OPENAIR3_DIR $ENV{OPENAIR_DIR}/openair3) set(OPENAIR_TARGETS $ENV{OPENAIR_DIR}/targets) #set(EXECUTABLE_OUTPUT_PATH ${OPENAIR_DIR}/targets/bin) @@ -20,30 +20,30 @@ set(OPENAIR_TARGETS $ENV{OPENAIR_DIR}/targets) # Add .h files for dependancies set(usim_SRC - ${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 + ${OPENAIR_DIR}/openair3/NAS/TOOLS/usim_data.c + ${OPENAIR_DIR}/openair3/NAS/UE/API/USIM/usim_api.c + ${OPENAIR_DIR}/openair3/NAS/UE/API/USIM/aka_functions.c + ${OPENAIR_DIR}/openair3/NAS/COMMON/UTIL/memory.c + ${OPENAIR_DIR}/openair3/NAS/COMMON/UTIL/nas_log.c + ${OPENAIR_DIR}/openair3/NAS/COMMON/UTIL/OctetString.c + ${OPENAIR_DIR}/openair3/NAS/COMMON/UTIL/TLVEncoder.c ) set(usim_HDR - ${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 + ${OPENAIR_DIR}/openair3/NAS/TOOLS/network.h + ${OPENAIR_DIR}/openair3/NAS/UE/API/USIM/usim_api.h + ${OPENAIR_DIR}/openair3/NAS/UE/API/USIM/aka_functions.h + ${OPENAIR_DIR}/openair3/NAS/COMMON/UTIL/memory.h + ${OPENAIR_DIR}/openair3/NAS/COMMON/UTIL/nas_log.h + ${OPENAIR_DIR}/openair3/NAS/COMMON/UTIL/OctetString.h + ${OPENAIR_DIR}/openair3/NAS/COMMON/UTIL/TLVEncoder.h ) include_directories( - ${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 + ${OPENAIR_DIR}/openair3/NAS/COMMON + ${OPENAIR_DIR}/openair3/NAS/UE/API/USIM + ${OPENAIR_DIR}/openair3/NAS/UE/EMM/ + ${OPENAIR_DIR}/openair3/NAS/UE/ESM/ + ${OPENAIR_DIR}/openair3/NAS/COMMON/IES/ + ${OPENAIR_DIR}/openair3/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/TOOLS/ue_data.c - ${OPENAIR_DIR}/openair-cn/NAS/COMMON/UTIL/memory.c - ${OPENAIR_DIR}/openair-cn/NAS/COMMON/UTIL/nas_log.c + ${OPENAIR_DIR}/openair3/NAS/TOOLS/ue_data.c + ${OPENAIR_DIR}/openair3/NAS/COMMON/UTIL/memory.c + ${OPENAIR_DIR}/openair3/NAS/COMMON/UTIL/nas_log.c ) set(nvram_HDR - ${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 + ${OPENAIR_DIR}/openair3/NAS/UE/EMM/emmData.h + ${OPENAIR_DIR}/openair3/NAS/COMMON/UTIL/memory.h + ${OPENAIR_DIR}/openair3/NAS/COMMON/userDef.h ) ADD_EXECUTABLE(nvram ${nvram_SRC} ${nvram_HDR}) diff --git a/cmake_targets/tools/build_epc b/cmake_targets/tools/build_epc deleted file mode 100755 index 0caeaf2617..0000000000 --- a/cmake_targets/tools/build_epc +++ /dev/null @@ -1,302 +0,0 @@ -#!/bin/bash -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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) anylater 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 . -# -# 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 build_epc -# brief -# author Lionel Gauthier -# company Eurecom -# email: lionel.gauthier@eurecom.fr -# -################################ -# include helper functions -################################ -THIS_SCRIPT_PATH=$(dirname $(readlink -f $0)) -source $THIS_SCRIPT_PATH/build_helper - -function help() -{ - echo_error " " - echo_error "Usage: build_epc [OPTION]..." - echo_error "Build the EPC executable." - echo_error " " - echo_error "Options:" - echo_error "Mandatory arguments to long options are mandatory for short options too." - echo_error " -c, --clean Clean the build generated files (build from scratch)" - echo_error " -C, --conf-files-only Generate only EPC configuration files (no build)" - echo_error " -d, --debug Compile with debug informations." - echo_error " -h, --help Print this help." - echo_error " -g, --gtpu-easy-module Used for debugging GTPU (kernel module can be easily removed, for dev and debug purpose only)" - echo_error " -G, --gtpu-full-speed Best GTPU throughput performance, but cannot be removed (default)." - echo_error " -H, --hss hostname HSS hostname (with FQDN), default is this host (`hostname --fqdn`)." - echo_error " -i, --check-installed-software Check installed software packages necessary to build and run EPC (support Ubuntu 14.04)." - l_realm=`hostname --fqdn` - l_realm=${l_realm#*.} - echo_error " -r, --realm realm Realm of the MME (if not specified, is extracted from this host FQDN ($l_realm))." - echo_error " -s, --transport-sctp-only Diameter use SCTP only (TCP disabled)." - echo_error " -S, --s6a-server MME act as a server on s6a interface (useful when HSS and MME/EPC run on the same host)." - echo_error " -t, --transport-tcp-only Diameter use TCP only (SCTP disabled)." - echo_error " -T, --transport-prefer-tcp Diameter prefer TCP." - echo_error " -v, --verbose Build process verbose." - echo_error " " - echo_error "Examples:" - echo_error " " - echo_error "Case 1 - EPC run on same HSS host" - echo_error "build_epc -d -S -t -T" - echo_error " " - echo_error "Case 2 - EPC and HSS do not run on same host" - echo_error "build_epc -d -s -H my_hss_fqdn" -} - - - -function main() -{ - local -i clean=0 - local -i conf_files_only=0 - local -i verbose=0 - local -i s6a_server=0 - local cmake_args=" " - local make_args="-j $NUM_CPU" - local realm="" - local gtpu_cmake_arg="-DFLAG_GTPV1U_KERNEL_THREAD_SOCK_NO_WAIT=False" - local hss_fqdn="" - local hss_hostname="" - local hss_ip="" - local REL="Rel10" - - - until [ -z "$1" ] - do - case "$1" in - -c | --clean) - clean=1 - echo "Clean the build generated files (build from scratch)" - shift; - ;; - -C | --conf-files-only) - conf_files_only=1 - echo "Generate only conf files (no build)" - shift; - ;; - -d | --debug) - cmake_args="$cmake_args -DDEBUG=1" - echo "Compile with debug informations" - shift; - ;; - -g | --gtpu-easy-module) - gtpu_cmake_arg="-DFLAG_GTPV1U_KERNEL_THREAD_SOCK_NO_WAIT=True" - echo "Compile with not optimized GTPU kernel module option (but kernel module easy to remove)" - shift; - ;; - -G | --gtpu-full-speed) - echo "Compile with best performance GTPU kernel module option" - shift; - ;; - -h | --help) - help - shift; - exit 0 - ;; - -H | --hss) - hss_fqdn=$2 - cmake_args="$cmake_args -DHSS_FQDN=$hss_fqdn" - shift 2; - ;; - -i | --check-installed-software) - echo "Check installed software packages necessary to build and run EPC (support Ubuntu 14.04):" - set_openair_env - check_install_oai_software - check_install_additional_tools - exit 0 - ;; - -r | --realm) - echo "Realm: $2" - realm=$2 - cmake_args="$cmake_args -DREALM=$realm" - shift 2; - ;; - -s | --transport-sctp-only) - echo "Diameter use SCTP (TCP disabled), this is the default option." - cmake_args="$cmake_args -DTRANSPORT_option=No_TCP" - shift; - ;; - -S | --s6a-server) - echo "MME act as a server on s6a" - s6a_server=1 - cmake_args="$cmake_args -DMME_S6A_IS_SERVER=1" - shift 1; - ;; - -t | --transport-tcp-only) - echo "Diameter use TCP (SCTP disabled)." - cmake_args="$cmake_args -DTRANSPORT_option=No_SCTP" - shift; - ;; - -T | --transport-prefer-tcp) - echo "Diameter prefer TCP (TCP, SCTP enabled)." - cmake_args="$cmake_args -DTRANSPORT_PREFER_TCP_option=Prefer_TCP" - shift; - ;; - -v | --verbose) - echo "Make build process verbose" - cmake_args="$cmake_args -DCMAKE_VERBOSE_MAKEFILE=ON" - make_args="VERBOSE=1 $make_args" - verbose=1 - shift; - ;; - *) - echo "Unknown option $1" - help - exit 1 - ;; - esac - done - - cmake_args="$cmake_args $gtpu_cmake_arg" - - # extra arguments processing - if [[ z$hss_fqdn = z ]]; then - hss_fqdn=`hostname --fqdn` - cmake_args="$cmake_args -DHSS_FQDN=$hss_fqdn" - if [[ z$realm = z ]]; then - realm=$hss_fqdn - realm=${realm#*.} - cmake_args="$cmake_args -DREALM=$realm" - fi - else - if [[ z$realm = z ]]; then - realm=${hss_fqdn#*.} - cmake_args="$cmake_args -DREALM=$realm" - fi - fi - hss_hostname=${hss_fqdn%%.*} - cmake_args="$cmake_args -DHSS_HOSTNAME=$hss_hostname" - - hss_ip=`resolveip --silent $hss_hostname` - if [[ z$hss_ip = z ]]; then - hss_ip=`resolveip --silent $hss_fqdn` - fi - if [[ z$hss_ip = z ]]; then - echo_abort "Unable to get HSS IP addr of $hss_fqdn" - fi - cmake_args="$cmake_args -DHSS_IP=$hss_ip" - - set_openair_env - if [[ $verbose -eq 1 ]]; then - cecho "OPENAIR_DIR = $OPENAIR_DIR" $green - fi - - # for conf files copy in this bash script - if [ -d /usr/lib/freeDiameter ]; then - export FREEDIAMETER_PREFIX=/usr - else - if [ -d /usr/local/lib/freeDiameter ]; then - export FREEDIAMETER_PREFIX=/usr/local - else - echo_fatal "FreeDiameter prefix not found, install freeDiameter if EPC, HSS" - fi - fi - - - - local dbin=$OPENAIR_DIR/targets/bin - local dlog=$OPENAIR_DIR/cmake_targets/log - local dconf=$OPENAIR_DIR/targets/bin - - mkdir -m 777 -p $dbin $dlog - - ############################################################################## - # Compile userspace executable - ############################################################################## - cd $OPENAIR_DIR/cmake_targets/epc_build_oai - if [ $clean -ne 0 ]; then - if [[ $verbose -eq 1 ]]; then - 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 - $SUDO rm -f /usr/local/etc/freeDiameter/epc* 2>&1 - $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/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 - - - - ############################################################################## - # Compile EPC - ############################################################################## - cd $OPENAIR_DIR/cmake_targets/epc_build_oai - #cd $OPENAIR_TARGETS/CMAKE/EPC/MME_GW - if [ ! -d ./build ]; then - mkdir -m 777 -p -v build - fi - cmake_file=./CMakeLists.txt - cp $OPENAIR_DIR/cmake_targets/epc_build_oai/CMakeLists.template $cmake_file - echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file - cd ./build - cmake $cmake_args .. - #make $make_args -j $NUM_CPU - if [ $conf_files_only -eq 0 ]; then - compilations \ - epc_build_oai mme_gw \ - mme_gw $dbin/mme_gw.$REL - # Only integrated mme+sgw+pgw is operational today - compilations \ - epc_build_oai xt_GTPUSP_lib \ - libxt_GTPUSP_lib.so $dbin - compilations \ - 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_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 - fi - # Do EPC - if [ -f $OPENAIR_DIR/cmake_targets/epc_build_oai/build/mme_fd.conf ] ; then - cp -uv $OPENAIR_DIR/cmake_targets/epc_build_oai/build/epc*.conf $dconf - $SUDO cp -uv $OPENAIR_DIR/cmake_targets/epc_build_oai/build/mme_fd.conf $FREEDIAMETER_PREFIX/etc/freeDiameter - else - echo_fatal "not installed EPC config files: not found" - fi -} - - -main "$@" - diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index 100effd872..4968a42016 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -1,29 +1,31 @@ ################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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. +# Copyright (c) 2015, EURECOM (www.eurecom.fr) +# All rights reserved. # +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: # -# 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. +# 1. Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. # -# 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 . +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -# 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 +# The views and conclusions contained in the software and documentation are those +# of the authors and should not be interpreted as representing official policies, +# either expressed or implied, of the FreeBSD Project. # ################################################################################ # file build_helper @@ -95,12 +97,9 @@ clean_kernel() { clean_all_files() { set_openair_env dir=$OPENAIR_DIR/cmake_targets - rm -rf $dir/log $OPENAIR_DIR/targets/bin/* + rm -rf $dir/log $OPENAIR_DIR/targets/bin/* rm -rf $dir/lte_build_oai $dir/lte-simulators/build - rm -rf $dir/epc_build_oai/build $dir/epc_build_oai/CMakeLists.txt rm -rf $dir/oaisim_build_oai/build $dir/oaisim_build_oai/CMakeLists.txt - rm -rf $dir/oaisim_mme_build_oai/build $dir/oaisim_mme_build_oai/CMakeLists.txt - rm -rf $dir/hss_build/build rm -rf $dir/autotests/bin $dir/autotests/log $dir/autotests/*/build } @@ -123,50 +122,6 @@ compilations() { fi } - -########################################## -# X.509 certificates -########################################## - -make_one_cert() { - fqdn=$1 - name=$2 - $SUDO openssl genrsa -out $name.key.pem 1024 - $SUDO openssl req -new -batch -out $name.csr.pem -key $name.key.pem -subj /CN=$name.$fqdn/C=FR/ST=PACA/L=Aix/O=Eurecom/OU=CM - $SUDO openssl ca -cert cacert.pem -keyfile cakey.pem -in $name.csr.pem -out $name.cert.pem -outdir . -batch -} - -make_certs(){ - - fqdn=$1 - certs_dir=$FREEDIAMETER_PREFIX/freeDiameter - # certificates are stored in diameter config directory - if [ ! -d $certs_dir ]; then - echo "Creating non existing directory: $certs_dir" - $SUDO mkdir -p $certs_dir || echo_error "can't create: $certs_dir" - fi - - cd $certs_dir - echo "creating the CA certificate" - echo_warning "erase all existing certificates as long as the CA is regenerated" - $SUDO rm -f $certs_dir/*.pem - $SUDO mkdir -p $certs_dir/demoCA/ - $SUDO touch $certs_dir/demoCA/index.txt - $SUDO sh -c "echo 01 > $certs_dir/demoCA/serial" - - # CA self certificate - $SUDO openssl req -new -batch -x509 -days 3650 -nodes -newkey rsa:1024 -out cacert.pem -keyout cakey.pem -subj /CN=$fqdn/C=FR/ST=PACA/L=Aix/O=Eurecom/OU=CM - - # generate hss certificate and sign it - make_one_cert eur hss - make_one_cert eur mme - - # legacy config is using a certificate named 'user' - make_one_cert eur user - -} - - ############################################ # External packages installers ############################################ @@ -200,58 +155,6 @@ install_gnutls_from_source(){ 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" - 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 - cd freeDiameter-1.1.5 - patch -p1 < $OPENAIR_DIR/openair-cn/S6A/freediameter/freediameter-1.1.5.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/1.1.5.tar.gz /tmp/freeDiameter-1.1.5 -} - -install_freediameter_from_source() { - cd /tmp - echo "Downloading 1.2.0 freeDiameter archive" - rm -rf /tmp/1.2.0.tar.gz* /tmp/freeDiameter-1.2.0 - wget http://www.freediameter.net/hg/freeDiameter/archive/1.2.0.tar.gz - tar xzf 1.2.0.tar.gz - cd freeDiameter-1.2.0 - 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/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(){ @@ -345,8 +248,6 @@ check_install_oai_software() { libxml2-dev \ linux-headers-`uname -r` \ mscgen \ - mysql-client \ - mysql-server \ octave \ octave-signal \ openssh-client \ @@ -357,11 +258,10 @@ check_install_oai_software() { $SUDO update-alternatives --set liblapack.so /usr/lib/atlas-base/atlas/liblapack.so if [ `lsb_release -rs` = '12.04' ] ; then install_nettle_from_source - install_gnutls_from_source + install_gnutls_from_source else $SUDO apt-get install -y libgnutls-dev nettle-dev nettle-bin fi - install_freediameter_from_source install_asn1c_from_source } @@ -370,8 +270,8 @@ install_asn1c_from_source(){ cd /tmp/asn1c-r1516 rm -rf /tmp/asn1c-r1516/* 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/openair3/S1AP/MESSAGES/ASN1/asn1cpatch.p0 >> /tmp/log_compile_asn1c + patch -p0 < $OPENAIR_DIR/openair3/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 @@ -400,65 +300,7 @@ install_nas_tools() { } -################################## -# create HSS DB -################################ -# arg 1 is mysql admin (ex: root) -# arg 2 is mysql password (ex: linux) -# arg 3 is hss username (ex: hssadmin) -# arg 4 is hss password (ex: admin) -# arg 5 is database name (ex: oai_db) -create_hss_database(){ - EXPECTED_ARGS=5 - if [ $# -ne $EXPECTED_ARGS ] - then - echo_error "Usage: $0 dbadmin dbpass hssuser hsspass databasename" - return 1 - fi - local mysql_admin=$1 - local mysql_password=$2 - local hss_username=$3 - local hss_password=$4 - local database_name=$5 - - Q1="GRANT ALL PRIVILEGES ON *.* TO '$hss_username'@'localhost' IDENTIFIED BY '$hss_password' WITH GRANT OPTION;" - Q2="FLUSH PRIVILEGES;" - mysql -u $mysql_admin --password=$mysql_password -e "${Q1}${Q2}" - if [ $? -ne 0 ]; then - echo_error "HSS: $hss_username permissions creation failed" - echo_error "verify root password for mysql is linux: mysql -u root --password=linux" - echo_error "if not, reset it to "linux" with sudo dpkg-reconfigure mysql-server-5.5" - return 1 - else - echo_success "HSS: $hss_username permissions creation succeeded" - fi - - Q3="CREATE DATABASE IF NOT EXISTS $database_name;" - mysql -u $hss_username --password=$hss_password -e "${Q3}" - if [ $? -ne 0 ]; then - echo_error "HSS: $database_name creation failed" - return 1 - else - echo_success "HSS: $database_name creation succeeded" - fi - - - # test if tables have been created - mysql -u $hss_username --password=$hss_password -e "desc $database_name.users" > /dev/null 2>&1 - if [ $? -eq 1 ]; then - mysql -u $hss_username --password=$hss_password $database_name < $OPENAIR_DIR/openair-cn/OPENAIRHSS/db/$database_name.sql - if [ $? -ne 0 ]; then - echo_error "HSS: $database_name tables creation failed" - return 1 - else - echo_success "HSS: $database_name tables creation succeeded" - fi - else - echo_success "HSS: $database_name tables already created, nothing done" - fi - return 0 -} ################################ # set_openair_env @@ -468,13 +310,11 @@ set_openair_env(){ [ -f "/.$fullpath" ] || fullpath=`readlink -f $PWD/$fullpath` openair_path=${fullpath%/cmake_targets/*} openair_path=${openair_path%/targets/*} - openair_path=${openair_path%/openair-cn/*} openair_path=${openair_path%/openair[123]/*} export OPENAIR_DIR=$openair_path export OPENAIR1_DIR=$openair_path/openair1 export OPENAIR2_DIR=$openair_path/openair2 export OPENAIR3_DIR=$openair_path/openair3 - export OPENAIRCN_DIR=$openair_path/openair-cn export OPENAIR_TARGETS=$openair_path/targets } diff --git a/cmake_targets/tools/build_hss b/cmake_targets/tools/build_hss deleted file mode 100755 index 6e0b1e927a..0000000000 --- a/cmake_targets/tools/build_hss +++ /dev/null @@ -1,271 +0,0 @@ -#!/bin/bash -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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) anylater 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 . -# -# 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 build_hss -# brief -# author Lionel Gauthier -# company Eurecom -# email: lionel.gauthier@eurecom.fr -# -################################ -# include helper functions -################################ -THIS_SCRIPT_PATH=$(dirname $(readlink -f $0)) -source $THIS_SCRIPT_PATH/build_helper - - - -function help() -{ - echo_error " " - echo_error "Usage: build_hss [OPTION]..." - echo_error "Build the experimental HSS executable." - echo_error " " - echo_error "Options:" - echo_error "Mandatory arguments to long options are mandatory for short options too." - echo_error " -b, --s6a-bind-addr-list addr_list Optionaly, s6a server bind addresses can be specified here" - echo_error " -c, --clean Clean the build generated files (build from scratch)" - echo_error " -d, --debug Compile with debug informations." - echo_error " -f, --fqdn fqdn HSS Fully Qualified Domain Name (if not specified default is `hostname --fqdn`)." - echo_error " -h, --help Print this help." - echo_error " -i, --check-installed-software Check installed software packages necessary to build and run HSS (support Ubuntu 14.04)." - echo_error " -I, --install-hss-files Install HSS database if necessary." - echo_error " -k, --operator-key key Operator key of the HSS." - echo_error " If filled, then OPc key in table users for all subscribers (IMSI) will be computed." - echo_error " -m, --connect-to-mme fqdn MME act as a S6A server, HSS as a client (reversed situation but allows MME and HSS be on the same host) ." - echo_error " -r, --realm realm Realm of the HSS (optional parameter)." - echo_error " -R, --random boolean If false HSS random function returns always 0 (allowed values: {true, false})." - echo_error " -s, --transport-sctp-only Diameter use SCTP (TCP disabled)." - echo_error " -t, --transport-tcp-only Diameter use TCP (SCTP disabled)." - echo_error " -T, --transport-prefer-tcp Diameter prefer TCP." - echo_error " -v, --verbose Build process verbose." - echo_error " " - echo_error "Examples:" - echo_error " " - echo_error "Case 1 - HSS run on same EPC host" - echo_error "build_hss -d -m my_epc_fqdn -d -t -T" - echo_error "or build_hss -d -m my_epc_fqdn -d -t -T -k 11111111111111111111111111111111" - echo_error " " - echo_error "Case 2 - HSS and EPC do not run on same host" - echo_error "build_hss -d -s" - echo_error "build_hss -d -s -k 11111111111111111111111111111111" -} - - - -function main() -{ - local -i clean=0 - local -i verbose=0 - local cmake_args=" " - local make_args="-j $NUM_CPU" - local realm="" - local hss_hostname="" - local mme_hostname="" - local mme_ip="" - local mme_fqdn="" - - - until [ -z "$1" ]; do - case "$1" in - -b | --s6a-bind-addr-list) - echo "S6A server bind addresses: $2" - cmake_args="$cmake_args -DFD_SERVER_IP_BIND_LIST=$2" - shift 2; - ;; - -c | --clean) - clean=1 - echo "Clean the build generated files (build from scratch)" - shift; - ;; - -d | --debug) - cmake_args="$cmake_args -DDEBUG=1" - echo "Compile with debug informations" - shift; - ;; - -f | --fqdn) - echo "FQDN of the HSS: $2" - cmake_args="$cmake_args -DHSS_FQDN=$2" - shift 2; - ;; - -h | --help) - help - exit 0 - ;; - -i | --check-installed-software) - echo "Check installed software packages necessary to build and run HSS (support Ubuntu 14.04):" - set_openair_env - check_install_oai_software - exit 0 - ;; - -I | --install-hss-files) - echo "Install HSS files: .conf files, database (if you want to reinstall database, drop it by hand before)." - cmake_args="$cmake_args -DINSTALL_HSS_FILES=1" - shift; - ;; - -k | --operator-key) - echo "Operator key of the HSS: $2" - cmake_args="$cmake_args -DOPERATOR_key=$2" - shift 2; - ;; - -m | --connect-to-mme) - mme_fqdn=$2 - shift 2; - ;; - -r | --realm) - echo "Realm of the HSS: $2" - cmake_args="$cmake_args -DREALM=$2" - shift 2; - ;; - -R | --random) - echo "Random function: $2" - cmake_args="$cmake_args -DRANDOM_boolean=$2" - shift 2; - ;; - -s | --transport-sctp-only) - echo "Diameter use SCTP (TCP disabled), this is the default option." - cmake_args="$cmake_args -DTRANSPORT_option=No_TCP" - shift; - ;; - -t | --transport-tcp-only) - echo "Diameter use TCP (SCTP disabled)." - cmake_args="$cmake_args -DTRANSPORT_option=No_SCTP" - shift; - ;; - -T | --transport-prefer-tcp) - echo "Diameter prefer TCP (TCP, SCTP enabled)." - cmake_args="$cmake_args -DTRANSPORT_PREFER_TCP_option=Prefer_TCP" - shift; - ;; - -v | --verbose) - echo "Make build process verbose" - cmake_args="$cmake_args -DCMAKE_VERBOSE_MAKEFILE=ON" - make_args="VERBOSE=1 $make_args" - verbose=1 - shift; - ;; - *) - echo "Unknown option $1" - help - exit 1 - ;; - esac - done - - # extra arguments processing - if [[ z$hss_fqdn = z ]]; then - hss_fqdn=`hostname --fqdn` - cmake_args="$cmake_args -DHSS_FQDN=$hss_fqdn" - if [[ z$realm = z ]]; then - realm=$hss_fqdn - realm=${realm#*.} - cmake_args="$cmake_args -DREALM=$realm" - fi - fi - - if [[ z$mme_fqdn != z ]]; then - cmake_args="$cmake_args -DMME_FQDN=$mme_fqdn" - mme_hostname=${mme_fqdn%%.*} - cmake_args="$cmake_args -DMME_HOSTNAME=$mme_hostname" - - mme_ip=`resolveip --silent $mme_hostname` - if [[ z$mme_ip = z ]]; then - mme_ip=`resolveip --silent $mme_fqdn` - fi - if [[ z$mme_ip = z ]]; then - echo_fatal "Unable to get MME IP addr of $mme_fqdn" - fi - cmake_args="$cmake_args -DHSS_CONNECT_TO_MME=1 -DMME_IP=$mme_ip" - fi - - set_openair_env - if [[ $verbose -eq 1 ]]; then - cecho "OPENAIR_DIR = $OPENAIR_DIR" $green - fi - - if [[ z$OPENAIR_DIR = z ]]; then - echo_fatal "OPENAIR_DIR env variable not set, exiting" - fi - - - local dbin=$OPENAIR_DIR/targets/bin - local dlog=$OPENAIR_DIR/cmake_targets/log - local dconf=OPENAIR_DIR/targets/bin - - mkdir -m 777 -p $dbin $dlog - - # for conf files copy in this bash script - if [ -d /usr/lib/freeDiameter ]; then - export FREEDIAMETER_PREFIX=/usr - else - if [ -d /usr/local/lib/freeDiameter ]; then - export FREEDIAMETER_PREFIX=/usr/local - else - echo_fatal "FreeDiameter prefix not found, install freeDiameter if EPC, HSS" - fi - fi - - - - cmake_args="$cmake_args -DOPENAIR_DIR=$OPENAIR_DIR" - - rm -f $OPENAIR_DIR/targets/bin/openair-hss - cd $OPENAIR_DIR/cmake_targets/hss_build - if [ $clean -ne 0 ]; then - if [[ $verbose -eq 1 ]]; then - echo "Cleaning HSS" - fi - $SUDO rm -Rf build 2>&1 - if [[ $verbose -eq 1 ]]; then - echo "Cleaning /usr/*/etc/freeDiameter" - fi - $SUDO rm -f /usr/local/etc/freeDiameter/hss* 2>&1 - $SUDO rm -f /usr/local/etc/freeDiameter/acl.conf 2>&1 - $SUDO rm -f /usr/etc/freeDiameter/hss* 2>&1 - $SUDO rm -f /usr/etc/freeDiameter/acl.conf 2>&1 - mkdir -m 777 -p -v build - fi - if [ ! -d ./build ]; then - mkdir -m 777 -p -v build - fi - cd ./build - cmake $cmake_args .. - make $make_args - make install - - - # bash doesn't like space char around = char - cp -uv $OPENAIR_DIR/cmake_targets/hss_build/build/hss.conf $dbin - $SUDO cp -uv $OPENAIR_DIR/cmake_targets/hss_build/build/hss_fd.conf $OPENAIR_DIR/cmake_targets/hss_build/build/acl.conf $FREEDIAMETER_PREFIX/etc/freeDiameter - -} - - -main "$@" - diff --git a/cmake_targets/tools/build_test_epc_tools b/cmake_targets/tools/build_test_epc_tools new file mode 100755 index 0000000000..aff2a26fc0 --- /dev/null +++ b/cmake_targets/tools/build_test_epc_tools @@ -0,0 +1,147 @@ +#!/bin/bash +################################################################################ +# OpenAirInterface +# Copyright(c) 1999 - 2014 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) anylater 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 . +# +# 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 build_test_epc_tools +# brief +# author Lionel Gauthier +# company Eurecom +# email: lionel.gauthier@eurecom.fr +# +################################ +# include helper functions +################################ +THIS_SCRIPT_PATH=$(dirname $(readlink -f $0)) +source $THIS_SCRIPT_PATH/build_helper + +function help() +{ + echo_error " " + echo_error "Usage: build_test_epc_tools [OPTION]..." + echo_error "Build the executables for generating and running a test case for EPC." + echo_error " " + echo_error "Options:" + echo_error "Mandatory arguments to long options are mandatory for short options too." + echo_error " -c, --clean Clean the build generated files (build from scratch)" + echo_error " -d, --debug Compile with debug informations." + echo_error " -h, --help Print this help." + echo_error " -v, --verbose Build process verbose." + echo_error " " +} + + + +function main() +{ + local -i clean=0 + local -i verbose=0 + local cmake_args=" " + local make_args="-j $NUM_CPU" + local realm="" + + + until [ -z "$1" ] + do + case "$1" in + -c | --clean) + clean=1 + echo "Clean the build generated files (build from scratch)" + shift; + ;; + -d | --debug) + cmake_args="$cmake_args -DDEBUG=1" + echo "Compile with debug informations" + shift; + ;; + -h | --help) + help + shift; + exit 0 + ;; + -v | --verbose) + echo "Make build process verbose" + cmake_args="$cmake_args -DCMAKE_VERBOSE_MAKEFILE=ON" + make_args="VERBOSE=1 $make_args" + verbose=1 + shift; + ;; + *) + echo "Unknown option $1" + help + exit 1 + ;; + esac + done + + + + + set_openair_env + if [[ $verbose -eq 1 ]]; then + cecho "OPENAIR_DIR = $OPENAIR_DIR" $green + fi + + local dbin=$OPENAIR_DIR/targets/bin + local dlog=$OPENAIR_DIR/cmake_targets/log + local dconf=$OPENAIR_DIR/targets/bin + + mkdir -m 777 -p $dbin $dlog + + ############################################################################## + # Compile userspace executable + ############################################################################## + cd $OPENAIR_DIR/cmake_targets/epc_test + if [ $clean -ne 0 ]; then + if [[ $verbose -eq 1 ]]; then + echo "Cleaning TEST_EPC" + fi + rm -f $OPENAIR_DIR/targets/bin/test_epc_generate_scenario + rm -Rf build 2>&1 + mkdir -m 777 -p -v build + fi + + ############################################################################## + # Compile EPC + ############################################################################## + cd $OPENAIR_DIR/cmake_targets/epc_test + if [ ! -d ./build ]; then + mkdir -m 777 -p -v build + fi + cmake_file=./CMakeLists.txt + cp $OPENAIR_DIR/cmake_targets/epc_test/CMakeLists.template $cmake_file + echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file + cd ./build + cmake $cmake_args .. + compilations \ + epc_test test_epc_generate_scenario \ + test_epc_generate_scenario $dbin/test_epc_generate_scenario +} + + +main "$@" + diff --git a/cmake_targets/tools/check_hss_s6a_certificate b/cmake_targets/tools/check_hss_s6a_certificate deleted file mode 100755 index e444c7f4c5..0000000000 --- a/cmake_targets/tools/check_hss_s6a_certificate +++ /dev/null @@ -1,104 +0,0 @@ -#!/bin/bash -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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) anylater 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 . -# -# 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 check_hss_s6a_certificate -# brief -# author Lionel Gauthier -# company Eurecom -# email: lionel.gauthier@eurecom.fr -################################ -# include helper functions -################################ -THIS_SCRIPT_PATH=$(dirname $(readlink -f $0)) -source $THIS_SCRIPT_PATH/build_helper - - -function _create_hss_certs() -{ - local freediameter_path=$1 - local fqdn=$2 - - cd /tmp - rm -rf /tmp/demoCA - mkdir /tmp/demoCA - echo 01 > /tmp/demoCA/serial - touch /tmp/demoCA/index.txt - - echo "Creating HSS certificate for user '$fqdn'" - # Create a Root Certification Authority Certificate - openssl req -new -batch -x509 -days 3650 -nodes -newkey rsa:1024 -out hss.cacert.pem -keyout hss.cakey.pem -subj /CN=$fqdn/C=FR/ST=PACA/L=Aix/O=Eurecom/OU=CM - - # Generate a Private Key - openssl genrsa -out hss.key.pem 1024 - - # Generate a CSR (Certificate Signing Request) that will be self-signed - openssl req -new -batch -out hss.csr.pem -key hss.key.pem -subj /CN=$fqdn/C=FR/ST=PACA/L=Aix/O=Eurecom/OU=CM - - # Certification authority - openssl ca -cert hss.cacert.pem -keyfile hss.cakey.pem -in hss.csr.pem -out hss.cert.pem -outdir . -batch - - if [ ! -d $freediameter_path/etc/freeDiameter ]; then - echo "Creating non existing directory: $freediameter_path/etc/freeDiameter/" - sudo mkdir -p $freediameter_path/etc/freeDiameter/ - fi - - sudo mv hss.cakey.pem hss.cert.pem hss.cacert.pem hss.key.pem $freediameter_path/etc/freeDiameter/ - cd - -} - - -#$1 if freediameter path -#$2 is fqdn -function main() { - local freediameter_path=$1 - local fqdn=$2 - if [ -d $freediameter_path/etc/freeDiameter ]; then - if [ -f $freediameter_path/etc/freeDiameter/hss.cert.pem ]; then - full_hostname=`cat $freediameter_path/etc/freeDiameter/hss.cert.pem | grep "Subject" | grep "CN" | cut -d '=' -f6` - if [ a$full_hostname == a$fqdn ]; then - echo_success "HSS S6A: Found valid certificate in $freediameter_path/etc/freeDiameter" - return 0 - else - echo_error "Bad hss fqdn found in cert file: $full_hostname fqdn is $fqdn" - fi - fi - fi - echo_error "HSS S6A: Did not find valid certificate in $freediameter_path/etc/freeDiameter" - echo_warning "HSS S6A: generating new certificate in $freediameter_path/etc/freeDiameter..." - _create_hss_certs $freediameter_path $fqdn - if [ $# -lt 3 ] ; then - main $freediameter_path $fqdn 2 - return $? - else - echo_error "Could not access to freeDiameter path: $freediameter_path/etc/freeDiameter" - exit 1 - fi -} - -main "$@" diff --git a/cmake_targets/tools/check_mme_s6a_certificate b/cmake_targets/tools/check_mme_s6a_certificate deleted file mode 100755 index aac91f3abe..0000000000 --- a/cmake_targets/tools/check_mme_s6a_certificate +++ /dev/null @@ -1,107 +0,0 @@ -#!/bin/bash -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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) anylater 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 . -# -# 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 check_mme_s6a_certificate -# brief -# author Lionel Gauthier -# company Eurecom -# email: lionel.gauthier@eurecom.fr -################################ -# include helper functions -################################ -THIS_SCRIPT_PATH=$(dirname $(readlink -f $0)) -. $THIS_SCRIPT_PATH/build_helper - - -function _create_mme_certs() -{ - local freediameter_path=$1 - local fqdn=$2 - - cd /tmp - rm -rf /tmp/demoCA - mkdir /tmp/demoCA - echo 01 > /tmp/demoCA/serial - touch /tmp/demoCA/index.txt - - echo "Creating MME certificate for user '$fqdn'" - # Create a Root Certification Authority Certificate - openssl req -new -batch -x509 -days 3650 -nodes -newkey rsa:1024 -out mme.cacert.pem -keyout mme.cakey.pem -subj /CN=$fqdn/C=FR/ST=PACA/L=Aix/O=Eurecom/OU=CM - - # Generate a Private Key - openssl genrsa -out mme.key.pem 1024 - - # Generate a CSR (Certificate Signing Request) that will be self-signed - openssl req -new -batch -out mme.csr.pem -key mme.key.pem -subj /CN=$fqdn/C=FR/ST=PACA/L=Aix/O=Eurecom/OU=CM - - # Certification authority - openssl ca -cert mme.cacert.pem -keyfile mme.cakey.pem -in mme.csr.pem -out mme.cert.pem -outdir . -batch - - if [ ! -d $freediameter_path/etc/freeDiameter ]; then - echo "Creating non existing directory: $freediameter_path/etc/freeDiameter/" - sudo mkdir -p $freediameter_path/etc/freeDiameter/ - fi - - sudo mv mme.cakey.pem mme.cert.pem mme.cacert.pem mme.key.pem $freediameter_path/etc/freeDiameter/ - cd - -} - -#$1 if freediameter path -#$2 is fqdn -function main() { - local freediameter_path=$1 - local fqdn=$2 - if [ -d $freediameter_path/etc/freeDiameter ]; then - if [ -f $freediameter_path/etc/freeDiameter/mme.cert.pem ]; then - full_hostname=`cat $freediameter_path/etc/freeDiameter/mme.cert.pem | grep "Subject" | grep "CN" | cut -d '=' -f6` - if [ a$full_hostname == a$fqdn ]; then - echo_success "MME S6A: Found valid certificate in $freediameter_path/etc/freeDiameter" - return 0 - 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..." - _create_mme_certs $freediameter_path $fqdn - if [ $# -lt 3 ] ; then - main $freediameter_path $fqdn 2 - return $? - else - echo_error "Could not access to freeDiameter path: $freediameter_path/etc/freeDiameter" - exit 1 - fi -} - -main "$@" diff --git a/cmake_targets/tools/create_hss_database b/cmake_targets/tools/create_hss_database deleted file mode 100755 index 054be034d7..0000000000 --- a/cmake_targets/tools/create_hss_database +++ /dev/null @@ -1,103 +0,0 @@ -#!/bin/bash -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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) anylater 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 . -# -# 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 create_hss_database -# brief -# author Lionel Gauthier -# company Eurecom -# email: lionel.gauthier@eurecom.fr -################################ -# include helper functions -################################ -THIS_SCRIPT_PATH=$(dirname $(readlink -f $0)) -. $THIS_SCRIPT_PATH/build_helper - - -# arg 1 is mysql user (ex: root) -# arg 2 is mysql password (ex: linux) -# arg 3 is hss username (ex: hssadmin) -# arg 4 is hss password (ex: admin) -# arg 5 is database name (ex: oai_db) -function main() -{ - EXPECTED_ARGS=5 - E_BADARGS=65 - MYSQL=`which mysql` - rv=0 - if [ $# -ne $EXPECTED_ARGS ] - then - echo_fatal "Usage: $0 dbuser dbpass hssuser hsspass databasename" - rv=1 - fi - - set_openair_env - - # removed % - #Q1="GRANT ALL PRIVILEGES ON *.* TO '$3'@'%' IDENTIFIED BY '$4' WITH GRANT OPTION;" - Q1="GRANT ALL PRIVILEGES ON *.* TO '$3'@'localhost' IDENTIFIED BY '$4' WITH GRANT OPTION;" - Q2="FLUSH PRIVILEGES;" - SQL="${Q1}${Q2}" - $MYSQL -u $1 --password=$2 -e "$SQL" - if [ $? -ne 0 ]; then - echo_error "$3 permissions failed" - return 1 - else - echo_success "$3 permissions succeeded" - fi - - - Q1="CREATE DATABASE IF NOT EXISTS ${BTICK}$5${BTICK};" - SQL="${Q1}" - $MYSQL -u $3 --password=$4 -e "$SQL" - if [ $? -ne 0 ]; then - echo_error "$5 creation failed" - return 1 - else - echo_success "$5 creation succeeded" - fi - - - # test if tables have been created - mysql -u $3 --password=$4 -e "desc $5.users" > /dev/null 2>&1 - - if [ $? -eq 1 ]; then - $MYSQL -u $3 --password=$4 $5 < $OPENAIRCN_DIR/OPENAIRHSS/db/$5.sql - if [ $? -ne 0 ]; then - echo_error "$5 tables creation failed" - return 1 - else - echo_success "$5 tables creation succeeded" - fi - fi - - return 0 -} - -main "$@" - diff --git a/cmake_targets/tools/epc.conf.in b/cmake_targets/tools/epc.conf.in deleted file mode 100755 index 7af3cca4cc..0000000000 --- a/cmake_targets/tools/epc.conf.in +++ /dev/null @@ -1,163 +0,0 @@ -# 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 : -{ - - REALM = "@REALM@"; # DO NOT CHANGE - # Define the limits of the system in terms of served eNB and served UE. - # When the limits will be reached, overload procedure will take place. - MAXENB = 10; - MAXUE = 100; - RELATIVE_CAPACITY = 10; - # Display statistics about whole system (expressed in seconds) - MME_STATISTIC_TIMER = 10; - EMERGENCY_ATTACH_SUPPORTED = "no"; - UNAUTHENTICATED_IMSI_SUPPORTED = "no"; - # ASN1 VERBOSITY: none, info, annoying - VERBOSITY = "none"; - - - IP_CAPABILITY = "IPV4V6"; - - - INTERTASK_INTERFACE : - { - # max queue size per task - ITTI_QUEUE_SIZE = 2000000; - }; - - S6A : - { - S6A_CONF = "@FREEDIAMETER_PATH@/../etc/freeDiameter/mme_fd.conf";# DO NOT CHANGE - HSS_HOSTNAME = "@HSS_HOSTNAME@"; # DO NOT CHANGE - }; - - # ------- SCTP definitions - SCTP : - { - # Number of streams to use in input/output - SCTP_INSTREAMS = 8; - SCTP_OUTSTREAMS = 8; - }; - - # ------- S1AP definitions - S1AP : - { - # outcome drop timer value (seconds) - S1AP_OUTCOME_TIMER = 10; - }; - - # ------- MME served GUMMEI - GUMMEI : - { - # MME code DEFAULT = 0 - # size = 8 bits - # maximum of 256 values, comma separated - MME_CODE = [ 1, 30 , 31, 32, 33, 34, 35, 36, 56 , 29 , 8 ]; - - # MME GROUP ID DEFAULT = 0 - # size = 16 bits - # maximum of 65535 values, comma separated - MME_GID = [ 32768 , 4 , 5 , 30 , 8 , 9 , 50021 ]; - - # TA (mcc.mnc:tracking area code) DEFAULT = 208.34:0 - # max values = 999.999:65535 - # maximum of 32 values, comma separated - TAI_LIST = ( - {MCC="208" ; MNC="95"; TAC = "1"; } # YOUR PLMN CONFIG HERE - ); - }; - - NAS : - { - # 3GPP TS 33.401 section 7.2.4.3 Procedures for NAS algorithm selection - # decreasing preference goes from left to right - ORDERED_SUPPORTED_INTEGRITY_ALGORITHM_LIST = [ "EIA2" , "EIA1" , "EIA0" ]; - ORDERED_SUPPORTED_CIPHERING_ALGORITHM_LIST = [ "EEA0" , "EEA1" , "EEA2" ]; - }; - - NETWORK_INTERFACES : - { - MME_INTERFACE_NAME_FOR_S1_MME = "eth2"; # YOUR NETWORK CONFIG HERE - MME_IPV4_ADDRESS_FOR_S1_MME = "192.168.27.101//24"; # YOUR NETWORK CONFIG HERE - - MME_INTERFACE_NAME_FOR_S11_MME = "none"; - MME_IPV4_ADDRESS_FOR_S11_MME = "0.0.0.0/24"; - }; -}; - -S-GW : -{ - NETWORK_INTERFACES : - { - SGW_INTERFACE_NAME_FOR_S11 = "none"; - SGW_IPV4_ADDRESS_FOR_S11 = "0.0.0.0/24"; - - SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP = "eth2"; # YOUR NETWORK CONFIG HERE - SGW_IPV4_ADDRESS_FOR_S1U_S12_S4_UP = "192.168.27.101/24"; # YOUR NETWORK CONFIG HERE - SGW_IPV4_PORT_FOR_S1U_S12_S4_UP = 2152; # PREFER NOT CHANGE - - SGW_INTERFACE_NAME_FOR_S5_S8_UP = "none"; # DO NOT CHANGE - SGW_IPV4_ADDRESS_FOR_S5_S8_UP = "0.0.0.0/24"; # DO NOT CHANGE - }; -}; - -P-GW = -{ - NETWORK_INTERFACES : - { - PGW_INTERFACE_NAME_FOR_S5_S8 = "none"; # DO NOT CHANGE - PGW_IPV4_ADDRESS_FOR_S5_S8 = "0.0.0.0/24"; # DO NOT CHANGE - - PGW_INTERFACE_NAME_FOR_SGI = "eth0"; # YOUR NETWORK CONFIG HERE - PGW_IPV4_ADDRESS_FOR_SGI = "192.168.12.213/24"; # YOUR NETWORK CONFIG HERE - PGW_MASQUERADE_SGI = "yes"; # YOUR NETWORK CONFIG HERE - }; - - IP_ADDRESS_POOL : - { - IPV4_LIST = ( - "192.188.0.0/24", # YOUR NETWORK CONFIG HERE - "192.188.1.0/24" # YOUR NETWORK CONFIG HERE - ); - IPV6_LIST = ( - "2014:02:26::0/120" # 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 -}; - - diff --git a/cmake_targets/tools/epc.local.enb.conf.in b/cmake_targets/tools/epc.local.enb.conf.in deleted file mode 100755 index 353a294f64..0000000000 --- a/cmake_targets/tools/epc.local.enb.conf.in +++ /dev/null @@ -1,130 +0,0 @@ -MME : -{ - - REALM = "@REALM@"; # DO NOT CHANGE - # Define the limits of the system in terms of served eNB and served UE. - # When the limits will be reached, overload procedure will take place. - MAXENB = 10; - MAXUE = 100; - RELATIVE_CAPACITY = 10; - # Display statistics about whole system (expressed in seconds) - MME_STATISTIC_TIMER = 10; - EMERGENCY_ATTACH_SUPPORTED = "no"; - UNAUTHENTICATED_IMSI_SUPPORTED = "no"; - # ASN1 VERBOSITY: none, info, annoying - VERBOSITY = "none"; - - - IP_CAPABILITY = "IPV4V6"; - - - INTERTASK_INTERFACE : - { - # max queue size per task - ITTI_QUEUE_SIZE = 2000000; - }; - - S6A : - { - S6A_CONF = "@FREEDIAMETER_PATH@/../etc/freeDiameter/mme_fd.conf";# DO NOT CHANGE - HSS_HOSTNAME = "@HSS_HOSTNAME@"; # DO NOT CHANGE - }; - - # ------- SCTP definitions - SCTP : - { - # Number of streams to use in input/output - SCTP_INSTREAMS = 8; - SCTP_OUTSTREAMS = 8; - }; - - # ------- S1AP definitions - S1AP : - { - # outcome drop timer value (seconds) - S1AP_OUTCOME_TIMER = 10; - }; - - # ------- MME served GUMMEI - GUMMEI : - { - # MME code DEFAULT = 0 - # size = 8 bits - # maximum of 256 values, comma separated - MME_CODE = [ 1, 30 , 31, 32, 33, 34, 35, 36, 56 , 29 , 8 ]; - - # MME GROUP ID DEFAULT = 0 - # size = 16 bits - # maximum of 65535 values, comma separated - MME_GID = [ 32768 , 4 , 5 , 30 , 8 , 9 , 50021 ]; - - # TA (mcc.mnc:tracking area code) DEFAULT = 208.34:0 - # max values = 999.999:65535 - # maximum of 32 values, comma separated - TAI_LIST = ( - {MCC="208" ; MNC="95"; TAC = "1"; } # YOUR PLMN CONFIG HERE - ); - }; - - NAS : - { - # 3GPP TS 33.401 section 7.2.4.3 Procedures for NAS algorithm selection - # decreasing preference goes from left to right - ORDERED_SUPPORTED_INTEGRITY_ALGORITHM_LIST = [ "EIA2" , "EIA1" , "EIA0" ]; - ORDERED_SUPPORTED_CIPHERING_ALGORITHM_LIST = [ "EEA0" , "EEA1" , "EEA2" ]; - }; - - NETWORK_INTERFACES : - { - MME_INTERFACE_NAME_FOR_S1_MME = "tun2"; # DO NOT CHANGE - MME_IPV4_ADDRESS_FOR_S1_MME = "192.188.2.2/24"; # DO NOT CHANGE - - MME_INTERFACE_NAME_FOR_S11_MME = "none"; - MME_IPV4_ADDRESS_FOR_S11_MME = "0.0.0.0/24"; - }; -}; - -S-GW : -{ - NETWORK_INTERFACES : - { - SGW_INTERFACE_NAME_FOR_S11 = "none"; - SGW_IPV4_ADDRESS_FOR_S11 = "0.0.0.0/24"; - - SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP = "lo"; # DO NOT CHANGE - SGW_IPV4_ADDRESS_FOR_S1U_S12_S4_UP = "127.0.0.1/24"; # DO NOT CHANGE - SGW_IPV4_PORT_FOR_S1U_S12_S4_UP = 2152; # PREFER NOT CHANGE - - SGW_INTERFACE_NAME_FOR_S5_S8_UP = "none"; # DO NOT CHANGE - SGW_IPV4_ADDRESS_FOR_S5_S8_UP = "0.0.0.0/24"; # DO NOT CHANGE - }; -}; - -P-GW = -{ - NETWORK_INTERFACES : - { - PGW_INTERFACE_NAME_FOR_S5_S8 = "none"; # DO NOT CHANGE - PGW_IPV4_ADDRESS_FOR_S5_S8 = "0.0.0.0/24"; # DO NOT CHANGE - - PGW_INTERFACE_NAME_FOR_SGI = "eth0"; # YOUR NETWORK CONFIG HERE - PGW_IPV4_ADDRESS_FOR_SGI = "192.168.12.213/24"; # YOUR NETWORK CONFIG HERE - PGW_MASQUERADE_SGI = "yes"; # YOUR NETWORK CONFIG HERE - }; - - IP_ADDRESS_POOL : - { - IPV4_LIST = ( - "192.187.0.0/24", # YOUR NETWORK CONFIG HERE - "192.187.1.0/24" # YOUR NETWORK CONFIG HERE - ); - IPV6_LIST = ( - "2014:02:26::0/120" # 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 -}; - - diff --git a/cmake_targets/tools/example_enb_exmimo_mme_hss.txt b/cmake_targets/tools/example_enb_exmimo_mme_hss.txt index c8227f176a..2c693a5003 100644 --- a/cmake_targets/tools/example_enb_exmimo_mme_hss.txt +++ b/cmake_targets/tools/example_enb_exmimo_mme_hss.txt @@ -21,7 +21,7 @@ # Contact Information # OpenAirInterface Admin: openair_admin@eurecom.fr # OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr +# OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr # # Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE # diff --git a/cmake_targets/tools/example_oaisim_enb_ue_mme_virtual.txt b/cmake_targets/tools/example_oaisim_enb_ue_mme_virtual.txt index d07d10b9d0..b47c6137c5 100644 --- a/cmake_targets/tools/example_oaisim_enb_ue_mme_virtual.txt +++ b/cmake_targets/tools/example_oaisim_enb_ue_mme_virtual.txt @@ -21,7 +21,7 @@ # Contact Information # OpenAirInterface Admin: openair_admin@eurecom.fr # OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr +# OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr # # Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE # diff --git a/cmake_targets/tools/indent_source_code b/cmake_targets/tools/indent_source_code index f666e65660..64de1c4c50 100755 --- a/cmake_targets/tools/indent_source_code +++ b/cmake_targets/tools/indent_source_code @@ -22,7 +22,7 @@ # Contact Information # OpenAirInterface Admin: openair_admin@eurecom.fr # OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr +# OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr # # Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE # @@ -50,7 +50,7 @@ set_openair_env #find $OPENAIR_DIR/openair1 -type f \( -name '*.c' -o -name '*.h' \) -exec sed --in-place 's/[[:space:]]\+$//' {} \+ #find $OPENAIR_DIR/openair2 -type f \( -name '*.c' -o -name '*.h' \) -exec sed --in-place 's/[[:space:]]\+$//' {} \+ #find $OPENAIR_DIR/openair3 -type f \( -name '*.c' -o -name '*.h' \) -exec sed --in-place 's/[[:space:]]\+$//' {} \+ - #find $OPENAIR_DIR/openair-cn -type f \( -name '*.c' -o -name '*.h' \) -exec sed --in-place 's/[[:space:]]\+$//' {} \+ + #find $OPENAIR_DIR/openair3 -type f \( -name '*.c' -o -name '*.h' \) -exec sed --in-place 's/[[:space:]]\+$//' {} \+ #find $OPENAIR_DIR/targets -type f \( -name '*.c' -o -name '*.h' \) -exec sed --in-place 's/[[:space:]]\+$//' {} \+ # Style google not available on 14.04 @@ -65,8 +65,8 @@ set_openair_env $OPENAIR_DIR/openair2/*.c \ $OPENAIR_DIR/openair3/*.h \ $OPENAIR_DIR/openair3/*.c \ - $OPENAIR_DIR/openair-cn/*.h \ - $OPENAIR_DIR/openair-cn/*.c \ + $OPENAIR_DIR/openair3/*.h \ + $OPENAIR_DIR/openair3/*.c \ $OPENAIR_DIR/targets/*.h \ $OPENAIR_DIR/targets/*.c } diff --git a/cmake_targets/tools/init_exmimo2 b/cmake_targets/tools/init_exmimo2 index 5e4d13bec3..66eedf93dd 100755 --- a/cmake_targets/tools/init_exmimo2 +++ b/cmake_targets/tools/init_exmimo2 @@ -23,7 +23,7 @@ # Contact Information # OpenAirInterface Admin: openair_admin@eurecom.fr # OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr +# OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr # # Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE # diff --git a/cmake_targets/tools/init_nas_nos1 b/cmake_targets/tools/init_nas_nos1 index fed8eacc10..d2b7760867 100644 --- a/cmake_targets/tools/init_nas_nos1 +++ b/cmake_targets/tools/init_nas_nos1 @@ -23,7 +23,7 @@ # Contact Information # OpenAirInterface Admin: openair_admin@eurecom.fr # OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr +# OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr # # Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE # diff --git a/cmake_targets/tools/perf_oai.bash b/cmake_targets/tools/perf_oai.bash index 71519534e3..2254f64ea3 100755 --- a/cmake_targets/tools/perf_oai.bash +++ b/cmake_targets/tools/perf_oai.bash @@ -21,7 +21,7 @@ # Contact Information # OpenAirInterface Admin: openair_admin@eurecom.fr # OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr +# OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr # # Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE # @@ -736,7 +736,7 @@ function main() cecho "OPENAIR1_DIR = $OPENAIR1_DIR" $green cecho "OPENAIR2_DIR = $OPENAIR2_DIR" $green cecho "OPENAIR3_DIR = $OPENAIR3_DIR" $green - cecho "OPENAIRCN_DIR = $OPENAIRCN_DIR" $green + cecho "OPENAIR3_DIR = $OPENAIR3_DIR" $green cecho "OPENAIR_TARGETS = $OPENAIR_TARGETS" $green @@ -744,7 +744,7 @@ function main() echo "OPENAIR1_DIR = $OPENAIR1_DIR" >> results/${oai_exp_date} echo "OPENAIR2_DIR = $OPENAIR2_DIR" >> results/${oai_exp_date} echo "OPENAIR3_DIR = $OPENAIR3_DIR" >> results/${oai_exp_date} - echo "OPENAIRCN_DIR = $OPENAIRCN_DIR" >> results/${oai_exp_date} + echo "OPENAIR3_DIR = $OPENAIR3_DIR" >> results/${oai_exp_date} echo "OPENAIR_TARGETS = $OPENAIR_TARGETS" >> results/${oai_exp_date} diff --git a/cmake_targets/tools/run_enb_s1_exmimo b/cmake_targets/tools/run_enb_s1_exmimo index a2a50220a6..e2df8b5049 100755 --- a/cmake_targets/tools/run_enb_s1_exmimo +++ b/cmake_targets/tools/run_enb_s1_exmimo @@ -22,7 +22,7 @@ # Contact Information # OpenAirInterface Admin: openair_admin@eurecom.fr # OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr +# OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr # # Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE # diff --git a/cmake_targets/tools/run_enb_s1_usrp b/cmake_targets/tools/run_enb_s1_usrp index a4766ed658..01f4156071 100755 --- a/cmake_targets/tools/run_enb_s1_usrp +++ b/cmake_targets/tools/run_enb_s1_usrp @@ -22,7 +22,7 @@ # Contact Information # OpenAirInterface Admin: openair_admin@eurecom.fr # OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr +# OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr # # Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE # diff --git a/cmake_targets/tools/run_enb_ue_virt_noS1 b/cmake_targets/tools/run_enb_ue_virt_noS1 index c1ce434fa5..74abe0de02 100755 --- a/cmake_targets/tools/run_enb_ue_virt_noS1 +++ b/cmake_targets/tools/run_enb_ue_virt_noS1 @@ -22,7 +22,7 @@ # Contact Information # OpenAirInterface Admin: openair_admin@eurecom.fr # OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr +# OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr # # Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE # diff --git a/cmake_targets/tools/run_enb_ue_virt_s1 b/cmake_targets/tools/run_enb_ue_virt_s1 index 2ce29429b1..9cc226a698 100755 --- a/cmake_targets/tools/run_enb_ue_virt_s1 +++ b/cmake_targets/tools/run_enb_ue_virt_s1 @@ -22,7 +22,7 @@ # Contact Information # OpenAirInterface Admin: openair_admin@eurecom.fr # OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr +# OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr # # Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE # diff --git a/cmake_targets/tools/run_epc b/cmake_targets/tools/run_epc deleted file mode 100755 index 08a014cde0..0000000000 --- a/cmake_targets/tools/run_epc +++ /dev/null @@ -1,199 +0,0 @@ -#!/bin/bash -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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) anylater 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 . -# -# 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 run_epc -# brief run script for EPC (MME+SGW-LITE). -# author Lionel GAUTHIER -# company Eurecom -# email: lionel.gauthier@eurecom.fr - - -################################ -# include helper functions -################################ -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 - - -function help() -{ - echo_error " " - echo_error "Usage: run_epc [OPTION]..." - echo_error "Run the EPC executable (MME+SGW-LITE)." - echo_error " " - echo_error "Options:" - echo_error "Mandatory arguments to long options are mandatory for short options too." - echo_error " -g, --gdb Run with GDB." - echo_error " -h, --help Print this help." - echo_error " -K, --itti-dump-file ITTI dump file containing all ITTI events occuring during EPC runtime." - echo_error " -l, --local-enb EPC run on the same eNB host." - echo_error " -m, --mscgen directory Generate mscgen output files in a directory" - echo_error " -v, --verbosity-level Verbosity level (0,1,2)." - echo_error " 0 -> ASN1 XER printf off" - echo_error " 1 -> ASN1 XER printf on and ASN1 debug off" - 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 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 - - until [ -z "$1" ] - do - case "$1" in - -g | --gdb) - run_gdb=1 - echo "setting GDB flag to: $GDB" - shift; - ;; - -h | --help) - help - exit 0 - ;; - -K | --itti-dump-file) - local 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/epc_itti.log" - else - shift 1; - fi - echo "setting ITTI dump file to: $itti_dump_file" - exe_arguments="$exe_arguments -K $itti_dump_file" - shift 1; - ;; - -l | --local-enb) - epc_local=1 - shift; - ;; - -m | --mscgen) - 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" - exit -1 - fi - ;; - -v | --verbosity-level) - local verbosity_level=$2 - echo "setting verbosity level to: $verbosity_level" - exe_arguments="-v $verbosity_level $exe_arguments" - shift 2; - ;; - *) - echo "Unknown option $1" - help - exit 0 - ;; - esac - done - - set_openair_env - cecho "OPENAIR_DIR = $OPENAIR_DIR" $green - - - 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 [ $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 - # 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.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 - if [ $g_run_msc_gen -eq 1 ]; then - do_msc_gen - 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 "$@" diff --git a/cmake_targets/tools/run_hss b/cmake_targets/tools/run_hss deleted file mode 100755 index 03b2132d96..0000000000 --- a/cmake_targets/tools/run_hss +++ /dev/null @@ -1,113 +0,0 @@ -#!/bin/bash -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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) anylater 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 . -# -# 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 run_hss -# brief run script for HSS (!EXPERIMENTAL!). -# author Lionel GAUTHIER -# company Eurecom -# email: lionel.gauthier@eurecom.fr - - -################################ -# include helper functions -################################ -THIS_SCRIPT_PATH=$(dirname $(readlink -f $0)) -source $THIS_SCRIPT_PATH/build_helper - - -function help() -{ - echo_error " " - echo_error "Usage: run_hss [OPTION]..." - echo_error "Run the HSS executable (experimental)." - echo_error " " - echo_error "Options:" - echo_error "Mandatory arguments to long options are mandatory for short options too." - echo_error " -g, --gdb Run with GDB." - echo_error " -h, --help Print this help." -} - - - -function main() -{ - local -i run_gdb=0 - local exe_arguments=" -c ./hss.conf" - - until [ -z "$1" ] - do - case "$1" in - -g | --gdb) - run_gdb=1 - echo "setting GDB flag to: $GDB" - shift; - ;; - -h | --help) - help - exit 0 - ;; - *) - echo "Unknown option $1" - help - exit 0 - ;; - esac - done - - set_openair_env - cecho "OPENAIR_DIR = $OPENAIR_DIR" $green - cecho "OPENAIR1_DIR = $OPENAIR1_DIR" $green - cecho "OPENAIR2_DIR = $OPENAIR2_DIR" $green - cecho "OPENAIR3_DIR = $OPENAIR3_DIR" $green - cecho "OPENAIRCN_DIR = $OPENAIRCN_DIR" $green - cecho "OPENAIR_TARGETS = $OPENAIR_TARGETS" $green - - - if [ ! -e $OPENAIR_TARGETS/bin/openair-hss ]; then - echo_fatal "Cannot find $OPENAIR_TARGETS/bin/openair-hss executable" - fi - - # for file config relative path - cd $OPENAIR_TARGETS/bin - - if [ $run_gdb -eq 0 ]; then - exec $OPENAIR_TARGETS/bin/openair-hss `echo $exe_arguments` 2>&1 - else - touch ~/.gdb_hss - chmod 777 ~/.gdb_hss - echo "file $OPENAIR_TARGETS/bin/openair-hss" > ~/.gdb_hss - echo "set args $exe_arguments " >> ~/.gdb_hss - echo "run" >> ~/.gdb_hss - cat ~/.gdb_hss - gdb -n -x ~/.gdb_hss 2>&1 - fi -} - - -main "$@" diff --git a/cmake_targets/tools/s6a.conf.in b/cmake_targets/tools/s6a.conf.in deleted file mode 100644 index 6b357b71fc..0000000000 --- a/cmake_targets/tools/s6a.conf.in +++ /dev/null @@ -1,97 +0,0 @@ -# -------- Local --------- - -# Uncomment if the framework cannot resolv it. -Identity = "@MME_FQDN@"; -Realm = "@REALM@"; - -# TLS configuration (see previous section) -TLS_Cred = "@FREEDIAMETER_PATH@/../etc/freeDiameter/mme.cert.pem", - "@FREEDIAMETER_PATH@/../etc/freeDiameter/mme.key.pem"; -TLS_CA = "@FREEDIAMETER_PATH@/../etc/freeDiameter/mme.cacert.pem"; - -# Disable use of TCP protocol (only listen and connect in SCTP) -# Default : TCP enabled -@TRANSPORT_option@; - -# This option is ignored if freeDiameter is compiled with DISABLE_SCTP option. -# Prefer TCP instead of SCTP for establishing new connections. -# This setting may be overwritten per peer in peer configuration blocs. -# Default : SCTP is attempted first. -@TRANSPORT_PREFER_TCP_option@; - - -No_IPv6; - -# Overwrite the number of SCTP streams. This value should be kept low, -# especially if you are using TLS over SCTP, because it consumes a lot of -# resources in that case. See tickets 19 and 27 for some additional details on -# this. -# Limit the number of SCTP streams -SCTP_streams = 3; - - -# By default, freeDiameter acts as a Diameter Relay Agent by forwarding all -# messages it cannot handle locally. This parameter disables this behavior. -NoRelay; - - -TLS_old_method; - - -AppServThreads = 1; - -# Specify the addresses on which to bind the listening server. This must be -# specified if the framework is unable to auto-detect these addresses, or if the -# auto-detected values are incorrect. Note that the list of addresses is sent -# in CER or CEA message, so one should pay attention to this parameter if some -# adresses should be kept hidden. -@ListenOn@ - -@DIAMETER_PORT@; -@DIAMETER_SEC_PORT@; - -# -------- Extensions --------- - -# Uncomment (and create rtd.conf) to specify routing table for this peer. -#LoadExtension = "rt_default.fdx" : "rtd.conf"; - -# Uncomment (and create acl.conf) to allow incoming connections from other peers. -#LoadExtension = "acl_wl.fdx" : "acl.conf"; - -# Uncomment to display periodic state information -#LoadExtension = "dbg_monitor.fdx"; - -# Uncomment to enable an interactive Python interpreter session. -# (see doc/dbg_interactive.py.sample for more information) -#LoadExtension = "dbg_interactive.fdx"; - -# Load the RFC4005 dictionary objects -#LoadExtension = "dict_nasreq.fdx"; - -LoadExtension = "dict_nas_mipv6.fdx"; -LoadExtension = "dict_s6a.fdx"; - -# Load RFC4072 dictionary objects -#LoadExtension = "dict_eap.fdx"; - -# Load the Diameter EAP server extension (requires diameap.conf) -#LoadExtension = "app_diameap.fdx" : "diameap.conf"; - -# Load the Accounting Server extension (requires app_acct.conf) -#LoadExtension = "app_acct.fdx" : "app_acct.conf"; - -# -------- Peers --------- - -# The framework will actively attempt to establish and maintain a connection -# with the peers listed here. -# For only accepting incoming connections, see the acl_wl.fx extension. - -# ConnectPeer -# Declare a remote peer to which this peer must maintain a connection. -# In addition, this allows specifying non-default parameters for this peer only -# (for example disable SCTP with this peer, or use RFC3588-flavour TLS). -# Note that by default, if a peer is not listed as a ConnectPeer entry, an -# incoming connection from this peer will be rejected. If you want to accept -# incoming connections from other peers, see the acl_wl.fdx? extension which -# allows exactly this. -@ConnectPeer@ = "@HSS_FQDN@" { ConnectTo = "@HSS_IP@"; No_IPv6; No_TLS ; port = 3868; Realm = "@REALM@"; }; diff --git a/common/utils/COPYING b/common/utils/COPYING index 818433ecc0..c888423064 100644 --- a/common/utils/COPYING +++ b/common/utils/COPYING @@ -1,674 +1,28 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program 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. - - This program 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 this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ \ No newline at end of file diff --git a/common/utils/asn1_conversions.h b/common/utils/asn1_conversions.h index be7748fecf..bb7b244989 100644 --- a/common/utils/asn1_conversions.h +++ b/common/utils/asn1_conversions.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #ifndef ASN1_CONVERSIONS_H_ #define ASN1_CONVERSIONS_H_ diff --git a/common/utils/assertions.h b/common/utils/assertions.h index a33c35ead3..8bb74109ed 100644 --- a/common/utils/assertions.h +++ b/common/utils/assertions.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #ifndef UTILS_ASSERTIONS_H_ #define UTILS_ASSERTIONS_H_ diff --git a/common/utils/collection/COPYING b/common/utils/collection/COPYING index 818433ecc0..d605b9a3b1 100644 --- a/common/utils/collection/COPYING +++ b/common/utils/collection/COPYING @@ -1,674 +1,28 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program 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. - - This program 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 this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ diff --git a/common/utils/collection/hashtable/COPYING b/common/utils/collection/hashtable/COPYING index 818433ecc0..d605b9a3b1 100644 --- a/common/utils/collection/hashtable/COPYING +++ b/common/utils/collection/hashtable/COPYING @@ -1,674 +1,28 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program 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. - - This program 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 this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ diff --git a/common/utils/collection/hashtable/hashtable.c b/common/utils/collection/hashtable/hashtable.c index ba2686c718..d424e2a0ad 100755 --- a/common/utils/collection/hashtable/hashtable.c +++ b/common/utils/collection/hashtable/hashtable.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include diff --git a/common/utils/collection/hashtable/hashtable.h b/common/utils/collection/hashtable/hashtable.h index 2082e4f85f..5c06937bed 100755 --- a/common/utils/collection/hashtable/hashtable.h +++ b/common/utils/collection/hashtable/hashtable.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #ifndef _UTILS_COLLECTION_HASH_TABLE_H_ diff --git a/common/utils/collection/hashtable/obj_hashtable.c b/common/utils/collection/hashtable/obj_hashtable.c index b1d804335f..63fd8a688b 100755 --- a/common/utils/collection/hashtable/obj_hashtable.c +++ b/common/utils/collection/hashtable/obj_hashtable.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include diff --git a/common/utils/collection/hashtable/obj_hashtable.h b/common/utils/collection/hashtable/obj_hashtable.h index bf7ea89b96..8743a13f08 100755 --- a/common/utils/collection/hashtable/obj_hashtable.h +++ b/common/utils/collection/hashtable/obj_hashtable.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #ifndef _UTILS_COLLECTION_OBJ_HASH_TABLE_H_ #define _UTILS_COLLECTION_OBJ_HASH_TABLE_H_ diff --git a/common/utils/itti/COPYING b/common/utils/itti/COPYING index 818433ecc0..c888423064 100644 --- a/common/utils/itti/COPYING +++ b/common/utils/itti/COPYING @@ -1,674 +1,28 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program 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. - - This program 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 this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ \ No newline at end of file diff --git a/common/utils/itti/assertions.h b/common/utils/itti/assertions.h index df14404c79..c047ef6b76 100644 --- a/common/utils/itti/assertions.h +++ b/common/utils/itti/assertions.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include diff --git a/common/utils/itti/backtrace.c b/common/utils/itti/backtrace.c index f83d018d6e..3d984cbf11 100644 --- a/common/utils/itti/backtrace.c +++ b/common/utils/itti/backtrace.c @@ -1,32 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - - *******************************************************************************/ - +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/common/utils/itti/backtrace.h b/common/utils/itti/backtrace.h index c2622a6b07..1ba8143860 100644 --- a/common/utils/itti/backtrace.h +++ b/common/utils/itti/backtrace.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include diff --git a/common/utils/itti/intertask_interface.c b/common/utils/itti/intertask_interface.c index c61dd07636..572c207b3f 100644 --- a/common/utils/itti/intertask_interface.c +++ b/common/utils/itti/intertask_interface.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #define _GNU_SOURCE #include diff --git a/common/utils/itti/intertask_interface.h b/common/utils/itti/intertask_interface.h index 350c88af6a..46fb0c749f 100644 --- a/common/utils/itti/intertask_interface.h +++ b/common/utils/itti/intertask_interface.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ /** @defgroup _intertask_interface_impl_ Intertask Interface Mechanisms * Implementation diff --git a/common/utils/itti/intertask_interface_dump.c b/common/utils/itti/intertask_interface_dump.c index e17cdab85a..491bff59b0 100644 --- a/common/utils/itti/intertask_interface_dump.c +++ b/common/utils/itti/intertask_interface_dump.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ /** @brief Intertask Interface Signal Dumper diff --git a/common/utils/itti/intertask_interface_dump.h b/common/utils/itti/intertask_interface_dump.h index 8d06a8ed1f..acaf450cf4 100644 --- a/common/utils/itti/intertask_interface_dump.h +++ b/common/utils/itti/intertask_interface_dump.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #ifndef INTERTASK_INTERFACE_DUMP_H_ #define INTERTASK_INTERFACE_DUMP_H_ diff --git a/common/utils/itti/intertask_interface_init.h b/common/utils/itti/intertask_interface_init.h index 1135f17738..a01f1eea90 100644 --- a/common/utils/itti/intertask_interface_init.h +++ b/common/utils/itti/intertask_interface_init.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ /** @defgroup _intertask_interface_impl_ Intertask Interface Mechanisms * Implementation diff --git a/common/utils/itti/intertask_interface_types.h b/common/utils/itti/intertask_interface_types.h index 3e0203df6d..bf29e12008 100644 --- a/common/utils/itti/intertask_interface_types.h +++ b/common/utils/itti/intertask_interface_types.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ /** @defgroup _intertask_interface_impl_ Intertask Interface Mechanisms * Implementation diff --git a/common/utils/itti/intertask_messages_def.h b/common/utils/itti/intertask_messages_def.h index baac5cd6d0..4f125f4649 100644 --- a/common/utils/itti/intertask_messages_def.h +++ b/common/utils/itti/intertask_messages_def.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ /* This message asks for task initialization */ MESSAGE_DEF(INITIALIZE_MESSAGE, MESSAGE_PRIORITY_MED, IttiMsgEmpty, initialize_message) diff --git a/common/utils/itti/intertask_messages_types.h b/common/utils/itti/intertask_messages_types.h index c047d7dae8..e64a709636 100644 --- a/common/utils/itti/intertask_messages_types.h +++ b/common/utils/itti/intertask_messages_types.h @@ -1,32 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - - *******************************************************************************/ - +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ /* * intertask_messages_types.h diff --git a/common/utils/itti/itti_types.h b/common/utils/itti/itti_types.h index ec1b290bfd..f1a17d1228 100644 --- a/common/utils/itti/itti_types.h +++ b/common/utils/itti/itti_types.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ /** @brief Intertask Interface common types * Contains type definitions used for generating and parsing ITTI messages. diff --git a/common/utils/itti/memory_pools.c b/common/utils/itti/memory_pools.c index 568c03defe..dadc80ca2a 100644 --- a/common/utils/itti/memory_pools.c +++ b/common/utils/itti/memory_pools.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #ifdef RTAI # include diff --git a/common/utils/itti/memory_pools.h b/common/utils/itti/memory_pools.h index a84499c2fc..72268f90d7 100644 --- a/common/utils/itti/memory_pools.h +++ b/common/utils/itti/memory_pools.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #ifndef MEMORY_POOLS_H_ #define MEMORY_POOLS_H_ diff --git a/common/utils/itti/messages_def.h b/common/utils/itti/messages_def.h index ea2a321ef8..7df3789fd7 100644 --- a/common/utils/itti/messages_def.h +++ b/common/utils/itti/messages_def.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ // These messages files are mandatory and must always be placed in first position #include "intertask_messages_def.h" diff --git a/common/utils/itti/messages_types.h b/common/utils/itti/messages_types.h index 2594d7b534..3426aada3e 100644 --- a/common/utils/itti/messages_types.h +++ b/common/utils/itti/messages_types.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ /* * messages_types.h diff --git a/common/utils/itti/signals.c b/common/utils/itti/signals.c index e1950b4665..b9a3316cec 100644 --- a/common/utils/itti/signals.c +++ b/common/utils/itti/signals.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #if HAVE_CONFIG_H # include "config.h" diff --git a/common/utils/itti/signals.h b/common/utils/itti/signals.h index 65bc59b046..53a73afa6f 100644 --- a/common/utils/itti/signals.h +++ b/common/utils/itti/signals.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #ifndef SIGNALS_H_ #define SIGNALS_H_ diff --git a/common/utils/itti/tasks_def.h b/common/utils/itti/tasks_def.h index 6d6ab48332..5f2a413235 100644 --- a/common/utils/itti/tasks_def.h +++ b/common/utils/itti/tasks_def.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ // This task is mandatory and must always be placed in first position TASK_DEF(TASK_TIMER, TASK_PRIORITY_MED, 10) diff --git a/common/utils/itti/timer.c b/common/utils/itti/timer.c index 25f70f04d7..40e8791022 100644 --- a/common/utils/itti/timer.c +++ b/common/utils/itti/timer.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include diff --git a/common/utils/itti/timer.h b/common/utils/itti/timer.h index 9f2ec30f7d..825b3ca2eb 100644 --- a/common/utils/itti/timer.h +++ b/common/utils/itti/timer.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #ifndef TIMER_H_ #define TIMER_H_ diff --git a/common/utils/itti/timer_messages_def.h b/common/utils/itti/timer_messages_def.h index 077147fe50..56af4e8a8e 100644 --- a/common/utils/itti/timer_messages_def.h +++ b/common/utils/itti/timer_messages_def.h @@ -1,31 +1,30 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - - *******************************************************************************/ - +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ MESSAGE_DEF(TIMER_HAS_EXPIRED, MESSAGE_PRIORITY_MED_PLUS, timer_has_expired_t, timer_has_expired) diff --git a/common/utils/itti/timer_messages_types.h b/common/utils/itti/timer_messages_types.h index c54f4d165e..8126b75aef 100644 --- a/common/utils/itti/timer_messages_types.h +++ b/common/utils/itti/timer_messages_types.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #ifndef TIMER_MESSAGES_TYPES_H_ #define TIMER_MESSAGES_TYPES_H_ diff --git a/common/utils/itti_analyzer/COPYING b/common/utils/itti_analyzer/COPYING index 818433ecc0..c888423064 100644 --- a/common/utils/itti_analyzer/COPYING +++ b/common/utils/itti_analyzer/COPYING @@ -1,674 +1,28 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program 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. - - This program 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 this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ \ No newline at end of file diff --git a/common/utils/itti_analyzer/README b/common/utils/itti_analyzer/README index 31dc085b23..8ca077a227 100644 --- a/common/utils/itti_analyzer/README +++ b/common/utils/itti_analyzer/README @@ -11,4 +11,4 @@ To run itti_analyzer, please perform the following actions: 5) make -6) ./itt \ No newline at end of file +6) ./itti_analyzer \ No newline at end of file diff --git a/common/utils/itti_analyzer/common/COPYING b/common/utils/itti_analyzer/common/COPYING index 818433ecc0..d605b9a3b1 100644 --- a/common/utils/itti_analyzer/common/COPYING +++ b/common/utils/itti_analyzer/common/COPYING @@ -1,674 +1,28 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program 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. - - This program 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 this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ diff --git a/common/utils/itti_analyzer/common/itti_types.h b/common/utils/itti_analyzer/common/itti_types.h index ddfd8473a6..3671b1d917 100644 --- a/common/utils/itti_analyzer/common/itti_types.h +++ b/common/utils/itti_analyzer/common/itti_types.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ /** @brief Intertask Interface common types * Contains type definitions used for generating and parsing ITTI messages. diff --git a/common/utils/itti_analyzer/common/logs.h b/common/utils/itti_analyzer/common/logs.h index 051e8b16c7..21d2dfad78 100644 --- a/common/utils/itti_analyzer/common/logs.h +++ b/common/utils/itti_analyzer/common/logs.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ /* * logs.h diff --git a/common/utils/itti_analyzer/common/rc.h b/common/utils/itti_analyzer/common/rc.h index 7fa6c05589..11eb107632 100644 --- a/common/utils/itti_analyzer/common/rc.h +++ b/common/utils/itti_analyzer/common/rc.h @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #include #include diff --git a/common/utils/itti_analyzer/itti_analyzer.c b/common/utils/itti_analyzer/itti_analyzer.c index 214430b096..78bdb43b39 100644 --- a/common/utils/itti_analyzer/itti_analyzer.c +++ b/common/utils/itti_analyzer/itti_analyzer.c @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #include #include diff --git a/common/utils/itti_analyzer/libbuffers/COPYING b/common/utils/itti_analyzer/libbuffers/COPYING index 818433ecc0..d605b9a3b1 100644 --- a/common/utils/itti_analyzer/libbuffers/COPYING +++ b/common/utils/itti_analyzer/libbuffers/COPYING @@ -1,674 +1,28 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program 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. - - This program 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 this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ diff --git a/common/utils/itti_analyzer/libbuffers/buffers.c b/common/utils/itti_analyzer/libbuffers/buffers.c index 7927ce646a..e8a1fc0c20 100644 --- a/common/utils/itti_analyzer/libbuffers/buffers.c +++ b/common/utils/itti_analyzer/libbuffers/buffers.c @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #include #include diff --git a/common/utils/itti_analyzer/libbuffers/buffers.h b/common/utils/itti_analyzer/libbuffers/buffers.h index 1346c4aaed..fd57e7b021 100644 --- a/common/utils/itti_analyzer/libbuffers/buffers.h +++ b/common/utils/itti_analyzer/libbuffers/buffers.h @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #include diff --git a/common/utils/itti_analyzer/libbuffers/file.c b/common/utils/itti_analyzer/libbuffers/file.c index 0cfe0edd59..b9404c31c0 100644 --- a/common/utils/itti_analyzer/libbuffers/file.c +++ b/common/utils/itti_analyzer/libbuffers/file.c @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #include #include diff --git a/common/utils/itti_analyzer/libbuffers/file.h b/common/utils/itti_analyzer/libbuffers/file.h index 0c1ecf7e07..8d2b90a5cf 100644 --- a/common/utils/itti_analyzer/libbuffers/file.h +++ b/common/utils/itti_analyzer/libbuffers/file.h @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #ifndef FILE_H_ #define FILE_H_ diff --git a/common/utils/itti_analyzer/libbuffers/socket.c b/common/utils/itti_analyzer/libbuffers/socket.c index 99cd44bd11..e782ee431b 100644 --- a/common/utils/itti_analyzer/libbuffers/socket.c +++ b/common/utils/itti_analyzer/libbuffers/socket.c @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #include #include diff --git a/common/utils/itti_analyzer/libbuffers/socket.h b/common/utils/itti_analyzer/libbuffers/socket.h index 755cf3093c..45881f311b 100644 --- a/common/utils/itti_analyzer/libbuffers/socket.h +++ b/common/utils/itti_analyzer/libbuffers/socket.h @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #include #include diff --git a/common/utils/itti_analyzer/libparser/COPYING b/common/utils/itti_analyzer/libparser/COPYING index 818433ecc0..d605b9a3b1 100644 --- a/common/utils/itti_analyzer/libparser/COPYING +++ b/common/utils/itti_analyzer/libparser/COPYING @@ -1,674 +1,28 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program 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. - - This program 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 this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ diff --git a/common/utils/itti_analyzer/libparser/array_type.c b/common/utils/itti_analyzer/libparser/array_type.c index c69351d32a..d88c7fa848 100644 --- a/common/utils/itti_analyzer/libparser/array_type.c +++ b/common/utils/itti_analyzer/libparser/array_type.c @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #include #include diff --git a/common/utils/itti_analyzer/libparser/array_type.h b/common/utils/itti_analyzer/libparser/array_type.h index 277a2a7db9..dd3eccf359 100644 --- a/common/utils/itti_analyzer/libparser/array_type.h +++ b/common/utils/itti_analyzer/libparser/array_type.h @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #include "types.h" diff --git a/common/utils/itti_analyzer/libparser/enum_type.c b/common/utils/itti_analyzer/libparser/enum_type.c index 1a2b90f2ca..78328b5492 100644 --- a/common/utils/itti_analyzer/libparser/enum_type.c +++ b/common/utils/itti_analyzer/libparser/enum_type.c @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #include #include diff --git a/common/utils/itti_analyzer/libparser/enum_type.h b/common/utils/itti_analyzer/libparser/enum_type.h index 745140b52d..ae19a5c495 100644 --- a/common/utils/itti_analyzer/libparser/enum_type.h +++ b/common/utils/itti_analyzer/libparser/enum_type.h @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #include "types.h" diff --git a/common/utils/itti_analyzer/libparser/enum_value_type.c b/common/utils/itti_analyzer/libparser/enum_value_type.c index 47d3ba9b37..eae25817b6 100644 --- a/common/utils/itti_analyzer/libparser/enum_value_type.c +++ b/common/utils/itti_analyzer/libparser/enum_value_type.c @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #include #include diff --git a/common/utils/itti_analyzer/libparser/enum_value_type.h b/common/utils/itti_analyzer/libparser/enum_value_type.h index 6be8eda743..71ce4f9849 100644 --- a/common/utils/itti_analyzer/libparser/enum_value_type.h +++ b/common/utils/itti_analyzer/libparser/enum_value_type.h @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #include "types.h" diff --git a/common/utils/itti_analyzer/libparser/field_type.c b/common/utils/itti_analyzer/libparser/field_type.c index 4a9c6df56b..4ebb743150 100644 --- a/common/utils/itti_analyzer/libparser/field_type.c +++ b/common/utils/itti_analyzer/libparser/field_type.c @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #include #include diff --git a/common/utils/itti_analyzer/libparser/field_type.h b/common/utils/itti_analyzer/libparser/field_type.h index abc09c0fe0..0437f9e5ec 100644 --- a/common/utils/itti_analyzer/libparser/field_type.h +++ b/common/utils/itti_analyzer/libparser/field_type.h @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #include "types.h" diff --git a/common/utils/itti_analyzer/libparser/file_type.c b/common/utils/itti_analyzer/libparser/file_type.c index 84552a836a..c032e6eb88 100644 --- a/common/utils/itti_analyzer/libparser/file_type.c +++ b/common/utils/itti_analyzer/libparser/file_type.c @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #include #include diff --git a/common/utils/itti_analyzer/libparser/file_type.h b/common/utils/itti_analyzer/libparser/file_type.h index e6343afad8..d84f5af34f 100644 --- a/common/utils/itti_analyzer/libparser/file_type.h +++ b/common/utils/itti_analyzer/libparser/file_type.h @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #include "types.h" diff --git a/common/utils/itti_analyzer/libparser/fundamental_type.c b/common/utils/itti_analyzer/libparser/fundamental_type.c index 1c9c9a0dc9..8559919730 100644 --- a/common/utils/itti_analyzer/libparser/fundamental_type.c +++ b/common/utils/itti_analyzer/libparser/fundamental_type.c @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #include #include diff --git a/common/utils/itti_analyzer/libparser/fundamental_type.h b/common/utils/itti_analyzer/libparser/fundamental_type.h index b0e169c643..cb13bf2b79 100644 --- a/common/utils/itti_analyzer/libparser/fundamental_type.h +++ b/common/utils/itti_analyzer/libparser/fundamental_type.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include "types.h" diff --git a/common/utils/itti_analyzer/libparser/intertask_contexts.h b/common/utils/itti_analyzer/libparser/intertask_contexts.h index 207910ee87..72d3fb2cc6 100644 --- a/common/utils/itti_analyzer/libparser/intertask_contexts.h +++ b/common/utils/itti_analyzer/libparser/intertask_contexts.h @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #include "fundamental_type.h" #include "struct_type.h" diff --git a/common/utils/itti_analyzer/libparser/pointer_type.c b/common/utils/itti_analyzer/libparser/pointer_type.c index e888c04b9a..921bafcac8 100644 --- a/common/utils/itti_analyzer/libparser/pointer_type.c +++ b/common/utils/itti_analyzer/libparser/pointer_type.c @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #include #include diff --git a/common/utils/itti_analyzer/libparser/pointer_type.h b/common/utils/itti_analyzer/libparser/pointer_type.h index b6eabff9a2..0c6b901f5b 100644 --- a/common/utils/itti_analyzer/libparser/pointer_type.h +++ b/common/utils/itti_analyzer/libparser/pointer_type.h @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #include "types.h" diff --git a/common/utils/itti_analyzer/libparser/reference_type.c b/common/utils/itti_analyzer/libparser/reference_type.c index 7409747d53..ee49b10cd5 100644 --- a/common/utils/itti_analyzer/libparser/reference_type.c +++ b/common/utils/itti_analyzer/libparser/reference_type.c @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #include #include diff --git a/common/utils/itti_analyzer/libparser/reference_type.h b/common/utils/itti_analyzer/libparser/reference_type.h index bcbfc98941..693bc712d8 100644 --- a/common/utils/itti_analyzer/libparser/reference_type.h +++ b/common/utils/itti_analyzer/libparser/reference_type.h @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #include "types.h" diff --git a/common/utils/itti_analyzer/libparser/struct_type.c b/common/utils/itti_analyzer/libparser/struct_type.c index b37c86fe59..af1201b4d2 100644 --- a/common/utils/itti_analyzer/libparser/struct_type.c +++ b/common/utils/itti_analyzer/libparser/struct_type.c @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #include #include diff --git a/common/utils/itti_analyzer/libparser/struct_type.h b/common/utils/itti_analyzer/libparser/struct_type.h index e132c31690..7bbb9ee100 100644 --- a/common/utils/itti_analyzer/libparser/struct_type.h +++ b/common/utils/itti_analyzer/libparser/struct_type.h @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #include "types.h" diff --git a/common/utils/itti_analyzer/libparser/typedef_type.c b/common/utils/itti_analyzer/libparser/typedef_type.c index 08f9eb5b38..285acfad5c 100644 --- a/common/utils/itti_analyzer/libparser/typedef_type.c +++ b/common/utils/itti_analyzer/libparser/typedef_type.c @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #include #include diff --git a/common/utils/itti_analyzer/libparser/typedef_type.h b/common/utils/itti_analyzer/libparser/typedef_type.h index aac3a680b7..0657f50c98 100644 --- a/common/utils/itti_analyzer/libparser/typedef_type.h +++ b/common/utils/itti_analyzer/libparser/typedef_type.h @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #include "types.h" diff --git a/common/utils/itti_analyzer/libparser/types.c b/common/utils/itti_analyzer/libparser/types.c index dbd87e8eb7..7ae55bb737 100644 --- a/common/utils/itti_analyzer/libparser/types.c +++ b/common/utils/itti_analyzer/libparser/types.c @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #include #include diff --git a/common/utils/itti_analyzer/libparser/types.h b/common/utils/itti_analyzer/libparser/types.h index ad502d3a13..339029839d 100644 --- a/common/utils/itti_analyzer/libparser/types.h +++ b/common/utils/itti_analyzer/libparser/types.h @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #include diff --git a/common/utils/itti_analyzer/libparser/union_type.c b/common/utils/itti_analyzer/libparser/union_type.c index 08ce06b389..ef8fd393ac 100644 --- a/common/utils/itti_analyzer/libparser/union_type.c +++ b/common/utils/itti_analyzer/libparser/union_type.c @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #include #include diff --git a/common/utils/itti_analyzer/libparser/union_type.h b/common/utils/itti_analyzer/libparser/union_type.h index faf0cecfa0..c1817dea6e 100644 --- a/common/utils/itti_analyzer/libparser/union_type.h +++ b/common/utils/itti_analyzer/libparser/union_type.h @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #include "types.h" diff --git a/common/utils/itti_analyzer/libparser/xml_parse.c b/common/utils/itti_analyzer/libparser/xml_parse.c index 98b93976eb..cdad8ee3ed 100644 --- a/common/utils/itti_analyzer/libparser/xml_parse.c +++ b/common/utils/itti_analyzer/libparser/xml_parse.c @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #include #include diff --git a/common/utils/itti_analyzer/libparser/xml_parse.h b/common/utils/itti_analyzer/libparser/xml_parse.h index 7b1f28527f..5d23a6157a 100644 --- a/common/utils/itti_analyzer/libparser/xml_parse.h +++ b/common/utils/itti_analyzer/libparser/xml_parse.h @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #include "rc.h" #include "types.h" diff --git a/common/utils/itti_analyzer/libresolver/COPYING b/common/utils/itti_analyzer/libresolver/COPYING index 818433ecc0..d605b9a3b1 100644 --- a/common/utils/itti_analyzer/libresolver/COPYING +++ b/common/utils/itti_analyzer/libresolver/COPYING @@ -1,674 +1,28 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program 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. - - This program 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 this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ diff --git a/common/utils/itti_analyzer/libresolver/locate_root.c b/common/utils/itti_analyzer/libresolver/locate_root.c index 18f3a2d188..8d1b101e73 100644 --- a/common/utils/itti_analyzer/libresolver/locate_root.c +++ b/common/utils/itti_analyzer/libresolver/locate_root.c @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #include #include diff --git a/common/utils/itti_analyzer/libresolver/locate_root.h b/common/utils/itti_analyzer/libresolver/locate_root.h index 9e9a5f204d..103e7b96ef 100644 --- a/common/utils/itti_analyzer/libresolver/locate_root.h +++ b/common/utils/itti_analyzer/libresolver/locate_root.h @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #ifndef LOCATE_ROOT_H_ #define LOCATE_ROOT_H_ diff --git a/common/utils/itti_analyzer/libresolver/resolvers.c b/common/utils/itti_analyzer/libresolver/resolvers.c index 312effbcaf..685cd84d87 100644 --- a/common/utils/itti_analyzer/libresolver/resolvers.c +++ b/common/utils/itti_analyzer/libresolver/resolvers.c @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #include #include diff --git a/common/utils/itti_analyzer/libresolver/resolvers.h b/common/utils/itti_analyzer/libresolver/resolvers.h index 1b24e921e9..84d2e15ecf 100644 --- a/common/utils/itti_analyzer/libresolver/resolvers.h +++ b/common/utils/itti_analyzer/libresolver/resolvers.h @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #ifndef RESOLVERS_H_ #define RESOLVERS_H_ diff --git a/common/utils/itti_analyzer/libui/COPYING b/common/utils/itti_analyzer/libui/COPYING index 818433ecc0..d605b9a3b1 100644 --- a/common/utils/itti_analyzer/libui/COPYING +++ b/common/utils/itti_analyzer/libui/COPYING @@ -1,674 +1,28 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program 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. - - This program 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 this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ diff --git a/common/utils/itti_analyzer/libui/ui_callbacks.c b/common/utils/itti_analyzer/libui/ui_callbacks.c index bec4dc3024..725a453334 100644 --- a/common/utils/itti_analyzer/libui/ui_callbacks.c +++ b/common/utils/itti_analyzer/libui/ui_callbacks.c @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #if HAVE_CONFIG_H # include "config.h" diff --git a/common/utils/itti_analyzer/libui/ui_callbacks.h b/common/utils/itti_analyzer/libui/ui_callbacks.h index 8ca5665f08..f408441548 100644 --- a/common/utils/itti_analyzer/libui/ui_callbacks.h +++ b/common/utils/itti_analyzer/libui/ui_callbacks.h @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #ifndef UI_CALLBACKS_H_ #define UI_CALLBACKS_H_ diff --git a/common/utils/itti_analyzer/libui/ui_filters.c b/common/utils/itti_analyzer/libui/ui_filters.c index 8d66904c99..e2fb993933 100644 --- a/common/utils/itti_analyzer/libui/ui_filters.c +++ b/common/utils/itti_analyzer/libui/ui_filters.c @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #include #include diff --git a/common/utils/itti_analyzer/libui/ui_filters.h b/common/utils/itti_analyzer/libui/ui_filters.h index 4eb051e918..9e168ad62f 100644 --- a/common/utils/itti_analyzer/libui/ui_filters.h +++ b/common/utils/itti_analyzer/libui/ui_filters.h @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #ifndef UI_FILTERS_H_ #define UI_FILTERS_H_ diff --git a/common/utils/itti_analyzer/libui/ui_interface.c b/common/utils/itti_analyzer/libui/ui_interface.c index cbb3b9fc98..8f0f5a8415 100644 --- a/common/utils/itti_analyzer/libui/ui_interface.c +++ b/common/utils/itti_analyzer/libui/ui_interface.c @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #include #include diff --git a/common/utils/itti_analyzer/libui/ui_interface.h b/common/utils/itti_analyzer/libui/ui_interface.h index ef7fe31f6b..de120e6565 100644 --- a/common/utils/itti_analyzer/libui/ui_interface.h +++ b/common/utils/itti_analyzer/libui/ui_interface.h @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #include diff --git a/common/utils/itti_analyzer/libui/ui_main_screen.c b/common/utils/itti_analyzer/libui/ui_main_screen.c index ae3ab125c0..e440bfb50e 100644 --- a/common/utils/itti_analyzer/libui/ui_main_screen.c +++ b/common/utils/itti_analyzer/libui/ui_main_screen.c @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #if HAVE_CONFIG_H # include "config.h" diff --git a/common/utils/itti_analyzer/libui/ui_main_screen.h b/common/utils/itti_analyzer/libui/ui_main_screen.h index 9d0805f4cd..4455195a1d 100644 --- a/common/utils/itti_analyzer/libui/ui_main_screen.h +++ b/common/utils/itti_analyzer/libui/ui_main_screen.h @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #ifndef UI_MAIN_SCREEN_H_ #define UI_MAIN_SCREEN_H_ diff --git a/common/utils/itti_analyzer/libui/ui_menu_bar.c b/common/utils/itti_analyzer/libui/ui_menu_bar.c index b4ec50141a..a5c7c2810f 100644 --- a/common/utils/itti_analyzer/libui/ui_menu_bar.c +++ b/common/utils/itti_analyzer/libui/ui_menu_bar.c @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #define G_LOG_DOMAIN ("UI") diff --git a/common/utils/itti_analyzer/libui/ui_menu_bar.h b/common/utils/itti_analyzer/libui/ui_menu_bar.h index 03e069b96b..7644862c7a 100644 --- a/common/utils/itti_analyzer/libui/ui_menu_bar.h +++ b/common/utils/itti_analyzer/libui/ui_menu_bar.h @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #ifndef UI_MENU_BAR_H_ #define UI_MENU_BAR_H_ diff --git a/common/utils/itti_analyzer/libui/ui_notebook.c b/common/utils/itti_analyzer/libui/ui_notebook.c index d5e81ffa4e..07bf12fe7c 100644 --- a/common/utils/itti_analyzer/libui/ui_notebook.c +++ b/common/utils/itti_analyzer/libui/ui_notebook.c @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #if HAVE_CONFIG_H # include "config.h" diff --git a/common/utils/itti_analyzer/libui/ui_notebook.h b/common/utils/itti_analyzer/libui/ui_notebook.h index 741eb901e9..cf574608ca 100644 --- a/common/utils/itti_analyzer/libui/ui_notebook.h +++ b/common/utils/itti_analyzer/libui/ui_notebook.h @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #ifndef UI_NOTEBOOK_H_ #define UI_NOTEBOOK_H_ diff --git a/common/utils/itti_analyzer/libui/ui_notif_dlg.c b/common/utils/itti_analyzer/libui/ui_notif_dlg.c index 0b278e6429..6d442a733c 100644 --- a/common/utils/itti_analyzer/libui/ui_notif_dlg.c +++ b/common/utils/itti_analyzer/libui/ui_notif_dlg.c @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #define G_LOG_DOMAIN ("UI") diff --git a/common/utils/itti_analyzer/libui/ui_notif_dlg.h b/common/utils/itti_analyzer/libui/ui_notif_dlg.h index ea6d2754ce..871b7ddb0c 100644 --- a/common/utils/itti_analyzer/libui/ui_notif_dlg.h +++ b/common/utils/itti_analyzer/libui/ui_notif_dlg.h @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #include diff --git a/common/utils/itti_analyzer/libui/ui_notifications.c b/common/utils/itti_analyzer/libui/ui_notifications.c index 50fed85645..5a3b57656b 100644 --- a/common/utils/itti_analyzer/libui/ui_notifications.c +++ b/common/utils/itti_analyzer/libui/ui_notifications.c @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #include #include diff --git a/common/utils/itti_analyzer/libui/ui_notifications.h b/common/utils/itti_analyzer/libui/ui_notifications.h index 377c093849..9ea36aa1f2 100644 --- a/common/utils/itti_analyzer/libui/ui_notifications.h +++ b/common/utils/itti_analyzer/libui/ui_notifications.h @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #ifndef UI_NOTIFICATIONS_H_ #define UI_NOTIFICATIONS_H_ diff --git a/common/utils/itti_analyzer/libui/ui_signal_dissect_view.c b/common/utils/itti_analyzer/libui/ui_signal_dissect_view.c index 41af8410ac..49e8df315d 100644 --- a/common/utils/itti_analyzer/libui/ui_signal_dissect_view.c +++ b/common/utils/itti_analyzer/libui/ui_signal_dissect_view.c @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #include diff --git a/common/utils/itti_analyzer/libui/ui_signal_dissect_view.h b/common/utils/itti_analyzer/libui/ui_signal_dissect_view.h index 1c9688f68d..36d8d55de5 100644 --- a/common/utils/itti_analyzer/libui/ui_signal_dissect_view.h +++ b/common/utils/itti_analyzer/libui/ui_signal_dissect_view.h @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #ifndef UI_SIGNAL_DISSECT_VIEW_H_ #define UI_SIGNAL_DISSECT_VIEW_H_ diff --git a/common/utils/itti_analyzer/libui/ui_tree_view.c b/common/utils/itti_analyzer/libui/ui_tree_view.c index 69b6b6b324..94a612dac6 100644 --- a/common/utils/itti_analyzer/libui/ui_tree_view.c +++ b/common/utils/itti_analyzer/libui/ui_tree_view.c @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #include #include diff --git a/common/utils/itti_analyzer/libui/ui_tree_view.h b/common/utils/itti_analyzer/libui/ui_tree_view.h index 8abdf7f53d..cee24eba38 100644 --- a/common/utils/itti_analyzer/libui/ui_tree_view.h +++ b/common/utils/itti_analyzer/libui/ui_tree_view.h @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 - - *******************************************************************************/ #ifndef UI_TREE_VIEW_H_ #define UI_TREE_VIEW_H_ diff --git a/common/utils/msc/msc.c b/common/utils/msc/msc.c index 9f7ed5ac3c..c05c1bf7ce 100644 --- a/common/utils/msc/msc.c +++ b/common/utils/msc/msc.c @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - 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 msc.c * \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 diff --git a/common/utils/msc/msc.h b/common/utils/msc/msc.h index b5c0c83280..e73f826ac3 100644 --- a/common/utils/msc/msc.h +++ b/common/utils/msc/msc.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #ifndef MSC_H_ #define MSC_H_ diff --git a/oaienv b/oaienv index 4aae35ca5b..383c75a4b1 100644 --- a/oaienv +++ b/oaienv @@ -4,7 +4,6 @@ export OPENAIR_DIR=$(pwd) export OPENAIR1_DIR=$OPENAIR_HOME/openair1 export OPENAIR2_DIR=$OPENAIR_HOME/openair2 export OPENAIR3_DIR=$OPENAIR_HOME/openair3 -export OPENAIRCN_DIR=$OPENAIR_HOME/openair-cn export OPENAIR_TARGETS=$OPENAIR_HOME/targets export OPENAIRITS_DIR=$OPENAIR_HOME/openairITS @@ -17,4 +16,3 @@ alias oait='cd $OPENAIR_TARGETS' alias oailte='cd $OPENAIR_TARGETS/RT/USER' alias oais='cd $OPENAIR_TARGETS/SIMU/USER' alias oaiex='cd $OPENAIR_TARGETS/SIMU/EXAMPLES' -alias oaicn='cd OPENAIRCN_DIR' diff --git a/openair-cn/AUTHORS b/openair-cn/AUTHORS deleted file mode 100644 index 8b13789179..0000000000 --- a/openair-cn/AUTHORS +++ /dev/null @@ -1 +0,0 @@ - diff --git a/openair-cn/COMMON/gtpv1_u_messages_def.h b/openair-cn/COMMON/gtpv1_u_messages_def.h deleted file mode 100644 index dfaa0429dc..0000000000 --- a/openair-cn/COMMON/gtpv1_u_messages_def.h +++ /dev/null @@ -1,36 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -MESSAGE_DEF(GTPV1U_CREATE_TUNNEL_REQ, MESSAGE_PRIORITY_MED, Gtpv1uCreateTunnelReq, gtpv1uCreateTunnelReq) -MESSAGE_DEF(GTPV1U_CREATE_TUNNEL_RESP, MESSAGE_PRIORITY_MED, Gtpv1uCreateTunnelResp, gtpv1uCreateTunnelResp) -MESSAGE_DEF(GTPV1U_UPDATE_TUNNEL_REQ, MESSAGE_PRIORITY_MED, Gtpv1uUpdateTunnelReq, gtpv1uUpdateTunnelReq) -MESSAGE_DEF(GTPV1U_UPDATE_TUNNEL_RESP, MESSAGE_PRIORITY_MED, Gtpv1uUpdateTunnelResp, gtpv1uUpdateTunnelResp) -MESSAGE_DEF(GTPV1U_DELETE_TUNNEL_REQ, MESSAGE_PRIORITY_MED, Gtpv1uDeleteTunnelReq, gtpv1uDeleteTunnelReq) -MESSAGE_DEF(GTPV1U_DELETE_TUNNEL_RESP, MESSAGE_PRIORITY_MED, Gtpv1uDeleteTunnelResp, gtpv1uDeleteTunnelResp) -MESSAGE_DEF(GTPV1U_TUNNEL_DATA_IND, MESSAGE_PRIORITY_MED, Gtpv1uTunnelDataInd, gtpv1uTunnelDataInd) -MESSAGE_DEF(GTPV1U_TUNNEL_DATA_REQ, MESSAGE_PRIORITY_MED, Gtpv1uTunnelDataReq, gtpv1uTunnelDataReq) diff --git a/openair-cn/COMMON/intertask_interface_conf.h b/openair-cn/COMMON/intertask_interface_conf.h deleted file mode 100644 index c6e8f02100..0000000000 --- a/openair-cn/COMMON/intertask_interface_conf.h +++ /dev/null @@ -1,50 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -/* - * intertask_interface_conf.h - * - * Created on: Oct 21, 2013 - * Author: winckel - */ - -#ifndef INTERTASK_INTERFACE_CONF_H_ -#define INTERTASK_INTERFACE_CONF_H_ - -/******************************************************************************* - * Intertask Interface Constants - ******************************************************************************/ - -#define ITTI_PORT (10007) - -/* This is the queue size for signal dumper */ -#define ITTI_QUEUE_MAX_ELEMENTS (200 * 1024) -#define ITTI_DUMP_MAX_CON (5) /* Max connections in parallel */ - -#endif /* INTERTASK_INTERFACE_CONF_H_ */ diff --git a/openair-cn/COMMON/ip_forward_messages_def.h b/openair-cn/COMMON/ip_forward_messages_def.h deleted file mode 100755 index 37ea73781a..0000000000 --- a/openair-cn/COMMON/ip_forward_messages_def.h +++ /dev/null @@ -1,34 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -MESSAGE_DEF(SGI_CREATE_ENDPOINT_REQUEST, MESSAGE_PRIORITY_MED, SGICreateEndpointReq, sgiCreateEndpointReq) -MESSAGE_DEF(SGI_CREATE_ENDPOINT_RESPONSE, MESSAGE_PRIORITY_MED, SGICreateEndpointResp, sgiCreateEndpointResp) -MESSAGE_DEF(SGI_UPDATE_ENDPOINT_REQUEST, MESSAGE_PRIORITY_MED, SGIUpdateEndpointReq, sgiUpdateEndpointReq) -MESSAGE_DEF(SGI_UPDATE_ENDPOINT_RESPONSE, MESSAGE_PRIORITY_MED, SGIUpdateEndpointResp, sgiUpdateEndpointResp) -MESSAGE_DEF(SGI_DELETE_ENDPOINT_REQUEST, MESSAGE_PRIORITY_MED, SGIDeleteEndpointReq, sgiDeleteEndpointReq) -MESSAGE_DEF(SGI_DELETE_ENDPOINT_RESPONSE, MESSAGE_PRIORITY_MED, SGIDeleteEndpointResp, sgiDeleteEndpointResp) diff --git a/openair-cn/COMMON/ip_forward_messages_types.h b/openair-cn/COMMON/ip_forward_messages_types.h deleted file mode 100755 index 40db8d5c38..0000000000 --- a/openair-cn/COMMON/ip_forward_messages_types.h +++ /dev/null @@ -1,96 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#ifndef SGI_FORWARD_MESSAGES_TYPES_H_ -#define SGI_FORWARD_MESSAGES_TYPES_H_ - -typedef enum SGIStatus_e { - SGI_STATUS_OK = 0, - SGI_STATUS_ERROR_CONTEXT_ALREADY_EXIST = 50, - SGI_STATUS_ERROR_CONTEXT_NOT_FOUND = 51, - SGI_STATUS_ERROR_INVALID_MESSAGE_FORMAT = 52, - SGI_STATUS_ERROR_SERVICE_NOT_SUPPORTED = 53, - SGI_STATUS_ERROR_SYSTEM_FAILURE = 54, - SGI_STATUS_ERROR_NO_RESOURCES_AVAILABLE = 55, - SGI_STATUS_ERROR_NO_MEMORY_AVAILABLE = 56, - SGI_STATUS_MAX, -} SGIStatus_t; - - -typedef struct { - Teid_t context_teid; ///< Tunnel Endpoint Identifier S11 - Teid_t sgw_S1u_teid; ///< Tunnel Endpoint Identifier S1-U - ebi_t eps_bearer_id; ///< EPS bearer identifier - pdn_type_t pdn_type; ///< PDN Type - PAA_t paa; ///< PDN Address Allocation -} SGICreateEndpointReq; - -typedef struct { - SGIStatus_t status; ///< Status of endpoint creation (Failed = 0xFF or Success = 0x0) - Teid_t context_teid; ///< Tunnel Endpoint Identifier S11 - Teid_t sgw_S1u_teid; ///< Tunnel Endpoint Identifier S1-U - 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 { - Teid_t context_teid; ///< Tunnel Endpoint Identifier S11 - Teid_t sgw_S1u_teid; ///< Tunnel Endpoint Identifier S1-U - Teid_t enb_S1u_teid; ///< Tunnel Endpoint Identifier S1-U - ebi_t eps_bearer_id; ///< EPS bearer identifier -} SGIUpdateEndpointReq; - -typedef struct { - SGIStatus_t status; ///< Status of endpoint creation (Failed = 0xFF or Success = 0x0) - Teid_t context_teid; ///< Tunnel Endpoint Identifier S11 - Teid_t sgw_S1u_teid; ///< Tunnel Endpoint Identifier S1-U - Teid_t enb_S1u_teid; ///< Tunnel Endpoint Identifier S1-U - ebi_t eps_bearer_id; ///< EPS bearer identifier -} SGIUpdateEndpointResp; - - -typedef struct { - Teid_t context_teid; ///< Tunnel Endpoint Identifier S11 - Teid_t sgw_S1u_teid; ///< Tunnel Endpoint Identifier S1-U - ebi_t eps_bearer_id; ///< EPS bearer identifier - pdn_type_t pdn_type; ///< PDN Type - PAA_t paa; ///< PDN Address Allocation -} SGIDeleteEndpointReq; - -typedef struct { - SGIStatus_t status; ///< Status of endpoint deletion (Failed = 0xFF or Success = 0x0) - Teid_t context_teid; ///< Tunnel Endpoint Identifier S11 - Teid_t sgw_S1u_teid; ///< Tunnel Endpoint Identifier S1-U - ebi_t eps_bearer_id; ///< EPS bearer identifier - pdn_type_t pdn_type; ///< PDN Type - PAA_t paa; ///< PDN Address Allocation -} SGIDeleteEndpointResp; - -#endif /* SGI_FORWARD_MESSAGES_TYPES_H_ */ diff --git a/openair-cn/COMMON/messages_def.h b/openair-cn/COMMON/messages_def.h deleted file mode 100644 index 2e4dac22e8..0000000000 --- a/openair-cn/COMMON/messages_def.h +++ /dev/null @@ -1,43 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -// These messages files are mandatory and must always be placed in first position -#include "intertask_messages_def.h" -#include "timer_messages_def.h" - -// Messages files used between tasks -#include "gtpv1_u_messages_def.h" -#include "ip_forward_messages_def.h" -#include "nas_messages_def.h" -#include "s11_messages_def.h" -#include "s1ap_messages_def.h" -#include "s6a_messages_def.h" -#include "sctp_messages_def.h" -#include "sgw_lite_def.h" -#include "udp_messages_def.h" -#include "mme_app_messages_def.h" diff --git a/openair-cn/COMMON/messages_types.h b/openair-cn/COMMON/messages_types.h deleted file mode 100644 index fd5da40bb5..0000000000 --- a/openair-cn/COMMON/messages_types.h +++ /dev/null @@ -1,49 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -#ifndef MESSAGES_TYPES_H_ -#define MESSAGES_TYPES_H_ - -#include "intertask_messages_types.h" -#include "timer_messages_types.h" - -#include "security_types.h" - -#include "gtpv1_u_messages_types.h" -#include "ip_forward_messages_types.h" -#include "s11_messages_types.h" -#include "s1ap_messages_types.h" -#include "nas_messages_types.h" -#include "s6a_messages_types.h" -#include "sctp_messages_types.h" -#include "sgw_lite_messages_types.h" -#include "udp_messages_types.h" -#include "mme_app_messages_types.h" - -#endif /* MESSAGES_TYPES_H_ */ diff --git a/openair-cn/COMMON/mme_app_messages_def.h b/openair-cn/COMMON/mme_app_messages_def.h deleted file mode 100644 index 68d904d4ae..0000000000 --- a/openair-cn/COMMON/mme_app_messages_def.h +++ /dev/null @@ -1,33 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -//WARNING: Do not include this header directly. Use intertask_interface.h instead. - -MESSAGE_DEF(MME_APP_CONNECTION_ESTABLISHMENT_IND , MESSAGE_PRIORITY_MED, mme_app_connection_establishment_ind_t , mme_app_connection_establishment_ind) -MESSAGE_DEF(MME_APP_CONNECTION_ESTABLISHMENT_CNF , MESSAGE_PRIORITY_MED, mme_app_connection_establishment_cnf_t , mme_app_connection_establishment_cnf) -MESSAGE_DEF(MME_APP_INITIAL_CONTEXT_SETUP_RSP , MESSAGE_PRIORITY_MED, mme_app_initial_context_setup_rsp_t , mme_app_initial_context_setup_rsp) diff --git a/openair-cn/COMMON/mme_app_messages_types.h b/openair-cn/COMMON/mme_app_messages_types.h deleted file mode 100644 index b9caa41547..0000000000 --- a/openair-cn/COMMON/mme_app_messages_types.h +++ /dev/null @@ -1,72 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#ifndef MME_APP_MESSAGES_TYPES_H_ -#define MME_APP_MESSAGES_TYPES_H_ - - -#define MME_APP_CONNECTION_ESTABLISHMENT_IND(mSGpTR) (mSGpTR)->ittiMsg.mme_app_connection_establishment_ind -#define MME_APP_CONNECTION_ESTABLISHMENT_CNF(mSGpTR) (mSGpTR)->ittiMsg.mme_app_connection_establishment_cnf -#define MME_APP_INITIAL_CONTEXT_SETUP_RSP(mSGpTR) (mSGpTR)->ittiMsg.mme_app_initial_context_setup_rsp - -typedef struct mme_app_connection_establishment_ind_s { - uint32_t mme_ue_s1ap_id; - nas_establish_ind_t nas; - - /* Transparent message from s1ap to be forwarded to MME_APP or - * to S1AP if connection establishment is rejected by NAS. - */ - s1ap_initial_ue_message_t transparent; -} mme_app_connection_establishment_ind_t; - -typedef struct mme_app_connection_establishment_cnf_s { - - ebi_t eps_bearer_id; - FTeid_t bearer_s1u_sgw_fteid; - qci_t bearer_qos_qci; - priority_level_t bearer_qos_prio_level; - pre_emp_vulnerability_t bearer_qos_pre_emp_vulnerability; - pre_emp_capability_t bearer_qos_pre_emp_capability; - ambr_t ambr; - - /* Key eNB */ - uint8_t keNB[32]; - uint16_t security_capabilities_encryption_algorithms; - uint16_t security_capabilities_integrity_algorithms; - - nas_conn_est_cnf_t nas_conn_est_cnf; -} mme_app_connection_establishment_cnf_t; - -typedef struct mme_app_initial_context_setup_rsp_s { - uint32_t mme_ue_s1ap_id; - ebi_t eps_bearer_id; - FTeid_t bearer_s1u_enb_fteid; -} mme_app_initial_context_setup_rsp_t; - - -#endif /* MME_APP_MESSAGES_TYPES_H_ */ diff --git a/openair-cn/COMMON/s11_messages_def.h b/openair-cn/COMMON/s11_messages_def.h deleted file mode 100644 index 3859ce7d62..0000000000 --- a/openair-cn/COMMON/s11_messages_def.h +++ /dev/null @@ -1,29 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -//WARNING: Do not include this header directly. Use intertask_interface.h instead. diff --git a/openair-cn/COMMON/s11_messages_types.h b/openair-cn/COMMON/s11_messages_types.h deleted file mode 100644 index 62882569a0..0000000000 --- a/openair-cn/COMMON/s11_messages_types.h +++ /dev/null @@ -1,32 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#ifndef S11_MESSAGES_TYPES_H_ -#define S11_MESSAGES_TYPES_H_ - -#endif /* S11_MESSAGES_TYPES_H_ */ diff --git a/openair-cn/COMMON/s6a_messages_def.h b/openair-cn/COMMON/s6a_messages_def.h deleted file mode 100644 index db8284aed5..0000000000 --- a/openair-cn/COMMON/s6a_messages_def.h +++ /dev/null @@ -1,33 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -//WARNING: Do not include this header directly. Use intertask_interface.h instead. -MESSAGE_DEF(S6A_UPDATE_LOCATION_REQ, MESSAGE_PRIORITY_MED, s6a_update_location_req_t, s6a_update_location_req) -MESSAGE_DEF(S6A_UPDATE_LOCATION_ANS, MESSAGE_PRIORITY_MED, s6a_update_location_ans_t, s6a_update_location_ans) -MESSAGE_DEF(S6A_AUTH_INFO_REQ, MESSAGE_PRIORITY_MED, s6a_auth_info_req_t, s6a_auth_info_req) -MESSAGE_DEF(S6A_AUTH_INFO_ANS, MESSAGE_PRIORITY_MED, s6a_auth_info_ans_t, s6a_auth_info_ans) diff --git a/openair-cn/COMMON/s6a_messages_types.h b/openair-cn/COMMON/s6a_messages_types.h deleted file mode 100644 index 0999afabbd..0000000000 --- a/openair-cn/COMMON/s6a_messages_types.h +++ /dev/null @@ -1,94 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#ifndef S6A_MESSAGES_TYPES_H_ -#define S6A_MESSAGES_TYPES_H_ - -#define AUTS_LENGTH 14 - -typedef struct s6a_update_location_req_s { -#define SKIP_SUBSCRIBER_DATA (0x1) - unsigned skip_subscriber_data:1; -#define INITIAL_ATTACH (0x1) - unsigned initial_attach:1; - - char imsi[IMSI_DIGITS_MAX + 1]; // username - uint8_t imsi_length; // username - - plmn_t visited_plmn; // visited plmn id - rat_type_t rat_type; // rat type - - // missing // origin host - // missing // origin realm - - // missing // destination host - // missing // destination realm -} s6a_update_location_req_t; - -typedef struct s6a_update_location_ans_s { - s6a_result_t result; // Result of the update location request procedure - subscription_data_t subscription_data; // subscriber status, - // Maximum Requested Bandwidth Uplink, downlink - // access restriction data - // msisdn - apn_config_profile_t apn_config_profile;// APN configuration profile - - network_access_mode_t access_mode; - rau_tau_timer_t rau_tau_timer; - char imsi[IMSI_DIGITS_MAX + 1]; - uint8_t imsi_length; - - -} s6a_update_location_ans_t; - -typedef struct s6a_auth_info_req_s { - char imsi[IMSI_DIGITS_MAX + 1]; - uint8_t imsi_length; - plmn_t visited_plmn; - /* Number of vectors to retrieve from HSS, should be equal to one */ - uint8_t nb_of_vectors; - - /* Bit to indicate that USIM has requested a re-synchronization of SQN */ - unsigned re_synchronization:1; - /* AUTS to provide to AUC. - * Only present and interpreted if re_synchronization == 1. - */ - uint8_t auts[AUTS_LENGTH]; -} s6a_auth_info_req_t; - -typedef struct s6a_auth_info_ans_s { - char imsi[IMSI_DIGITS_MAX + 1]; - uint8_t imsi_length; - - /* Result of the authentication information procedure */ - s6a_result_t result; - /* Authentication info containing the vector(s) */ - authentication_info_t auth_info; -} s6a_auth_info_ans_t; - -#endif /* S6A_MESSAGES_TYPES_H_ */ diff --git a/openair-cn/COMMON/sctp_messages_def.h b/openair-cn/COMMON/sctp_messages_def.h deleted file mode 100644 index 3b840f1bf6..0000000000 --- a/openair-cn/COMMON/sctp_messages_def.h +++ /dev/null @@ -1,35 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -//WARNING: Do not include this header directly. Use intertask_interface.h instead. - -MESSAGE_DEF(SCTP_INIT_MSG, MESSAGE_PRIORITY_MED, SctpInit, sctpInit) -MESSAGE_DEF(SCTP_DATA_REQ, MESSAGE_PRIORITY_MED, sctp_data_req_t, sctp_data_req) -MESSAGE_DEF(SCTP_DATA_IND, MESSAGE_PRIORITY_MED, sctp_data_ind_t, sctp_data_ind) -MESSAGE_DEF(SCTP_NEW_ASSOCIATION, MESSAGE_PRIORITY_MAX, sctp_new_peer_t, sctp_new_peer) -MESSAGE_DEF(SCTP_CLOSE_ASSOCIATION, MESSAGE_PRIORITY_MAX, sctp_close_association_t, sctp_close_association) diff --git a/openair-cn/COMMON/sctp_messages_types.h b/openair-cn/COMMON/sctp_messages_types.h deleted file mode 100644 index ac991e2f07..0000000000 --- a/openair-cn/COMMON/sctp_messages_types.h +++ /dev/null @@ -1,76 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#ifndef SCTP_MESSAGES_TYPES_H_ -#define SCTP_MESSAGES_TYPES_H_ - -#define SCTP_DATA_IND(mSGpTR) (mSGpTR)->ittiMsg.sctp_data_ind -#define SCTP_DATA_REQ(mSGpTR) (mSGpTR)->ittiMsg.sctp_data_req -#define SCTP_INIT_MSG(mSGpTR) (mSGpTR)->ittiMsg.sctpInit -#define SCTP_CLOSE_ASSOCIATION(mSGpTR) (mSGpTR)->ittiMsg.sctp_close_association - -typedef struct sctp_data_req_s { - uint8_t *buffer; - uint32_t bufLen; - uint32_t assocId; - uint16_t stream; -} sctp_data_req_t; - -typedef struct sctp_data_ind_s { - uint8_t *buffer; ///< SCTP buffer - uint32_t buf_length; ///< SCTP buffer length - int32_t assoc_id; ///< SCTP physical association ID - uint8_t stream; ///< Stream number on which data had been received - uint16_t instreams; ///< Number of input streams for the SCTP connection between peers - uint16_t outstreams; ///< Number of output streams for the SCTP connection between peers -} sctp_data_ind_t; - -typedef struct sctp_init_s { - /* Request usage of ipv4 */ - unsigned ipv4:1; - /* Request usage of ipv6 */ - unsigned ipv6:1; - uint8_t nb_ipv4_addr; - uint32_t ipv4_address[10]; - uint8_t nb_ipv6_addr; - char *ipv6_address[10]; - uint16_t port; - uint32_t ppid; -} SctpInit; - -typedef struct sctp_close_association_s { - uint32_t assoc_id; -} sctp_close_association_t; - -typedef struct sctp_new_peer_s { - uint32_t instreams; - uint32_t outstreams; - uint32_t assoc_id; -} sctp_new_peer_t; - -#endif /* SCTP_MESSAGES_TYPES_H_ */ diff --git a/openair-cn/COMMON/sgw_lite_def.h b/openair-cn/COMMON/sgw_lite_def.h deleted file mode 100644 index 3f1814b028..0000000000 --- a/openair-cn/COMMON/sgw_lite_def.h +++ /dev/null @@ -1,36 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -MESSAGE_DEF(SGW_CREATE_SESSION_REQUEST, MESSAGE_PRIORITY_MED, SgwCreateSessionRequest, sgwCreateSessionRequest) -MESSAGE_DEF(SGW_CREATE_SESSION_RESPONSE, MESSAGE_PRIORITY_MED, SgwCreateSessionResponse, sgwCreateSessionResponse) -MESSAGE_DEF(SGW_MODIFY_BEARER_REQUEST, MESSAGE_PRIORITY_MED, SgwModifyBearerRequest, sgwModifyBearerRequest) -MESSAGE_DEF(SGW_MODIFY_BEARER_RESPONSE, MESSAGE_PRIORITY_MED, SgwModifyBearerResponse, sgwModifyBearerResponse) -MESSAGE_DEF(SGW_DELETE_SESSION_REQUEST, MESSAGE_PRIORITY_MED, SgwDeleteSessionRequest, sgwDeleteSessionRequest) -MESSAGE_DEF(SGW_DELETE_SESSION_RESPONSE, MESSAGE_PRIORITY_MED, SgwDeleteSessionResponse, sgwDeleteSessionResponse) -MESSAGE_DEF(SGW_RELEASE_ACCESS_BEARERS_REQUEST, MESSAGE_PRIORITY_MED, SgwReleaseAccessBearersRequest, sgwReleaseAccessBearersRequest) -MESSAGE_DEF(SGW_RELEASE_ACCESS_BEARERS_RESPONSE, MESSAGE_PRIORITY_MED, SgwReleaseAccessBearersResponse, sgwReleaseAccessBearersResponse) diff --git a/openair-cn/COMMON/sgw_lite_messages_types.h b/openair-cn/COMMON/sgw_lite_messages_types.h deleted file mode 100644 index f83015b6bb..0000000000 --- a/openair-cn/COMMON/sgw_lite_messages_types.h +++ /dev/null @@ -1,928 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - - -/*! \file sgw_lite_messages_types.h - * \brief S11 definitions for interaction between MME and S11 - * 3GPP TS 29.274. - * Messages are the same as for GTPv2-C but here we abstract the UDP layer - * \author Sebastien ROUX - * \date 2013 - * \version 0.1 - */ - -#include "../SGW-LITE/sgw_lite_ie_defs.h" - -#ifndef SGW_LITE_MESSAGES_TYPES_H_ -#define SGW_LITE_MESSAGES_TYPES_H_ - -#define SGW_CREATE_SESSION_REQUEST(mSGpTR) (mSGpTR)->ittiMsg.sgwCreateSessionRequest -#define SGW_CREATE_SESSION_RESPONSE(mSGpTR) (mSGpTR)->ittiMsg.sgwCreateSessionResponse -#define SGW_MODIFY_BEARER_REQUEST(mSGpTR) (mSGpTR)->ittiMsg.sgwModifyBearerRequest -#define SGW_MODIFY_BEARER_RESPONSE(mSGpTR) (mSGpTR)->ittiMsg.sgwModifyBearerResponse -#define SGW_DELETE_SESSION_REQUEST(mSGpTR) (mSGpTR)->ittiMsg.sgwDeleteSessionRequest -#define SGW_DELETE_SESSION_RESPONSE(mSGpTR) (mSGpTR)->ittiMsg.sgwDeleteSessionResponse -#define SGW_RELEASE_ACCESS_BEARERS_REQUEST(mSGpTR) (mSGpTR)->ittiMsg.sgwReleaseAccessBearersRequest -#define SGW_RELEASE_ACCESS_BEARERS_RESPONSE(mSGpTR) (mSGpTR)->ittiMsg.sgwReleaseAccessBearersResponse - - -/** @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 - * - UE requested PDN connectivity - * - Tracking Area Update procedure with Serving GW change - * - S1/X2-based handover with SGW change - */ -typedef struct SgwCreateSessionRequest_s { - Teid_t teid; ///< S11- S-GW Tunnel Endpoint Identifier - - Imsi_t imsi; ///< The IMSI shall be included in the message on the S4/S11 - ///< interface, and on S5/S8 interface if provided by the - ///< MME/SGSN, except for the case: - ///< - If the UE is emergency attached and the UE is UICCless. - ///< The IMSI shall be included in the message on the S4/S11 - ///< interface, and on S5/S8 interface if provided by the - ///< MME/SGSN, but not used as an identifier - ///< - if UE is emergency attached but IMSI is not authenticated. - ///< The IMSI shall be included in the message on the S2b interface. - - Msisdn_t msisdn; ///< For an E-UTRAN Initial Attach the IE shall be included - ///< when used on the S11 interface, if provided in the - ///< subscription data from the HSS. - ///< For a PDP Context Activation procedure the IE shall be - ///< included when used on the S4 interface, if provided in the - ///< subscription data from the HSS. - ///< The IE shall be included for the case of a UE Requested - ///< PDN Connectivity, if the MME has it stored for that UE. - ///< It shall be included when used on the S5/S8 interfaces if - ///< provided by the MME/SGSN. - ///< The ePDG shall include this IE on the S2b interface during - ///< an Attach with GTP on S2b and a UE initiated Connectivity - ///< to Additional PDN with GTP on S2b, if provided by the - ///< HSS/AAA. - - Mei_t mei; ///< The MME/SGSN shall include the ME Identity (MEI) IE on - ///< the S11/S4 interface: - ///< - If the UE is emergency attached and the UE is UICCless - ///< - If the UE is emergency attached and the IMSI is not authenticated - ///< For all other cases the MME/SGSN shall include the ME - ///< Identity (MEI) IE on the S11/S4 interface if it is available. - ///< If the SGW receives this IE, it shall forward it to the PGW - ///< on the S5/S8 interface. - - Uli_t uli; ///< This IE shall be included on the S11 interface for E- - ///< UTRAN Initial Attach and UE-requested PDN Connectivity - ///< procedures. It shall include ECGI&TAI. The MME/SGSN - ///< shall also include it on the S11/S4 interface for - ///< TAU/RAU/X2-Handover/Enhanced SRNS Relocation - ///< procedure if the PGW has requested location information - ///< change reporting and MME/SGSN support location - ///< information change reporting. The SGW shall include this - ///< IE on S5/S8 if it receives the ULI from MME/SGSN. - - ServingNetwork_t serving_network; ///< This IE shall be included on the S4/S11, S5/S8 and S2b - ///< interfaces for an E-UTRAN initial attach, a PDP Context - ///< Activation, a UE requested PDN connectivity, an Attach - ///< with GTP on S2b, a UE initiated Connectivity to Additional - ///< PDN with GTP on S2b and a Handover to Untrusted Non- - ///< 3GPP IP Access with GTP on S2b. - - rat_type_t rat_type; ///< This IE shall be set to the 3GPP access type or to the - ///< value matching the characteristics of the non-3GPP access - ///< the UE is using to attach to the EPS. - ///< The ePDG may use the access technology type of the - ///< untrusted non-3GPP access network if it is able to acquire - ///< it; otherwise it shall indicate Virtual as the RAT Type. - ///< See NOTE 3, NOTE 4. - - indication_flags_t indication_flags; ///< This IE shall be included if any one of the applicable flags - ///< is set to 1. - ///< Applicable flags are: - ///< - S5/S8 Protocol Type: This flag shall be used on - ///< the S11/S4 interfaces and set according to the - ///< protocol chosen to be used on the S5/S8 - ///< interfaces. - ///< - ///< - Dual Address Bearer Flag: This flag shall be used - ///< on the S2b, S11/S4 and S5/S8 interfaces and shall - ///< be set to 1 when the PDN Type, determined based - ///< on UE request and subscription record, is set to - ///< IPv4v6 and all SGSNs which the UE may be - ///< handed over to support dual addressing. This shall - ///< be determined based on node pre-configuration by - ///< the operator. - ///< - ///< - Handover Indication: This flag shall be set to 1 on - ///< the S11/S4 and S5/S8 interface during an E- - ///< UTRAN Initial Attach or a UE Requested PDN - ///< Connectivity or aPDP Context Activation procedure - ///< if the PDN connection/PDP Context is handed-over - ///< from non-3GPP access. - ///< This flag shall be set to 1 on the S2b interface - ///< during a Handover to Untrusted Non-3GPP IP - ///< Access with GTP on S2b and IP address - ///< preservation is requested by the UE. - ///< - ///< .... - ///< - Unauthenticated IMSI: This flag shall be set to 1 - ///< on the S4/S11 and S5/S8 interfaces if the IMSI - ///< present in the message is not authenticated and is - ///< for an emergency attached UE. - - FTeid_t sender_fteid_for_cp; ///< Sender F-TEID for control plane (MME) - - FTeid_t pgw_address_for_cp; ///< PGW S5/S8 address for control plane or PMIP - ///< This IE shall be sent on the S11 / S4 interfaces. The TEID - ///< or GRE Key is set to "0" in the E-UTRAN initial attach, the - ///< PDP Context Activation and the UE requested PDN - ///< connectivity procedures. - - char apn[APN_MAX_LENGTH + 1]; ///< Access Point Name - - SelectionMode_t selection_mode; ///< Selection Mode - ///< This IE shall be included on the S4/S11 and S5/S8 - ///< interfaces for an E-UTRAN initial attach, a PDP Context - ///< Activation and a UE requested PDN connectivity. - ///< This IE shall be included on the S2b interface for an Initial - ///< Attach with GTP on S2b and a UE initiated Connectivity to - ///< Additional PDN with GTP on S2b. - ///< It shall indicate whether a subscribed APN or a non - ///< subscribed APN chosen by the MME/SGSN/ePDG was - ///< selected. - ///< CO: When available, this IE shall be sent by the MME/SGSN on - ///< the S11/S4 interface during TAU/RAU/HO with SGW - ///< relocation. - - pdn_type_t pdn_type; ///< PDN Type - ///< This IE shall be included on the S4/S11 and S5/S8 - ///< interfaces for an E-UTRAN initial attach, a PDP Context - ///< Activation and a UE requested PDN connectivity. - ///< This IE shall be set to IPv4, IPv6 or IPv4v6. This is based - ///< on the UE request and the subscription record retrieved - ///< from the HSS (for MME see 3GPP TS 23.401 [3], clause - ///< 5.3.1.1, and for SGSN see 3GPP TS 23.060 [35], clause - ///< 9.2.1). See NOTE 1. - - PAA_t paa; ///< PDN Address Allocation - ///< This IE shall be included the S4/S11, S5/S8 and S2b - ///< interfaces for an E-UTRAN initial attach, a PDP Context - ///< Activation, a UE requested PDN connectivity, an Attach - ///< with GTP on S2b, a UE initiated Connectivity to Additional - ///< PDN with GTP on S2b and a Handover to Untrusted Non- - ///< 3GPP IP Access with GTP on S2b. For PMIP-based - ///< S5/S8, this IE shall also be included on the S4/S11 - ///< interfaces for TAU/RAU/Handover cases involving SGW - ///< relocation. - ///< The PDN type field in the PAA shall be set to IPv4, or IPv6 - ///< or IPv4v6 by MME, based on the UE request and the - ///< subscription record retrieved from the HSS. - ///< For static IP address assignment (for MME see 3GPP TS - ///< 23.401 [3], clause 5.3.1.1, for SGSN see 3GPP TS 23.060 - ///< [35], clause 9.2.1, and for ePDG see 3GPP TS 23.402 [45] - ///< subclause 4.7.3), the MME/SGSN/ePDG shall set the IPv4 - ///< address and/or IPv6 prefix length and IPv6 prefix and - ///< Interface Identifier based on the subscribed values - ///< received from HSS, if available. The value of PDN Type - ///< field shall be consistent with the value of the PDN Type IE, - ///< if present in this message. - ///< For a Handover to Untrusted Non-3GPP IP Access with - ///< GTP on S2b, the ePDG shall set the IPv4 address and/or - ///< IPv6 prefix length and IPv6 prefix and Interface Identifier - ///< based on the IP address(es) received from the UE. - ///< If static IP address assignment is not used, and for - ///< scenarios other than a Handover to Untrusted Non-3GPP - ///< IP Access with GTP on S2b, the IPv4 address shall be set - ///< to 0.0.0.0, and/or the IPv6 Prefix Length and IPv6 prefix - ///< and Interface Identifier shall all be set to zero. - ///< - ///< CO: This IE shall be sent by the MME/SGSN on S11/S4 - ///< interface during TAU/RAU/HO with SGW relocation. - - // APN Restriction Maximum_APN_Restriction ///< This IE shall be included on the S4/S11 and S5/S8 - ///< interfaces in the E-UTRAN initial attach, PDP Context - ///< Activation and UE Requested PDN connectivity - ///< procedures. - ///< This IE denotes the most stringent restriction as required - ///< by any already active bearer context. If there are no - ///< already active bearer contexts, this value is set to the least - ///< restrictive type. - - ambr_t ambr; ///< Aggregate Maximum Bit Rate (APN-AMBR) - ///< This IE represents the APN-AMBR. It shall be included on - ///< the S4/S11, S5/S8 and S2b interfaces for an E-UTRAN - ///< initial attach, UE requested PDN connectivity, the PDP - ///< Context Activation procedure using S4, the PS mobility - ///< from the Gn/Gp SGSN to the S4 SGSN/MME procedures, - ///< Attach with GTP on S2b and a UE initiated Connectivity to - ///< Additional PDN with GTP on S2b. - - // EBI Linked EPS Bearer ID ///< This IE shall be included on S4/S11 in RAU/TAU/HO - ///< except in the Gn/Gp SGSN to MME/S4-SGSN - ///< RAU/TAU/HO procedures with SGW change to identify the - ///< default bearer of the PDN Connection - - 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. - - bearer_to_create_t bearer_to_create; ///< Bearer Contexts to be created - ///< Several IEs with the same type and instance value shall be - ///< included on the S4/S11 and S5/S8 interfaces as necessary - ///< to represent a list of Bearers. One single IE shall be - ///< included on the S2b interface. - ///< One bearer shall be included for an E-UTRAN Initial - ///< Attach, a PDP Context Activation, a UE requested PDN - ///< Connectivity, an Attach with GTP on S2b, a UE initiated - ///< Connectivity to Additional PDN with GTP on S2b and a - ///< Handover to Untrusted Non-3GPP IP Access with GTP on - ///< S2b. - ///< One or more bearers shall be included for a - ///< Handover/TAU/RAU with an SGW change. - - ///bearer_to_remove_t bearer_to_remove; ///< This IE shall be included on the S4/S11 interfaces for the - ///< TAU/RAU/Handover cases where any of the bearers - ///< existing before the TAU/RAU/Handover procedure will be - ///< deactivated as consequence of the TAU/RAU/Handover - ///< procedure. - ///< For each of those bearers, an IE with the same type and - ///< instance value shall be included. - - // Trace Information trace_information ///< This IE shall be included on the S4/S11 interface if an - ///< SGW trace is activated, and/or on the S5/S8 and S2b - ///< interfaces if a PGW trace is activated. See 3GPP TS - ///< 32.422 [18]. - - // Recovery Recovery ///< This IE shall be included on the S4/S11, S5/S8 and S2b - ///< interfaces if contacting the peer for the first time - - FQ_CSID_t mme_fq_csid; ///< This IE shall be included by the MME on the S11 interface - ///< and shall be forwarded by an SGW on the S5/S8 interfaces - ///< according to the requirements in 3GPP TS 23.007 [17]. - - FQ_CSID_t sgw_fq_csid; ///< This IE shall included by the SGW on the S5/S8 interfaces - ///< according to the requirements in 3GPP TS 23.007 [17]. - - //FQ_CSID_t epdg_fq_csid; ///< This IE shall be included by the ePDG on the S2b interface - ///< according to the requirements in 3GPP TS 23.007 [17]. - - UETimeZone_t ue_time_zone; ///< This IE shall be included by the MME over S11 during - ///< Initial Attach, UE Requested PDN Connectivity procedure. - ///< This IE shall be included by the SGSN over S4 during PDP - ///< Context Activation procedure. - ///< This IE shall be included by the MME/SGSN over S11/S4 - ///< TAU/RAU/Handover with SGW relocation. - ///< C: If SGW receives this IE, SGW shall forward it to PGW - ///< across S5/S8 interface. - - UCI_t uci; ///< User CSG Information - ///< CO This IE shall be included on the S4/S11 interface for E- - ///< UTRAN Initial Attach, UE-requested PDN Connectivity and - ///< PDP Context Activation using S4 procedures if the UE is - ///< accessed via CSG cell or hybrid cell. The MME/SGSN - ///< shall also include it for TAU/RAU/Handover procedures if - ///< the PGW has requested CSG info reporting and - ///< MME/SGSN support CSG info reporting. The SGW shall - ///< include this IE on S5/S8 if it receives the User CSG - ///< information from MME/SGSN. - - // Charging Characteristics - // MME/S4-SGSN LDN - // SGW LDN - // ePDG LDN - // Signalling Priority Indication - // MMBR Max MBR/APN-AMBR - // Private Extension - - /* S11 stack specific parameter. Not used in standalone epc mode */ - void *trxn; ///< Transaction identifier - uint32_t peer_ip; ///< MME ipv4 address for S-GW or S-GW ipv4 address for MME - uint16_t peer_port; ///< MME port for S-GW or S-GW port for MME -} SgwCreateSessionRequest; - -/** @struct SgwCreateSessionResponse - * @brief Create Session Response - * - * The Create Session Response will be sent on S11 interface as - * part of these procedures: - * - E-UTRAN Initial Attach - * - UE requested PDN connectivity - * - Tracking Area Update procedure with SGW change - * - S1/X2-based handover with SGW change - */ -typedef struct SgwCreateSessionResponse_s { - Teid_t teid; ///< Tunnel Endpoint Identifier - - // here fields listed in 3GPP TS 29.274 - SGWCause_t cause; ///< If the SGW cannot accept any of the "Bearer Context Created" IEs within Create Session Request - ///< message, the SGW shall send the Create Session Response with appropriate reject Cause value. - - // change_reporting_action ///< This IE shall be included on the S5/S8 and S4/S11 - ///< interfaces with the appropriate Action field if the location - ///< Change Reporting mechanism is to be started or stopped - ///< for this subscriber in the SGSN/MME. - - // csg_Information_reporting_action ///< This IE shall be included on the S5/S8 and S4/S11 - ///< interfaces with the appropriate Action field if the CSG Info - ///< reporting mechanism is to be started or stopped for this - ///< subscriber in the SGSN/MME. - - FTeid_t s11_sgw_teid; ///< Sender F-TEID for control plane - ///< This IE shall be sent on the S11/S4 interfaces. For the - ///< S5/S8/S2b interfaces it is not needed because its content - ///< would be identical to the IE PGW S5/S8/S2b F-TEID for - ///< PMIP based interface or for GTP based Control Plane - ///< interface. - - FTeid_t s5_s8_pgw_teid; ///< PGW S5/S8/S2b F-TEID for PMIP based interface or for GTP based Control Planeinterface - ///< PGW shall include this IE on the S5/S8 interfaces during - ///< the Initial Attach, UE requested PDN connectivity and PDP - ///< Context Activation procedures. - ///< If SGW receives this IE it shall forward the IE to MME/S4- - ///< SGSN on S11/S4 interface. - ///< This IE shall include the TEID in the GTP based S5/S8 - ///< case and the GRE key in the PMIP based S5/S8 case. - ///< In PMIP based S5/S8 case, same IP address is used for - ///< both control plane and the user plane communication. - ///< - ///< PGW shall include this IE on the S2b interface during the - ///< Attach with GTP on S2b, UE initiated Connectivity to - ///< Additional PDN with GTP on S2b and Handover to - ///< Untrusted Non-3GPP IP Access with GTP on S2b - ///< procedures. - - - PAA_t paa; ///< PDN Address Allocation - ///< This IE shall be included on the S5/S8, S4/S11 and S2b - ///< interfaces for the E-UTRAN initial attach, PDP Context - ///< Activation, UE requested PDN connectivity, Attach with - ///< GTP on S2b, UE initiated Connectivity to Additional PDN - ///< with GTP on S2b and Handover to Untrusted Non-3GPP IP - ///< Access with GTP on S2b procedures. - ///< The PDN type field in the PAA shall be set to IPv4, or IPv6 - ///< or IPv4v6 by the PGW. - ///< For the interfaces other than S2b, if the DHCPv4 is used - ///< for IPv4 address allocation, the IPv4 address field shall be - ///< set to 0.0.0.0. - - APNRestriction_t apn_restriction; ///< This IE shall be included on the S5/S8 and S4/S11 - ///< interfaces in the E-UTRAN initial attach, PDP Context - ///< Activation and UE Requested PDN connectivity - ///< procedures. - ///< This IE shall also be included on S4/S11 during the Gn/Gp - ///< SGSN to S4 SGSN/MME RAU/TAU procedures. - ///< This IE denotes the restriction on the combination of types - ///< of APN for the APN associated with this EPS bearer - ///< Context. - - ambr_t ambr; ///< Aggregate Maximum Bit Rate (APN-AMBR) - ///< This IE represents the APN-AMBR. It shall be included on - ///< the S5/S8, S4/S11 and S2b interfaces if the received APN- - ///< AMBR has been modified by the PCRF. - - // EBI Linked EPS Bearer ID ///< This IE shall be sent on the S4/S11 interfaces during - ///< Gn/Gp SGSN to S4-SGSN/MME RAU/TAU procedure to - ///< identify the default bearer the PGW selects for the PDN - ///< Connection. - - 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. - - bearer_context_created_t bearer_context_created;///< EPS bearers corresponding to Bearer Contexts sent in - ///< request message. Several IEs with the same type and - ///< instance value may be included on the S5/S8 and S4/S11 - ///< as necessary to represent a list of Bearers. One single IE - ///< shall be included on the S2b interface. - ///< One bearer shall be included for E-UTRAN Initial Attach, - ///< PDP Context Activation or UE Requested PDN - ///< Connectivity , Attach with GTP on S2b, UE initiated - ///< Connectivity to Additional PDN with GTP on S2b, and - ///< Handover to Untrusted Non-3GPP IP Access with GTP on - ///< S2b. - ///< One or more created bearers shall be included for a - ///< Handover/TAU/RAU with an SGW change. See NOTE 2. - - // Bearer_Context bearer_contexts_marked_for_removal ///< EPS bearers corresponding to Bearer Contexts to be - ///< removed that were sent in the Create Session Request - ///< message. - ///< For each of those bearers an IE with the same type and - ///< instance value shall be included on the S4/S11 interfaces. - - // Recovery Recovery ///< This IE shall be included on the S4/S11, S5/S8 and S2b - ///< interfaces if contacting the peer for the first time - - // FQDN charging_Gateway_name ///< When Charging Gateway Function (CGF) Address is - ///< configured, the PGW shall include this IE on the S5 - ///< interface. - ///< NOTE 1: Both Charging Gateway Name and Charging Gateway Address shall not be included at the same - ///< time. When both are available, the operator configures a preferred value. - - // IP Address charging_Gateway_address ///< When Charging Gateway Function (CGF) Address is - ///< configured, the PGW shall include this IE on the S5 - ///< interface. See NOTE 1. - - - FQ_CSID_t pgw_fq_csid; ///< This IE shall be included by the PGW on the S5/S8 and - ///< S2b interfaces and, when received from S5/S8 be - ///< forwarded by the SGW on the S11 interface according to - ///< the requirements in 3GPP TS 23.007 [17]. - - FQ_CSID_t sgw_fq_csid; ///< This IE shall be included by the SGW on the S11 interface - ///< according to the requirements in 3GPP TS 23.007 [17]. - - // Local Distinguished Name (LDN) SGW LDN ///< This IE is optionally sent by the SGW to the MME/SGSN - ///< on the S11/S4 interfaces (see 3GPP TS 32.423 [44]), - ///< when contacting the peer node for the first time. - ///< Also: - ///< This IE is optionally sent by the SGW to the MME/SGSN - ///< on the S11/S4 interfaces (see 3GPP TS 32.423 [44]), - ///< when communicating the LDN to the peer node for the first - ///< time. - - // Local Distinguished Name (LDN) PGW LDN ///< This IE is optionally included by the PGW on the S5/S8 - ///< and S2b interfaces (see 3GPP TS 32.423 [44]), when - ///< contacting the peer node for the first time. - ///< Also: - ///< This IE is optionally included by the PGW on the S5/S8 - ///< interfaces (see 3GPP TS 32.423 [44]), when - ///< communicating the LDN to the peer node for the first time. - - // EPC_Timer pgw_back_off_time ///< This IE may be included on the S5/S8 and S4/S11 - ///< interfaces when the PDN GW rejects the Create Session - ///< Request with the cause "APN congestion". It indicates the - ///< time during which the MME or S4-SGSN should refrain - ///< from sending subsequent PDN connection establishment - ///< requests to the PGW for the congested APN for services - ///< other than Service Users/emergency services. - ///< See NOTE 3: - ///< The last received value of the PGW Back-Off Time IE shall supersede any previous values received - ///< from that PGW and for this APN in the MME/SGSN. - - // Private Extension ///< This IE may be sent on the S5/S8, S4/S11 and S2b - ///< interfaces. - - /* S11 stack specific parameter. Not used in standalone epc mode */ - void *trxn; ///< Transaction identifier - uint32_t peer_ip; ///< MME ipv4 address -} SgwCreateSessionResponse; - -/** @struct SgwModifyBearerRequest - * @brief Modify Bearer Request - * - * The Modify Bearer Request will be sent on S11 interface as - * part of these procedures: - * - E-UTRAN Tracking Area Update without SGW Change - * - UE triggered Service Request - * - S1-based Handover - * - E-UTRAN Initial Attach - * - UE requested PDN connectivity - * - X2-based handover without SGWrelocation - */ -typedef struct SgwModifyBearerRequest_s { - Teid_t teid; ///< S11 SGW Tunnel Endpoint Identifier - - // MEI ME Identity (MEI) ///< C:This IE shall be sent on the S5/S8 interfaces for the Gn/Gp - ///< SGSN to MME TAU. - - Uli_t uli; ///< C: The MME/SGSN shall include this IE for - ///< TAU/RAU/Handover procedures if the PGW has requested - ///< location information change reporting and MME/SGSN - ///< support location information change reporting. - ///< An MME/SGSN which supports location information - ///< change shall include this IE for UE-initiated Service - ///< Request procedure if the PGW has requested location - ///< information change reporting and the UE’s location info - ///< has changed. - ///< The SGW shall include this IE on S5/S8 if it receives the - ///< ULI from MME/SGSN. - ///< CO:This IE shall also be included on the S4/S11 interface for a - ///< TAU/RAU/Handover with MME/SGSN change without - ///< SGW change procedure, if the level of support (User - ///< Location Change Reporting and/or CSG Information - ///< Change Reporting) changes the MME shall include the - ///< ECGI/TAI in the ULI, the SGSN shall include the CGI/SAI - ///< in the ULI. - ///< The SGW shall include this IE on S5/S8 if it receives the - ///< ULI from MME/SGSN. - - ServingNetwork_t serving_network; ///< CO:This IE shall be included on S11/S4 interface during the - ///< following procedures: - ///< - TAU/RAU/handover if Serving Network is changed. - ///< - TAU/RAU when the UE was ISR activated which is - ///< indicated by ISRAU flag. - ///< - UE triggered Service Request when UE is ISR - ///< activated. - ///< - UE initiated Service Request if ISR is not active, but - ///< the Serving Network has changed during previous - ///< mobility procedures, i.e. intra MME/S4-SGSN - ///< TAU/RAU and the change has not been reported to - ///< the PGW yet. - ///< - TAU/RAU procedure as part of the optional network - ///< triggered service restoration procedure with ISR, as - ///< specified by 3GPP TS 23.007 [17]. - ///< - ///< CO:This IE shall be included on S5/S8 if the SGW receives this - ///< IE from MME/SGSN and if ISR is not active. - ///< This IE shall be included on S5/S8 if the SGW receives this - ///< IE from MME/SGSN and ISR is active and the Modify - ///< Bearer Request message needs to be sent to the PGW as - ///< specified in the 3GPP TS 23.401 [3]. - - rat_type_t rat_type; ///< C: This IE shall be sent on the S11 interface for a TAU with - ///< an SGSN interaction, UE triggered Service Request or an I- - ///< RAT Handover. - ///< This IE shall be sent on the S4 interface for a RAU with - ///< MME interaction, a RAU with an SGSN change, a UE - ///< Initiated Service Request or an I-RAT Handover. - ///< This IE shall be sent on the S5/S8 interface if the RAT type - ///< changes. - ///< CO: CO If SGW receives this IE from MME/SGSN during a - ///< TAU/RAU/Handover with SGW change procedure, the - ///< SGW shall forward it across S5/S8 interface to PGW. - ///< CO: The IE shall be sent on the S11/S4 interface during the - ///< following procedures: - ///< - an inter MM TAU or inter SGSN RAU when UE was - ///< ISR activated which is indicated by ISRAU flag. - ///< - TAU/RAU procedure as part of optional network - ///< triggered service restoration procedure with ISR, as - ///< specified by 3GPP TS 23.007 [17]. - ///< If ISR is active, this IE shall also be included on the S11 - ///< interface in the S1-U GTP-U tunnel setup procedure during - ///< an intra-MME intra-SGW TAU procedure. - - indication_flags_t indication_flags; ///< C:This IE shall be included if any one of the applicable flags - ///< is set to 1. - ///< Applicable flags are: - ///< -ISRAI: This flag shall be used on S4/S11 interface - ///< and set to 1 if the ISR is established between the - ///< MME and the S4 SGSN. - ///< - Handover Indication: This flag shall be set to 1 on - ///< the S4/S11 and S5/S8 interfaces during an E- - ///< UTRAN Initial Attach or for a UE Requested PDN - ///< Connectivity or a PDP Context Activation - ///< procedure, if the PDN connection/PDP context is - ///< handed-over from non-3GPP access. - ///< - Direct Tunnel Flag: This flag shall be used on the - ///< S4 interface and set to 1 if Direct Tunnel is used. - ///< - Change Reporting support Indication: shall be - ///< used on S4/S11, S5/S8 and set if the SGSN/MME - ///< supports location Info Change Reporting. This flag - ///< should be ignored by SGW if no message is sent - ///< on S5/S8. See NOTE 4. - ///< - CSG Change Reporting Support Indication: shall - ///< be used on S4/S11, S5/S8 and set if the - ///< SGSN/MME supports CSG Information Change - ///< Reporting. This flag shall be ignored by SGW if no - ///< message is sent on S5/S8. See NOTE 4. - ///< - Change F-TEID support Indication: This flag shall - ///< be used on S4/S11 for an IDLE state UE initiated - ///< TAU/RAU procedure and set to 1 to allow the - ///< SGW changing the GTP-U F-TEID. - - FTeid_t sender_fteid_for_cp; ///< C: Sender F-TEID for control plane - ///< This IE shall be sent on the S11 and S4 interfaces for a - ///< TAU/RAU/ Handover with MME/SGSN change and without - ///< any SGW change. - ///< This IE shall be sent on the S5 and S8 interfaces for a - ///< TAU/RAU/Handover with a SGW change. - - ambr_t apn_ambr; ///< C: Aggregate Maximum Bit Rate (APN-AMBR) - ///< The APN-AMBR shall be sent for the PS mobility from the - ///< Gn/Gp SGSN to the S4 SGSN/MME procedures.. - - /* Delay Value in integer multiples of 50 millisecs, or zero */ - DelayValue_t delay_dl_packet_notif_req; ///. - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -// This task is mandatory and must always be placed in first position -TASK_DEF(TASK_TIMER, TASK_PRIORITY_MED, 10) - -// Other possible tasks in the process - -/// GTPV1-U task -TASK_DEF(TASK_GTPV1_U, TASK_PRIORITY_MED, 200) -/// FW_IP task -TASK_DEF(TASK_FW_IP, TASK_PRIORITY_MED, 200) -/// MME Applicative task -TASK_DEF(TASK_MME_APP, TASK_PRIORITY_MED, 200) -/// NAS task -TASK_DEF(TASK_NAS_MME, TASK_PRIORITY_MED, 200) -/// S11 task -TASK_DEF(TASK_S11, TASK_PRIORITY_MED, 200) -/// S1AP task -TASK_DEF(TASK_S1AP, TASK_PRIORITY_MED, 200) -/// S6a task -TASK_DEF(TASK_S6A, TASK_PRIORITY_MED, 200) -/// SCTP task -TASK_DEF(TASK_SCTP, TASK_PRIORITY_MED, 200) -/// Serving and Proxy Gateway Application task -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) diff --git a/openair-cn/COMMON/udp_messages_def.h b/openair-cn/COMMON/udp_messages_def.h deleted file mode 100644 index 809e31bab2..0000000000 --- a/openair-cn/COMMON/udp_messages_def.h +++ /dev/null @@ -1,31 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -MESSAGE_DEF(UDP_INIT, MESSAGE_PRIORITY_MED, udp_init_t, udp_init) -MESSAGE_DEF(UDP_DATA_REQ, MESSAGE_PRIORITY_MED, udp_data_req_t, udp_data_req) -MESSAGE_DEF(UDP_DATA_IND, MESSAGE_PRIORITY_MED, udp_data_ind_t, udp_data_ind) diff --git a/openair-cn/COMMON/udp_messages_types.h b/openair-cn/COMMON/udp_messages_types.h deleted file mode 100644 index 464d1575b1..0000000000 --- a/openair-cn/COMMON/udp_messages_types.h +++ /dev/null @@ -1,54 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#ifndef UDP_MESSAGES_TYPES_H_ -#define UDP_MESSAGES_TYPES_H_ - -#define UDP_INIT(mSGpTR) (mSGpTR)->ittiMsg.udp_init - -typedef struct { - uint32_t port; - char *address; -} udp_init_t; - -typedef struct { - uint8_t *buffer; - uint32_t buffer_length; - uint32_t buffer_offset; - uint32_t peer_address; - uint32_t peer_port; -} udp_data_req_t; - -typedef struct { - uint8_t *buffer; - uint32_t buffer_length; - uint32_t peer_address; - uint32_t peer_port; -} udp_data_ind_t; - -#endif /* UDP_MESSAGES_TYPES_H_ */ diff --git a/openair-cn/ChangeLog b/openair-cn/ChangeLog deleted file mode 100644 index 0db17ac628..0000000000 --- a/openair-cn/ChangeLog +++ /dev/null @@ -1,15 +0,0 @@ -v0.1: -- Build system -- SCTP layer v0.1 -- S1AP layer v0.1 -v0.2: -- Updated S1AP messages to RELEASE9 v9.8 -- S1-U layer using nw-gtpv1u -v0.3: -- Updated S1AP messages to RELEASE10 v10.5 -- Added NAS interface -- Added MME APPlication -- Converted sctp_bind to sctp_bindx for multi-homing support -- Added configuration file parsing -- S6a layer v0.1 using freeDiameter -- KeNB key derivy function \ No newline at end of file diff --git a/openair-cn/DOCS/EPC_User_Guide.docx b/openair-cn/DOCS/EPC_User_Guide.docx deleted file mode 100644 index b9cca8254c..0000000000 Binary files a/openair-cn/DOCS/EPC_User_Guide.docx and /dev/null differ diff --git a/openair-cn/DOCS/EPC_User_Guide.pdf b/openair-cn/DOCS/EPC_User_Guide.pdf deleted file mode 100644 index 6b8a476bad..0000000000 Binary files a/openair-cn/DOCS/EPC_User_Guide.pdf and /dev/null differ diff --git a/openair-cn/GTPV1-U/GTPU_SP/COPYING b/openair-cn/GTPV1-U/GTPU_SP/COPYING deleted file mode 100755 index d511905c16..0000000000 --- a/openair-cn/GTPV1-U/GTPU_SP/COPYING +++ /dev/null @@ -1,339 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program 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 2 of the License, or - (at your option) any later version. - - This program 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 this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/openair-cn/GTPV1-U/GTPU_SP/INSTALL b/openair-cn/GTPV1-U/GTPU_SP/INSTALL deleted file mode 100755 index 0de93a937c..0000000000 --- a/openair-cn/GTPV1-U/GTPU_SP/INSTALL +++ /dev/null @@ -1,33 +0,0 @@ -How to build ------------- - -1. Extract the files in a location of your choice. The - Files will be extracted in a directory called gtpu. - -2. cd /gtpu. - -3. make - -If make is successful, the binary files (libxt_GTPU.so and xt_GTPU.ko) -will be created in the Bin folder. - - -How to install --------------- -There is no "make install" as that will be difficult to support all -possible Linux distro. The cmd.sh file demonstrates how to install -the two binary files in the system. - - -In case of problem: - - check you got the last release of the library (see README), - - contact the mailing list (see README), - - check the bugtracker for known bugs (see README). - - -Documentation -------------- -Please have a look at the "Architecture" section in the README. - - - diff --git a/openair-cn/GTPV1-U/GTPU_SP/Makefile b/openair-cn/GTPV1-U/GTPU_SP/Makefile deleted file mode 100755 index f8b59266e1..0000000000 --- a/openair-cn/GTPV1-U/GTPU_SP/Makefile +++ /dev/null @@ -1,104 +0,0 @@ -#################################################################################### -# Makefile for iptables extension for the GTPUSP target and GTPUSP klm -# -# Copyright (c) 2010-2011 Polaris Networks -# Author: Pradip Biswas -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License version 2 as -# published by the Free Software Foundation. -# -#################################################################################### - -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_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_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_GTPUSP -################################################################################ - -XT_IPTABLES_VERSION = $(shell /sbin/iptables -V | cut -d " " -f 2 | cut -b 2-) -IPT_FIRST_NUM = $(shell echo ${XT_IPTABLES_VERSION} | cut -d "." -f 1 | cut -d "-" -f 1) -IPT_SECOND_NUM = $(shell echo ${XT_IPTABLES_VERSION} | cut -d "." -f 2 | cut -d "-" -f 1) -IPT_THIRD_NUM = $(shell echo ${XT_IPTABLES_VERSION} | cut -d "." -f 3 | cut -d "-" -f 1) -IPTVERSION = $(IPT_FIRST_NUM)$(IPT_SECOND_NUM)$(IPT_THIRD_NUM) -IPTABLES_VERSION_STRING = \"$(IPT_FIRST_NUM).$(IPT_SECOND_NUM).$(IPT_THIRD_NUM)\" - -LIB_CC := gcc - -ifeq ($(IPTVERSION), 135) - LIB_LD := ld -else - LIB_LD := gcc -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_GTPUSP_init -DPIC -fPIC -O2 \ - -DIPTVERSION=$(IPTVERSION) \ - -DIPTABLES_VERSION_STRING=$(IPTABLES_VERSION_STRING) - -XT_TARGET := xt_GTPUSP -XT_LIBNAME := lib$(XT_TARGET).so -XT_BUILD_DIR = $(BIN_DIR)/$(XT_TARGET) - -# Get the system distribution type -IsDebian=$(shell /bin/cat /proc/version | grep -i -e ubuntu -e debian) -IsRedHat=$(shell /bin/cat /proc/version | grep -i -e centos -e "red hat" -e suse -e fedora) - -# Change the ipq library name for 64-bit Debian-based distributions -ifeq ($(X86_64),x86_64) - ifneq ($(strip $(IsDebian)),) - LIB_IPQ=_pic - endif -endif - -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_GTPUSP.c - -XT_OBJECTS := $(addprefix $(XT_BUILD_DIR)/, $(notdir $(XT_SOURCES:.c=.o))) - -xtlib: XT - -XT: DF = $(XT_BUILD_DIR)/$(*F) -XT: $(XT_BUILD_DIR) $(BIN_DIR)/$(XT_LIBNAME) - --include $(addprefix $(XT_BUILD_DIR)/, $(notdir $(XT_SOURCES:.c=.P))) - -$(XT_BUILD_DIR): - @echo Build Directory is $@ - @if [ ! -d $(BIN_DIR) ]; then mkdir $(BIN_DIR); fi - @if [ ! -d $@ ]; then mkdir $@; fi - -$(BIN_DIR)/$(XT_LIBNAME): $(XT_OBJECTS) - @echo Linking $@ - @$(LIB_LD) -shared $(XT_OBJECTS) -o $@ - -$(XT_BUILD_DIR)/%.o : %.c - @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; \ - sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ - -e '/^$$/ d' -e 's/$$/ :/' < $(DF).d >> $(DF).P; \ - rm -f $(DF).d - -libclean: - @rm -rf $(BIN_DIR)/$(XT_LIBNAME) $(XT_BUILD_DIR) - diff --git a/openair-cn/GTPV1-U/GTPU_SP/README b/openair-cn/GTPV1-U/GTPU_SP/README deleted file mode 100755 index f29b8421c3..0000000000 --- a/openair-cn/GTPV1-U/GTPU_SP/README +++ /dev/null @@ -1,80 +0,0 @@ -Introduction ------------- -This piece of software implementes GPRS Tunneling Protocol (GTP) for user plane. -The software has two components - one is the extension of iptables that -run in user-space. The other is the counterpart of the iptables extension -that runs in kernel space. - - -License -------- -The project is licensed under GPL2+, see the COPYING and AUTHORS files for more -details. - - -Architecture ------------- -The GTPu tunneling is handled in two parts. The first part is the user-space -iptables target extension library (let's call it libxt). The second -part is the GTPu kernel loadable module (let's call it gtpu). The way it -is, once the user configures a GTPu tunnel attributes using iptables, the klm -is loaded by the kernel automatically and handles the IP packets according to -the GTPu tunnel attributes set by the user. - -The user can set the action to be taken on a matching IP packet. The action can be -either of "add", "remove" or "transport" . - -A GTPu tunnel has the following attributes: - - own IP address - - own GTPu tunnel id - - peer's IP address - - peer's GTPu tunnel id - -The GTPU target is designed to work only on mangle table. Also, the user is -expected to add GTPU target to the PREROUTING chain, as the GTPU target will -modify the original IP packet before it is routed. - -Once the user creates the rule in iptables, the matching IP packets go through -the gtpu klm, which acts upon the IP packet according to the action set by the -user. The action "Add" means the klm will add a GTPu header to the IP packet. -"Remove" will remove the GTPu header from the IP packet and "Transport" will -do a Remove first followed by an "Add" on the IP packet. - -For example, consider the following command: - -iptables -t mangle -A PREROUTING -d 10.10.10.1 -j GTPU --own-ip 192.168.0.98 --own-tun 100 --peer-ip 192.168.0.109 --peer-tun 101 --action add - -This command will configure the system to add a GTPu header to any IP packet destined to 10.10.10.1. -The source IP address outer IP will be 192.168.0.109, the dest IP will be 192.168.0.98 and -the destination GTP tunnel id will be 101. - -Similarly, consider the following command: - -iptables -t mangle -A PREROUTING -s 192.168.0.109 -d 192.168.0.98 -p udp --dport 2152 -j GTPU --action remove - -This command will process all the GTPu packets coming from 192.168.0.109 to 192.168.0.98 to -strip the GTPu header and forward the inner IP packet to the kernel's routing engine. - - -Files ---------- -There are two source C files and one header file: - - libxt_GTPU.c : source file for iptables GTPU extension library (libxt) - - xt_GTPU.c : source file for gtpu kernel loadable module (klm) - - xt_GTPU.h : common header file, shared between the libxt and the klm - - Makefile : Makefile to build both the libxt and the klm - - cmd.sh : sample cmd file to show how the binaries can be used - -See the INSTALL file to learn how to build the binaries. - - -References ----------- -3GPP TS 29.281 General Packet Radio System (GPRS) - Tunnelling Protocol User Plane (GTP-u) - - -Authors -------- -Pradip Biswas - diff --git a/openair-cn/GTPV1-U/GTPU_SP/RELEASE_NOTES b/openair-cn/GTPV1-U/GTPU_SP/RELEASE_NOTES deleted file mode 100755 index 022846fcd5..0000000000 --- a/openair-cn/GTPV1-U/GTPU_SP/RELEASE_NOTES +++ /dev/null @@ -1,6 +0,0 @@ - -Known issues in GTPU v1.0 -------------------------- - -1. Does not implement the "Transport" action. - diff --git a/openair-cn/GTPV1-U/GTPU_SP/cmd.sh b/openair-cn/GTPV1-U/GTPU_SP/cmd.sh deleted file mode 100755 index 428b5b155a..0000000000 --- a/openair-cn/GTPV1-U/GTPU_SP/cmd.sh +++ /dev/null @@ -1,18 +0,0 @@ -# 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 - diff --git a/openair-cn/GTPV1-U/GTPU_SP/libxt_GTPUSP.c b/openair-cn/GTPV1-U/GTPU_SP/libxt_GTPUSP.c deleted file mode 100755 index 0b749a8759..0000000000 --- a/openair-cn/GTPV1-U/GTPU_SP/libxt_GTPUSP.c +++ /dev/null @@ -1,322 +0,0 @@ -/* Shared library add-on to iptables for the GTPUSP target - * - * Copyright (c) 2010-2011 Polaris Networks - * Author: Pradip Biswas - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "xt_GTPUSP.h" - -#if (IPTVERSION <= 135) -#include -#elif (IPTVERSION > 135) -#include -#endif - -#if (IPTVERSION <= 135) -#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 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 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 { - PARAM_LADDR = 1 << 0, - PARAM_LTUN = 1 << 1, - PARAM_RADDR = 1 << 2, - PARAM_RTUN = 1 << 3, - PARAM_ACTION = 1 << 4, -}; - -static void GTPUSP_help(void) -{ - printf( - "GTPUSP target options\n" - " --action value Set action \n" - " --own-ip value Set own IP address\n" - " --own-tun value Set own tunnel id \n" - " --peer-ip value Set peer IP address\n" - " --peer-tun value Set peer tunnel id \n"); -} - -#if (IPTVERSION <= 135) -/* Stolen from iptables v1.4.7 code */ -void gtpusp_param_act(unsigned int status, const char *p1, ...) -{ - const char *p2, *p3; - va_list args; - int b; - - va_start(args, p1); - - switch (status) { - case GTPUSP_PARAM_ONLY_ONCE: - p2 = va_arg(args, const char *); - b = va_arg(args, unsigned int); - - if (!b) - return; - - exit_error(PARAMETER_PROBLEM, - "%s: \"%s\" option may only be specified once", - p1, p2); - break; - - case GTPUSP_PARAM_BAD_VALUE: - p2 = va_arg(args, const char *); - p3 = va_arg(args, const char *); - exit_error(PARAMETER_PROBLEM, - "%s: Bad value for \"%s\" option: \"%s\"", - p1, p2, p3); - break; - - default: - exit_error(status, "%s", "Unknown error"); - break; - } - - va_end(args); -} - -#endif - -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: - gtpusp_param_act(GTPUSP_PARAM_BAD_VALUE, "GTPUSP", "--own-ip", s); - break; - - case PARAM_RADDR: - gtpusp_param_act(GTPUSP_PARAM_BAD_VALUE, "GTPUSP", "--peer-ip", s); - break; - } - } - - switch (flag) { - case PARAM_LADDR: - info->laddr = addr; - break; - - case PARAM_RADDR: - info->raddr = addr; - break; - } -} - -static void parse_gtpusp_tunid(char *s, struct xt_gtpusp_target_info *info, int flag) -{ - unsigned int value; - - if (!gtpusp_strtoui(s, &value, 0, UINT32_MAX)) { - switch (flag) { - case PARAM_LTUN: - gtpusp_param_act(GTPUSP_PARAM_BAD_VALUE, "GTPUSP", "--own-tun", s); - break; - - case PARAM_RTUN: - gtpusp_param_act(GTPUSP_PARAM_BAD_VALUE, "GTPUSP", "--peer-tun", s); - break; - } - } - - switch (flag) { - case PARAM_LTUN: - info->ltun = value; - break; - - case PARAM_RTUN: - info->rtun = value; - break; - } -} - -static void parse_gtpusp_action(char *s, struct xt_gtpusp_target_info *info, unsigned int *flags) -{ - if (!strcmp(s, "add")) { - info->action = PARAM_GTPUSP_ACTION_ADD; - *flags |= PARAM_GTPUSP_ACTION_ADD; - } else { - gtpusp_param_act(GTPUSP_PARAM_BAD_VALUE, "GTPUSP", "--action", s); - } -} - -#if (IPTVERSION <= 135) -static int -GTPUSP_parse(int c, char **argv, int invert, unsigned int *flags, - const struct ipt_entry *entry, - struct ipt_entry_target **target) -#else -static int -GTPUSP_parse(int c, char **argv, int invert, unsigned int *flags, - const void *entry, struct xt_entry_target **target) -#endif -{ - struct xt_gtpusp_target_info *info = (struct xt_gtpusp_target_info *) (*target)->data; - - switch (c) { - case '1': - 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': - 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': - 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': - 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': - gtpusp_param_act(GTPUSP_PARAM_ONLY_ONCE, "GTPUSP", "--action", *flags & PARAM_ACTION); - parse_gtpusp_action(optarg, info, flags); - *flags |= PARAM_ACTION; - return 1; - } - - return 1; -} - -static void GTPUSP_check(unsigned int flags) -{ - if (!(flags & PARAM_ACTION)) { - gtpusp_exit_error(PARAMETER_PROBLEM, "GTPUSP: You must specify action"); - } - - if (!(flags & PARAM_LADDR)) { - gtpusp_exit_error(PARAMETER_PROBLEM, "GTPUSP: You must specify local addr"); - } - - if (!(flags & PARAM_LTUN)) { - gtpusp_exit_error(PARAMETER_PROBLEM, "GTPUSP: You must specify local tunnel id"); - } - - if (!(flags & PARAM_RADDR)) { - gtpusp_exit_error(PARAMETER_PROBLEM, "GTPUSP: You must specify remote addr"); - } - - if (!(flags & PARAM_RTUN)) { - 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_GTPUSP_ACTION_ADD: - sprintf (actionstr, "add"); - break; - - default : - sprintf (actionstr, "unspecified!!!"); - break; - } -} - -#if (IPTVERSION <= 135) -static void -GTPUSP_print(const struct ipt_ip *ip, - const struct ipt_entry_target *target, - int numeric) - -#else -static void -GTPUSP_print(const void *ip, - const struct xt_entry_target *target, - int numeric) -#endif -{ - const struct xt_gtpusp_target_info *info = - (struct xt_gtpusp_target_info *) target->data; - - char laddr[64], raddr[64], actionstr[32]; - - convert_action_to_string(info->action, actionstr); - - sprintf (laddr, "%s", inet_ntoa(*(struct in_addr*)&info->laddr)); - sprintf (raddr, "%s", inet_ntoa(*(struct in_addr*)&info->raddr)); - printf("GTPUSP self: %s tunnel: 0x%x / peer: %s tunnel: 0x%x / action: %s", - laddr, info->ltun, raddr, info->rtun, actionstr); -} - -static struct option GTPUSP_opts[] = { - { "own-ip", 1, NULL, '1' }, - { "own-tun", 1, NULL, '2' }, - { "peer-ip", 1, NULL, '3' }, - { "peer-tun", 1, NULL, '4' }, - { "action", 1, NULL, '5' }, - { .name = NULL } -}; - -#if (IPTVERSION <= 135) -static struct iptables_target gtpusp_tg_reg = { -#else -static struct xtables_target gtpusp_tg_reg = { -#endif - .name = "GTPUSP", - .version = XT_GTPUSP_VERSION, -#if (IPTVERSION > 135) - .family = NFPROTO_IPV4, -#endif - .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(>pusp_tg_reg); -#else - xtables_register_target(>pusp_tg_reg); -#endif -} - diff --git a/openair-cn/GTPV1-U/GTPU_SP/xt_GTPUSP.c b/openair-cn/GTPV1-U/GTPU_SP/xt_GTPUSP.c deleted file mode 100755 index 24f210e371..0000000000 --- a/openair-cn/GTPV1-U/GTPU_SP/xt_GTPUSP.c +++ /dev/null @@ -1,780 +0,0 @@ -/* - * GTPu klm for Linux/iptables - * - * Copyright (c) 2010-2011 Polaris Networks - * Author: Pradip Biswas - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// CONNMARK -#include -#include -#include -#include -#if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE) -# define WITH_IPV6 1 -#endif -#include "xt_GTPUSP.h" -#if !(defined KVERSION) -# error "Kernel version is not defined!!!! Exiting." -#endif - -#define GTPU_TRACE_IN_KERN_LOG 0 - -#if defined(GTPU_TRACE_IN_KERN_LOG) -#define PR_INFO(fORMAT, aRGS...) pr_info(fORMAT, ##aRGS) -#else -#define PR_INFO(fORMAT, aRGS...) -#endif -#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* _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 _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 _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 _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 "GTPUSP" -MODULE_LICENSE("GPL"); -MODULE_AUTHOR("Pradip Biswas "); -MODULE_DESCRIPTION("GTPu Data Path extension on netfilter"); -//----------------------------------------------------------------------------- -static struct xt_target gtpusp_tg_reg[] __read_mostly = { - { - .name = MODULE_NAME, - .revision = 0, - .family = NFPROTO_IPV4, - .hooks = (1 << NF_INET_POST_ROUTING) | - (1 << NF_INET_LOCAL_IN) | - (1 << NF_INET_FORWARD), - .table = "mangle", - .target = _gtpusp_tg4, - .targetsize = sizeof(struct xt_gtpusp_target_info), - .me = THIS_MODULE, - }, -#ifdef WITH_IPV6 - { - .name = MODULE_NAME, - .revision = 0, - .family = NFPROTO_IPV6, - .hooks = (1 << NF_INET_POST_ROUTING) | - (1 << NF_INET_LOCAL_IN) | - (1 << NF_INET_FORWARD), - .table = "mangle", - .target = _gtpusp_tg6, - .targetsize = sizeof(struct xt_gtpusp_target_info), - .me = THIS_MODULE, - }, -#endif -}; -#define GTP_ECHO_REQ 1 -#define GTP_ECHO_RSP 2 -#define GTP_ERROR_INDICATION 26 -#define GTP_GPDU 255 - -typedef struct gtpv1u_msg_s { - unsigned char version; - unsigned char protocol_type; - unsigned char ext_hdr_flag; - unsigned char seq_num_flag; - u_int16_t npdu_num_flag; - u_int32_t msg_type; - u_int16_t msg_len; - u_int32_t teid; - u_int16_t seq_num; - unsigned char npdu_num; - unsigned char next_ext_hdr_type; - u_int32_t msg_buf_len; - u_int32_t msg_buf_offset; - struct gtpv1u_msg_s* next; -} gtpv1u_msg_t; - -struct gtpuhdr { - char flags; - char msgtype; - u_int16_t length; - u_int32_t tunid; -}; -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; -} gtpusp_sock_t; - -//----------------------------------------------------------------------------- -#define GTPU_HDR_PNBIT 1 -#define GTPU_HDR_SBIT 1 << 1 -#define GTPU_HDR_EBIT 1 << 2 -#define GTPU_ANY_EXT_HDR_BIT (GTPU_HDR_PNBIT | GTPU_HDR_SBIT | GTPU_HDR_EBIT) - -#define GTPU_FAILURE 1 -#define GTPU_SUCCESS !GTPU_FAILURE -#define GTPUSP_2_PRINT_BUFFER_LEN 8192 - -#define IP_MORE_FRAGMENTS 0x2000 -#define NIPADDR(addr) \ - (uint8_t)(addr & 0x000000FF), \ - (uint8_t)((addr & 0x0000FF00) >> 8), \ - (uint8_t)((addr & 0x00FF0000) >> 16), \ - (uint8_t)((addr & 0xFF000000) >> 24) -//----------------------------------------------------------------------------- -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)"); -INT_MODULE_PARM(gtpu_enb_port, 2153); -MODULE_PARM_DESC(gtpu_enb_port, "UDP port number for S1U interface (eNB side)"); -STRING_MODULE_PARM(sgw_addr, "127.0.0.1"); -MODULE_PARM_DESC(sgw_addr, "IPv4 address of the S1U IP interface"); - - - -//----------------------------------------------------------------------------- -static char* -_gtpusp_icmph_type_2_string(uint8_t typeP) -//----------------------------------------------------------------------------- -{ - switch (typeP) { - case ICMP_ECHOREPLY:return "ECHOREPLY";break; - case ICMP_DEST_UNREACH:return "DEST_UNREACH";break; - case ICMP_SOURCE_QUENCH:return "SOURCE_QUENCH";break; - case ICMP_REDIRECT:return "REDIRECT";break; - case ICMP_ECHO:return "ECHO";break; - case ICMP_TIME_EXCEEDED:return "TIME_EXCEEDED";break; - case ICMP_PARAMETERPROB:return "PARAMETERPROB";break; - case ICMP_TIMESTAMP:return "TIMESTAMP";break; - case ICMP_TIMESTAMPREPLY:return "TIMESTAMPREPLY";break; - case ICMP_INFO_REQUEST:return "INFO_REQUEST";break; - case ICMP_INFO_REPLY:return "INFO_REPLY";break; - case ICMP_ADDRESS:return "ADDRESS";break; - case ICMP_ADDRESSREPLY:return "ADDRESSREPLY";break; - default:return "TYPE?"; - } -} -//----------------------------------------------------------------------------- -static char* -_gtpusp_nf_inet_hook_2_string(int nf_inet_hookP) -{ - //----------------------------------------------------------------------------- - switch (nf_inet_hookP) { - case NF_INET_PRE_ROUTING: - return "NF_INET_PRE_ROUTING"; - break; - - case NF_INET_LOCAL_IN: - return "NF_INET_LOCAL_IN"; - break; - - case NF_INET_FORWARD: - return "NF_INET_FORWARD"; - break; - - case NF_INET_LOCAL_OUT: - return "NF_INET_LOCAL_OUT"; - break; - - case NF_INET_POST_ROUTING: - return "NF_INET_POST_ROUTING"; - break; - - default: - return "NF_INET_UNKNOWN"; - } -} -//----------------------------------------------------------------------------- -void -_gtpusp_print_hex_octets(unsigned char* data_pP, unsigned short sizeP) -{ - //----------------------------------------------------------------------------- - - unsigned long octet_index = 0; - unsigned long buffer_marker = 0; - unsigned char aindex; - struct timeval tv; - char timeofday[64]; - unsigned int h,m,s; - - if (data_pP == NULL) { - return; - } - - if (sizeP > 2000) { - return; - } - - do_gettimeofday(&tv); - h = (tv.tv_sec/3600) % 24; - m = (tv.tv_sec / 60) % 60; - s = tv.tv_sec % 60; - snprintf(timeofday, 64, "%02d:%02d:%02d.%06ld", h,m,s,tv.tv_usec); - - 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(&_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(&_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(&_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 - */ - } - - /* - * Append enough spaces and put final pipe - */ - for (aindex = octet_index; aindex < 16; ++aindex) - buffer_marker+=snprintf(&_gtpusp_print_buffer[buffer_marker], GTPUSP_2_PRINT_BUFFER_LEN - buffer_marker, " "); - - //SGI_IF_DEBUG(" "); - 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 -//----------------------------------------------------------------------------- -static int _udp_thread(void *data) -//----------------------------------------------------------------------------- -{ - int size, tx_size; - int bufsize = 8192; -#if defined(FLAG_GTPV1U_KERNEL_THREAD_SOCK_NO_WAIT) - int success_read = 0; - int failed_read = 0; -#endif - unsigned char buf[bufsize+1]; - unsigned char gtp_resp[1024]; - - /* kernel thread initialization */ - _gtpusp_sock.running = 1; - - PR_INFO(MODULE_NAME": listening on port %d\n", gtpu_sgw_port); - - /* main loop */ - while(_gtpusp_sock.thread_stop_requested == 0){ - if (kthread_should_stop()) { - _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 = _gtpusp_ksocket_receive(_gtpusp_sock.sock, &_gtpusp_sock.addr, buf, bufsize); - - if (size <= 0) { - if (size != -EAGAIN) { - pr_info(MODULE_NAME": error getting datagram, sock_recvmsg error = %d\n", size); - } -#if defined(FLAG_GTPV1U_KERNEL_THREAD_SOCK_NO_WAIT) - success_read = 0; - failed_read += 1; - if (failed_read > 10) failed_read = 10; - usleep_range(failed_read*20,failed_read*200); -#endif - } else { -#if defined(FLAG_GTPV1U_KERNEL_THREAD_SOCK_NO_WAIT) - success_read += 1; - failed_read = 0; -#endif - PR_INFO(MODULE_NAME": received %d bytes\n", size); - - 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)); - } - } - } - _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() - } - PR_INFO(MODULE_NAME": kthread do_exit()\n"); - do_exit(0); -} - -//----------------------------------------------------------------------------- -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; - uint8_t msg_type; - struct iphdr *iph_p = NULL; - struct iphdr *new_iph_p= NULL; - struct sk_buff *skb_p = NULL; - const unsigned char * rx_buf_p = rx_buf_pP; - int err = 0; - struct rtable *rt = NULL; - struct flowi fl = { - .u = { - .ip4 = { - .daddr = 0, - .flowi4_tos = 0, - .flowi4_scope = RT_SCOPE_UNIVERSE, - } - } - }; - - msg_type = rx_buf_pP[1]; - - switch(msg_type) { - case GTP_ECHO_REQ: - PR_INFO(MODULE_NAME": TODO GTP ECHO_REQ, SEND TO GTPV1U TASK USER SPACE\n"); - //TODO; - return 0; - break; - - case GTP_ERROR_INDICATION: - PR_INFO(MODULE_NAME":TODO GTP ERROR INDICATION, SEND TO GTPV1U TASK USER SPACE\n"); - //TODO; - return 0; - break; - - case GTP_ECHO_RSP: - PR_INFO(MODULE_NAME":GTP ECHO_RSP, SEND TO GTPV1U TASK USER SPACE\n"); - return 0; - break; - - case GTP_GPDU: { - gtpv1u_msg.version = ((*rx_buf_p) & 0xE0) >> 5; - gtpv1u_msg.protocol_type = ((*rx_buf_p) & 0x10) >> 4; - gtpv1u_msg.ext_hdr_flag = ((*rx_buf_p) & 0x04) >> 2; - gtpv1u_msg.seq_num_flag = ((*rx_buf_p) & 0x02) >> 1; - gtpv1u_msg.npdu_num_flag = ((*rx_buf_p) & 0x01); - rx_buf_p++; - - gtpv1u_msg.msg_type = *(rx_buf_p); - rx_buf_p++; - - rx_buf_p += 2; - - gtpv1u_msg.teid = ntohl(*((u_int32_t *)rx_buf_p)); - rx_buf_p += 4; - - if(gtpv1u_msg.ext_hdr_flag || gtpv1u_msg.seq_num_flag || gtpv1u_msg.npdu_num_flag) { - gtpv1u_msg.seq_num = ntohs(*(((u_int16_t *)rx_buf_p))); - rx_buf_p += 2; - gtpv1u_msg.npdu_num = *(rx_buf_p++); - gtpv1u_msg.next_ext_hdr_type = *(rx_buf_p++); - } - - gtpv1u_msg.msg_buf_offset = (u_int32_t)(rx_buf_p - rx_buf_pP); - gtpv1u_msg.msg_buf_len = lenP - gtpv1u_msg.msg_buf_offset; - gtpv1u_msg.msg_len = lenP; - - iph_p = (struct iphdr*)(&rx_buf_pP[gtpv1u_msg.msg_buf_offset]); - - fl.u.ip4.daddr = iph_p->daddr; - fl.u.ip4.flowi4_tos = RT_TOS(iph_p->tos); - - rt = ip_route_output_key(&init_net, &fl.u.ip4); - - if (rt == NULL) { - PR_INFO("GTPURH: Failed to route packet to dst 0x%x. Error: (%d)\n", fl.u.ip4.daddr, err); - return NF_DROP; - } - - if (rt->dst.dev == NULL) { - pr_info("GTPURH: dst dev NULL\n"); - return 0; - } - - skb_p = alloc_skb(LL_MAX_HEADER + ntohs(iph_p->tot_len), GFP_ATOMIC); - if (skb_p == NULL) { - return 0; - } - skb_p->priority = rt_tos2priority(iph_p->tos); - skb_p->pkt_type = PACKET_OTHERHOST; - skb_dst_set(skb_p, dst_clone(&rt->dst)); - skb_p->dev = skb_dst(skb_p)->dev; - - skb_reserve(skb_p, LL_MAX_HEADER + ntohs(iph_p->tot_len)); - skb_p->protocol = htons(ETH_P_IP); - - new_iph_p = (void *)skb_push(skb_p, ntohs(iph_p->tot_len) - (iph_p->ihl << 2)); - skb_reset_transport_header(skb_p); - new_iph_p = (void *)skb_push(skb_p, iph_p->ihl << 2); - memcpy(new_iph_p, iph_p, ntohs(iph_p->tot_len)); - skb_reset_network_header(skb_p); - skb_reset_inner_network_header(skb_p); - skb_reset_inner_transport_header(skb_p); - - skb_p->mark = gtpv1u_msg.teid; - - new_iph_p->ttl = ip4_dst_hoplimit(skb_dst(skb_p)); - skb_p->ip_summed = CHECKSUM_NONE; - - if (skb_p->len > dst_mtu(skb_dst(skb_p))) { - PR_INFO("GTPURH: bad length\n"); - goto free_skb; - } - ip_local_out(skb_p); - return 0; -free_skb: - pr_info("GTPURH: Dropped skb\n"); - kfree_skb(skb_p); - return 0; - } - break; - - default: - PR_INFO(MODULE_NAME":ERROR GTPU msg type %u\n", msg_type); - return 0; - } -} - -//----------------------------------------------------------------------------- -static int _gtpusp_ksocket_receive(struct socket* sock_pP, struct sockaddr_in* addr_pP, unsigned char* buf_pP, int lenP) -//----------------------------------------------------------------------------- -{ - struct msghdr msg; - struct iovec iov; - mm_segment_t oldfs; - int size = 0; - - if (sock_pP->sk==NULL) return 0; - - iov.iov_base = buf_pP; - iov.iov_len = lenP; - -#if defined(FLAG_GTPV1U_KERNEL_THREAD_SOCK_NO_WAIT) - msg.msg_flags = MSG_DONTWAIT; -#else - msg.msg_flags = 0; -#endif - msg.msg_name = addr_pP; - msg.msg_namelen = sizeof(struct sockaddr_in); - msg.msg_control = NULL; - msg.msg_controllen = 0; - msg.msg_iov = &iov; - msg.msg_iovlen = 1; - msg.msg_control = NULL; - - oldfs = get_fs(); - set_fs(KERNEL_DS); - size = sock_recvmsg(sock_pP,&msg,lenP,msg.msg_flags); - set_fs(oldfs); - - return size; -} - -//----------------------------------------------------------------------------- -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; - struct iovec iov[2]; - mm_segment_t oldfs; - int size = 0; - int err = 0; - int iov_index = 0; - - if ( (err = sock_pP->ops->connect(sock_pP, (struct sockaddr *)addr_pP, sizeof(struct sockaddr), 0)) < 0 ) { - PR_INFO(MODULE_NAME": Could not connect to socket, error = %d\n", -err); - return 0; - } - if (sock_pP->sk == NULL) { - return 0; - } - if ((gtpuh_pP != NULL) && (len_gtpP > 0)) { - iov[iov_index].iov_base = gtpuh_pP; - iov[iov_index].iov_len = len_gtpP; - iov_index += 1; - } - - if ((buf_ip_pP != NULL) && (len_ipP > 0)) { - iov[iov_index].iov_base = buf_ip_pP; - iov[iov_index].iov_len = len_ipP; - iov_index += 1; - } - - msg.msg_flags = 0; - msg.msg_name = addr_pP; - msg.msg_namelen = sizeof(struct sockaddr_in); - msg.msg_control = NULL; - msg.msg_controllen = 0; - msg.msg_iov = iov; - msg.msg_iovlen = iov_index; - msg.msg_control = NULL; - - oldfs = get_fs(); - set_fs(KERNEL_DS); - size = sock_sendmsg(sock_pP,&msg,len_ipP+len_gtpP); - set_fs(oldfs); - - return size; - } - -#ifdef WITH_IPV6 -//----------------------------------------------------------------------------- -static void -_gtpusp_tg6_add(struct sk_buff *old_skb_pP, const struct xt_action_param *par_pP) -{ - //----------------------------------------------------------------------------- - } -#endif - -//----------------------------------------------------------------------------- -static void -_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); - struct gtpuhdr gtpuh; - uint16_t orig_iplen = 0; - // CONNMARK - enum ip_conntrack_info ctinfo; - struct nf_conn *ct = NULL; - u_int32_t newmark; - - if (skb_linearize(old_skb_pP) < 0) { - PR_INFO(MODULE_NAME": skb no linearize\n"); - return; - } - orig_iplen = ntohs(old_iph_p->tot_len); - - //---------------------------------------------------------------------------- - // CONNMARK - //---------------------------------------------------------------------------- - ct = nf_ct_get(old_skb_pP, &ctinfo); - if (ct == NULL) { - 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_gtpusp_target_info *)(par_pP->targinfo))->ltun; - } else { - //XT_CONNMARK_RESTORE: - newmark = old_skb_pP->mark ^ ct->mark; - - 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_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); - } - } - - - /* Add GTPu header */ - gtpuh.flags = 0x30; /* v1 and Protocol-type=GTP */ - gtpuh.msgtype = 0xff; /* T-PDU */ - gtpuh.length = htons(orig_iplen); - gtpuh.tunid = htonl(((const struct xt_gtpusp_target_info *)(par_pP->targinfo))->rtun); - - _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 -_gtpusp_tg6(struct sk_buff *skb_pP, const struct xt_action_param *par_pP) -{ - //----------------------------------------------------------------------------- - - const struct xt_gtpusp_target_info *tgi_p = par_pP->targinfo; - - if (tgi_p == NULL) { - return NF_ACCEPT; - } - - if (tgi_p->action == PARAM_GTPUSP_ACTION_ADD) { - _gtpusp_tg6_add(skb_pP, par_pP); - return NF_DROP; // TODO - } - - return NF_ACCEPT; -} -#endif - -//----------------------------------------------------------------------------- -static unsigned int -_gtpusp_tg4(struct sk_buff *skb_pP, const struct xt_action_param *par_pP) -{ - //----------------------------------------------------------------------------- - const struct xt_gtpusp_target_info *tgi_p = par_pP->targinfo; - - if (tgi_p == NULL) { - return NF_ACCEPT; - } - - if (tgi_p->action == PARAM_GTPUSP_ACTION_ADD) { - _gtpusp_tg4_add(skb_pP, par_pP); - return NF_DROP; - } - - return NF_ACCEPT; -} - -//----------------------------------------------------------------------------- -static int -__init gtpusp_tg_init(void) -//----------------------------------------------------------------------------- -{ - int err; - - pr_info(MODULE_NAME": Initializing module (KVersion: %d)\n", KVERSION); - pr_info(MODULE_NAME": Copyright Polaris Networks 2010-2011\n"); - pr_info(MODULE_NAME": Modified by EURECOM Lionel GAUTHIER 2014\n"); -#ifndef CMAKER - pr_info(MODULE_NAME": Compiled %s at time %s\n",__DATE__,__TIME__); -#endif -#if defined(WITH_IPV6) - pr_info(MODULE_NAME": IPv4/IPv6 enabled\n"); -#else - pr_info(MODULE_NAME": IPv4 only enabled\n"); -#endif - pr_info(MODULE_NAME": params gtpu_enb_port=%u, gtpu_sgw_port=%u, sgw_addr=%s\n", - gtpu_enb_port, gtpu_sgw_port, sgw_addr); - - // UDP socket socket - memset(&_gtpusp_sock, 0, sizeof(gtpusp_sock_t)); - - /* create a socket */ - 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; - } - - _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); - - _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); - - _gtpusp_sock.thread_stop_requested = 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 - _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((_gtpusp_sock.thread)) { - wake_up_process(_gtpusp_sock.thread); - } - return xt_register_targets(gtpusp_tg_reg, ARRAY_SIZE(gtpusp_tg_reg)); -close_and_out: - sock_release(_gtpusp_sock.sock); - _gtpusp_sock.sock = NULL; - return err; -} - -//----------------------------------------------------------------------------- -static void -__exit gtpusp_tg_exit(void) -//----------------------------------------------------------------------------- -{ - int err; - int loop = 0; - - - if (_gtpusp_sock.thread==NULL) { - pr_info(MODULE_NAME": no kernel thread to kill\n"); - } else { - 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 ((_gtpusp_sock.running > 0) && (loop < 20)); - if (_gtpusp_sock.running > 0) { - pr_info(MODULE_NAME": stopping kernel thread\n"); - err = kthread_stop(_gtpusp_sock.thread); - if(!err) { - pr_info(MODULE_NAME": Successfully killed kernel thread!\n"); - } else { - pr_info(MODULE_NAME": Unsuccessfully killed kernel thread!\n"); - } - } else { - pr_info(MODULE_NAME": Found thread exited by itself\n"); - } - } - } - - /* free allocated resources before exit */ - if (_gtpusp_sock.sock != NULL) { - sock_release(_gtpusp_sock.sock); - _gtpusp_sock.sock = NULL; - } - xt_unregister_targets(gtpusp_tg_reg, ARRAY_SIZE(gtpusp_tg_reg)); - pr_info(MODULE_NAME": Unloading module\n"); -} - - -module_init(gtpusp_tg_init); -module_exit(gtpusp_tg_exit); -MODULE_ALIAS("ipt6_GTPUSP"); -MODULE_ALIAS("ipt_GTPUSP"); - diff --git a/openair-cn/GTPV1-U/GTPU_SP/xt_GTPUSP.h b/openair-cn/GTPV1-U/GTPU_SP/xt_GTPUSP.h deleted file mode 100755 index e4d72f5875..0000000000 --- a/openair-cn/GTPV1-U/GTPU_SP/xt_GTPUSP.h +++ /dev/null @@ -1,23 +0,0 @@ -/* Shared header file for iptables extension for the GTPU target and GTPu KLM - * - * Copyright (c) 2010-2011 Polaris Networks - * Author: Pradip Biswas - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - */ - -enum xt_gtpusp_mode_ { - PARAM_GTPUSP_ACTION_ADD = 1 << 8, -}; - -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))); - u_int32_t rtun __attribute__((aligned(8))); - u_int32_t action __attribute__((aligned(8))); -}; - diff --git a/openair-cn/GTPV2-C/Makefile.am b/openair-cn/GTPV2-C/Makefile.am deleted file mode 100644 index 4bbb12ed0d..0000000000 --- a/openair-cn/GTPV2-C/Makefile.am +++ /dev/null @@ -1,29 +0,0 @@ -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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 . -# -# Contact Information -# OpenAirInterface Admin: openair_admin@eurecom.fr -# OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr -# -# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. -# -################################################################################ -SUBDIRS = nwgtpv2c-0.11/ \ No newline at end of file diff --git a/openair-cn/GTPV2-C/nwgtpv2c-0.11/AUTHORS b/openair-cn/GTPV2-C/nwgtpv2c-0.11/AUTHORS deleted file mode 100644 index b068a40fdd..0000000000 --- a/openair-cn/GTPV2-C/nwgtpv2c-0.11/AUTHORS +++ /dev/null @@ -1 +0,0 @@ -Amit Chawre diff --git a/openair-cn/GTPV2-C/nwgtpv2c-0.11/COPYING b/openair-cn/GTPV2-C/nwgtpv2c-0.11/COPYING deleted file mode 100644 index d27832d6c1..0000000000 --- a/openair-cn/GTPV2-C/nwgtpv2c-0.11/COPYING +++ /dev/null @@ -1,26 +0,0 @@ -Copyright (c) 2010-2011 Amit Chawre -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. -3. The name of the author may not be used to endorse or promote products -derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - diff --git a/openair-cn/GTPV2-C/nwgtpv2c-0.11/Makefile.am b/openair-cn/GTPV2-C/nwgtpv2c-0.11/Makefile.am deleted file mode 100644 index 2b8e86b1a2..0000000000 --- a/openair-cn/GTPV2-C/nwgtpv2c-0.11/Makefile.am +++ /dev/null @@ -1,6 +0,0 @@ -# this is example-file: Makefile.am - -# the subdirectories of the project to go into -SUBDIRS = \ - src\ - test-app diff --git a/openair-cn/GTPV2-C/nwgtpv2c-0.11/README b/openair-cn/GTPV2-C/nwgtpv2c-0.11/README deleted file mode 100644 index 8aa79638e9..0000000000 --- a/openair-cn/GTPV2-C/nwgtpv2c-0.11/README +++ /dev/null @@ -1,168 +0,0 @@ - -INTRODUCTION ------------- - -nwGtpv2c library is a free and open source implementation of GPRS Tunneling -Protocol v2, also known as eGTP-C, as per 3GPP TS-29274. - -The stack library supports transaction management, message creation and parsing, -message validation, echo response and retransmission management. Other than -this, timer and memory management functions are also built into the stack. - -The library is published under BSD three clause license. - - -DESIGN PHILOSPHY ----------------- - -The stack is designed for high portability not only for the hardware and OS -it will run on but also for the application software that uses it. The stack -doesn't mandate conditions on the user application architecture or design. -The stack relies on the user application for infrastructure utilities such -as I/O, timers, logs and multithreading. This realized by using callback -mechanisms and enables the stack library to seamlessly integrate without or -very little changes to the existing application framework. - -The stack is fully-asynchronous in design for compatibility with event loop -mechanisms such as select, poll, etc. and can also be used for multi-threaded -applications. It should compile on Linux, BSD, Mac OS X, Solaris and Windows -(cygwin). - -The stack architecture builds upon following mentioned entities that are -external to it: - - +-------------+ +---------+ +---------+ - | ULP ENTITY | | TMR MGR | | LOG MGR | - +------+------+ +----+----+ +----+----+ - | | | - +------+------------------+------------------+----+ - | | - | NWGTPv2 STACK | - | | - +-------------------------+-----------------------+ - | - +------+------+ - | UDP ENTITY | - +-------------+ - - -- User Layer Protocol (ULP) Entity: -This entity is the one which decides behaviour of the GTP user application. -This layer implements the intelligent logic for the GTP application and sits -on top of the GTP stack. This layer may also execute functions other than GTP -procedures for example authetication. - -- UDP Entity: -This is the layer below the GTP stack and is responsible for UDP I/O between -the stack and network. This layer shall manage the socket interface. This entity -abstracts the stack library's view of the network. This may be useful in a -multiprocess load balancing application wherein the GTP messages are received -by a GTP load distribution entity and relayed to multiple GTP stacks over -internal messaging. It may or may not be housed with/in ULP. - -- Timer Manager Entity: -Timer Manager Entity provides the GTP stack library with infrastructure for -timer CRUD operations. It may or may not be housed with/in ULP. - -- Log Manager Entity: -Log Manager Entity provides the GTP stack library with callbacks for logging -operations. It may or may not be housed with/in ULP. - - -Optionally, there may be a user level "Stack Management Entity" which shall be -resposible for creating and configuring the stack library, though the stack -library is not aware of any such entity. - -The application may implement all above entities as a single or multiple object. -The external entities need to register callbacks with GTP stack library for -receiving APIs from the stack library and stack library exposes API for the same. - -The GTP stack library doesn't implement any execution threads of its own. It is -up-to user application if it want to call the library APIs via multiple threads. -The stack library, though, currently DOES NOT protect its critical section and -hence, is NOT threadsafe. - - -FEATURES --------- - -- TS 29.274 (Release 9) compliance target for gtp-c -- Message Encoding -- Reliable Message Delivery -- Message Parser -- Message Integrity and Error Checking -- Support for S11, S5 and S8 SAE/EPC interfaces -- Easy Application Integration - - -APPLICATIONS ------------- - -In general, the GTP stack library may be used to write any GTP version 2 based -application. -The GTP stack library can also be used by applications implementing LTE MME, SGW -or PDN Gateways and simulators/emulators for either of them. Please see the test -applications involving basic GTP procedures. - -The test applications use libevent-1.4 library for I/O and timer infrastructure, -(http://www.monkey.org/~provos/libevent-1.4.14b-stable.tar.gz). -Following is a brief description of the test applications: - -- nw-helloworld -This is minimalistic program demostrating usage of nw-gtpv2 library. It -demostrates ulp, udp, tmrmgr and logmgr entities as well as stack construction -and destruction. The gtpv2c test application creates a transaction and sends -a initial request messages over it. - -- nw-egpting -egtping is a utility for pinging a GPRS Tunneling Protocol (GTP) version 2, -or Evolved GTP (eGTP) using Echo Request/Response. - -- nw-epc -The nw-epc software package is a free and open source framework implementation -of SGW and PGW built upon nw-gtpv2. - - -LICENSE -------- - -Copyright (c) 2010-2011 Amit Chawre -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -DISCLAIMER ----------- - -THIS INFORMATION IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS INFORMATION, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/openair-cn/GTPV2-C/nwgtpv2c-0.11/configure.ac b/openair-cn/GTPV2-C/nwgtpv2c-0.11/configure.ac deleted file mode 100644 index c9284f575e..0000000000 --- a/openair-cn/GTPV2-C/nwgtpv2c-0.11/configure.ac +++ /dev/null @@ -1,58 +0,0 @@ -# this is example-file: configure.ac - -# initial information about the project -AC_INIT([NwGtpv2c],[0.11],[]) - -# check if the source folder is correct -AC_CONFIG_SRCDIR([src/NwGtpv2c.c]) - -# Checks for programs - -# check for C++ preprocessor and compiler and the library compiler -AC_PROG_CXXCPP -AC_PROG_CXX -AC_PROG_RANLIB - -# automake initialisation and check for minimal automake API version 1.9 -AM_INIT_AUTOMAKE([1.9]) - -# use the C compiler for the following checks -AC_LANG([C]) -AC_C_INLINE - -# Checks for header files. -AC_HEADER_STDC -AC_CHECK_HEADERS([fcntl.h]) -AC_CHECK_HEADERS([string]) -AC_CHECK_HEADERS([iostream]) -AC_CHECK_HEADERS([arpa/inet.h]) -AC_CHECK_HEADERS([sys/time.h]) -AC_CHECK_HEADERS([sys/socket.h]) - -AC_CHECK_FUNCS([strerror]) -AC_CHECK_FUNCS([socket]) -AC_CHECK_FUNCS([memset]) -AC_CHECK_FUNCS([gettimeofday]) -AC_FUNC_MALLOC -AC_PROG_LN_S - -AC_CHECK_LIB([event], [event_init]) -AM_CONDITIONAL([ENABLE_TESTS_APP], [test x$HAVE_LIBEVENT == xyes]) - -# Checks for typedefs, structures, and compiler characteristics. -AC_TYPE_SIZE_T - -# distribute additional compiler and linker flags -# --> set these variables instead of CXXFLAGS or LDFLAGS -AC_SUBST([AM_CFLAGS]) -AC_SUBST([AM_LDFLAGS]) - -# files to generate via autotools (.am or .in source files) -AC_CONFIG_FILES([Makefile]) -AC_CONFIG_FILES([src/Makefile]) -AC_CONFIG_FILES([test-app/Makefile]) -AC_CONFIG_FILES([test-app/nw-helloworld/Makefile]) -AC_CONFIG_FILES([test-app/nw-egtping/Makefile]) - -# generate the final Makefile etc. -AC_OUTPUT diff --git a/openair-cn/GTPV2-C/nwgtpv2c-0.11/include/NwGtpv2cLog.h b/openair-cn/GTPV2-C/nwgtpv2c-0.11/include/NwGtpv2cLog.h deleted file mode 100644 index b35694b966..0000000000 --- a/openair-cn/GTPV2-C/nwgtpv2c-0.11/include/NwGtpv2cLog.h +++ /dev/null @@ -1,83 +0,0 @@ -/*----------------------------------------------------------------------------* - * * - * n w - g t p v 2 c * - * G P R S T u n n e l i n g P r o t o c o l v 2 c S t a c k * - * * - * * - * Copyright (c) 2010-2011 Amit Chawre * - * All rights reserved. * - * * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright * - * notice, this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - *----------------------------------------------------------------------------*/ - -#ifndef __NW_GTPV2C_LOG_H__ -#define __NW_GTPV2C_LOG_H__ - -#include -#include "NwLog.h" - -/** - * @file NwGtpv2cLog.h - * @brief This header contains logging related definitions. -*/ - -#ifdef __cplusplus -extern "C" { -#endif - -/*--------------------------------------------------------------------------- - * Log Macro Definition - *--------------------------------------------------------------------------*/ - -#define NW_LOG(_gtpv2cHandle, _logLevel, ...) \ - do { \ - if(((NwGtpv2cStackT*)(_gtpv2cHandle))->logLevel >= _logLevel) \ - { \ - char _logBuf[1024]; \ - snprintf(_logBuf, 1024, __VA_ARGS__); \ - ((NwGtpv2cStackT*)(_gtpv2cHandle))->logMgr.logReqCallback(((NwGtpv2cStackT*)_gtpv2cHandle)->logMgr.logMgrHandle, _logLevel, __FILE__, __LINE__, _logBuf);\ - } \ - } while(0) - -#define NW_ENTER(_gtpv2cHandle) \ - do { \ - NW_LOG(_gtpv2cHandle, NW_LOG_LEVEL_DEBG, "Entering '%s'", __func__);\ - } while(0) - -#define NW_LEAVE(_gtpv2cHandle) \ - do { \ - NW_LOG(_gtpv2cHandle, NW_LOG_LEVEL_DEBG, "Leaving '%s'", __func__);\ - } while(0) - -#ifdef __cplusplus -} -#endif - -#endif /* __NW_TYPES_H__ */ - - -/*--------------------------------------------------------------------------* - * E N D O F F I L E * - *--------------------------------------------------------------------------*/ - diff --git a/openair-cn/GTPV2-C/nwgtpv2c-0.11/include/NwGtpv2cMsgIeParseInfo.h b/openair-cn/GTPV2-C/nwgtpv2c-0.11/include/NwGtpv2cMsgIeParseInfo.h deleted file mode 100644 index 38a37a5d4a..0000000000 --- a/openair-cn/GTPV2-C/nwgtpv2c-0.11/include/NwGtpv2cMsgIeParseInfo.h +++ /dev/null @@ -1,95 +0,0 @@ -/*----------------------------------------------------------------------------* - * * - * n w - g t p v 2 c * - * G P R S T u n n e l i n g P r o t o c o l v 2 c S t a c k * - * * - * * - * Copyright (c) 2010-2011 Amit Chawre * - * All rights reserved. * - * * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright * - * notice, this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - *----------------------------------------------------------------------------*/ - -#ifndef __NW_GTPV2C_MSG_PARSE_INFO_H__ -#define __NW_GTPV2C_MSG_PARSE_INFO_H__ - -#include "NwTypes.h" -#include "NwGtpv2c.h" - -/** - * @file NwGtpv2cMsgParseInfo.h - * @brief This file defines APIs for to parse incoming messages. -*/ - -typedef struct { - uint8_t groupedIeType; - uint16_t mandatoryIeCount; - NwGtpv2cStackHandleT hStack; - - struct { - uint8_t ieMinLength; - uint8_t iePresence; - } ieParseInfo[NW_GTPV2C_IE_TYPE_MAXIMUM][NW_GTPV2C_IE_INSTANCE_MAXIMUM]; - -} NwGtpv2cGroupedIeParseInfoT; - -typedef struct { - uint16_t msgType; - uint16_t mandatoryIeCount; - NwGtpv2cStackHandleT hStack; - - struct { - uint8_t ieMinLength; - uint8_t iePresence; - NwGtpv2cGroupedIeParseInfoT* pGroupedIeInfo; - } ieParseInfo[NW_GTPV2C_IE_TYPE_MAXIMUM][NW_GTPV2C_IE_INSTANCE_MAXIMUM]; - -} NwGtpv2cMsgIeParseInfoT; - -#ifdef __cplusplus -extern "C" { -#endif - -NwGtpv2cMsgIeParseInfoT* -nwGtpv2cMsgIeParseInfoNew(NwGtpv2cStackHandleT hStack, uint8_t msgType); - -NwRcT -nwGtpv2cMsgIeParseInfoDelete(NwGtpv2cMsgIeParseInfoT* thiz); - -NwRcT -nwGtpv2cMsgIeParse(NW_IN NwGtpv2cMsgIeParseInfoT* thiz, - NW_IN NwGtpv2cMsgHandleT hMsg, - NW_INOUT NwGtpv2cErrorT *pError); - -#ifdef __cplusplus -} -#endif - -#endif /* __NW_GTPV2C_MSG_PARSE_INFO_H__ */ - - -/*--------------------------------------------------------------------------* - * E N D O F F I L E * - *--------------------------------------------------------------------------*/ - diff --git a/openair-cn/GTPV2-C/nwgtpv2c-0.11/include/NwGtpv2cPrivate.h b/openair-cn/GTPV2-C/nwgtpv2c-0.11/include/NwGtpv2cPrivate.h deleted file mode 100644 index 29be2c3f29..0000000000 --- a/openair-cn/GTPV2-C/nwgtpv2c-0.11/include/NwGtpv2cPrivate.h +++ /dev/null @@ -1,237 +0,0 @@ -/*----------------------------------------------------------------------------* - * * - * n w - g t p v 2 c * - * G P R S T u n n e l i n g P r o t o c o l v 2 c S t a c k * - * * - * * - * Copyright (c) 2010-2011 Amit Chawre * - * All rights reserved. * - * * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright * - * notice, this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - *----------------------------------------------------------------------------*/ - -#ifndef __NW_GTPV2C_PRIVATE_H__ -#define __NW_GTPV2C_PRIVATE_H__ - -#include - -#include "tree.h" -#include "queue.h" - -#include "NwTypes.h" -#include "NwError.h" -#include "NwGtpv2c.h" -#include "NwGtpv2cIe.h" -#include "NwGtpv2cMsg.h" -#include "NwGtpv2cMsgIeParseInfo.h" -#include "NwGtpv2cTunnel.h" - -/** - * @file NwGtpv2cPrivate.h - * @brief This header file contains nw-gtpv2c private definitions not to be - * exposed to user application. -*/ - -#ifdef __cplusplus -extern "C" { -#endif - -#define NW_GTPV2C_MALLOC(_stack, _size, _mem, _type) \ - do { \ - if(((NwGtpv2cStackT*)(_stack))->memMgr.memAlloc && ((NwGtpv2cStackT*)(_stack))->memMgr.memFree )\ - { \ - _mem = (_type) ((NwGtpv2cStackT*) (_stack))->memMgr.memAlloc(((NwGtpv2cStackT*) (_stack))->memMgr.hMemMgr, _size, __FILE__, __LINE__);\ - } \ - else \ - { \ - _mem = (_type) malloc (_size); \ - } \ - } while (0) - -#define NW_GTPV2C_FREE(_stack, _mem) \ - do { \ - if(((NwGtpv2cStackT*)(_stack))->memMgr.memAlloc && ((NwGtpv2cStackT*)(_stack))->memMgr.memFree )\ - { \ - ((NwGtpv2cStackT*)(_stack))->memMgr.memFree(((NwGtpv2cStackT*) (_stack))->memMgr.hMemMgr, _mem, __FILE__, __LINE__);\ - } \ - else \ - { \ - free ((void*)_mem); \ - } \ - } while (0) - -/*--------------------------------------------------------------------------* - * G T P V 2 C S T A C K O B J E C T T Y P E D E F I N I T I O N * - *--------------------------------------------------------------------------*/ - -/** - * gtpv2c stack class definition - */ - -typedef struct NwGtpv2cStack { - uint32_t id; - NwGtpv2cUlpEntityT ulp; - NwGtpv2cUdpEntityT udp; - NwGtpv2cMemMgrEntityT memMgr; - NwGtpv2cTimerMgrEntityT tmrMgr; - NwGtpv2cLogMgrEntityT logMgr; - - uint32_t seqNum; - uint32_t logLevel; - uint32_t restartCounter; - - NwGtpv2cMsgIeParseInfoT *pGtpv2cMsgIeParseInfo[NW_GTP_MSG_END]; - struct NwGtpv2cTimeoutInfo *activeTimerInfo; - - RB_HEAD( NwGtpv2cTunnelMap, NwGtpv2cTunnel ) tunnelMap; - RB_HEAD( NwGtpv2cOutstandingTxSeqNumTrxnMap, NwGtpv2cTrxn ) outstandingTxSeqNumMap; - RB_HEAD( NwGtpv2cOutstandingRxSeqNumTrxnMap, NwGtpv2cTrxn ) outstandingRxSeqNumMap; - RB_HEAD( NwGtpv2cActiveTimerList, NwGtpv2cTimeoutInfo ) activeTimerList; - NwHandleT hTmrMinHeap; -} NwGtpv2cStackT; - - -/*--------------------------------------------------------------------------* - * Timeout Info Type Definition - *--------------------------------------------------------------------------*/ - -/** - * gtpv2c timeout info - */ - -typedef struct NwGtpv2cTimeoutInfo { - NwGtpv2cStackHandleT hStack; - struct timeval tvTimeout; - uint32_t tmrType; - void* timeoutArg; - NwRcT (*timeoutCallbackFunc)(void*); - NwGtpv2cTimerHandleT hTimer; - RB_ENTRY (NwGtpv2cTimeoutInfo) activeTimerListRbtNode; /**< RB Tree Data Structure Node */ - uint32_t timerMinHeapIndex; - struct NwGtpv2cTimeoutInfo *next; -} NwGtpv2cTimeoutInfoT; - - -/*--------------------------------------------------------------------------- - * GTPv2c Message Container Definition - *--------------------------------------------------------------------------*/ - -#define NW_GTPV2C_MAX_MSG_LEN (1024) /**< Maximum supported gtpv2c packet length including header */ - -/** - * NwGtpv2cMsgT holds gtpv2c messages to/from the peer. - */ -typedef struct NwGtpv2cMsgS { - 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]; - uint8_t top; - } groupedIeEncodeStack; - - NwBoolT isIeValid[NW_GTPV2C_IE_TYPE_MAXIMUM][NW_GTPV2C_IE_INSTANCE_MAXIMUM]; - 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; - -/** - * Transaction structure - */ - -typedef struct NwGtpv2cTrxn { - 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 */ - NwGtpv2cTunnelHandleT hTunnel; /**< Handle to local tunnel context */ - NwGtpv2cUlpTrxnHandleT hUlpTrxn; /**< Handle to ULP tunnel context */ - RB_ENTRY (NwGtpv2cTrxn) outstandingTxSeqNumMapRbtNode; /**< RB Tree Data Structure Node */ - RB_ENTRY (NwGtpv2cTrxn) outstandingRxSeqNumMapRbtNode; /**< RB Tree Data Structure Node */ - struct NwGtpv2cTrxn* next; -} NwGtpv2cTrxnT; - -/** - * GTPv2c Path Context - */ - -typedef struct NwGtpv2cPathS { - 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; - - -RB_PROTOTYPE(NwGtpv2cTunnelMap, NwGtpv2cTunnel, tunnelMapRbtNode, nwGtpv2cCompareTunnel) -RB_PROTOTYPE(NwGtpv2cOutstandingTxSeqNumTrxnMap, NwGtpv2cTrxn, outstandingTxSeqNumMapRbtNode, nwGtpv2cCompareSeqNum) -RB_PROTOTYPE(NwGtpv2cOutstandingRxSeqNumTrxnMap, NwGtpv2cTrxn, outstandingRxSeqNumMapRbtNode, nwGtpv2cCompareSeqNum) -RB_PROTOTYPE(NwGtpv2cActiveTimerList, NwGtpv2cTimeoutInfo, activeTimerListRbtNode, nwGtpv2cCompareOutstandingTxRexmitTime) - -/** - * Start Timer with ULP Timer Manager - */ - -NwRcT -nwGtpv2cStartTimer(NwGtpv2cStackT* thiz, - uint32_t timeoutSec, - uint32_t timeoutUsec, - uint32_t tmrType, - NwRcT (*timeoutCallbackFunc)(void*), - void* timeoutCallbackArg, - NwGtpv2cTimerHandleT *phTimer); - - -/** - * Stop Timer with ULP Timer Manager - */ - -NwRcT -nwGtpv2cStopTimer(NwGtpv2cStackT* thiz, - NwGtpv2cTimerHandleT hTimer); - -#ifdef __cplusplus -} -#endif - -#endif /* __NW_GTPV2C_PRIVATE_H__ */ -/*--------------------------------------------------------------------------* - * E N D O F F I L E * - *--------------------------------------------------------------------------*/ - diff --git a/openair-cn/GTPV2-C/nwgtpv2c-0.11/include/NwGtpv2cTrxn.h b/openair-cn/GTPV2-C/nwgtpv2c-0.11/include/NwGtpv2cTrxn.h deleted file mode 100644 index 26ae1875c3..0000000000 --- a/openair-cn/GTPV2-C/nwgtpv2c-0.11/include/NwGtpv2cTrxn.h +++ /dev/null @@ -1,117 +0,0 @@ -/*----------------------------------------------------------------------------* - * * - * n w - g t p v 2 c * - * G P R S T u n n e l i n g P r o t o c o l v 2 c S t a c k * - * * - * * - * Copyright (c) 2010-2011 Amit Chawre * - * All rights reserved. * - * * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright * - * notice, this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - *----------------------------------------------------------------------------*/ - -/** - * @file NwGtpv2cTrxn.h - * @author Amit Chawre - * @brief - * - * This header file contains required definitions and functions - * prototypes used by gtpv2c transactions. - * - **/ - - -#ifndef __NW_GTPV2C_TRXN_H__ -#define __NW_GTPV2C_TRXN_H__ - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * Constructotr - */ -NwGtpv2cTrxnT* -nwGtpv2cTrxnNew( NW_IN NwGtpv2cStackT* pStack); - -/** - * Overloaded Constructotr - */ -NwGtpv2cTrxnT* -nwGtpv2cTrxnWithSeqNumNew( NW_IN NwGtpv2cStackT* pStack, - NW_IN uint32_t seqNum); - -/** - * Another overloaded constructor. Create transaction as outstanding - * RX transaction for detecting duplicated requests. - * - * @param[in] thiz : Pointer to stack. - * @param[in] teidLocal : Trxn teid. - * @param[in] peerIp : Peer Ip address. - * @param[in] peerPort : Peer Ip port. - * @param[in] seqNum : Seq Number. - * @return NW_OK on success. - */ - -NwGtpv2cTrxnT* -nwGtpv2cTrxnOutstandingRxNew( NW_IN NwGtpv2cStackT* pStack, - NW_IN uint32_t teidLocal, - NW_IN uint32_t peerIp, - NW_IN uint32_t peerPort, - NW_IN uint32_t seqNum); - -NwRcT -nwGtpv2cTrxnDelete( NW_INOUT NwGtpv2cTrxnT **ppTrxn); - -/** - * Start timer to wait before pruginf a req tran for which response has been sent - * - * @param[in] thiz : Pointer to transaction - * @return NW_OK on success. - */ - -NwRcT -nwGtpv2cTrxnStartDulpicateRequestWaitTimer(NwGtpv2cTrxnT* thiz); - -/** - * Start timer to wait for rsp of a req message - * - * @param[in] thiz : Pointer to transaction - * @param[in] timeoutCallbackFunc : Timeout handler callback function. - * @return NW_OK on success. - */ - -NwRcT -nwGtpv2cTrxnStartPeerRspWaitTimer(NwGtpv2cTrxnT* thiz); - -#ifdef __cplusplus -} -#endif - -#endif /* __NW_GTPV2C_TRXN_H__ */ - -/*--------------------------------------------------------------------------* - * E N D O F F I L E * - *--------------------------------------------------------------------------*/ - diff --git a/openair-cn/GTPV2-C/nwgtpv2c-0.11/include/NwGtpv2cTunnel.h b/openair-cn/GTPV2-C/nwgtpv2c-0.11/include/NwGtpv2cTunnel.h deleted file mode 100644 index 33c437ada7..0000000000 --- a/openair-cn/GTPV2-C/nwgtpv2c-0.11/include/NwGtpv2cTunnel.h +++ /dev/null @@ -1,79 +0,0 @@ -/*----------------------------------------------------------------------------* - * * - * n w - g t p v 2 c * - * G P R S T u n n e l i n g P r o t o c o l v 2 c S t a c k * - * * - * * - * Copyright (c) 2010-2011 Amit Chawre * - * All rights reserved. * - * * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright * - * notice, this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - *----------------------------------------------------------------------------*/ - -#ifndef __NW_GTPV2C_TUNNEL_H__ -#define __NW_GTPV2C_TUNNEL_H__ - -#include -#include -#include - -#include "tree.h" -#include "NwTypes.h" -#include "NwUtils.h" -#include "NwError.h" -#include "NwGtpv2c.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct NwGtpv2cStack; - -typedef struct NwGtpv2cTunnel { - uint32_t teid; - uint32_t ipv4AddrRemote; - NwGtpv2cUlpTunnelHandleT hUlpTunnel; - RB_ENTRY (NwGtpv2cTunnel) tunnelMapRbtNode; /**< RB Tree Data Structure Node */ - struct NwGtpv2cTunnel* next; -} NwGtpv2cTunnelT; - -NwGtpv2cTunnelT* -nwGtpv2cTunnelNew(struct NwGtpv2cStack *hStack, uint32_t teid, uint32_t peerIpv4Addr, NwGtpv2cUlpTunnelHandleT hUlpTunnel); - -NwRcT -nwGtpv2cTunnelDelete(struct NwGtpv2cStack *pStack, NwGtpv2cTunnelT* thiz); - -NwRcT -nwGtpv2cTunnelGetUlpTunnelHandle( NwGtpv2cTunnelT* thiz, NwGtpv2cUlpTunnelHandleT* phUlpTunnel); - -#ifdef __cplusplus -} -#endif - -#endif - -/*--------------------------------------------------------------------------* - * E N D O F F I L E * - *--------------------------------------------------------------------------*/ - diff --git a/openair-cn/GTPV2-C/nwgtpv2c-0.11/include/queue.h b/openair-cn/GTPV2-C/nwgtpv2c-0.11/include/queue.h deleted file mode 100644 index 457220bc98..0000000000 --- a/openair-cn/GTPV2-C/nwgtpv2c-0.11/include/queue.h +++ /dev/null @@ -1,566 +0,0 @@ -/* - * Copyright (c) 1991, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)queue.h 8.5 (Berkeley) 8/20/94 - * $FreeBSD: src/sys/sys/queue.h,v 1.32.2.6 2001/12/18 10:09:02 ru Exp $ - */ - -#ifndef _SYS_QUEUE_H_ -#define _SYS_QUEUE_H_ - - -/* - * This file defines five types of data structures: singly-linked lists, - * singly-linked tail queues, lists, tail queues, and circular queues. - * - * A singly-linked list is headed by a single forward pointer. The elements - * are singly linked for minimum space and pointer manipulation overhead at - * the expense of O(n) removal for arbitrary elements. New elements can be - * added to the list after an existing element or at the head of the list. - * Elements being removed from the head of the list should use the explicit - * macro for this purpose for tmpimum efficiency. A singly-linked list may - * only be traversed in the forward direction. Singly-linked lists are ideal - * for applications with large datasets and few or no removals or for - * implementing a LIFO queue. - * - * A singly-linked tail queue is headed by a pair of pointers, one to the - * head of the list and the other to the tail of the list. The elements are - * singly linked for minimum space and pointer manipulation overhead at the - * expense of O(n) removal for arbitrary elements. New elements can be added - * to the list after an existing element, at the head of the list, or at the - * end of the list. Elements being removed from the head of the tail queue - * should use the explicit macro for this purpose for tmpimum efficiency. - * A singly-linked tail queue may only be traversed in the forward direction. - * Singly-linked tail queues are ideal for applications with large datasets - * and few or no removals or for implementing a FIFO queue. - * - * A list is headed by a single forward pointer (or an array of forward - * pointers for a hash table header). The elements are doubly linked - * so that an arbitrary element can be removed without a need to - * traverse the list. New elements can be added to the list before - * or after an existing element or at the head of the list. A list - * may only be traversed in the forward direction. - * - * A tail queue is headed by a pair of pointers, one to the head of the - * list and the other to the tail of the list. The elements are doubly - * linked so that an arbitrary element can be removed without a need to - * traverse the list. New elements can be added to the list before or - * after an existing element, at the head of the list, or at the end of - * the list. A tail queue may be traversed in either direction. - * - * A circle queue is headed by a pair of pointers, one to the head of the - * list and the other to the tail of the list. The elements are doubly - * linked so that an arbitrary element can be removed without a need to - * traverse the list. New elements can be added to the list before or after - * an existing element, at the head of the list, or at the end of the list. - * A circle queue may be traversed in either direction, but has a more - * complex end of list detection. - * - * For details on the use of these macros, see the queue(3) manual page. - * - * - * SLIST LIST STAILQ TAILQ CIRCLEQ - * _HEAD + + + + + - * _HEAD_INITIALIZER + + + + + - * _ENTRY + + + + + - * _INIT + + + + + - * _EMPTY + + + + + - * _FIRST + + + + + - * _NEXT + + + + + - * _PREV - - - + + - * _LAST - - + + + - * _FOREACH + + + + + - * _FOREACH_REVERSE - - - + + - * _INSERT_HEAD + + + + + - * _INSERT_BEFORE - + - + + - * _INSERT_AFTER + + + + + - * _INSERT_TAIL - - + + + - * _REMOVE_HEAD + - + - - - * _REMOVE + + + + + - * - */ - -/* - * Singly-linked List declarations. - */ -#define SLIST_HEAD(name, type) \ -struct name { \ - struct type *slh_first; /* first element */ \ -} - -#define SLIST_HEAD_INITIALIZER(head) \ - { NULL } - -#define SLIST_ENTRY(type) \ -struct { \ - struct type *sle_next; /* next element */ \ -} - -/* - * Singly-linked List functions. - */ -#define SLIST_EMPTY(head) ((head)->slh_first == NULL) - -#define SLIST_FIRST(head) ((head)->slh_first) - -#define SLIST_FOREACH(var, head, field) \ - for ((var) = SLIST_FIRST((head)); \ - (var); \ - (var) = SLIST_NEXT((var), field)) - -#define SLIST_INIT(head) do { \ - SLIST_FIRST((head)) = NULL; \ -} while (0) - -#define SLIST_INSERT_AFTER(slistelm, elm, field) do { \ - SLIST_NEXT((elm), field) = SLIST_NEXT((slistelm), field); \ - SLIST_NEXT((slistelm), field) = (elm); \ -} while (0) - -#define SLIST_INSERT_HEAD(head, elm, field) do { \ - SLIST_NEXT((elm), field) = SLIST_FIRST((head)); \ - SLIST_FIRST((head)) = (elm); \ -} while (0) - -#define SLIST_NEXT(elm, field) ((elm)->field.sle_next) - -#define SLIST_REMOVE(head, elm, type, field) do { \ - if (SLIST_FIRST((head)) == (elm)) { \ - SLIST_REMOVE_HEAD((head), field); \ - } \ - else { \ - struct type *curelm = SLIST_FIRST((head)); \ - while (SLIST_NEXT(curelm, field) != (elm)) \ - curelm = SLIST_NEXT(curelm, field); \ - SLIST_NEXT(curelm, field) = \ - SLIST_NEXT(SLIST_NEXT(curelm, field), field); \ - } \ -} while (0) - -#define SLIST_REMOVE_HEAD(head, field) do { \ - SLIST_FIRST((head)) = SLIST_NEXT(SLIST_FIRST((head)), field); \ -} while (0) - -/* - * Singly-linked Tail queue declarations. - */ -#define STAILQ_HEAD(name, type) \ -struct name { \ - struct type *stqh_first;/* first element */ \ - struct type **stqh_last;/* addr of last next element */ \ -} - -#define STAILQ_HEAD_INITIALIZER(head) \ - { NULL, &(head).stqh_first } - -#define STAILQ_HEAD_INIT(head) do{ \ - (head).stqh_first = NULL; \ - (head).stqh_last = &(head).stqh_first; \ -}while(0) - -#define STAILQ_ENTRY(type) \ -struct { \ - struct type *stqe_next; /* next element */ \ -} - -/* - * Singly-linked Tail queue functions. - */ -#define STAILQ_EMPTY(head) ((head)->stqh_first == NULL) - -#define STAILQ_FIRST(head) ((head)->stqh_first) - -#define STAILQ_FOREACH(var, head, field) \ - for((var) = STAILQ_FIRST((head)); \ - (var); \ - (var) = STAILQ_NEXT((var), field)) - -#define STAILQ_INIT(head) do { \ - STAILQ_FIRST((head)) = NULL; \ - (head)->stqh_last = &STAILQ_FIRST((head)); \ -} while (0) - -#define STAILQ_INSERT_AFTER(head, tqelm, elm, field) do { \ - if ((STAILQ_NEXT((elm), field) = STAILQ_NEXT((tqelm), field)) == NULL)\ - (head)->stqh_last = &STAILQ_NEXT((elm), field); \ - STAILQ_NEXT((tqelm), field) = (elm); \ -} while (0) - -#define STAILQ_INSERT_HEAD(head, elm, field) do { \ - if ((STAILQ_NEXT((elm), field) = STAILQ_FIRST((head))) == NULL) \ - (head)->stqh_last = &STAILQ_NEXT((elm), field); \ - STAILQ_FIRST((head)) = (elm); \ -} while (0) - -#define STAILQ_INSERT_TAIL(head, elm, field) do { \ - STAILQ_NEXT((elm), field) = NULL; \ - *(head)->stqh_last = (elm); \ - (head)->stqh_last = &STAILQ_NEXT((elm), field); \ -} while (0) - -#define STAILQ_LAST(head, type, field) \ - (STAILQ_EMPTY(head) ? \ - NULL : \ - ((struct type *) \ - ((char *)((head)->stqh_last) - __offsetof(struct type, field)))) - -#define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next) - -#define STAILQ_REMOVE(head, elm, type, field) do { \ - if (STAILQ_FIRST((head)) == (elm)) { \ - STAILQ_REMOVE_HEAD(head, field); \ - } \ - else { \ - struct type *curelm = STAILQ_FIRST((head)); \ - while (STAILQ_NEXT(curelm, field) != (elm)) \ - curelm = STAILQ_NEXT(curelm, field); \ - if ((STAILQ_NEXT(curelm, field) = \ - STAILQ_NEXT(STAILQ_NEXT(curelm, field), field)) == NULL)\ - (head)->stqh_last = &STAILQ_NEXT((curelm), field);\ - } \ -} while (0) - -#define STAILQ_REMOVE_HEAD(head, field) do { \ - if ((STAILQ_FIRST((head)) = \ - STAILQ_NEXT(STAILQ_FIRST((head)), field)) == NULL) \ - (head)->stqh_last = &STAILQ_FIRST((head)); \ -} while (0) - -#define STAILQ_REMOVE_HEAD_UNTIL(head, elm, field) do { \ - if ((STAILQ_FIRST((head)) = STAILQ_NEXT((elm), field)) == NULL) \ - (head)->stqh_last = &STAILQ_FIRST((head)); \ -} while (0) - -/* - * List declarations. - */ -#define LIST_HEAD(name, type) \ -struct name { \ - struct type *lh_first; /* first element */ \ -} - -#define LIST_HEAD_INITIALIZER(head) \ - { NULL } - -#define LIST_ENTRY(type) \ -struct { \ - struct type *le_next; /* next element */ \ - struct type **le_prev; /* address of previous next element */ \ -} - -/* - * List functions. - */ - -#define LIST_EMPTY(head) ((head)->lh_first == NULL) - -#define LIST_FIRST(head) ((head)->lh_first) - -#define LIST_FOREACH(var, head, field) \ - for ((var) = LIST_FIRST((head)); \ - (var); \ - (var) = LIST_NEXT((var), field)) - -#define LIST_INIT(head) do { \ - LIST_FIRST((head)) = NULL; \ -} while (0) - -#define LIST_INSERT_AFTER(listelm, elm, field) do { \ - if ((LIST_NEXT((elm), field) = LIST_NEXT((listelm), field)) != NULL)\ - LIST_NEXT((listelm), field)->field.le_prev = \ - &LIST_NEXT((elm), field); \ - LIST_NEXT((listelm), field) = (elm); \ - (elm)->field.le_prev = &LIST_NEXT((listelm), field); \ -} while (0) - -#define LIST_INSERT_BEFORE(listelm, elm, field) do { \ - (elm)->field.le_prev = (listelm)->field.le_prev; \ - LIST_NEXT((elm), field) = (listelm); \ - *(listelm)->field.le_prev = (elm); \ - (listelm)->field.le_prev = &LIST_NEXT((elm), field); \ -} while (0) - -#define LIST_INSERT_HEAD(head, elm, field) do { \ - if ((LIST_NEXT((elm), field) = LIST_FIRST((head))) != NULL) \ - LIST_FIRST((head))->field.le_prev = &LIST_NEXT((elm), field);\ - LIST_FIRST((head)) = (elm); \ - (elm)->field.le_prev = &LIST_FIRST((head)); \ -} while (0) - -#define LIST_NEXT(elm, field) ((elm)->field.le_next) - -#define LIST_REMOVE(elm, field) do { \ - if (LIST_NEXT((elm), field) != NULL) \ - LIST_NEXT((elm), field)->field.le_prev = \ - (elm)->field.le_prev; \ - *(elm)->field.le_prev = LIST_NEXT((elm), field); \ -} while (0) - -/* - * Tail queue declarations. - */ -#define TAILQ_HEAD(name, type) \ -struct name { \ - struct type *tqh_first; /* first element */ \ - struct type **tqh_last; /* addr of last next element */ \ -} - -#define TAILQ_HEAD_INITIALIZER(head) \ - { NULL, &(head).tqh_first } - -#define TAILQ_ENTRY(type) \ -struct { \ - struct type *tqe_next; /* next element */ \ - struct type **tqe_prev; /* address of previous next element */ \ -} - -/* - * Tail queue functions. - */ -#define TAILQ_EMPTY(head) ((head)->tqh_first == NULL) - -#define TAILQ_FIRST(head) ((head)->tqh_first) - -#define TAILQ_FOREACH(var, head, field) \ - for ((var) = TAILQ_FIRST((head)); \ - (var); \ - (var) = TAILQ_NEXT((var), field)) - -#define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ - for ((var) = TAILQ_LAST((head), headname); \ - (var); \ - (var) = TAILQ_PREV((var), headname, field)) - -#define TAILQ_INIT(head) do { \ - TAILQ_FIRST((head)) = NULL; \ - (head)->tqh_last = &TAILQ_FIRST((head)); \ -} while (0) - -#define TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ - if ((TAILQ_NEXT((elm), field) = TAILQ_NEXT((listelm), field)) != NULL)\ - TAILQ_NEXT((elm), field)->field.tqe_prev = \ - &TAILQ_NEXT((elm), field); \ - else \ - (head)->tqh_last = &TAILQ_NEXT((elm), field); \ - TAILQ_NEXT((listelm), field) = (elm); \ - (elm)->field.tqe_prev = &TAILQ_NEXT((listelm), field); \ -} while (0) - -#define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \ - (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \ - TAILQ_NEXT((elm), field) = (listelm); \ - *(listelm)->field.tqe_prev = (elm); \ - (listelm)->field.tqe_prev = &TAILQ_NEXT((elm), field); \ -} while (0) - -#define TAILQ_INSERT_HEAD(head, elm, field) do { \ - if ((TAILQ_NEXT((elm), field) = TAILQ_FIRST((head))) != NULL) \ - TAILQ_FIRST((head))->field.tqe_prev = \ - &TAILQ_NEXT((elm), field); \ - else \ - (head)->tqh_last = &TAILQ_NEXT((elm), field); \ - TAILQ_FIRST((head)) = (elm); \ - (elm)->field.tqe_prev = &TAILQ_FIRST((head)); \ -} while (0) - -#define TAILQ_INSERT_TAIL(head, elm, field) do { \ - TAILQ_NEXT((elm), field) = NULL; \ - (elm)->field.tqe_prev = (head)->tqh_last; \ - *(head)->tqh_last = (elm); \ - (head)->tqh_last = &TAILQ_NEXT((elm), field); \ -} while (0) - -#define TAILQ_LAST(head, headname) \ - (*(((struct headname *)((head)->tqh_last))->tqh_last)) - -#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next) - -#define TAILQ_PREV(elm, headname, field) \ - (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last)) - -#define TAILQ_REMOVE(head, elm, field) do { \ - if ((TAILQ_NEXT((elm), field)) != NULL) \ - TAILQ_NEXT((elm), field)->field.tqe_prev = \ - (elm)->field.tqe_prev; \ - else \ - (head)->tqh_last = (elm)->field.tqe_prev; \ - *(elm)->field.tqe_prev = TAILQ_NEXT((elm), field); \ -} while (0) - -/* - * Circular queue declarations. - */ -#define CIRCLEQ_HEAD(name, type) \ -struct name { \ - struct type *cqh_first; /* first element */ \ - struct type *cqh_last; /* last element */ \ -} - -#define CIRCLEQ_HEAD_INITIALIZER(head) \ - { (void *)&(head), (void *)&(head) } - -#define CIRCLEQ_ENTRY(type) \ -struct { \ - struct type *cqe_next; /* next element */ \ - struct type *cqe_prev; /* previous element */ \ -} - -/* - * Circular queue functions. - */ -#define CIRCLEQ_EMPTY(head) ((head)->cqh_first == (void *)(head)) - -#define CIRCLEQ_FIRST(head) ((head)->cqh_first) - -#define CIRCLEQ_FOREACH(var, head, field) \ - for ((var) = CIRCLEQ_FIRST((head)); \ - (var) != (void *)(head); \ - (var) = CIRCLEQ_NEXT((var), field)) - -#define CIRCLEQ_FOREACH_REVERSE(var, head, field) \ - for ((var) = CIRCLEQ_LAST((head)); \ - (var) != (void *)(head); \ - (var) = CIRCLEQ_PREV((var), field)) - -#define CIRCLEQ_INIT(head) do { \ - CIRCLEQ_FIRST((head)) = (void *)(head); \ - CIRCLEQ_LAST((head)) = (void *)(head); \ -} while (0) - -#define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) do { \ - CIRCLEQ_NEXT((elm), field) = CIRCLEQ_NEXT((listelm), field); \ - CIRCLEQ_PREV((elm), field) = (listelm); \ - if (CIRCLEQ_NEXT((listelm), field) == (void *)(head)) \ - CIRCLEQ_LAST((head)) = (elm); \ - else \ - CIRCLEQ_PREV(CIRCLEQ_NEXT((listelm), field), field) = (elm);\ - CIRCLEQ_NEXT((listelm), field) = (elm); \ -} while (0) - -#define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) do { \ - CIRCLEQ_NEXT((elm), field) = (listelm); \ - CIRCLEQ_PREV((elm), field) = CIRCLEQ_PREV((listelm), field); \ - if (CIRCLEQ_PREV((listelm), field) == (void *)(head)) \ - CIRCLEQ_FIRST((head)) = (elm); \ - else \ - CIRCLEQ_NEXT(CIRCLEQ_PREV((listelm), field), field) = (elm);\ - CIRCLEQ_PREV((listelm), field) = (elm); \ -} while (0) - -#define CIRCLEQ_INSERT_HEAD(head, elm, field) do { \ - CIRCLEQ_NEXT((elm), field) = CIRCLEQ_FIRST((head)); \ - CIRCLEQ_PREV((elm), field) = (void *)(head); \ - if (CIRCLEQ_LAST((head)) == (void *)(head)) \ - CIRCLEQ_LAST((head)) = (elm); \ - else \ - CIRCLEQ_PREV(CIRCLEQ_FIRST((head)), field) = (elm); \ - CIRCLEQ_FIRST((head)) = (elm); \ -} while (0) - -#define CIRCLEQ_INSERT_TAIL(head, elm, field) do { \ - CIRCLEQ_NEXT((elm), field) = (void *)(head); \ - CIRCLEQ_PREV((elm), field) = CIRCLEQ_LAST((head)); \ - if (CIRCLEQ_FIRST((head)) == (void *)(head)) \ - CIRCLEQ_FIRST((head)) = (elm); \ - else \ - CIRCLEQ_NEXT(CIRCLEQ_LAST((head)), field) = (elm); \ - CIRCLEQ_LAST((head)) = (elm); \ -} while (0) - -#define CIRCLEQ_LAST(head) ((head)->cqh_last) - -#define CIRCLEQ_NEXT(elm,field) ((elm)->field.cqe_next) - -#define CIRCLEQ_PREV(elm,field) ((elm)->field.cqe_prev) - -#define CIRCLEQ_REMOVE(head, elm, field) do { \ - if (CIRCLEQ_NEXT((elm), field) == (void *)(head)) \ - CIRCLEQ_LAST((head)) = CIRCLEQ_PREV((elm), field); \ - else \ - CIRCLEQ_PREV(CIRCLEQ_NEXT((elm), field), field) = \ - CIRCLEQ_PREV((elm), field); \ - if (CIRCLEQ_PREV((elm), field) == (void *)(head)) \ - CIRCLEQ_FIRST((head)) = CIRCLEQ_NEXT((elm), field); \ - else \ - CIRCLEQ_NEXT(CIRCLEQ_PREV((elm), field), field) = \ - CIRCLEQ_NEXT((elm), field); \ -} while (0) - -#ifdef _KERNEL - -/* - * XXX insque() and remque() are an old way of handling certain queues. - * They bogusly assumes that all queue heads look alike. - */ - -struct quehead { - struct quehead *qh_link; - struct quehead *qh_rlink; -}; - -#ifdef __GNUC__ - -static __inline void -insque(void *a, void *b) -{ - struct quehead *element = (struct quehead *)a, - *head = (struct quehead *)b; - - element->qh_link = head->qh_link; - element->qh_rlink = head; - head->qh_link = element; - element->qh_link->qh_rlink = element; -} - -static __inline void -remque(void *a) -{ - struct quehead *element = (struct quehead *)a; - - element->qh_link->qh_rlink = element->qh_rlink; - element->qh_rlink->qh_link = element->qh_link; - element->qh_rlink = 0; -} - -#else /* !__GNUC__ */ - -void insque __P((void *a, void *b)); -void remque __P((void *a)); - -#endif /* __GNUC__ */ - -#endif /* _KERNEL */ - -#endif /* !_SYS_QUEUE_H_ */ - - - diff --git a/openair-cn/GTPV2-C/nwgtpv2c-0.11/shared/NwError.h b/openair-cn/GTPV2-C/nwgtpv2c-0.11/shared/NwError.h deleted file mode 100644 index 6389bedcb2..0000000000 --- a/openair-cn/GTPV2-C/nwgtpv2c-0.11/shared/NwError.h +++ /dev/null @@ -1,66 +0,0 @@ -/*----------------------------------------------------------------------------* - * * - * n w - g t p v 2 c * - * G P R S T u n n e l i n g P r o t o c o l v 2 c S t a c k * - * * - * * - * Copyright (c) 2010-2011 Amit Chawre * - * All rights reserved. * - * * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright * - * notice, this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - *----------------------------------------------------------------------------*/ - - -#ifndef __NW_ERROR_H__ -#define __NW_ERROR_H__ - -/** - * @file NwError.h - * @brief This header file contains return error code type definitions. -*/ - -#ifdef __cplusplus -extern "C" { -#endif - -typedef enum { - - NW_OK = 0x00000000, - NW_GTPV2C_IE_MISSING, - NW_GTPV2C_IE_INCORRECT, - NW_GTPV2C_MANDATORY_IE_DUPLICATE, - NW_GTPV2C_CONDITIONAL_IE_MISSING, - NW_GTPV2C_MANDATORY_IE_MISSING, - NW_GTPV2C_MSG_MALFORMED, - NW_FAILURE = 0xFFFFFFFE -} -NwRcT; - -#ifdef __cplusplus -} -#endif - -#endif /* __NW_ERROR_CODE_H__ */ - - diff --git a/openair-cn/GTPV2-C/nwgtpv2c-0.11/shared/NwGtpv2c.h b/openair-cn/GTPV2-C/nwgtpv2c-0.11/shared/NwGtpv2c.h deleted file mode 100644 index e3178fb11b..0000000000 --- a/openair-cn/GTPV2-C/nwgtpv2c-0.11/shared/NwGtpv2c.h +++ /dev/null @@ -1,576 +0,0 @@ -/*----------------------------------------------------------------------------* - * * - * n w - g t p v 2 c * - * G P R S T u n n e l i n g P r o t o c o l v 2 c S t a c k * - * * - * * - * Copyright (c) 2010-2011 Amit Chawre * - * All rights reserved. * - * * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright * - * notice, this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - *----------------------------------------------------------------------------*/ - -#ifndef __NW_GTPV2C_H__ -#define __NW_GTPV2C_H__ - -#include -#include -#include -#include "NwTypes.h" -#include "NwError.h" - -/** @mainpage - - @section intro Introduction - - nw-gtpv2c library is a free and open source control plane implementation of GPRS - Tunneling protocol v2 also known as eGTPc as per 3GPP TS29274-930. - The library is published under BSD three clause license. - - @section scope Scope - - The stack library also does basic tasks like packet/header validation, - retransmission and message parsing. - - @section design Design Philosophy - - The stack is fully-asynchronous in design for compatibility with event loop - mechanisms such as select, poll, etc. and can also be used for multi-threaded - applications. It should compile on Linux, *BSD, Mac OS X, Solaris and Windows - (cygwin). - - The stack is designed for high portability not only for the hardware and OS it will - run on but also for the application software that uses it. The stack doesn't mandate - conditions on the user application architecture or design. The stack relies on - the user application for infrastructure utilities such as I/O, timers, - logs and multithreading. This realized by using callback mechanisms and enables the - stack library to seamlessly integrate without or very little changes to the existing - application framework. - - The stack architecture builds upon following mentioned entities that are external to it. - - User Layer Protocol (ULP) Entity: - This layer implements the intelligent logic for the application and sits on top of the - stack. - - UDP Entity: - This is the layer below the stack and is responsible for UDP I/O with the stack and network. - It may or may not be housed in ULP. - - Timer Manager Entity: - Timer Manager Entity provides the stack with infrastructure for timer CRUD operations. - - Log Manager Entity: - Log Manager Entity provides the stack with callbacks for logging operations. It may - or may not be housed in ULP. - - The application may implement all above entities as a single or multiple object. - - @section applications Applications and Usage - - Please refer sample applications under 'test-app' directory for usage examples. - - */ - -/** - * @file NwGtpv2c.h - * @author Amit Chawre - * @brief - * - * This header file contains all required definitions and functions - * prototypes for using nw-gtpv2c library. - * - **/ - -/*--------------------------------------------------------------------------* - * S T A C K H A N D L E D E F I N I T I O N S * - *--------------------------------------------------------------------------*/ - -typedef NwPtrT NwGtpv2cStackHandleT; /**< Gtpv2c Stack Handle */ -typedef NwPtrT NwGtpv2cUlpHandleT; /**< Gtpv2c Stack Ulp Entity Handle */ -typedef NwPtrT NwGtpv2cUdpHandleT; /**< Gtpv2c Stack Udp Entity Handle */ -typedef NwPtrT NwGtpv2cTimerMgrHandleT; /**< Gtpv2c Stack Timer Manager Handle */ -typedef NwPtrT NwGtpv2cMemMgrHandleT; /**< Gtpv2c Stack Memory Manager Handle */ -typedef NwPtrT NwGtpv2cLogMgrHandleT; /**< Gtpv2c Stack Log Manager Handle */ -typedef NwPtrT NwGtpv2cTimerHandleT; /**< Gtpv2c Stack Timer Handle */ -typedef NwPtrT NwGtpv2cMsgHandleT; /**< Gtpv2c Msg Handle */ -typedef NwPtrT NwGtpv2cTrxnHandleT; /**< Gtpv2c Transaction Handle */ -typedef NwPtrT NwGtpv2cTunnelHandleT; /**< Gtpv2c Ulp Tunnel Handle */ -typedef NwPtrT NwGtpv2cUlpTrxnHandleT; /**< Gtpv2c Ulp Transaction Handle */ -typedef NwPtrT NwGtpv2cUlpTunnelHandleT; /**< Gtpv2c Ulp Tunnel Handle */ - -typedef uint8_t NwGtpv2cMsgTypeT; /**< Gtpv2c Msg Type */ - -typedef struct NwGtpv2cStackConfigS { - uint16_t __tbd; -} NwGtpv2cStackConfigT; - -/*--------------------------------------------------------------------------* - * S T A C K A P I D E F I N I T I O N S * - *--------------------------------------------------------------------------*/ - -#define NW_GTPV2C_ULP_API_FLAG_NONE (0x00 << 24) -#define NW_GTPV2C_ULP_API_FLAG_CREATE_LOCAL_TUNNEL (0x01 << 24) -#define NW_GTPV2C_ULP_API_FLAG_DELETE_LOCAL_TUNNEL (0x02 << 24) -#define NW_GTPV2C_ULP_API_FLAG_IS_COMMAND_MESSAGE (0x03 << 24) - -/*--------------------------------------------------------------------------- - * Gtpv2c Stack ULP API type definitions - *--------------------------------------------------------------------------*/ - -/** - * APIs types between ULP and Stack - */ - -typedef enum { - /* APIs from ULP to stack */ - - NW_GTPV2C_ULP_API_INITIAL_REQ = 0x00000000, /**< Send a initial message */ - NW_GTPV2C_ULP_API_TRIGGERED_REQ, /**< Send a triggered req message */ - NW_GTPV2C_ULP_API_TRIGGERED_RSP, /**< Send a triggered rsp message */ - - /* APIs from stack to ULP */ - - NW_GTPV2C_ULP_API_INITIAL_REQ_IND, /**< Receive a initial message from stack */ - NW_GTPV2C_ULP_API_TRIGGERED_RSP_IND, /**< Recieve a triggered rsp message from stack */ - NW_GTPV2C_ULP_API_TRIGGERED_REQ_IND, /**< Recieve a triggered req message from stack */ - NW_GTPV2C_ULP_API_RSP_FAILURE_IND, /**< Rsp failure for gtpv2 message from stack */ - - /* Local tunnel management APIs from ULP to stack */ - - NW_GTPV2C_ULP_CREATE_LOCAL_TUNNEL, /**< Create a local tunnel */ - NW_GTPV2C_ULP_DELETE_LOCAL_TUNNEL, /**< Delete a local tunnel */ - - /* Do not add below this */ - NW_GTPV2C_ULP_API_END = 0xFFFFFFFF, - -} NwGtpv2cUlpApiTypeT; - -/** - * Error information of incoming GTP messages - */ - -typedef struct NwGtpv2cErrorS { - NW_IN uint8_t cause; - NW_IN uint8_t flags; - struct { - NW_IN uint8_t type; - NW_IN uint8_t instance; - } offendingIe; -} NwGtpv2cErrorT; - -/** - * API information elements between ULP and Stack for - * sending a Gtpv2c initial message. - */ - -typedef struct { - NW_INOUT NwGtpv2cTunnelHandleT hTunnel; /**< Tunnel handle over which the mesasge is to be sent.*/ - NW_IN uint16_t t3Timer; - NW_IN uint16_t maxRetries; - NW_IN NwGtpv2cUlpTrxnHandleT hUlpTrxn; /**< Optional handle to be returned in rsp of this msg. */ - - NW_IN uint32_t peerIp; /**< Required only in case when hTunnel == 0 */ - NW_IN uint32_t teidLocal; /**< Required only in case when hTunnel == 0 */ - NW_IN NwGtpv2cUlpTunnelHandleT hUlpTunnel; /**< Required only in case when hTunnel == 0 */ -} NwGtpv2cInitialReqInfoT; - -/** - * API information elements between ULP and Stack for - * sending a Gtpv2c triggered request message. - */ - -typedef struct { - NW_IN NwGtpv2cTunnelHandleT hTunnel; /**< Tunnel handle over which the mesasge is to be sent */ - NW_IN NwGtpv2cTrxnHandleT hTrxn; /**< Request Trxn handle which to which triggered req is being sent */ - NW_IN uint16_t t3Timer; - NW_IN uint16_t maxRetries; - NW_IN NwGtpv2cUlpTrxnHandleT hUlpTrxn; /**< Optional handle to be returned in rsp of this msg. */ - NW_IN uint32_t peerIp; /**< Required only in case when hTunnel == 0 */ - NW_IN uint32_t teidLocal; /**< Required only in case when hTunnel == 0 */ - NW_IN NwGtpv2cUlpTunnelHandleT hUlpTunnel; /**< Required only in case when hTunnel == 0 */ - -} NwGtpv2cTriggeredReqInfoT; - -/** - * API information elements between ULP and Stack for - * sending a Gtpv2c triggered response message. - */ - -typedef struct { - NW_IN NwGtpv2cTrxnHandleT hTrxn; /**< Request Trxn handle which to which triggered rsp is being sent */ - NW_IN uint32_t teidLocal; /**< Required only if NW_GTPV2C_ULP_API_FLAG_CREATE_LOCAL_TUNNEL is set to flags. */ - NW_IN NwGtpv2cUlpTunnelHandleT hUlpTunnel; /**< Required only if NW_GTPV2C_ULP_API_FLAG_CREATE_LOCAL_TUNNEL is set to flags. */ - - NW_OUT NwGtpv2cTunnelHandleT hTunnel; /**< Returned only in case flags is set to - NW_GTPV2C_ULP_API_FLAG_CREATE_LOCAL_TUNNEL */ -} NwGtpv2cTriggeredRspInfoT; - -/** - * API information elements between ULP and Stack for - * sending a Gtpv2c initial message. - */ - -typedef struct { - NW_IN NwGtpv2cErrorT error; - NW_IN NwGtpv2cTrxnHandleT hTrxn; - NW_IN NwGtpv2cUlpTrxnHandleT hUlpTrxn; - NW_IN NwGtpv2cMsgTypeT msgType; - NW_IN uint32_t peerIp; - NW_IN uint32_t peerPort; - NW_IN NwGtpv2cUlpTunnelHandleT hUlpTunnel; - NW_INOUT NwGtpv2cTunnelHandleT hTunnel; -} NwGtpv2cInitialReqIndInfoT; - -/** - * API information elements between ULP and Stack for - * sending a Gtpv2c triggered request message. - */ - -typedef struct { - NW_IN NwGtpv2cErrorT error; - NW_IN NwGtpv2cTrxnHandleT hTrxn; - NW_IN NwGtpv2cUlpTrxnHandleT hUlpTrxn; - NW_IN NwGtpv2cMsgTypeT msgType; - NW_IN uint32_t seqNum; - NW_IN uint32_t teidLocal; - NW_IN uint32_t teidRemote; - NW_IN NwGtpv2cUlpTunnelHandleT hUlpTunnel; -} NwGtpv2cTriggeredReqIndInfoT; - -/** - * API information elements between ULP and Stack for - * sending a Gtpv2c triggered response message. - */ - -typedef struct { - NW_IN NwGtpv2cErrorT error; - NW_IN NwGtpv2cUlpTrxnHandleT hUlpTrxn; - NW_IN NwGtpv2cUlpTunnelHandleT hUlpTunnel; - NW_IN NwGtpv2cMsgTypeT msgType; -} NwGtpv2cTriggeredRspIndInfoT; - -/** - * API information elements between ULP and Stack for - * receving a path failure indication from stack. - */ - -typedef struct { - NW_IN NwGtpv2cUlpTrxnHandleT hUlpTrxn; - NW_IN NwGtpv2cUlpTunnelHandleT hUlpTunnel; -} NwGtpv2cRspFailureIndInfoT; - -/** - * API information elements between ULP and Stack for - * creating local tunnel. - */ - -typedef struct { - NW_OUT NwGtpv2cTunnelHandleT hTunnel; - NW_IN NwGtpv2cUlpTunnelHandleT hUlpTunnel; - NW_IN uint32_t teidLocal; - NW_IN uint32_t peerIp; -} NwGtpv2cCreateLocalTunnelInfoT; - - -/** - * API information elements between ULP and Stack for - * deleting a local tunnel. - */ - -typedef struct { - NW_IN NwGtpv2cTunnelHandleT hTunnel; -} NwGtpv2cDeleteLocalTunnelInfoT; - - -/** - * API container structure between ULP and Stack. - */ - -typedef struct { - NwGtpv2cUlpApiTypeT apiType; /**< First bytes of this field is used as flag holder */ - NwGtpv2cMsgHandleT hMsg; /**< Handle associated with this API */ - union { - NwGtpv2cInitialReqInfoT initialReqInfo; - NwGtpv2cTriggeredRspInfoT triggeredRspInfo; - NwGtpv2cTriggeredReqInfoT triggeredReqInfo; - NwGtpv2cInitialReqIndInfoT initialReqIndInfo; - NwGtpv2cTriggeredRspIndInfoT triggeredRspIndInfo; - NwGtpv2cTriggeredReqIndInfoT triggeredReqIndInfo; - NwGtpv2cRspFailureIndInfoT rspFailureInfo; - NwGtpv2cCreateLocalTunnelInfoT createLocalTunnelInfo; - NwGtpv2cDeleteLocalTunnelInfoT deleteLocalTunnelInfo; - } apiInfo; -} NwGtpv2cUlpApiT; - - -/*--------------------------------------------------------------------------* - * S T A C K E N T I T I E S D E F I N I T I O N S * - *--------------------------------------------------------------------------*/ - -/** - * Gtpv2c ULP entity definition - */ - -typedef struct { - NwGtpv2cUlpHandleT hUlp; - NwRcT (*ulpReqCallback) ( NW_IN NwGtpv2cUlpHandleT hUlp, - NW_IN NwGtpv2cUlpApiT *pUlpApi); -} NwGtpv2cUlpEntityT; - - -/** - * Gtpv2c UDP entity definition - */ - -typedef struct { - NwGtpv2cUdpHandleT hUdp; - NwRcT (*udpDataReqCallback) ( NW_IN NwGtpv2cUdpHandleT udpHandle, - NW_IN uint8_t* dataBuf, - NW_IN uint32_t dataSize, - NW_IN uint32_t peerIp, - NW_IN uint32_t peerPort); -} NwGtpv2cUdpEntityT; - -/** - * Gtpv2c Memory Manager entity definition - */ - -typedef struct { - NwGtpv2cMemMgrHandleT hMemMgr; - void* (*memAlloc)( NW_IN NwGtpv2cMemMgrHandleT hMemMgr, - NW_IN uint32_t memSize, - NW_IN NwCharT* fileName, - NW_IN uint32_t lineNumber); - - void (*memFree) ( NW_IN NwGtpv2cMemMgrHandleT hMemMgr, - NW_IN void* hMem, - NW_IN NwCharT* fileName, - NW_IN uint32_t lineNumber); -} NwGtpv2cMemMgrEntityT; - - -#define NW_GTPV2C_TMR_TYPE_ONE_SHOT (0) -#define NW_GTPV2C_TMR_TYPE_REPETITIVE (1) -/** - * Gtpv2c Timer Manager entity definition - */ - -typedef struct { - NwGtpv2cTimerMgrHandleT tmrMgrHandle; - NwRcT (*tmrStartCallback)( NW_IN NwGtpv2cTimerMgrHandleT tmrMgrHandle, - NW_IN uint32_t timeoutSec, - NW_IN uint32_t timeoutUsec, - NW_IN uint32_t tmrType, - NW_IN void* tmrArg, - NW_OUT NwGtpv2cTimerHandleT* tmrHandle); - - NwRcT (*tmrStopCallback) ( NW_IN NwGtpv2cTimerMgrHandleT tmrMgrHandle, - NW_IN NwGtpv2cTimerHandleT tmrHandle); -} NwGtpv2cTimerMgrEntityT; - -/** - * Gtpv2c Log manager entity definition - */ - -typedef struct { - NwGtpv2cLogMgrHandleT logMgrHandle; - NwRcT (*logReqCallback) (NW_IN NwGtpv2cLogMgrHandleT logMgrHandle, - NW_IN uint32_t logLevel, - NW_IN NwCharT* filename, - NW_IN uint32_t line, - NW_IN NwCharT* logStr); -} NwGtpv2cLogMgrEntityT; - - -/*--------------------------------------------------------------------------* - * P U B L I C F U N C T I O N S * - *--------------------------------------------------------------------------*/ - -#ifdef __cplusplus -extern "C" { -#endif - -/** - Constructor. Initialize nw-gtpv2c stack instance. - - @param[in,out] phGtpcStackHandle : Pointer to stack instance handle - */ - -NwRcT -nwGtpv2cInitialize( NW_INOUT NwGtpv2cStackHandleT* phGtpcStackHandle); - -/** - Destructor. Destroy nw-gtpv2c stack instance . - - @param[in] hGtpcStackHandle : Stack instance handle - */ - -NwRcT -nwGtpv2cFinalize( NW_IN NwGtpv2cStackHandleT hGtpcStackHandle); - -/** - Set Configuration for the nw-gtpv2c stack. - - @param[in,out] phGtpcStackHandle : Pointer to stack handle - */ - -NwRcT -nwGtpv2cConfigSet( NW_IN NwGtpv2cStackHandleT* phGtpcStackHandle, NW_IN NwGtpv2cStackConfigT* pConfig); - -/** - Get Configuration for the nw-gtpv2c stack. - - @param[in,out] phGtpcStackHandle : Pointer to stack handle - */ - -NwRcT -nwGtpv2cConfigGet( NW_IN NwGtpv2cStackHandleT* phGtpcStackHandle, NW_OUT NwGtpv2cStackConfigT* pConfig); - -/** - Set ULP entity for the stack. - - @param[in] hGtpcStackHandle : Stack handle - @param[in] pUlpEntity : Pointer to ULP entity. - @return NW_OK on success. - */ - -NwRcT -nwGtpv2cSetUlpEntity( NW_IN NwGtpv2cStackHandleT hGtpcStackHandle, - NW_IN NwGtpv2cUlpEntityT* pUlpEntity); - -/** - Set UDP entity for the stack. - - @param[in] hGtpcStackHandle : Stack handle - @param[in] pUdpEntity : Pointer to UDP entity. - @return NW_OK on success. - */ - -NwRcT -nwGtpv2cSetUdpEntity( NW_IN NwGtpv2cStackHandleT hGtpcStackHandle, - NW_IN NwGtpv2cUdpEntityT* pUdpEntity); - -/** - Set MemMgr entity for the stack. - - @param[in] hGtpcStackHandle : Stack handle - @param[in] pMemMgr : Pointer to Memory Manager. - @return NW_OK on success. - */ - -NwRcT -nwGtpv2cSetMemMgrEntity( NW_IN NwGtpv2cStackHandleT hGtpcStackHandle, - NW_IN NwGtpv2cMemMgrEntityT* pMemMgr); - - -/** - Set TmrMgr entity for the stack. - - @param[in] hGtpcStackHandle : Stack handle - @param[in] pTmrMgr : Pointer to Timer Manager. - @return NW_OK on success. - */ - -NwRcT -nwGtpv2cSetTimerMgrEntity( NW_IN NwGtpv2cStackHandleT hGtpcStackHandle, - NW_IN NwGtpv2cTimerMgrEntityT* pTmrMgr); - -/** - Set LogMgr entity for the stack. - - @param[in] hGtpcStackHandle : Stack handle - @param[in] pLogMgr : Pointer to Log Manager. - @return NW_OK on success. - */ - -NwRcT -nwGtpv2cSetLogMgrEntity( NW_IN NwGtpv2cStackHandleT hGtpcStackHandle, - NW_IN NwGtpv2cLogMgrEntityT* pLogMgr); - -/** - Set log level for the stack. - - @param[in] hGtpcStackHandle : Stack handle - @param[in] logLevel : Log Level. - @return NW_OK on success. - */ - -NwRcT -nwGtpv2cSetLogLevel( NW_IN NwGtpv2cStackHandleT hGtpcStackHandle, - NW_IN uint32_t logLevel); - - -/** - Process Data Request from UDP entity. - - @param[in] hGtpcStackHandle : Stack handle - @param[in] udpData : Pointer to received UDP data. - @param[in] udpDataLen : Received data length. - @param[in] dstPort : Received on port. - @param[in] from : Received from peer information. - @return NW_OK on success. - */ - -NwRcT -nwGtpv2cProcessUdpReq( NW_IN NwGtpv2cStackHandleT hGtpcStackHandle, - NW_IN uint8_t* udpData, - NW_IN uint32_t udpDataLen, - NW_IN uint16_t peerPort, - NW_IN uint32_t peerIP); - -/** - Process Request from ULP entity. - - @param[in] hGtpcStackHandle : Stack handle - @param[in] pLogMgr : Pointer to Ulp Req. - @return NW_OK on success. - */ - -NwRcT -nwGtpv2cProcessUlpReq( NW_IN NwGtpv2cStackHandleT hGtpcStackHandle, - NW_IN NwGtpv2cUlpApiT *ulpReq); - - -/** - Process Timer timeout Request from Timer Manager - - @param[in] pLogMgr : Pointer timeout arguments. - @return NW_OK on success. - */ - -NwRcT -nwGtpv2cProcessTimeout( NW_IN void* timeoutArg); - - -#ifdef __cplusplus -} -#endif - -#endif /* __NW_GTPV2C_H__ */ - -/*--------------------------------------------------------------------------* - * E N D O F F I L E * - *--------------------------------------------------------------------------*/ - diff --git a/openair-cn/GTPV2-C/nwgtpv2c-0.11/shared/NwGtpv2cIe.h b/openair-cn/GTPV2-C/nwgtpv2c-0.11/shared/NwGtpv2cIe.h deleted file mode 100644 index 2de7e217c7..0000000000 --- a/openair-cn/GTPV2-C/nwgtpv2c-0.11/shared/NwGtpv2cIe.h +++ /dev/null @@ -1,159 +0,0 @@ -/*----------------------------------------------------------------------------* - * * - * n w - g t p v 2 c * - * G P R S T u n n e l i n g P r o t o c o l v 2 c S t a c k * - * * - * * - * Copyright (c) 2010-2011 Amit Chawre * - * All rights reserved. * - * * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright * - * notice, this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - *----------------------------------------------------------------------------*/ - -/** - * @file NwGtpv2cIe.h - * @brief This header file contains Information Element definitions for GTPv2c - * as per 3GPP TS 29274-930. -*/ - -#ifndef __NW_GTPV2C_IE_H__ -#define __NW_GTPV2C_IE_H__ - -/*--------------------------------------------------------------------------* - * G T P V 2 C I E T Y P E M A C R O D E F I N I T I O N S * - *--------------------------------------------------------------------------*/ - -#define NW_GTPV2C_IE_RESERVED (0) -#define NW_GTPV2C_IE_IMSI (1) -#define NW_GTPV2C_IE_CAUSE (2) -#define NW_GTPV2C_IE_RECOVERY (3) -#define NW_GTPV2C_IE_APN (71) -#define NW_GTPV2C_IE_AMBR (72) -#define NW_GTPV2C_IE_EBI (73) -#define NW_GTPV2C_IE_IP_ADDRESS (74) -#define NW_GTPV2C_IE_MEI (75) -#define NW_GTPV2C_IE_MSISDN (76) -#define NW_GTPV2C_IE_INDICATION (77) -#define NW_GTPV2C_IE_PCO (78) -#define NW_GTPV2C_IE_PAA (79) -#define NW_GTPV2C_IE_BEARER_LEVEL_QOS (80) -#define NW_GTPV2C_IE_FLOW_QOS (81) -#define NW_GTPV2C_IE_RAT_TYPE (82) -#define NW_GTPV2C_IE_SERVING_NETWORK (83) -#define NW_GTPV2C_IE_BEARER_TFT (84) -#define NW_GTPV2C_IE_TAD (85) -#define NW_GTPV2C_IE_ULI (86) -#define NW_GTPV2C_IE_FTEID (87) -#define NW_GTPV2C_IE_TMSI (88) -#define NW_GTPV2C_IE_GLOBAL_CN_ID (89) -#define NW_GTPV2C_IE_S103PDF (90) -#define NW_GTPV2C_IE_S1UDF (91) -#define NW_GTPV2C_IE_DELAY_VALUE (92) -#define NW_GTPV2C_IE_BEARER_CONTEXT (93) -#define NW_GTPV2C_IE_CHARGING_ID (94) -#define NW_GTPV2C_IE_CHARGING_CHARACTERISTICS (95) -#define NW_GTPV2C_IE_TRACE_INFORMATION (96) -#define NW_GTPV2C_IE_BEARER_FLAGS (97) -#define NW_GTPV2C_IE_PDN_TYPE (99) -#define NW_GTPV2C_IE_PROCEDURE_TRANSACTION_ID (100) -#define NW_GTPV2C_IE_DRX_PARAMETER (101) -#define NW_GTPV2C_IE_UE_NETWORK_CAPABILITY (102) -#define NW_GTPV2C_IE_MM_CONTEXT (103) -#define NW_GTPV2C_IE_PDN_CONNECTION (109) -#define NW_GTPV2C_IE_PDU_NUMBERS (110) -#define NW_GTPV2C_IE_PTMSI (111) -#define NW_GTPV2C_IE_PTMSI_SIGNATURE (112) -#define NW_GTPV2C_IE_HOP_COUNTER (113) -#define NW_GTPV2C_IE_UE_TIME_ZONE (114) -#define NW_GTPV2C_IE_TRACE_REFERENCE (115) -#define NW_GTPV2C_IE_COMPLETE_REQUEST_MESSAGE (116) -#define NW_GTPV2C_IE_GUTI (117) -#define NW_GTPV2C_IE_F_CONTAINER (118) -#define NW_GTPV2C_IE_F_CAUSE (119) -#define NW_GTPV2C_IE_SELECTED_PLMN_ID (120) -#define NW_GTPV2C_IE_TARGET_IDENTIFICATION (121) -#define NW_GTPV2C_IE_PACKET_FLOW_ID (123) -#define NW_GTPV2C_IE_RAB_CONTEXT (124) -#define NW_GTPV2C_IE_SOURCE_RNC_PDCP_CONTEXT_INFO (125) -#define NW_GTPV2C_IE_UDP_SOURCE_PORT_NUMBER (126) -#define NW_GTPV2C_IE_APN_RESTRICTION (127) -#define NW_GTPV2C_IE_SELECTION_MODE (128) -#define NW_GTPV2C_IE_SOURCE_IDENTIFICATION (129) -#define NW_GTPV2C_IE_CHANGE_REPORTING_ACTION (131) -#define NW_GTPV2C_IE_FQ_CSID (132) -#define NW_GTPV2C_IE_CHANNEL_NEEDED (133) -#define NW_GTPV2C_IE_EMLPP_PRIORITY (134) -#define NW_GTPV2C_IE_NODE_TYPE (135) -#define NW_GTPV2C_IE_FQDN (136) -#define NW_GTPV2C_IE_TI (137) -#define NW_GTPV2C_IE_MBMS_SESSION_DURATION (138) -#define NW_GTPV2C_IE_MBMS_SERIVCE_AREA (139) -#define NW_GTPV2C_IE_MBMS_SESSION_IDENTIFIER (140) -#define NW_GTPV2C_IE_MBMS_FLOW_IDENTIFIER (141) -#define NW_GTPV2C_IE_MBMS_IP_MULTICAST_DISTRIBUTION (142) -#define NW_GTPV2C_IE_MBMS_IP_DISTRIBUTION_ACK (143) -#define NW_GTPV2C_IE_RFSP_INDEX (144) -#define NW_GTPV2C_IE_UCI (145) -#define NW_GTPV2C_IE_CSG_INFORMATION_REPORTING_ACTION (146) -#define NW_GTPV2C_IE_CSG_ID (147) -#define NW_GTPV2C_IE_CSG_MEMBERSHIP_INDICATION (148) -#define NW_GTPV2C_IE_SERVICE_INDICATOR (149) -#define NW_GTPV2C_IE_LDN (151) -#define NW_GTPV2C_IE_ADDITIONAL_MM_CTXT_FOR_SRVCC (159) -#define NW_GTPV2C_IE_ADDITIONAL_FLAGS_FOR_SRVCC (160) -#define NW_GTPV2C_IE_PRIVATE_EXTENSION (255) -#define NW_GTPV2C_IE_TYPE_MAXIMUM (256) - - -/*--------------------------------------------------------------------------* - * G T P V 2 C C A U S E V A L U E D E F I N I T I O N S * - *--------------------------------------------------------------------------*/ - -#define NW_GTPV2C_CAUSE_REQUEST_ACCEPTED (16) -#define NW_GTPV2C_CAUSE_INVALID_LENGTH (67) -#define NW_GTPV2C_CAUSE_MANDATORY_IE_INCORRECT (69) -#define NW_GTPV2C_CAUSE_MANDATORY_IE_MISSING (70) -#define NW_GTPV2C_CAUSE_SYSTEM_FAILURE (72) -#define NW_GTPV2C_CAUSE_REQUEST_REJECTED (94) -#define NW_GTPV2C_CAUSE_REMOTE_PEER_NOT_RESPONDING (100) -#define NW_GTPV2C_CAUSE_CONDITIONAL_IE_MISSING (103) - -#define NW_GTPV2C_IE_INSTANCE_ZERO (0) -#define NW_GTPV2C_IE_INSTANCE_ONE (1) -#define NW_GTPV2C_IE_INSTANCE_TWO (2) -#define NW_GTPV2C_IE_INSTANCE_THREE (3) -#define NW_GTPV2C_IE_INSTANCE_FOUR (4) -#define NW_GTPV2C_IE_INSTANCE_MAXIMUM (NW_GTPV2C_IE_INSTANCE_FOUR) - -#define NW_GTPV2C_IE_PRESENCE_MANDATORY (1) -#define NW_GTPV2C_IE_PRESENCE_CONDITIONAL (2) -#define NW_GTPV2C_IE_PRESENCE_CONDITIONAL_OPTIONAL (3) -#define NW_GTPV2C_IE_PRESENCE_OPTIONAL (4) - -#endif /* __NW_GTPV2C_IE_H__ */ - -/*--------------------------------------------------------------------------* - * E N D O F F I L E * - *--------------------------------------------------------------------------*/ - diff --git a/openair-cn/GTPV2-C/nwgtpv2c-0.11/shared/NwGtpv2cMsg.h b/openair-cn/GTPV2-C/nwgtpv2c-0.11/shared/NwGtpv2cMsg.h deleted file mode 100644 index 7c7476383b..0000000000 --- a/openair-cn/GTPV2-C/nwgtpv2c-0.11/shared/NwGtpv2cMsg.h +++ /dev/null @@ -1,626 +0,0 @@ -/*----------------------------------------------------------------------------* - * * - * n w - g t p v 2 c * - * G P R S T u n n e l i n g P r o t o c o l v 2 c S t a c k * - * * - * * - * Copyright (c) 2010-2011 Amit Chawre * - * All rights reserved. * - * * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright * - * notice, this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - *----------------------------------------------------------------------------*/ - -#ifndef __NW_GTPV2C_MSG_H__ -#define __NW_GTPV2C_MSG_H__ - -#include "NwTypes.h" -#include "NwGtpv2c.h" - -/** - * @file NwGtpv2cMsg.h - * @brief This file defines APIs for to build new outgoing gtpv2c messages and to parse incoming messages. - */ - -#ifdef __cplusplus -extern "C" { -#endif - -/*--------------------------------------------------------------------------* - * S H A R E D A P I M A C R O S * - *--------------------------------------------------------------------------*/ - - -#define NW_GTP_VERSION (0x02) /**< GTP Version */ -#define NW_GTPV2C_MINIMUM_HEADER_SIZE (8) /**< Size of GTPv2c minimun header */ -#define NW_GTPV2C_EPC_SPECIFIC_HEADER_SIZE (12) /**< Size of GTPv2c EPC specific header */ - -/* GTP Message Type Values */ -#define NW_GTP_ECHO_REQ (1) -#define NW_GTP_ECHO_RSP (2) -#define NW_GTP_VERSION_NOT_SUPPORTED_IND (3) -#define NW_GTP_CREATE_SESSION_REQ (32) -#define NW_GTP_CREATE_SESSION_RSP (33) -#define NW_GTP_MODIFY_BEARER_REQ (34) -#define NW_GTP_MODIFY_BEARER_RSP (35) -#define NW_GTP_DELETE_SESSION_REQ (36) -#define NW_GTP_DELETE_SESSION_RSP (37) -#define NW_GTP_MODIFY_BEARER_CMD (64) -#define NW_GTP_MODIFY_BEARER_FAILURE_IND (65) -#define NW_GTP_DELETE_BEARER_CMD (66) -#define NW_GTP_DELETE_BEARER_FAILURE_IND (67) -#define NW_GTP_BEARER_RESOURCE_CMD (68) -#define NW_GTP_BEARER_RESOURCE_FAILURE_IND (69) -#define NW_GTP_DOWNLINK_DATA_NOTIFICATION_FAILURE_IND (70) -#define NW_GTP_TRACE_SESSION_ACTIVATION (71) -#define NW_GTP_TRACE_SESSION_DEACTIVATION (72) -#define NW_GTP_STOP_PAGING_IND (73) -#define NW_GTP_CREATE_BEARER_REQ (95) -#define NW_GTP_CREATE_BEARER_RSP (96) -#define NW_GTP_UPDATE_BEARER_REQ (97) -#define NW_GTP_UPDATE_BEARER_RSP (98) -#define NW_GTP_DELETE_BEARER_REQ (99) -#define NW_GTP_DELETE_BEARER_RSP (100) -#define NW_GTP_DELETE_PDN_CONNECTION_SET_REQ (101) -#define NW_GTP_DELETE_PDN_CONNECTION_SET_RSP (102) -#define NW_GTP_IDENTIFICATION_REQ (128) -#define NW_GTP_IDENTIFICATION_RSP (129) -#define NW_GTP_CONTEXT_REQ (130) -#define NW_GTP_CONTEXT_RSP (131) -#define NW_GTP_CONTEXT_ACK (132) -#define NW_GTP_FORWARD_RELOCATION_REQ (133) -#define NW_GTP_FORWARD_RELOCATION_RSP (134) -#define NW_GTP_FORWARD_RELOCATION_COMPLETE_NTF (135) -#define NW_GTP_FORWARD_RELOCATION_COMPLETE_ACK (136) -#define NW_GTP_FORWARD_ACCESS_CONTEXT_NTF (137) -#define NW_GTP_FORWARD_ACCESS_CONTEXT_ACK (138) -#define NW_GTP_RELOCATION_CANCEL_REQ (139) -#define NW_GTP_RELOCATION_CANCEL_RSP (140) -#define NW_GTP_CONFIGURE_TRANSFER_TUNNEL (141) -#define NW_GTP_DETACH_NTF (149) -#define NW_GTP_DETACH_ACK (150) -#define NW_GTP_CS_PAGING_INDICATION (151) -#define NW_GTP_RAN_INFORMATION_RELAY (152) -#define NW_GTP_ALERT_MME_NTF (153) -#define NW_GTP_ALERT_MME_ACK (154) -#define NW_GTP_UE_ACTIVITY_NTF (155) -#define NW_GTP_UE_ACTIVITY_ACK (156) -#define NW_GTP_CREATE_FORWARDING_TUNNEL_REQ (160) -#define NW_GTP_CREATE_FORWARDING_TUNNEL_RSP (161) -#define NW_GTP_SUSPEND_NTF (162) -#define NW_GTP_SUSPEND_ACK (163) -#define NW_GTP_RESUME_NTF (164) -#define NW_GTP_RESUME_ACK (165) -#define NW_GTP_CREATE_INDIRECT_DATA_FORWARDING_TUNNEL_REQ (166) -#define NW_GTP_CREATE_INDIRECT_DATA_FORWARDING_TUNNEL_RSP (167) -#define NW_GTP_DELETE_INDIRECT_DATA_FORWARDING_TUNNEL_REQ (168) -#define NW_GTP_DELETE_INDIRECT_DATA_FORWARDING_TUNNEL_RSP (169) -#define NW_GTP_RELEASE_ACCESS_BEARERS_REQ (170) -#define NW_GTP_RELEASE_ACCESS_BEARERS_RSP (171) -#define NW_GTP_DOWNLINK_DATA_NOTIFICATION (176) -#define NW_GTP_DOWNLINK_DATA_NOTIFICATION_ACK (177) -#define NW_GTP_RESERVED (178) -#define NW_GTP_UPDATE_PDN_CONNECTION_SET_REQ (200) -#define NW_GTP_UPDATE_PDN_CONNECTION_SET_RSP (201) -#define NW_GTP_MBMS_SESSION_START_REQ (231) -#define NW_GTP_MBMS_SESSION_START_RSP (232) -#define NW_GTP_MBMS_SESSION_UPDATE_REQ (233) -#define NW_GTP_MBMS_SESSION_UPDATE_RSP (234) -#define NW_GTP_MBMS_SESSION_STOP_REQ (235) -#define NW_GTP_MBMS_SESSION_STOP_RSP (236) -#define NW_GTP_MSG_END (255) - - -/* Cause Values */ -#define NW_GTPV2C_CAUSE_BIT_NONE (0x00) -#define NW_GTPV2C_CAUSE_BIT_CS (0x01) -#define NW_GTPV2C_CAUSE_BIT_BCE (0x02) -#define NW_GTPV2C_CAUSE_BIT_PCE (0x04) - -/* RAT Type Values */ -#define NW_RAT_TYPE_EUTRAN (0x06) - -/* PDN Type Values */ -#define NW_PDN_TYPE_IPv4 (0x01) -#define NW_PDN_TYPE_IPv6 (0x02) -#define NW_PDN_TYPE_IPv4IPv6 (0x03) - -/* Interface Type Values */ -#define NW_GTPV2C_IFTYPE_S1U_ENODEB_GTPU (0) -#define NW_GTPV2C_IFTYPE_S1U_SGW_GTPU (1) -#define NW_GTPV2C_IFTYPE_S12_RNC_GTPU (2) -#define NW_GTPV2C_IFTYPE_S12_SGW_GTPU (3) -#define NW_GTPV2C_IFTYPE_S5S8_SGW_GTPU (4) -#define NW_GTPV2C_IFTYPE_S5S8_PGW_GTPU (5) -#define NW_GTPV2C_IFTYPE_S5S8_SGW_GTPC (6) -#define NW_GTPV2C_IFTYPE_S5S8_PGW_GTPC (7) -#define NW_GTPV2C_IFTYPE_S5S8_SGW_PIMPv6 (8) -#define NW_GTPV2C_IFTYPE_S5S8_PGW_PIMPv6 (9) -#define NW_GTPV2C_IFTYPE_S11_MME_GTPC (10) -#define NW_GTPV2C_IFTYPE_S11S4_SGW_GTPC (11) - -/* Indication Flag Values */ -#define NW_GTPV2C_INDICATION_FLAG_NONE (0x0000) -#define NW_GTPV2C_INDICATION_FLAG_DAF (0x8000) -#define NW_GTPV2C_INDICATION_FLAG_DTF (0x4000) -#define NW_GTPV2C_INDICATION_FLAG_HI (0x2000) -#define NW_GTPV2C_INDICATION_FLAG_DFI (0x1000) -#define NW_GTPV2C_INDICATION_FLAG_OI (0x0800) -#define NW_GTPV2C_INDICATION_FLAG_ISRSI (0x0400) -#define NW_GTPV2C_INDICATION_FLAG_ISRAI (0x0200) -#define NW_GTPV2C_INDICATION_FLAG_SGWCI (0x0100) - -#define NW_GTPV2C_INDICATION_FLAG_SPARE (0x0080) -#define NW_GTPV2C_INDICATION_FLAG_UMSI (0x0040) -#define NW_GTPV2C_INDICATION_FLAG_CSFI (0x0020) -#define NW_GTPV2C_INDICATION_FLAG_CRSI (0x0010) -#define NW_GTPV2C_INDICATION_FLAG_PS (0x0008) -#define NW_GTPV2C_INDICATION_FLAG_PT (0x0004) -#define NW_GTPV2C_INDICATION_FLAG_SI (0x0002) -#define NW_GTPV2C_INDICATION_FLAG_MSV (0x0001) - -/*--------------------------------------------------------------------------* - * G T P V 2 C I E D A T A - T Y P E D E F I N I T I O N S * - *--------------------------------------------------------------------------*/ - -#pragma pack(1) - -typedef struct NwGtpv2cIeTv1 { - uint8_t t; - uint16_t l; - uint8_t i; - uint8_t v; -} NwGtpv2cIeTv1T; - -typedef struct NwGtpv2cIeTv2 { - uint8_t t; - uint16_t l; - uint8_t i; - uint16_t v; -} NwGtpv2cIeTv2T; - -typedef struct NwGtpv2cIeTv4 { - uint8_t t; - uint16_t l; - uint8_t i; - uint32_t v; -} NwGtpv2cIeTv4T; - -typedef struct NwGtpv2cIeTv8 { - uint8_t t; - uint16_t l; - uint8_t i; - uint64_t v; -} NwGtpv2cIeTv8T; - -typedef struct NwGtpv2cIeTlv { - uint8_t t; - uint16_t l; - uint8_t i; -} NwGtpv2cIeTlvT; - -#pragma pack() - - -/** - * Allocate a gtpv2c message. - * - * @param[in] hGtpcStackHandle : gtpv2c stack handle. - * @param[in] teidPresent : TEID is present flag. - * @param[in] msgType : Message type for this message. - * @param[in] teid : TEID for this message. - * @param[in] seqNum : Sequence number for this message. - * @param[out] phMsg : Pointer to message handle. - */ - -NwRcT -nwGtpv2cMsgNew( NW_IN NwGtpv2cStackHandleT hGtpcStackHandle, - NW_IN uint8_t teidPresent, - NW_IN uint8_t msgType, - NW_IN uint32_t teid, - NW_IN uint32_t seqNum, - NW_OUT NwGtpv2cMsgHandleT *phMsg); - - -/** - * Allocate a gtpv2c message from data buffer. - * - * @param[in] hGtpcStackHandle : gtpv2c stack handle. - * @param[in] pBuf: Buffer to be copied in this message. - * @param[in] bufLen: Buffer length to be copied in this message. - * @param[out] phMsg : Pointer to message handle. - */ - -NwRcT -nwGtpv2cMsgFromBufferNew( NW_IN NwGtpv2cStackHandleT hGtpcStackHandle, - NW_IN uint8_t* pBuf, - NW_IN uint32_t bufLen, - NW_OUT NwGtpv2cMsgHandleT *phMsg); - -/** - * Free a gtpv2c message. - * - * @param[in] hGtpcStackHandle : gtpv2c stack handle. - * @param[in] hMsg : Message handle. - */ - -NwRcT -nwGtpv2cMsgDelete( NW_IN NwGtpv2cStackHandleT hGtpcStackHandle, - NW_IN NwGtpv2cMsgHandleT hMsg); - -/** - * Set TEID for gtpv2c message. - * - * @param[in] hMsg : Message handle. - * @param[in] teid: TEID value. - */ - -NwRcT -nwGtpv2cMsgSetTeid(NW_IN NwGtpv2cMsgHandleT hMsg, uint32_t teid); - -/** - * Set TEID present flag for gtpv2c message. - * - * @param[in] hMsg : Message handle. - * @param[in] teidPesent: Flag boolean value. - */ - -NwRcT -nwGtpv2cMsgSetTeidPresent(NW_IN NwGtpv2cMsgHandleT hMsg, NwBoolT teidPresent); - -/** - * Set sequence for gtpv2c message. - * - * @param[in] hMsg : Message handle. - * @param[in] seqNum: Flag boolean value. - */ - -NwRcT -nwGtpv2cMsgSetSeqNumber(NW_IN NwGtpv2cMsgHandleT hMsg, uint32_t seqNum); - -/** - * Get TEID present for gtpv2c message. - * - * @param[in] hMsg : Message handle. - */ - -uint32_t -nwGtpv2cMsgGetTeid(NW_IN NwGtpv2cMsgHandleT hMsg); - -/** - * Get TEID present for gtpv2c message. - * - * @param[in] hMsg : Message handle. - */ - -NwBoolT -nwGtpv2cMsgGetTeidPresent(NW_IN NwGtpv2cMsgHandleT hMsg); - -/** - * Get sequence number for gtpv2c message. - * - * @param[in] hMsg : Message handle. - */ - -uint32_t -nwGtpv2cMsgGetSeqNumber(NW_IN NwGtpv2cMsgHandleT hMsg); - -/** - * Get msg lenght for gtpv2c message. - * - * @param[in] hMsg : Message handle. - */ - -uint32_t -nwGtpv2cMsgGetLength(NW_IN NwGtpv2cMsgHandleT hMsg); - -/** - * Add a gtpv2c information element of length 1 to gtpv2c message. - * - * @param[in] hMsg : Handle to gtpv2c message. - * @param[in] type : IE type. - * @param[in] instance : IE instance. - * @param[in] value : IE value. - */ - -NwRcT -nwGtpv2cMsgAddIeTV1(NW_IN NwGtpv2cMsgHandleT hMsg, - NW_IN uint8_t type, - NW_IN uint8_t instance, - NW_IN uint8_t value); - - -/** - * Add a gtpv2c information element of length 2 to gtpv2c message. - * - * @param[in] hMsg : Handle to gtpv2c message. - * @param[in] type : IE type. - * @param[in] instance : IE instance. - * @param[in] value : IE value. - */ - -NwRcT -nwGtpv2cMsgAddIeTV2(NW_IN NwGtpv2cMsgHandleT hMsg, - NW_IN uint8_t type, - NW_IN uint8_t instance, - NW_IN uint16_t value); - - -/** - * Add a gtpv2c information element of length 4 to gtpv2c message. - * - * @param[in] hMsg : Handle to gtpv2c message. - * @param[in] type : IE type. - * @param[in] instance : IE instance. - * @param[in] value : IE value. - */ - -NwRcT -nwGtpv2cMsgAddIeTV4(NW_IN NwGtpv2cMsgHandleT hMsg, - NW_IN uint8_t type, - NW_IN uint8_t instance, - NW_IN uint32_t value); - - -/** - * Add a gtpv2c information element of variable length to gtpv2c message. - * - * @param[in] hMsg : Handle to gtpv2c message. - * @param[in] type : IE type. - * @param[in] length : IE length. - * @param[in] instance : IE instance. - * @param[in] value : IE value. - */ - -NwRcT -nwGtpv2cMsgAddIe(NW_IN NwGtpv2cMsgHandleT hMsg, - NW_IN uint8_t type, - NW_IN uint16_t length, - NW_IN uint8_t instance, - NW_IN uint8_t* pVal); - -/** - * Add CAUSE information element to gtpv2c message. - * - * @param[in] hMsg : Handle to gtpv2c message. - * @param[in] instance : IE instance. - * @param[in] causeValue: Cause value. - * @param[in] bitFlags: PDN Connetiion IE Error Flag, Bearer Context IE Error Flag, Cause Source Flag. - * @param[in] offendingIeType: Offending IE type. - * @param[in] offendingIeInstance: Offending IE instance. - */ - -NwRcT -nwGtpv2cMsgAddIeCause(NW_IN NwGtpv2cMsgHandleT hMsg, - NW_IN uint8_t instance, - NW_IN uint8_t causeValue, - NW_IN uint8_t bitFlags, - NW_IN uint8_t offendingIeType, - NW_IN uint8_t offendingIeInstance); - -/** - * Add F-TEID information element to gtpv2c message. - * - * @param[in] hMsg : Handle to gtpv2c message. - * @param[in] instance : IE instance. - * @param[in] ifType : Interface Type. - * @param[in] teidOrGreKey: TEID/ GRE Key - * @param[in] ipv4Addr : Ipv4 Address in Network Byte Order. - * @param[in] pIpv6Addr: Pointer to IPv6 Address in Network Byte Order. - */ - -NwRcT -nwGtpv2cMsgAddIeFteid(NW_IN NwGtpv2cMsgHandleT hMsg, - NW_IN uint8_t instance, - NW_IN uint8_t ifType, - NW_IN uint32_t teidOrGreKey, - NW_IN uint32_t ipv4Addr, - NW_IN uint8_t* pIpv6Addr); - -NwRcT -nwGtpv2cMsgGroupedIeStart(NW_IN NwGtpv2cMsgHandleT hMsg, - NW_IN uint8_t type, - NW_IN uint8_t instance); - -NwRcT -nwGtpv2cMsgGroupedIeEnd(NW_IN NwGtpv2cMsgHandleT hMsg); - - -/** - * Check if information element of type and instance is present - * in gtpv2c message. - * - * @param[in] hMsg : Handle to gtpv2c message. - * @param[in] type : IE Type. - * @param[in] instance : IE instance. - * @return NW_TRUE on success, NW_FALSE on failure. - */ - -NwBoolT -nwGtpv2cMsgIsIePresent(NW_IN NwGtpv2cMsgHandleT hMsg, - NW_IN uint8_t type, - NW_IN uint8_t instance); - -/** - * Get an information element of type 'uint8_t' from gtpv2c message. - * - * @param[in] hMsg : Handle to gtpv2c message. - * @param[in] type : IE Type. - * @param[in] instance : IE instance. - * @param[out] pVal : Pointer to value buffer. - * @return NW_OK on success. - */ - -NwRcT -nwGtpv2cMsgGetIeTV1(NW_IN NwGtpv2cMsgHandleT hMsg, - NW_IN uint8_t type, - NW_IN uint8_t instance, - NW_OUT uint8_t* pVal); - -/** - * Get an information element of type 'uint16_t' from gtpv2c message. - * - * @param[in] hMsg : Handle to gtpv2c message. - * @param[in] tyep : IE Type. - * @param[in] instance : IE instance. - * @param[out] pVal : Pointer to value buffer. - * @return NW_OK on success. - */ - - -NwRcT -nwGtpv2cMsgGetIeTV2(NW_IN NwGtpv2cMsgHandleT hMsg, - NW_IN uint8_t type, - NW_IN uint8_t instance, - NW_OUT uint16_t* pVal); - -/** - * Get an information element of type 'uint32_t' from gtpv2c message. - * - * @param[in] hMsg : Handle to gtpv2c message. - * @param[in] tyep : IE Type. - * @param[in] instance : IE instance. - * @param[out] pVal : Pointer to value buffer. - * @return NW_OK on success. - */ - - -NwRcT -nwGtpv2cMsgGetIeTV4(NW_IN NwGtpv2cMsgHandleT hMsg, - NW_IN uint8_t type, - NW_IN uint8_t instance, - NW_OUT uint32_t* pVal); - -/** - * Get an information element of type 'uint64_t' from gtpv2c message. - * - * @param[in] hMsg : Handle to gtpv2c message. - * @param[in] tyep : IE Type. - * @param[in] instance : IE instance. - * @param[out] pVal : Pointer to IE value buffer. - * @return NW_OK on success. - */ - - -NwRcT -nwGtpv2cMsgGetIeTV8(NW_IN NwGtpv2cMsgHandleT hMsg, - NW_IN uint8_t type, - NW_IN uint8_t instance, - NW_OUT uint64_t* pVal); - -/** - * Get an information element of variable length from gtpv2c message. - * - * @param[in] hMsg : Handle to gtpv2c message. - * @param[in] tyep : IE Type. - * @param[in] instance : IE instance. - * @param[in] maxLen : Maximum length of IE. - * @param[out] pVal : Pointer to IE value buffer. - * @param[out] pLen : Pointer to IE length buffer. - * @return NW_OK on success. - */ - -NwRcT -nwGtpv2cMsgGetIeTlv(NW_IN NwGtpv2cMsgHandleT hMsg, - NW_IN uint8_t type, - NW_IN uint8_t instance, - NW_IN uint16_t maxLen, - NW_OUT uint8_t* pVal, - NW_OUT uint16_t* pLen); - -/** - * Get an information element of variable length from gtpv2c message. - * - * @param[in] hMsg : Handle to gtpv2c message. - * @param[in] tyep : IE Type. - * @param[in] instance : IE instance. - * @param[out] ppVal : Pointer to IE value buffer pointer. - * @param[out] pLen : Pointer to IE length buffer. - * @return NW_OK on success. - */ - -NwRcT -nwGtpv2cMsgGetIeTlvP(NW_IN NwGtpv2cMsgHandleT hMsg, - NW_IN uint8_t type, - NW_IN uint8_t instance, - NW_OUT uint8_t** ppVal, - NW_OUT uint16_t* pLen); - - -/** - * Get F-TEID information element to gtpv2c message. - * - * @param[in] hMsg : Handle to gtpv2c message. - * @param[in] instance : IE instance. - * @param[out] ifType : Interface Type. - * @param[out] teidOrGreKey: TEID/ GRE Key - * @param[out] ipv4Addr : Ipv4 Address in Network Byte Order. - * @param[out] pIpv6Addr: Pointer to IPv6 Address in Network Byte Order. - */ - -NwRcT -nwGtpv2cMsgGetIeFteid(NW_IN NwGtpv2cMsgHandleT hMsg, - NW_IN uint8_t instance, - NW_OUT uint8_t* ifType, - NW_OUT uint32_t* teidOrGreKey, - NW_OUT uint32_t* ipv4Addr, - NW_OUT uint8_t* pIpv6Addr); - -NwRcT -nwGtpv2cMsgGetIeCause(NW_IN NwGtpv2cMsgHandleT hMsg, - NW_IN uint8_t instance, - NW_OUT uint8_t* causeValue, - NW_OUT uint8_t* flags, - NW_OUT uint8_t* offendingIeType, - NW_OUT uint8_t* offendingIeInstance); - -/** - * Get msg type for gtpv2c message. - * - * @param[in] hMsg : Message handle. - */ - -uint32_t -nwGtpv2cMsgGetMsgType(NW_IN NwGtpv2cMsgHandleT hMsg); - -/** - * Dump the contents of gtpv2c message. - * - * @param[in] hMsg : Handle to gtpv2c message. - * @param[in] fp: Pointer to output file. - */ - -NwRcT -nwGtpv2cMsgHexDump(NwGtpv2cMsgHandleT hMsg, FILE* fp); - -#ifdef __cplusplus -} -#endif - -#endif /* __NW_GTPV2C_MSG_H__ */ - - -/*--------------------------------------------------------------------------* - * E N D O F F I L E * - *--------------------------------------------------------------------------*/ - diff --git a/openair-cn/GTPV2-C/nwgtpv2c-0.11/shared/NwGtpv2cMsgParser.h b/openair-cn/GTPV2-C/nwgtpv2c-0.11/shared/NwGtpv2cMsgParser.h deleted file mode 100644 index a16bf4800a..0000000000 --- a/openair-cn/GTPV2-C/nwgtpv2c-0.11/shared/NwGtpv2cMsgParser.h +++ /dev/null @@ -1,153 +0,0 @@ -/*----------------------------------------------------------------------------* - * * - * n w - g t p v 2 c * - * G P R S T u n n e l i n g P r o t o c o l v 2 c S t a c k * - * * - * * - * Copyright (c) 2010-2011 Amit Chawre * - * All rights reserved. * - * * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright * - * notice, this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - *----------------------------------------------------------------------------*/ - -#include -#include "NwTypes.h" -#include "NwGtpv2c.h" -#include "NwGtpv2cIe.h" - -#ifndef __NW_GTPV2C_MSG_PARSER_H__ -#define __NW_GTPV2C_MSG_PARSER_H__ - -/** - * @file NwGtpv2cMsgParser.h - * @brief This file defines APIs to parser gtpv2c messages. -*/ - -typedef struct { - uint16_t msgType; - uint16_t mandatoryIeCount; - NwGtpv2cStackHandleT hStack; - NwRcT (*ieReadCallback) (uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t* ieValue, void* ieReadCallbackArg); - void* ieReadCallbackArg; - - struct { - uint8_t iePresence; - NwRcT (*ieReadCallback) (uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t* ieValue, void* ieReadCallbackArg); - void* ieReadCallbackArg; - } ieParseInfo[NW_GTPV2C_IE_TYPE_MAXIMUM][NW_GTPV2C_IE_INSTANCE_MAXIMUM]; - - uint8_t *pIe[NW_GTPV2C_IE_TYPE_MAXIMUM][NW_GTPV2C_IE_INSTANCE_MAXIMUM]; -} NwGtpv2cMsgParserT; - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * Allocate a gtpv2c message Parser. - * - * @param[in] hGtpcStackHandle : gtpv2c stack handle. - * @param[in] msgType : Message type for this message parser. - * @param[out] pthiz : Pointer to message parser handle. - */ - -NwRcT -nwGtpv2cMsgParserNew( NW_IN NwGtpv2cStackHandleT hGtpcStackHandle, - NW_IN uint8_t msgType, - NW_IN NwRcT (*ieReadCallback) (uint8_t ieType, - uint8_t ieLength, - uint8_t ieInstance, - uint8_t* ieValue, - void* ieReadCallbackArg), - NW_IN void* ieReadCallbackArg, - NW_IN NwGtpv2cMsgParserT **pthiz); - - -/** - * Free a gtpv2c message parser. - * - * @param[in] hGtpcStackHandle : gtpv2c stack handle. - * @param[in] thiz : Message parser handle. - */ - -NwRcT -nwGtpv2cMsgParserDelete( NW_IN NwGtpv2cStackHandleT hGtpcStackHandle, - NW_IN NwGtpv2cMsgParserT* thiz); - -NwRcT -nwGtpv2cMsgParserUpdateIe( NW_IN NwGtpv2cMsgParserT* thiz, - NW_IN uint8_t ieType, - NW_IN uint8_t ieInstance, - NW_IN uint8_t iePresence, - NW_IN NwRcT (*ieReadCallback) (uint8_t ieType, - uint8_t ieLength, - uint8_t ieInstance, - uint8_t* ieValue, - void* ieReadCallbackArg), - NW_IN void* ieReadCallbackArg); - - -NwRcT -nwGtpv2cMsgParserUpdateIeReadCallback( NW_IN NwGtpv2cMsgParserT* thiz, - NW_IN NwRcT (*ieReadCallback) (uint8_t ieType, - uint8_t ieLength, - uint8_t ieInstance, - uint8_t* ieValue, - void* ieReadCallbackArg)); - - -NwRcT -nwGtpv2cMsgParserUpdateIeReadCallbackArg( NW_IN NwGtpv2cMsgParserT* thiz, - NW_IN void* ieReadCallbackArg); - -NwRcT -nwGtpv2cMsgParserAddIe( NW_IN NwGtpv2cMsgParserT* thiz, - NW_IN uint8_t ieType, - NW_IN uint8_t ieInstance, - NW_IN uint8_t iePresence, - NW_IN NwRcT (*ieReadCallback) (uint8_t ieType, - uint8_t ieLength, - uint8_t ieInstance, - uint8_t* ieValue, - void* ieReadCallbackArg), - NW_IN void* ieReadCallbackArg); - -NwRcT -nwGtpv2cMsgParserRun( NW_IN NwGtpv2cMsgParserT *thiz, - NW_IN NwGtpv2cMsgHandleT hMsg, - NW_OUT uint8_t *pOffendingIeType, - NW_OUT uint8_t *pOffendingIeInstance, - NW_OUT uint16_t *pOffendingIeLength); - -#ifdef __cplusplus -} -#endif - -#endif /* __NW_GTPV2C_MSG_PARSER_H__ */ - - -/*--------------------------------------------------------------------------* - * E N D O F F I L E * - *--------------------------------------------------------------------------*/ - diff --git a/openair-cn/GTPV2-C/nwgtpv2c-0.11/shared/NwLog.h b/openair-cn/GTPV2-C/nwgtpv2c-0.11/shared/NwLog.h deleted file mode 100644 index a941a31905..0000000000 --- a/openair-cn/GTPV2-C/nwgtpv2c-0.11/shared/NwLog.h +++ /dev/null @@ -1,85 +0,0 @@ -/*----------------------------------------------------------------------------* - * * - * n w - g t p v 2 c * - * G P R S T u n n e l i n g P r o t o c o l v 2 c S t a c k * - * * - * * - * Copyright (c) 2010-2011 Amit Chawre * - * All rights reserved. * - * * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright * - * notice, this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - *----------------------------------------------------------------------------*/ - - -#ifndef __NW_LOG_H__ -#define __NW_LOG_H__ - -#include - -#include "NwTypes.h" - -/** - * @file NwLog.h - * @brief This header file contains global shared logging definitions. -*/ - -#ifdef __cplusplus -extern "C" { -#endif - -/*--------------------------------------------------------------------------- - * Log Level Definitions - *--------------------------------------------------------------------------*/ - -#define NW_LOG_LEVEL_EMER (0) /**< system is unusable */ -#define NW_LOG_LEVEL_ALER (1) /**< action must be taken immediately*/ -#define NW_LOG_LEVEL_CRIT (2) /**< critical conditions */ -#define NW_LOG_LEVEL_ERRO (3) /**< error conditions */ -#define NW_LOG_LEVEL_WARN (4) /**< warning conditions */ -#define NW_LOG_LEVEL_NOTI (5) /**< normal but signification condition */ -#define NW_LOG_LEVEL_INFO (6) /**< informational */ -#define NW_LOG_LEVEL_DEBG (7) /**< debug-level messages */ - -/*--------------------------------------------------------------------------- - * IPv4 logging macros - *--------------------------------------------------------------------------*/ - -#define NW_IPV4_ADDR "%u.%u.%u.%u" -#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) (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 -} -#endif - -#endif /* __NW_LOG_H__ */ - - diff --git a/openair-cn/GTPV2-C/nwgtpv2c-0.11/shared/NwTypes.h b/openair-cn/GTPV2-C/nwgtpv2c-0.11/shared/NwTypes.h deleted file mode 100644 index 78be53a5d0..0000000000 --- a/openair-cn/GTPV2-C/nwgtpv2c-0.11/shared/NwTypes.h +++ /dev/null @@ -1,83 +0,0 @@ -/*----------------------------------------------------------------------------* - * * - * n w - g t p v 2 c * - * G P R S T u n n e l i n g P r o t o c o l v 2 c S t a c k * - * * - * * - * Copyright (c) 2010-2011 Amit Chawre * - * All rights reserved. * - * * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright * - * notice, this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - *----------------------------------------------------------------------------*/ - - -#include -#include - -#ifndef __NW_TYPES_H__ -#define __NW_TYPES_H__ - -/** - * @file NwTypes.h - * @brief This header file contains basic type definitions. -*/ - -#ifdef __cplusplus -extern "C" { -#endif - -#define NW_IN /**< An input argument */ -#define NW_OUT /**< An output argument */ -#define NW_INOUT /**< An input and output argument */ - -#define NW_TRUE (1) /**< Truth value */ -#define NW_FALSE (0) /**< False value */ - -typedef unsigned char uint8_t; /**< Unsigned 1 byte */ -typedef unsigned short uint16_t; /**< Unsigned 2 byte */ -typedef unsigned int uint32_t; /**< Unsigned 4 byte */ -typedef unsigned long long uint64_t; /**< Unsigned 8 byte */ - -typedef signed char NwS8T; /**< Signed 1 byte */ -typedef signed short NwS16T; /**< Signed 2 byte */ -typedef signed int NwS32T; /**< Signed 4 byte */ -typedef signed long long NwS64T; /**< Signed 8 byte */ - -typedef char NwBoolT; /**< Use this for booleans */ - -typedef char NwCharT; /**< Use this for strings */ - -typedef signed int NwFdT; /**< Use this for file descriptor */ - -typedef uintptr_t NwPtrT; /**< Use this for generic pointers */ -typedef unsigned int NwHandleT; /**< Use this for generic handles */ - - -#ifdef __cplusplus -} -#endif - -#endif /* __NW_TYPES_H__ */ - - diff --git a/openair-cn/GTPV2-C/nwgtpv2c-0.11/shared/NwUtils.h b/openair-cn/GTPV2-C/nwgtpv2c-0.11/shared/NwUtils.h deleted file mode 100644 index a51437bce8..0000000000 --- a/openair-cn/GTPV2-C/nwgtpv2c-0.11/shared/NwUtils.h +++ /dev/null @@ -1,69 +0,0 @@ -/*----------------------------------------------------------------------------* - * * - * n w - g t p v 2 c * - * G P R S T u n n e l i n g P r o t o c o l v 2 c S t a c k * - * * - * * - * Copyright (c) 2010-2011 Amit Chawre * - * All rights reserved. * - * * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright * - * notice, this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - *----------------------------------------------------------------------------*/ - -#include - -#ifndef __NW_UTILS_H__ -#define __NW_UTILS_H__ - - -/** - * @file NwUtils.h - * @brief This header file contains utility macro and function definitions. -*/ - -#define NW_ASSERT assert /**< Assertion */ - -#define NW_CHK_NULL_PTR(_ptr) NW_ASSERT(_ptr != NULL) /**< Null pointer check */ - -#define NW_HTONS(x) ( ( ((x) & 0xff00) >> 8 ) | ( ((x) & 0x00ff) << 8 ) ) - -#define NW_HTONL(x) ( ( ((x) & 0xff000000) >> 24 ) | ( ( (x) & 0x00ff0000 ) >> 8 ) | \ - ( ( (x) & 0x0000ff00 ) << 8 ) | ( ( (x) & 0x000000ff) << 24 ) ) - -#define NW_HTONLL(x) ( \ - ( ( ((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 -#define NW_NTOHL NW_HTONL -#define NW_NTOHLL NW_HTONLL - - -#endif /* __NW_UTILS_H__ */ - - diff --git a/openair-cn/GTPV2-C/nwgtpv2c-0.11/src/Makefile.am b/openair-cn/GTPV2-C/nwgtpv2c-0.11/src/Makefile.am deleted file mode 100644 index 0c12bd5984..0000000000 --- a/openair-cn/GTPV2-C/nwgtpv2c-0.11/src/Makefile.am +++ /dev/null @@ -1,46 +0,0 @@ -# this is example-file: src/mylib/Makefile.am - -# additional include paths necessary to compile the C++ library -AM_CFLAGS = -Wall -I$(top_srcdir)/src -I$(top_srcdir)/shared -I$(top_srcdir)/include @AM_CFLAGS@ - -############################################################################### -# THE LIBRARIES TO BUILD -############################################################################### - -# the library names to build (note we are building static libs only) -lib_LIBRARIES = libNwGtpv2c.a - -# where to install the headers on the system -libNwGtpv2c_adir = $(includedir)/mylib - -# the list of header files that belong to the library (to be installed later) -libNwGtpv2c_a_HEADERS = \ - $(top_srcdir)/shared/NwTypes.h\ - $(top_srcdir)/shared/NwUtils.h\ - $(top_srcdir)/shared/NwError.h\ - $(top_srcdir)/shared/NwLog.h\ - $(top_srcdir)/shared/NwGtpv2c.h\ - $(top_srcdir)/shared/NwGtpv2cMsg.h\ - $(top_srcdir)/shared/NwGtpv2cMsgParser.h\ - $(top_srcdir)/shared/NwGtpv2cIe.h\ - $(top_srcdir)/include/NwGtpv2cPrivate.h\ - $(top_srcdir)/include/NwGtpv2cTrxn.h\ - $(top_srcdir)/include/NwGtpv2cTunnel.h\ - $(top_srcdir)/include/NwGtpv2cMsgIeParseInfo.h\ - $(top_srcdir)/include/NwGtpv2cLog.h\ - $(top_srcdir)/include/queue.h\ - $(top_srcdir)/include/tree.h - -# the sources to add to the library and to add to the source distribution -libNwGtpv2c_a_SOURCES = \ - $(libNwGtpv2_a_HEADERS) \ - NwGtpv2cTrxn.c\ - NwGtpv2cTunnel.c\ - NwGtpv2cMsg.c\ - NwGtpv2cMsgIeParseInfo.c\ - NwGtpv2cMsgParser.c\ - NwGtpv2c.c - -############################################################################### - - diff --git a/openair-cn/GTPV2-C/nwgtpv2c-0.11/src/NwGtpv2c.c b/openair-cn/GTPV2-C/nwgtpv2c-0.11/src/NwGtpv2c.c deleted file mode 100644 index 123fe0932a..0000000000 --- a/openair-cn/GTPV2-C/nwgtpv2c-0.11/src/NwGtpv2c.c +++ /dev/null @@ -1,1811 +0,0 @@ -/*----------------------------------------------------------------------------* - * * - * n w - g t p v 2 c * - * G P R S T u n n e l i n g P r o t o c o l v 2 c S t a c k * - * * - * * - * Copyright (c) 2010-2011 Amit Chawre * - * All rights reserved. * - * * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright * - * notice, this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - *----------------------------------------------------------------------------*/ - -#include -#include -#include -#include - -#include "NwTypes.h" -#include "NwUtils.h" -#include "NwError.h" -#include "NwGtpv2cPrivate.h" -#include "NwGtpv2c.h" -#include "NwGtpv2cIe.h" -#include "NwGtpv2cTrxn.h" -#include "NwGtpv2cLog.h" - -#ifdef _NWGTPV2C_HAVE_TIMERADD -#define NW_GTPV2C_TIMER_ADD(tvp, uvp, vvp) timeradd((tvp), (uvp), (vvp)) -#define NW_GTPV2C_TIMER_SUB(tvp, uvp, vvp) timersub((tvp), (uvp), (vvp)) -#define NW_GTPV2C_TIMER_CMP_P(a, b, CMP) timercmp(a, b, CMP) -#else - -#define NW_GTPV2C_TIMER_ADD(tvp, uvp, vvp) \ - do { \ - (vvp)->tv_sec = (tvp)->tv_sec + (uvp)->tv_sec; \ - (vvp)->tv_usec = (tvp)->tv_usec + (uvp)->tv_usec; \ - if ((vvp)->tv_usec >= 1000000) { \ - (vvp)->tv_sec++; \ - (vvp)->tv_usec -= 1000000; \ - } \ - } while (0) - -#define NW_GTPV2C_TIMER_SUB(tvp, uvp, vvp) \ - do { \ - (vvp)->tv_sec = (tvp)->tv_sec - (uvp)->tv_sec; \ - (vvp)->tv_usec = (tvp)->tv_usec - (uvp)->tv_usec; \ - if ((vvp)->tv_usec < 0) { \ - (vvp)->tv_sec--; \ - (vvp)->tv_usec += 1000000; \ - } \ - } while (0) - -#define NW_GTPV2C_TIMER_CMP_P(a, b, CMP) \ - (((a)->tv_sec == (b)->tv_sec) ? \ - ((a)->tv_usec CMP (b)->tv_usec) : \ - ((a)->tv_sec CMP (b)->tv_sec)) - -#endif - - -#define NW_GTPV2C_INIT_MSG_IE_PARSE_INFO(__thiz, __msgType) \ - do { \ - __thiz->pGtpv2cMsgIeParseInfo[__msgType] = \ - nwGtpv2cMsgIeParseInfoNew((NwGtpv2cStackHandleT)__thiz, __msgType);\ - } while(0) - -#define NW_GTPV2C_UDP_PORT (2123) - -#ifdef __cplusplus -extern "C" { -#endif - -static NwGtpv2cTimeoutInfoT* gpGtpv2cTimeoutInfoPool = NULL; - -typedef struct { - int currSize; - int maxSize; - NwGtpv2cTimeoutInfoT** pHeap; -} NwGtpv2cTmrMinHeapT; - -#define NW_HEAP_PARENT_INDEX(__child) ( ( (__child) - 1 ) / 2 ) - - -NwGtpv2cTmrMinHeapT* -nwGtpv2cTmrMinHeapNew(int maxSize) -{ - NwGtpv2cTmrMinHeapT* thiz = (NwGtpv2cTmrMinHeapT*) malloc (sizeof(NwGtpv2cTmrMinHeapT)); - - if(thiz) { - thiz->currSize = 0; - thiz->maxSize = maxSize; - thiz->pHeap = (NwGtpv2cTimeoutInfoT**) malloc (maxSize * sizeof(NwGtpv2cTimeoutInfoT*)); - } - - return thiz; -} - -void -nwGtpv2cTmrMinHeapDelete(NwGtpv2cTmrMinHeapT* thiz) -{ - free(thiz->pHeap); - free(thiz); -} - -static NwRcT -nwGtpv2cTmrMinHeapInsert(NwGtpv2cTmrMinHeapT* thiz, NwGtpv2cTimeoutInfoT* pTimerEvent) -{ - int holeIndex = thiz->currSize++; - - NW_ASSERT(thiz->currSize < thiz->maxSize); - - while((holeIndex > 0) && - NW_GTPV2C_TIMER_CMP_P(&(thiz->pHeap[NW_HEAP_PARENT_INDEX(holeIndex)])->tvTimeout, &(pTimerEvent->tvTimeout), >)) { - thiz->pHeap[holeIndex] = thiz->pHeap[NW_HEAP_PARENT_INDEX(holeIndex)]; - thiz->pHeap[holeIndex]->timerMinHeapIndex = holeIndex; - holeIndex = NW_HEAP_PARENT_INDEX(holeIndex); - } - - thiz->pHeap[holeIndex] = pTimerEvent; - pTimerEvent->timerMinHeapIndex = holeIndex; - - return holeIndex; -} - -#define NW_MIN_HEAP_INDEX_INVALID (0xFFFFFFFF) -static NwRcT -nwGtpv2cTmrMinHeapRemove(NwGtpv2cTmrMinHeapT* thiz, int minHeapIndex) -{ - NwGtpv2cTimeoutInfoT* pTimerEvent; - int holeIndex = minHeapIndex; - int minChild, maxChild; - - //printf("- Trying Removing %p from index %u, currSize %u, minChild %u, maxChild %u\n", thiz->pHeap[minHeapIndex], minHeapIndex, thiz->currSize, minChild, maxChild); - if(minHeapIndex == NW_MIN_HEAP_INDEX_INVALID) return NW_FAILURE; - - if(minHeapIndex < thiz->currSize) { - thiz->pHeap[minHeapIndex]->timerMinHeapIndex = NW_MIN_HEAP_INDEX_INVALID; - thiz->currSize--; - - pTimerEvent = thiz->pHeap[thiz->currSize]; - holeIndex = minHeapIndex; - minChild = ( 2 * holeIndex ) + 1; - maxChild = minChild + 1; - - //printf("- Removing %p from index %u, currSize %u, minChild %u, maxChild %u\n", thiz->pHeap[minHeapIndex], minHeapIndex, thiz->currSize, minChild, maxChild); - - while( (maxChild) <= thiz->currSize ) { - if(NW_GTPV2C_TIMER_CMP_P(&(thiz->pHeap[minChild]->tvTimeout), &(thiz->pHeap[maxChild]->tvTimeout), >)) - minChild = maxChild; - - if(NW_GTPV2C_TIMER_CMP_P(&(pTimerEvent->tvTimeout), &(thiz->pHeap[minChild]->tvTimeout), <)) { - break; - } - - thiz->pHeap[holeIndex] = thiz->pHeap[minChild]; - thiz->pHeap[holeIndex]->timerMinHeapIndex = holeIndex; - holeIndex = minChild; - minChild = ( 2 * holeIndex ) + 1; - maxChild = minChild + 1; - } - - while((holeIndex > 0) && - NW_GTPV2C_TIMER_CMP_P(&((thiz->pHeap[NW_HEAP_PARENT_INDEX(holeIndex)])->tvTimeout), &(pTimerEvent->tvTimeout), >)) { - thiz->pHeap[holeIndex] = thiz->pHeap[NW_HEAP_PARENT_INDEX(holeIndex)]; - thiz->pHeap[holeIndex]->timerMinHeapIndex = holeIndex; - holeIndex = NW_HEAP_PARENT_INDEX(holeIndex); - } - - if(holeIndex < thiz->currSize) { - thiz->pHeap[holeIndex] = pTimerEvent; - pTimerEvent->timerMinHeapIndex = holeIndex; - } - - thiz->pHeap[thiz->currSize] = NULL; - return NW_OK; - } - - return NW_FAILURE; -} - -static NwGtpv2cTimeoutInfoT* -nwGtpv2cTmrMinHeapPeek(NwGtpv2cTmrMinHeapT* thiz) -{ - if(thiz->currSize) { - //printf("- Peek Returning %p at index %u(%u)\n", thiz->pHeap[0], thiz->pHeap[0]->timerMinHeapIndex, thiz->currSize); - return thiz->pHeap[0]; - } - - return NULL; -} -/*--------------------------------------------------------------------------* - * P R I V A T E F U N C T I O N S * - *--------------------------------------------------------------------------*/ - -static void -nwGtpv2cDisplayBanner( NwGtpv2cStackT* thiz) -{ -#ifdef NW_GTPV2C_DISPLAY_LICENCE_INFO - printf(" *----------------------------------------------------------------------------*\n"); - printf(" * *\n"); - printf(" * n w - g t p v 2 c *\n"); - printf(" * G P R S T u n n e l i n g P r o t o c o l v 2 c S t a c k *\n"); - printf(" * *\n"); - printf(" * *\n"); - printf(" * Copyright (c) 2010-2011 Amit Chawre *\n"); - printf(" * All rights reserved. *\n"); - printf(" * *\n"); - printf(" * Redistribution and use in source and binary forms, with or without *\n"); - printf(" * modification, are permitted provided that the following conditions *\n"); - printf(" * are met: *\n"); - printf(" * *\n"); - printf(" * 1. Redistributions of source code must retain the above copyright *\n"); - printf(" * notice, this list of conditions and the following disclaimer. *\n"); - printf(" * 2. Redistributions in binary form must reproduce the above copyright *\n"); - printf(" * notice, this list of conditions and the following disclaimer in the *\n"); - printf(" * documentation and/or other materials provided with the distribution. *\n"); - printf(" * 3. The name of the author may not be used to endorse or promote products *\n"); - printf(" * derived from this software without specific prior written permission. *\n"); - printf(" * *\n"); - printf(" * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR *\n"); - printf(" * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES *\n"); - printf(" * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. *\n"); - printf(" * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, *\n"); - printf(" * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT *\n"); - printf(" * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, *\n"); - printf(" * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY *\n"); - printf(" * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT *\n"); - printf(" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF *\n"); - printf(" * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *\n"); - printf(" *----------------------------------------------------------------------------*\n\n"); -#endif -} - -/*--------------------------------------------------------------------------- - * Tunnel RBTree Search Data Structure - *--------------------------------------------------------------------------*/ - -/** - Comparator funtion for comparing two sequence number transactions. - - @param[in] a: Pointer to session a. - @param[in] b: Pointer to session b. - @return An integer greater than, equal to or less than zero according to whether the - object pointed to by a is greater than, equal to or less than the object pointed to by b. - */ - -static inline NwS32T -nwGtpv2cCompareTunnel(struct NwGtpv2cTunnel * a, struct NwGtpv2cTunnel* b) -{ - if(a->teid > b->teid) - return 1; - - if(a->teid < b->teid) - return -1; - - if(a->ipv4AddrRemote > b->ipv4AddrRemote) - return 1; - - if(a->ipv4AddrRemote < b->ipv4AddrRemote) - return -1; - - return 0; -} - -RB_GENERATE(NwGtpv2cTunnelMap, NwGtpv2cTunnel, tunnelMapRbtNode, nwGtpv2cCompareTunnel) - -/*--------------------------------------------------------------------------- - * Transaction RBTree Search Data Structure - *--------------------------------------------------------------------------*/ - -/** - Comparator funtion for comparing two outstancing TX transactions. - - @param[in] a: Pointer to session a. - @param[in] b: Pointer to session b. - @return An integer greater than, equal to or less than zero according to whether the - object pointed to by a is greater than, equal to or less than the object pointed to by b. - */ - -static inline NwS32T -nwGtpv2cCompareOutstandingTxSeqNumTrxn(struct NwGtpv2cTrxn* a, struct NwGtpv2cTrxn* b) -{ - if(a->seqNum > b->seqNum) - return 1; - - if(a->seqNum < b->seqNum) - return -1; - - if(a->peerIp > b->peerIp) - return 1; - - if(a->peerIp < b->peerIp) - return -1; - - return 0; -} - -RB_GENERATE(NwGtpv2cOutstandingTxSeqNumTrxnMap, NwGtpv2cTrxn, outstandingTxSeqNumMapRbtNode, nwGtpv2cCompareOutstandingTxSeqNumTrxn) - -/** - Comparator funtion for comparing outstanding RX transactions. - - @param[in] a: Pointer to session a. - @param[in] b: Pointer to session b. - @return An integer greater than, equal to or less than zero according to whether the - object pointed to by a is greater than, equal to or less than the object pointed to by b. - */ - -static inline NwS32T -nwGtpv2cCompareOutstandingRxSeqNumTrxn(struct NwGtpv2cTrxn* a, struct NwGtpv2cTrxn* b) -{ - if(a->seqNum > b->seqNum) - return 1; - - if(a->seqNum < b->seqNum) - return -1; - - if(a->peerIp > b->peerIp) - return 1; - - if(a->peerIp < b->peerIp) - return -1; - - if(a->peerPort > b->peerPort) - return 1; - - if(a->peerPort < b->peerPort) - return -1; - - return 0; -} - -RB_GENERATE(NwGtpv2cOutstandingRxSeqNumTrxnMap, NwGtpv2cTrxn, outstandingRxSeqNumMapRbtNode, nwGtpv2cCompareOutstandingRxSeqNumTrxn) - -/*--------------------------------------------------------------------------- - * Timer RB-tree data structure. - *--------------------------------------------------------------------------*/ - -/** - Comparator funtion for comparing two outstancing TX transactions. - - @param[in] a: Pointer to session a. - @param[in] b: Pointer to session b. - @return An integer greater than, equal to or less than zero according to whether the - object pointed to by a is greater than, equal to or less than the object pointed to by b. - */ - -static inline NwS32T -nwGtpv2cCompareOutstandingTxRexmitTime(struct NwGtpv2cTimeoutInfo* a, struct NwGtpv2cTimeoutInfo* b) -{ - if(NW_GTPV2C_TIMER_CMP_P(&a->tvTimeout, &b->tvTimeout, >)) - return 1; - - if(NW_GTPV2C_TIMER_CMP_P(&a->tvTimeout, &b->tvTimeout, <)) - return -1; - - return 0; -} - -RB_GENERATE(NwGtpv2cActiveTimerList, NwGtpv2cTimeoutInfo, activeTimerListRbtNode, nwGtpv2cCompareOutstandingTxRexmitTime) - - - -/** - * Send msg to peer via data request to UDP Entity - * - * @param[in] thiz : Pointer to stack. - * @param[in] peerIp : Peer Ip address. - * @param[in] peerPort : Peer Ip port. - * @param[in] pMsg : Message to be sent. - * @return NW_OK on success. - */ -static NwRcT -nwGtpv2cCreateAndSendMsg(NW_IN NwGtpv2cStackT* thiz, - NW_IN uint32_t seqNum, - NW_IN uint32_t peerIp, - NW_IN uint32_t peerPort, - NW_IN NwGtpv2cMsgT *pMsg) -{ - NwRcT rc; - uint8_t* msgHdr; - - NW_ASSERT(thiz); - NW_ASSERT(pMsg); - - msgHdr = pMsg->msgBuf; - - /* Set flags in header */ - *(msgHdr++) = (pMsg->version << 5) | (pMsg->teidPresent << 3); - - /* Set msg type in header */ - *(msgHdr++) = (pMsg->msgType); - - /* Set msg length in header*/ - *((uint16_t*) msgHdr) = htons(pMsg->msgLen - 4 ); - msgHdr += 2; - - /* Set TEID, if present in header */ - if(pMsg->teidPresent) { - *((uint32_t*) msgHdr) = htonl(pMsg->teid); - msgHdr += 4; - } - - /* Set seq num in header */ - *((uint32_t*) msgHdr) = htonl(seqNum << 8); - - /* Call UDP data request callback */ - NW_ASSERT(thiz->udp.udpDataReqCallback != NULL); - rc = thiz->udp.udpDataReqCallback(thiz->udp.hUdp, - pMsg->msgBuf, - pMsg->msgLen, - peerIp, - peerPort); - NW_ASSERT(NW_OK == rc); - - return rc; -} - -/** - Send an Version Not Supported message - - @param[in] thiz : Stack pointer - @return NW_OK on success. - */ - -static NwRcT -nwGtpv2cSendVersionNotSupportedInd( NW_IN NwGtpv2cStackT* thiz, - NW_IN uint32_t peerIp, - NW_IN uint32_t peerPort, - NW_IN uint32_t seqNum) -{ - NwRcT rc; - NwGtpv2cMsgHandleT hMsg = 0; - - rc = nwGtpv2cMsgNew( (NwGtpv2cStackHandleT)thiz, - NW_FALSE, - NW_GTP_VERSION_NOT_SUPPORTED_IND, - 0x00, - seqNum, - (&hMsg)); - - NW_ASSERT(NW_OK == rc); - - NW_LOG(thiz, NW_LOG_LEVEL_NOTI, "Sending Version Not Supported Indication message to %x:%x with seq %u", peerIp, peerPort, seqNum); - - rc = nwGtpv2cCreateAndSendMsg(thiz, - seqNum, - peerIp, - peerPort, - (NwGtpv2cMsgT*) hMsg); - - rc = nwGtpv2cMsgDelete((NwGtpv2cStackHandleT)thiz, hMsg); - NW_ASSERT(NW_OK == rc); - - return rc; -} - -/** - Create a local tunnel. - - @param[in] thiz : Stack pointer - @return NW_OK on success. - */ - -static NwRcT -nwGtpv2cCreateLocalTunnel( NW_IN NwGtpv2cStackT* thiz, - NW_IN uint32_t teid, - NW_IN uint32_t ipv4Remote, - NW_IN NwGtpv2cUlpTunnelHandleT hUlpTunnel, - NW_OUT NwGtpv2cTunnelHandleT *phTunnel) -{ - NwRcT rc; - NwGtpv2cTunnelT *pTunnel, *pCollision; - - NW_ENTER(thiz); - - NW_LOG(thiz, NW_LOG_LEVEL_DEBG, "Creating local tunnel with teid '0x%x' and peer IP 0x%x", teid, ipv4Remote); - - pTunnel = nwGtpv2cTunnelNew(thiz, teid, ipv4Remote, hUlpTunnel); - - if(pTunnel) { - pCollision = RB_INSERT(NwGtpv2cTunnelMap, &(thiz->tunnelMap), pTunnel); - - if(pCollision) { - rc = nwGtpv2cTunnelDelete(thiz, pTunnel); - NW_ASSERT(NW_OK == rc); - - *phTunnel = (NwGtpv2cTunnelHandleT) 0; - NW_LOG(thiz, NW_LOG_LEVEL_WARN, "Local tunnel creation failed for teid '0x%x' and peer IP "NW_IPV4_ADDR". Tunnel already exists!", teid, NW_IPV4_ADDR_FORMAT(ipv4Remote)); - - NW_ASSERT(0); - NW_LEAVE(thiz); - return NW_OK; - } - } else { - rc = NW_FAILURE; - } - - *phTunnel = (NwGtpv2cTunnelHandleT) pTunnel; - NW_LEAVE(thiz); - return NW_OK; -} - -/** - Delete a local tunnel. - - @param[in] thiz : Stack pointer - @return NW_OK on success. - */ - -static NwRcT -nwGtpv2cDeleteLocalTunnel( NW_IN NwGtpv2cStackT* thiz, - NW_OUT NwGtpv2cTunnelHandleT hTunnel) -{ - NwRcT rc; - NwGtpv2cTunnelT *pTunnel = (NwGtpv2cTunnelT*) hTunnel ; - - NW_ENTER(thiz); - - pTunnel = RB_REMOVE(NwGtpv2cTunnelMap, &(thiz->tunnelMap), (NwGtpv2cTunnelT*)hTunnel); - NW_ASSERT(pTunnel == (NwGtpv2cTunnelT*)hTunnel); - - NW_LOG(thiz, NW_LOG_LEVEL_DEBG, "Deleting local tunnel with teid '0x%x' and peer IP 0x%x", pTunnel->teid, pTunnel->ipv4AddrRemote); - - rc = nwGtpv2cTunnelDelete(thiz, pTunnel); - NW_ASSERT(NW_OK == rc); - - NW_LEAVE(thiz); - return NW_OK; -} - -/*--------------------------------------------------------------------------- - * ULP API Processing Functions - *--------------------------------------------------------------------------*/ - -/** - Process NW_GTPV2C_ULP_API_INITIAL_REQ Request from ULP entity. - - @param[in] hGtpcStackHandle : Stack handle - @param[in] pUlpReq : Pointer to Ulp Req. - @return NW_OK on success. - */ - -static NwRcT -nwGtpv2cHandleUlpInitialReq( NW_IN NwGtpv2cStackT* thiz, NW_IN NwGtpv2cUlpApiT *pUlpReq) -{ - NwRcT rc; - NwGtpv2cTrxnT *pTrxn; - - NW_ENTER(thiz); - - /* Create New Transaction */ - pTrxn = nwGtpv2cTrxnNew(thiz); - - if(pTrxn) { - if(!pUlpReq->apiInfo.initialReqInfo.hTunnel) { - rc = nwGtpv2cCreateLocalTunnel(thiz, - pUlpReq->apiInfo.initialReqInfo.teidLocal, - pUlpReq->apiInfo.initialReqInfo.peerIp, - pUlpReq->apiInfo.initialReqInfo.hUlpTunnel, - &pUlpReq->apiInfo.initialReqInfo.hTunnel); - NW_ASSERT(NW_OK == rc); - } - - pTrxn->pMsg = (NwGtpv2cMsgT*) pUlpReq->hMsg; - pTrxn->hTunnel = pUlpReq->apiInfo.initialReqInfo.hTunnel; - pTrxn->hUlpTrxn = pUlpReq->apiInfo.initialReqInfo.hUlpTrxn; - pTrxn->peerIp = ((NwGtpv2cTunnelT*)(pTrxn->hTunnel))->ipv4AddrRemote; - pTrxn->peerPort = NW_GTPV2C_UDP_PORT; - - if(pUlpReq->apiType & NW_GTPV2C_ULP_API_FLAG_IS_COMMAND_MESSAGE) { - pTrxn->seqNum |= 0x00100000UL; - } - - rc = nwGtpv2cCreateAndSendMsg(thiz, - pTrxn->seqNum, - pTrxn->peerIp, - pTrxn->peerPort, - pTrxn->pMsg); - - if(NW_OK == rc) { - /* Start guard timer */ - rc = nwGtpv2cTrxnStartPeerRspWaitTimer(pTrxn); - NW_ASSERT(NW_OK == rc); - - /* Insert into search tree */ - pTrxn = RB_INSERT(NwGtpv2cOutstandingTxSeqNumTrxnMap, &(thiz->outstandingTxSeqNumMap), pTrxn); - NW_ASSERT(pTrxn == NULL); - } else { - rc = nwGtpv2cTrxnDelete(&pTrxn); - NW_ASSERT(NW_OK == rc); - } - } else { - rc = NW_FAILURE; - } - - NW_LEAVE(thiz); - - return rc; -} - -/** - Process NW_GTPV2C_ULP_API_TRIGGERED_REQ Request from ULP entity. - - @param[in] hGtpcStackHandle : Stack handle - @param[in] pUlpReq : Pointer to Ulp Req. - @return NW_OK on success. - */ - -static NwRcT -nwGtpv2cHandleUlpTriggeredReq( NW_IN NwGtpv2cStackT* thiz, NW_IN NwGtpv2cUlpApiT *pUlpReq) -{ - NwRcT rc; - NwGtpv2cTrxnT *pTrxn; - NwGtpv2cTrxnT *pReqTrxn; - - NW_ENTER(thiz); - - /* Create New Transaction */ - pTrxn = nwGtpv2cTrxnWithSeqNumNew(thiz, (((NwGtpv2cMsgT*)(pUlpReq->hMsg))->seqNum)); - - if(pTrxn) { - pReqTrxn = (NwGtpv2cTrxnT*) pUlpReq->apiInfo.triggeredReqInfo.hTrxn; - - pTrxn->hUlpTrxn = pUlpReq->apiInfo.triggeredReqInfo.hUlpTrxn; - pTrxn->peerIp = pReqTrxn->peerIp; - pTrxn->peerPort = pReqTrxn->peerPort; - pTrxn->pMsg = (NwGtpv2cMsgT*) pUlpReq->hMsg; - - rc = nwGtpv2cCreateAndSendMsg(thiz, - pTrxn->seqNum, - pTrxn->peerIp, - pTrxn->peerPort, - pTrxn->pMsg); - - if(NW_OK == rc) { - /* Start guard timer */ - rc = nwGtpv2cTrxnStartPeerRspWaitTimer(pTrxn); - NW_ASSERT(NW_OK == rc); - - /* Insert into search tree */ - RB_INSERT(NwGtpv2cOutstandingTxSeqNumTrxnMap, &(thiz->outstandingTxSeqNumMap), pTrxn); - - if(!pUlpReq->apiInfo.triggeredReqInfo.hTunnel) { - rc = nwGtpv2cCreateLocalTunnel(thiz, - pUlpReq->apiInfo.triggeredReqInfo.teidLocal, - pReqTrxn->peerIp, - pUlpReq->apiInfo.triggeredReqInfo.hUlpTunnel, - &pUlpReq->apiInfo.triggeredReqInfo.hTunnel); - } - } else { - rc = nwGtpv2cTrxnDelete(&pTrxn); - NW_ASSERT(NW_OK == rc); - } - } else { - rc = NW_FAILURE; - } - - NW_LEAVE(thiz); - - return rc; -} - -/** - Process NW_GTPV2C_ULP_API_TRIGGERED_RSP Request from ULP entity. - - @param[in] hGtpcStackHandle : Stack handle - @param[in] pUlpReq : Pointer to Ulp Req. - @return NW_OK on success. - */ - -static NwRcT -nwGtpv2cHandleUlpTriggeredRsp( NW_IN NwGtpv2cStackT* thiz, NW_IN NwGtpv2cUlpApiT *pUlpRsp) -{ - NwRcT rc; - NwGtpv2cTrxnT *pReqTrxn; - - NW_ENTER(thiz); - - pReqTrxn = (NwGtpv2cTrxnT*) pUlpRsp->apiInfo.triggeredRspInfo.hTrxn; - NW_ASSERT(pReqTrxn != NULL); - - if(((NwGtpv2cMsgT*) pUlpRsp->hMsg)->seqNum == 0) - ((NwGtpv2cMsgT*) pUlpRsp->hMsg)->seqNum = pReqTrxn->seqNum; - - NW_LOG(thiz, NW_LOG_LEVEL_DEBG, "Sending response message over seq '0x%x'", pReqTrxn->seqNum); - - rc = nwGtpv2cCreateAndSendMsg(thiz, - pReqTrxn->seqNum, - pReqTrxn->peerIp, - pReqTrxn->peerPort, - (NwGtpv2cMsgT*) pUlpRsp->hMsg); - - pReqTrxn->pMsg = (NwGtpv2cMsgT*) pUlpRsp->hMsg; - - rc = nwGtpv2cTrxnStartDulpicateRequestWaitTimer(pReqTrxn); - - if((pUlpRsp->apiType & 0xFF000000) == NW_GTPV2C_ULP_API_FLAG_CREATE_LOCAL_TUNNEL) { - rc = nwGtpv2cCreateLocalTunnel(thiz, - pUlpRsp->apiInfo.triggeredRspInfo.teidLocal, - pReqTrxn->peerIp, - pUlpRsp->apiInfo.triggeredRspInfo.hUlpTunnel, - &pUlpRsp->apiInfo.triggeredRspInfo.hTunnel); - } - - return rc; -} - -/** - Process NW_GTPV2C_ULP_CREATE_LOCAL_TUNNEL Request from ULP entity. - - @param[in] hGtpcStackHandle : Stack handle - @param[in] pUlpReq : Pointer to Ulp Req. - @return NW_OK on success. - */ - -static NwRcT -nwGtpv2cHandleUlpCreateLocalTunnel( NW_IN NwGtpv2cStackT* thiz, NW_IN NwGtpv2cUlpApiT *pUlpReq) -{ - NwRcT rc; - NwGtpv2cTunnelT *pTunnel, *pCollision; - - NW_ENTER(thiz); - - NW_LOG(thiz, NW_LOG_LEVEL_DEBG, "Creating local tunnel with teid '0x%x' and peer IP 0x%x", pUlpReq->apiInfo.createLocalTunnelInfo.teidLocal, pUlpReq->apiInfo.createLocalTunnelInfo.peerIp); - - pTunnel = nwGtpv2cTunnelNew(thiz, pUlpReq->apiInfo.createLocalTunnelInfo.teidLocal, - pUlpReq->apiInfo.createLocalTunnelInfo.peerIp, - pUlpReq->apiInfo.triggeredRspInfo.hUlpTunnel); - NW_ASSERT(pTunnel); - - pCollision = RB_INSERT(NwGtpv2cTunnelMap, &(thiz->tunnelMap), pTunnel); - - if(pCollision) { - rc = nwGtpv2cTunnelDelete(thiz, pTunnel); - NW_ASSERT(NW_OK == rc); - - pUlpReq->apiInfo.createLocalTunnelInfo.hTunnel = (NwGtpv2cTunnelHandleT) 0; - NW_LEAVE(thiz); - return NW_FAILURE; - } - - pUlpReq->apiInfo.createLocalTunnelInfo.hTunnel = (NwGtpv2cTunnelHandleT) pTunnel; - NW_LEAVE(thiz); - return NW_OK; -} - -/** - Process NW_GTPV2C_ULP_DELETE_LOCAL_TUNNEL Request from ULP entity. - - @param[in] hGtpcStackHandle : Stack handle - @param[in] pUlpReq : Pointer to Ulp Req. - @return NW_OK on success. - */ - -static NwRcT -nwGtpv2cHandleUlpDeleteLocalTunnel( NW_IN NwGtpv2cStackT* thiz, NW_IN NwGtpv2cUlpApiT *pUlpReq) -{ - NwRcT rc; - - NW_ENTER(thiz); - - rc = nwGtpv2cDeleteLocalTunnel(thiz, pUlpReq->apiInfo.deleteLocalTunnelInfo.hTunnel); - - NW_LEAVE(thiz); - return rc; -} - -/** - Send GTPv2c Initial Request Message Indication to ULP entity. - - @param[in] hGtpcStackHandle : Stack handle - @return NW_OK on success. - */ - -static NwRcT -nwGtpv2cSendInitialReqIndToUlp( NW_IN NwGtpv2cStackT *thiz, - NW_IN NwGtpv2cErrorT *pError, - NW_IN NwGtpv2cTrxnT *pTrxn, - NW_IN uint32_t hUlpTunnel, - NW_IN uint32_t msgType, - NW_IN uint32_t peerIp, - NW_IN uint16_t peerPort, - NW_IN NwGtpv2cMsgHandleT hMsg) -{ - NwRcT rc; - NwGtpv2cUlpApiT ulpApi; - - NW_ENTER(thiz); - - ulpApi.hMsg = hMsg; - ulpApi.apiType = NW_GTPV2C_ULP_API_INITIAL_REQ_IND; - ulpApi.apiInfo.initialReqIndInfo.msgType = msgType; - ulpApi.apiInfo.initialReqIndInfo.hTrxn = (NwGtpv2cTrxnHandleT) pTrxn; - ulpApi.apiInfo.initialReqIndInfo.hUlpTunnel = hUlpTunnel; - ulpApi.apiInfo.initialReqIndInfo.peerIp = peerIp; - ulpApi.apiInfo.initialReqIndInfo.peerPort = peerPort; - - ulpApi.apiInfo.triggeredRspIndInfo.error = *pError; - - rc = thiz->ulp.ulpReqCallback(thiz->ulp.hUlp, &ulpApi); - - NW_LEAVE(thiz); - - return rc; -} - -/** - Send GTPv2c Triggered Response Indication to ULP entity. - - @param[in] hGtpcStackHandle : Stack handle - @return NW_OK on success. - */ - -static NwRcT -nwGtpv2cSendTriggeredRspIndToUlp( NW_IN NwGtpv2cStackT* thiz, - NW_IN NwGtpv2cErrorT *pError, - NW_IN uint32_t hUlpTrxn, - NW_IN uint32_t hUlpTunnel, - NW_IN uint32_t msgType, - NW_IN NwGtpv2cMsgHandleT hMsg) -{ - NwRcT rc; - NwGtpv2cUlpApiT ulpApi; - - NW_ENTER(thiz); - - ulpApi.hMsg = hMsg; - ulpApi.apiType = NW_GTPV2C_ULP_API_TRIGGERED_RSP_IND; - ulpApi.apiInfo.triggeredRspIndInfo.msgType = msgType; - ulpApi.apiInfo.triggeredRspIndInfo.hUlpTrxn = hUlpTrxn; - ulpApi.apiInfo.triggeredRspIndInfo.hUlpTunnel = hUlpTunnel; - - ulpApi.apiInfo.triggeredRspIndInfo.error = *pError; - - rc = thiz->ulp.ulpReqCallback(thiz->ulp.hUlp, &ulpApi); - - NW_LEAVE(thiz); - - return rc; -} - -/** - Handle Echo Request from Peer Entity. - - @param[in] thiz : Stack context - @return NW_OK on success. - */ - -static NwRcT -nwGtpv2cHandleEchoReq(NW_IN NwGtpv2cStackT *thiz, - NW_IN uint32_t msgType, - NW_IN uint8_t* msgBuf, - NW_IN uint32_t msgBufLen, - NW_IN uint16_t peerPort, - NW_IN uint32_t peerIp) -{ - NwRcT rc; - uint32_t seqNum = 0; - NwGtpv2cMsgHandleT hMsg = 0; - - seqNum = ntohl(*((uint32_t*)(msgBuf + (((*msgBuf) & 0x08) ? 8 : 4)))) >> 8; - - /* Send Echo Response */ - - rc = nwGtpv2cMsgNew( (NwGtpv2cStackHandleT)thiz, - NW_FALSE, /* TEID present flag */ - NW_GTP_ECHO_RSP, /* Msg Type */ - 0x00, /* TEID */ - seqNum, /* Seq Number */ - (&hMsg)); - - NW_ASSERT(NW_OK == rc); - - rc = nwGtpv2cMsgAddIeTV1(hMsg, NW_GTPV2C_IE_RECOVERY, 0, thiz->restartCounter); - - NW_LOG(thiz, NW_LOG_LEVEL_ERRO, "Sending NW_GTP_ECHO_RSP message to "NW_IPV4_ADDR":%u with seq %u", NW_IPV4_ADDR_FORMAT(peerIp), peerPort, (seqNum)); - - rc = nwGtpv2cCreateAndSendMsg(thiz, - (seqNum), - peerIp, - peerPort, - (NwGtpv2cMsgT*) hMsg); - - rc = nwGtpv2cMsgDelete((NwGtpv2cStackHandleT)thiz, hMsg); - NW_ASSERT(NW_OK == rc); - - return rc; -} - -/** - Handle Initial Request from Peer Entity. - - @param[in] thiz : Stack context - @return NW_OK on success. - */ - -static NwRcT -nwGtpv2cHandleInitialReq(NW_IN NwGtpv2cStackT *thiz, - NW_IN uint32_t msgType, - NW_IN uint8_t* msgBuf, - NW_IN uint32_t msgBufLen, - NW_IN uint16_t peerPort, - NW_IN uint32_t peerIp) -{ - NwRcT rc; - uint32_t seqNum = 0; - uint32_t teidLocal = 0; - NwGtpv2cTrxnT *pTrxn; - NwGtpv2cTunnelT *pLocalTunnel, keyTunnel; - NwGtpv2cMsgHandleT hMsg = 0; - NwGtpv2cUlpTunnelHandleT hUlpTunnel; - NwGtpv2cErrorT error; - - teidLocal = *((uint32_t*)(msgBuf + 4)); - - if(teidLocal) { - keyTunnel.teid = ntohl(teidLocal); - keyTunnel.ipv4AddrRemote = peerIp; - pLocalTunnel = RB_FIND(NwGtpv2cTunnelMap, &(thiz->tunnelMap), &keyTunnel); - - if(!pLocalTunnel) { - NW_LOG(thiz, NW_LOG_LEVEL_WARN, "Request message received on non-existent teid 0x%x from peer 0x%x received! Discarding.", ntohl(teidLocal), htonl(peerIp)); - return NW_OK; - } - - hUlpTunnel = pLocalTunnel->hUlpTunnel; - } else { - hUlpTunnel = 0; - } - - seqNum = ntohl(*((uint32_t*)(msgBuf + (((*msgBuf) & 0x08) ? 8 : 4)))) >> 8; - pTrxn = nwGtpv2cTrxnOutstandingRxNew(thiz, ntohl(teidLocal), peerIp, peerPort, (seqNum)); - - if(pTrxn) { - - rc = nwGtpv2cMsgFromBufferNew((NwGtpv2cStackHandleT)thiz, msgBuf, msgBufLen, &(hMsg)); - - NW_ASSERT(thiz->pGtpv2cMsgIeParseInfo[msgType]); - - rc = nwGtpv2cMsgIeParse(thiz->pGtpv2cMsgIeParseInfo[msgType], hMsg, &error); - - if(rc != NW_OK) { - NW_LOG(thiz, NW_LOG_LEVEL_WARN, "Malformed request message received on TEID %u from peer 0x%x. Notifying ULP.", ntohl(teidLocal), htonl(peerIp)); - } - - rc = nwGtpv2cSendInitialReqIndToUlp( thiz, - &error, - pTrxn, - hUlpTunnel, - msgType, - peerIp, - peerPort, - hMsg); - } - - return NW_OK; -} - -/** - Handle Triggered Response from Peer Entity. - - @param[in] thiz : Stack context - @return NW_OK on success. - */ - -static NwRcT -nwGtpv2cHandleTriggeredRsp(NW_IN NwGtpv2cStackT *thiz, - NW_IN uint32_t msgType, - NW_IN uint8_t* msgBuf, - NW_IN uint32_t msgBufLen, - NW_IN uint16_t peerPort, - NW_IN uint32_t peerIp) -{ - NwRcT rc; - NwGtpv2cTrxnT *pTrxn, keyTrxn; - NwGtpv2cMsgHandleT hMsg = 0; - NwGtpv2cErrorT error; - - keyTrxn.seqNum = ntohl(*((uint32_t*)(msgBuf + (((*msgBuf) & 0x08) ? 8 : 4)))) >> 8;; - keyTrxn.peerIp = peerIp; - - pTrxn = RB_FIND(NwGtpv2cOutstandingTxSeqNumTrxnMap, &(thiz->outstandingTxSeqNumMap), &keyTrxn); - - if(pTrxn) { - uint32_t hUlpTrxn; - uint32_t hUlpTunnel; - - hUlpTrxn = pTrxn->hUlpTrxn; - hUlpTunnel = (pTrxn->hTunnel ? ((NwGtpv2cTunnelT*)(pTrxn->hTunnel))->hUlpTunnel : 0); - - RB_REMOVE(NwGtpv2cOutstandingTxSeqNumTrxnMap, &(thiz->outstandingTxSeqNumMap), pTrxn); - rc = nwGtpv2cTrxnDelete(&pTrxn); - NW_ASSERT(NW_OK == rc); - - NW_ASSERT(msgBuf && msgBufLen); - rc = nwGtpv2cMsgFromBufferNew((NwGtpv2cStackHandleT)thiz, msgBuf, msgBufLen, &(hMsg)); - - NW_ASSERT(thiz->pGtpv2cMsgIeParseInfo[msgType]); - rc = nwGtpv2cMsgIeParse(thiz->pGtpv2cMsgIeParseInfo[msgType], hMsg, &error); - - if(rc != NW_OK) { - NW_LOG(thiz, NW_LOG_LEVEL_WARN, "Malformed message received on TEID %u from peer 0x%x. Notifying ULP.", ntohl((*((uint32_t*)(msgBuf + 4)))), htonl(peerIp)); - } - - rc = nwGtpv2cSendTriggeredRspIndToUlp( thiz, - &error, - hUlpTrxn, - hUlpTunnel, - msgType, - hMsg); - } else { - NW_LOG(thiz, NW_LOG_LEVEL_WARN, "Response message without a matching outstanding request received! Discarding."); - rc = NW_OK; - } - - return rc; -} - -/*--------------------------------------------------------------------------* - * P U B L I C F U N C T I O N S * - *--------------------------------------------------------------------------*/ - -/** - * Constructor - */ - -NwRcT -nwGtpv2cInitialize( NW_INOUT NwGtpv2cStackHandleT* hGtpcStackHandle) -{ - NwRcT rc = NW_OK; - NwGtpv2cStackT* thiz; - - thiz = (NwGtpv2cStackT*) malloc( sizeof(NwGtpv2cStackT)); - - memset(thiz, 0, sizeof(NwGtpv2cStackT)); - - if(thiz) { - thiz->id = (uint32_t) thiz; - thiz->seqNum = ((uint32_t) thiz) & 0x0000FFFF; - - RB_INIT(&(thiz->tunnelMap)); - RB_INIT(&(thiz->outstandingTxSeqNumMap)); - RB_INIT(&(thiz->outstandingRxSeqNumMap)); - RB_INIT(&(thiz->activeTimerList)); - - thiz->hTmrMinHeap = (NwHandleT) nwGtpv2cTmrMinHeapNew(10000); - - NW_GTPV2C_INIT_MSG_IE_PARSE_INFO(thiz, NW_GTP_ECHO_RSP); - - /* For S11 interface */ - NW_GTPV2C_INIT_MSG_IE_PARSE_INFO(thiz, NW_GTP_CREATE_SESSION_REQ); - NW_GTPV2C_INIT_MSG_IE_PARSE_INFO(thiz, NW_GTP_CREATE_SESSION_RSP); - NW_GTPV2C_INIT_MSG_IE_PARSE_INFO(thiz, NW_GTP_DELETE_SESSION_REQ); - NW_GTPV2C_INIT_MSG_IE_PARSE_INFO(thiz, NW_GTP_DELETE_SESSION_RSP); - NW_GTPV2C_INIT_MSG_IE_PARSE_INFO(thiz, NW_GTP_MODIFY_BEARER_REQ); - NW_GTPV2C_INIT_MSG_IE_PARSE_INFO(thiz, NW_GTP_MODIFY_BEARER_RSP); - - /* For S10 interface */ - NW_GTPV2C_INIT_MSG_IE_PARSE_INFO(thiz, NW_GTP_FORWARD_RELOCATION_REQ); - NW_GTPV2C_INIT_MSG_IE_PARSE_INFO(thiz, NW_GTP_FORWARD_RELOCATION_RSP); - NW_GTPV2C_INIT_MSG_IE_PARSE_INFO(thiz, NW_GTP_FORWARD_RELOCATION_COMPLETE_NTF); - NW_GTPV2C_INIT_MSG_IE_PARSE_INFO(thiz, NW_GTP_FORWARD_RELOCATION_COMPLETE_ACK); - NW_GTPV2C_INIT_MSG_IE_PARSE_INFO(thiz, NW_GTP_CONTEXT_REQ); - NW_GTPV2C_INIT_MSG_IE_PARSE_INFO(thiz, NW_GTP_CONTEXT_REQ); - NW_GTPV2C_INIT_MSG_IE_PARSE_INFO(thiz, NW_GTP_CONTEXT_ACK); - NW_GTPV2C_INIT_MSG_IE_PARSE_INFO(thiz, NW_GTP_IDENTIFICATION_REQ); - NW_GTPV2C_INIT_MSG_IE_PARSE_INFO(thiz, NW_GTP_IDENTIFICATION_RSP); - - nwGtpv2cDisplayBanner(thiz); - } else { - rc = NW_FAILURE; - } - - *hGtpcStackHandle = (NwGtpv2cStackHandleT) thiz; - return rc; -} - - -/** - * Destructor - */ - -NwRcT -nwGtpv2cFinalize( NW_IN NwGtpv2cStackHandleT hGtpcStackHandle) -{ - if(!hGtpcStackHandle) - return NW_FAILURE; - - free((void*)hGtpcStackHandle); - return NW_OK; -} - - -/** - * Set ULP entity - */ - -NwRcT -nwGtpv2cSetUlpEntity( NW_IN NwGtpv2cStackHandleT hGtpcStackHandle, - NW_IN NwGtpv2cUlpEntityT* pUlpEntity) -{ - NwGtpv2cStackT* thiz = (NwGtpv2cStackT*) hGtpcStackHandle; - - if(!pUlpEntity) - return NW_FAILURE; - - thiz->ulp = *(pUlpEntity); - return NW_OK; -} - -/** - * Set UDP entity - */ - -NwRcT -nwGtpv2cSetUdpEntity( NW_IN NwGtpv2cStackHandleT hGtpcStackHandle, - NW_IN NwGtpv2cUdpEntityT* pUdpEntity) -{ - NwGtpv2cStackT* thiz = (NwGtpv2cStackT*) hGtpcStackHandle; - - if(!pUdpEntity) - return NW_FAILURE; - - thiz->udp = *(pUdpEntity); - return NW_OK; -} - -/** - * Set MEM MGR entity - */ - -NwRcT -nwGtpv2cSetMemMgrEntity( NW_IN NwGtpv2cStackHandleT hGtpcStackHandle, - NW_IN NwGtpv2cMemMgrEntityT* pMemMgrEntity) -{ - NwGtpv2cStackT* thiz = (NwGtpv2cStackT*) hGtpcStackHandle; - - if(!pMemMgrEntity) - return NW_FAILURE; - - thiz->memMgr = *(pMemMgrEntity); - return NW_OK; -} - -/** - * Set TMR MGR entity - */ - -NwRcT -nwGtpv2cSetTimerMgrEntity( NW_IN NwGtpv2cStackHandleT hGtpcStackHandle, - NW_IN NwGtpv2cTimerMgrEntityT* pTmrMgrEntity) -{ - NwGtpv2cStackT* thiz = (NwGtpv2cStackT*) hGtpcStackHandle; - - if(!pTmrMgrEntity) - return NW_FAILURE; - - thiz->tmrMgr = *(pTmrMgrEntity); - return NW_OK; -} - - -/** - * Set LOG MGR entity - */ - -NwRcT -nwGtpv2cSetLogMgrEntity( NW_IN NwGtpv2cStackHandleT hGtpcStackHandle, - NW_IN NwGtpv2cLogMgrEntityT* pLogMgrEntity) -{ - NwGtpv2cStackT* thiz = (NwGtpv2cStackT*) hGtpcStackHandle; - - if(!pLogMgrEntity) - return NW_FAILURE; - - thiz->logMgr = *(pLogMgrEntity); - return NW_OK; -} - -/** - Set log level for the stack. - */ - -NwRcT -nwGtpv2cSetLogLevel( NW_IN NwGtpv2cStackHandleT hGtpcStackHandle, - NW_IN uint32_t logLevel) -{ - NwGtpv2cStackT* thiz = (NwGtpv2cStackT*) hGtpcStackHandle; - thiz->logLevel = logLevel; - return NW_OK; -} - -/** - * Process Request from Udp Layer - */ - -NwRcT -nwGtpv2cProcessUdpReq( NW_IN NwGtpv2cStackHandleT hGtpcStackHandle, - NW_IN uint8_t* udpData, - NW_IN uint32_t udpDataLen, - NW_IN uint16_t peerPort, - NW_IN uint32_t peerIp) -{ - NwRcT rc; - NwGtpv2cStackT* thiz; - uint16_t msgType; - - thiz = (NwGtpv2cStackT*) hGtpcStackHandle; - NW_ASSERT(thiz); - - NW_ENTER(thiz); - - if(udpDataLen < NW_GTPV2C_MINIMUM_HEADER_SIZE) { - /* - * TS 29.274 Section 7.7.3: - * If a GTP entity receives a message, which is too short to - * contain the respective GTPv2 header, the GTP-PDU shall be - * silently discarded - */ - NW_LOG(thiz, NW_LOG_LEVEL_WARN, "Received message too small! Discarding."); - return NW_OK; - } - - if( (ntohs(*((uint16_t*)((uint8_t*)udpData + 2))) /* Length */ - + ((*((uint8_t*)(udpData)) & 0x08) ? 4 : 0) /* Extra Header length if TEID present */) > udpDataLen) { - NW_LOG(thiz, NW_LOG_LEVEL_WARN, "Received message with errneous length of %u against expected length of %u! Discarding", udpDataLen, - ntohs(*((uint16_t*)((uint8_t*)udpData + 2))) + ((*((uint8_t*)(udpData)) & 0x08) ? 4 : 0)); - return NW_OK; - } - - if(((*((uint8_t*)(udpData)) & 0xE0) >> 5) != NW_GTP_VERSION) { - NW_LOG(thiz, NW_LOG_LEVEL_WARN, "Received unsupported GTP version '%u' message! Discarding.", ((*((uint8_t*)(udpData)) & 0xE0) >> 5)); - /* Send Version Not Supported Message to peer */ - rc = nwGtpv2cSendVersionNotSupportedInd( - thiz, - peerIp, - peerPort, - *((uint32_t*)(udpData + ((*((uint8_t*)(udpData)) & 0x08) ? 8 : 4))) /* Seq Num */); - - return NW_OK; - } - - msgType = *((uint8_t*)(udpData + 1)); - - switch(msgType) { - case NW_GTP_ECHO_REQ: { - rc = nwGtpv2cHandleEchoReq(thiz, msgType, udpData, udpDataLen, peerPort, peerIp); - } - break; - - case NW_GTP_CREATE_SESSION_REQ: - case NW_GTP_MODIFY_BEARER_REQ: - case NW_GTP_DELETE_SESSION_REQ: - case NW_GTP_CREATE_BEARER_REQ: - case NW_GTP_UPDATE_BEARER_REQ: - case NW_GTP_DELETE_BEARER_REQ: { - rc = nwGtpv2cHandleInitialReq(thiz, msgType, udpData, udpDataLen, peerPort, peerIp); - } - break; - - case NW_GTP_ECHO_RSP: - case NW_GTP_CREATE_SESSION_RSP: - case NW_GTP_MODIFY_BEARER_RSP: - case NW_GTP_DELETE_SESSION_RSP: - case NW_GTP_CREATE_BEARER_RSP: - case NW_GTP_UPDATE_BEARER_RSP: - case NW_GTP_DELETE_BEARER_RSP: { - rc = nwGtpv2cHandleTriggeredRsp(thiz, msgType, udpData, udpDataLen, peerPort, peerIp); - } - break; - - default: { - /* - * TS 29.274 Section 7.7.4: - * If a GTP entity receives a message with an unknown Message Type - * value, it shall silently discard the message. - */ - NW_LOG(thiz, NW_LOG_LEVEL_WARN, "Received unknown message type %u from UDP! Ignoring.", msgType); - rc = NW_OK; - } - } - - NW_LEAVE(thiz); - return rc; -} - - -/* - * Process Request from Upper Layer - */ - -NwRcT -nwGtpv2cProcessUlpReq( NW_IN NwGtpv2cStackHandleT hGtpcStackHandle, - NW_IN NwGtpv2cUlpApiT *pUlpReq) -{ - NwRcT rc; - NwGtpv2cStackT* thiz = (NwGtpv2cStackT*) hGtpcStackHandle; - - NW_ASSERT(thiz); - NW_ASSERT(pUlpReq != NULL); - - NW_ENTER(thiz); - - switch(pUlpReq->apiType & 0x00FFFFFFL) { - case NW_GTPV2C_ULP_API_INITIAL_REQ: { - NW_LOG(thiz, NW_LOG_LEVEL_DEBG, "Received initial request from ulp"); - rc = nwGtpv2cHandleUlpInitialReq(thiz, pUlpReq); - } - break; - - case NW_GTPV2C_ULP_API_TRIGGERED_REQ: { - NW_LOG(thiz, NW_LOG_LEVEL_DEBG, "Received triggered request from ulp"); - rc = nwGtpv2cHandleUlpTriggeredReq(thiz, pUlpReq); - } - break; - - case NW_GTPV2C_ULP_API_TRIGGERED_RSP: { - NW_LOG(thiz, NW_LOG_LEVEL_DEBG, "Received triggered response from ulp"); - rc = nwGtpv2cHandleUlpTriggeredRsp(thiz, pUlpReq); - } - break; - - case NW_GTPV2C_ULP_CREATE_LOCAL_TUNNEL: { - NW_LOG(thiz, NW_LOG_LEVEL_DEBG, "Received create local tunnel from ulp"); - rc = nwGtpv2cHandleUlpCreateLocalTunnel(thiz, pUlpReq); - } - break; - - case NW_GTPV2C_ULP_DELETE_LOCAL_TUNNEL: { - NW_LOG(thiz, NW_LOG_LEVEL_DEBG, "Received delete local tunnel from ulp"); - rc = nwGtpv2cHandleUlpDeleteLocalTunnel(thiz, pUlpReq); - } - break; - - default: { - NW_LOG(thiz, NW_LOG_LEVEL_WARN, "Received unhandled API 0x%x from ULP! Ignoring.", pUlpReq->apiType); - rc = NW_FAILURE; - } - break; - } - - NW_LEAVE(thiz); - - return rc; -} - -/** - * Process Timer timeout Request from Timer ULP Manager - */ - -NwRcT -nwGtpv2cProcessTimeoutOld(void* arg) -{ - NwRcT rc; - NwGtpv2cStackT* thiz; - NwGtpv2cTimeoutInfoT* timeoutInfo = (NwGtpv2cTimeoutInfoT*) arg; - NwGtpv2cTimeoutInfoT* pNextTimeoutInfo; - struct timeval tv; - - NW_ASSERT(timeoutInfo != NULL); - thiz = (NwGtpv2cStackT*) (((NwGtpv2cTimeoutInfoT*) timeoutInfo)->hStack); - - NW_ASSERT(thiz != NULL); - - NW_ENTER(thiz); - - if(thiz->activeTimerInfo == timeoutInfo) { - thiz->activeTimerInfo = NULL; - RB_REMOVE(NwGtpv2cActiveTimerList, &(thiz->activeTimerList), timeoutInfo); - timeoutInfo->next = gpGtpv2cTimeoutInfoPool; - gpGtpv2cTimeoutInfoPool = timeoutInfo; - - rc = ((timeoutInfo)->timeoutCallbackFunc) (timeoutInfo->timeoutArg); - - } else { - NW_LOG(thiz, NW_LOG_LEVEL_WARN, - "Received timeout event from ULP for non-existent timeoutInfo 0x%p and activeTimer 0x%p!", - timeoutInfo, thiz->activeTimerInfo); - return NW_OK; - } - - - NW_ASSERT(gettimeofday(&tv, NULL) == 0); - - for ((timeoutInfo) = RB_MIN(NwGtpv2cActiveTimerList, &(thiz->activeTimerList)); - (timeoutInfo) != NULL; ) - - { - if(NW_GTPV2C_TIMER_CMP_P(&timeoutInfo->tvTimeout, &tv, >)) - break; - - pNextTimeoutInfo = RB_NEXT(NwGtpv2cActiveTimerList, &(thiz->activeTimerList), timeoutInfo); - RB_REMOVE(NwGtpv2cActiveTimerList, &(thiz->activeTimerList), timeoutInfo); - timeoutInfo->next = gpGtpv2cTimeoutInfoPool; - gpGtpv2cTimeoutInfoPool = timeoutInfo; - - rc = ((timeoutInfo)->timeoutCallbackFunc) (timeoutInfo->timeoutArg); - - timeoutInfo = pNextTimeoutInfo; - } - - /* activeTimerInfo may be reset by the timeoutCallbackFunc call above */ - if(thiz->activeTimerInfo == NULL) { - timeoutInfo = RB_MIN(NwGtpv2cActiveTimerList, &(thiz->activeTimerList)); - - if(timeoutInfo) { - NW_GTPV2C_TIMER_SUB(&timeoutInfo->tvTimeout, &tv, &tv); - rc = thiz->tmrMgr.tmrStartCallback(thiz->tmrMgr.tmrMgrHandle, tv.tv_sec, tv.tv_usec, timeoutInfo->tmrType, (void*)timeoutInfo, &timeoutInfo->hTimer); - NW_ASSERT(NW_OK == rc); - - thiz->activeTimerInfo = timeoutInfo; - } - } - - NW_LEAVE(thiz); - - return rc; -} - -NwRcT -nwGtpv2cProcessTimeout(void* arg) -{ - NwRcT rc; - NwGtpv2cStackT* thiz; - NwGtpv2cTimeoutInfoT* timeoutInfo = (NwGtpv2cTimeoutInfoT*) arg; - struct timeval tv; - - NW_ASSERT(timeoutInfo != NULL); - - thiz = (NwGtpv2cStackT*) (timeoutInfo->hStack); - - NW_ASSERT(thiz != NULL); - NW_ENTER(thiz); - - if(thiz->activeTimerInfo == timeoutInfo) { - thiz->activeTimerInfo = NULL; - rc = nwGtpv2cTmrMinHeapRemove(thiz->hTmrMinHeap, timeoutInfo->timerMinHeapIndex); - timeoutInfo->next = gpGtpv2cTimeoutInfoPool; - gpGtpv2cTimeoutInfoPool = timeoutInfo; - - rc = ((timeoutInfo)->timeoutCallbackFunc) (timeoutInfo->timeoutArg); - } else { - NW_LOG(thiz, NW_LOG_LEVEL_WARN, "Received timeout event from ULP for " - "non-existent timeoutInfo 0x%p and activeTimer 0x%p!", - timeoutInfo, thiz->activeTimerInfo); - - NW_LEAVE(thiz); - - return NW_OK; - } - - NW_ASSERT(gettimeofday(&tv, NULL) == 0); - - //printf("------ Start -------\n"); - timeoutInfo = nwGtpv2cTmrMinHeapPeek(thiz->hTmrMinHeap); - - while((timeoutInfo) != NULL) { - if(NW_GTPV2C_TIMER_CMP_P(&timeoutInfo->tvTimeout, &tv, >)) - break; - - rc = nwGtpv2cTmrMinHeapRemove(thiz->hTmrMinHeap, timeoutInfo->timerMinHeapIndex); - timeoutInfo->next = gpGtpv2cTimeoutInfoPool; - gpGtpv2cTimeoutInfoPool = timeoutInfo; - - rc = ((timeoutInfo)->timeoutCallbackFunc) (timeoutInfo->timeoutArg); - - timeoutInfo = nwGtpv2cTmrMinHeapPeek(thiz->hTmrMinHeap); - //printf("-- %p --\n", timeoutInfo); - } - - //printf("------ End -------\n"); - - /* activeTimerInfo may be reset by the timeoutCallbackFunc call above */ - if(thiz->activeTimerInfo == NULL) { - timeoutInfo = nwGtpv2cTmrMinHeapPeek(thiz->hTmrMinHeap); - - if(timeoutInfo) { - NW_GTPV2C_TIMER_SUB(&timeoutInfo->tvTimeout, &tv, &tv); - rc = thiz->tmrMgr.tmrStartCallback(thiz->tmrMgr.tmrMgrHandle, tv.tv_sec, tv.tv_usec, timeoutInfo->tmrType, (void*)timeoutInfo, &timeoutInfo->hTimer); - NW_ASSERT(NW_OK == rc); - - thiz->activeTimerInfo = timeoutInfo; - } - } - - NW_LEAVE(thiz); - - return rc; -} - -/** - * Start Timer with ULP Timer Manager - */ - - - - - -NwRcT -nwGtpv2cStartTimer(NwGtpv2cStackT* thiz, - uint32_t timeoutSec, - uint32_t timeoutUsec, - uint32_t tmrType, - NwRcT (*timeoutCallbackFunc)(void*), - void* timeoutCallbackArg, - NwGtpv2cTimerHandleT *phTimer) -{ - NwRcT rc = NW_OK; - struct timeval tv; - NwGtpv2cTimeoutInfoT *timeoutInfo; - NwGtpv2cTimeoutInfoT *collision; - - NW_ENTER(thiz); - - if(gpGtpv2cTimeoutInfoPool) { - timeoutInfo = gpGtpv2cTimeoutInfoPool; - gpGtpv2cTimeoutInfoPool = gpGtpv2cTimeoutInfoPool->next; - } else { - NW_GTPV2C_MALLOC(thiz, sizeof(NwGtpv2cTimeoutInfoT), timeoutInfo, NwGtpv2cTimeoutInfoT*); - } - - if(timeoutInfo) { - timeoutInfo->tmrType = tmrType; - timeoutInfo->timeoutArg = timeoutCallbackArg; - timeoutInfo->timeoutCallbackFunc = timeoutCallbackFunc; - timeoutInfo->hStack = (NwGtpv2cStackHandleT)thiz; - - NW_ASSERT(gettimeofday(&tv, NULL) == 0); - NW_ASSERT(gettimeofday(&timeoutInfo->tvTimeout, NULL) == 0); - - timeoutInfo->tvTimeout.tv_sec = timeoutSec; - timeoutInfo->tvTimeout.tv_usec = timeoutUsec; - NW_GTPV2C_TIMER_ADD(&tv, &timeoutInfo->tvTimeout, &timeoutInfo->tvTimeout); - - rc = nwGtpv2cTmrMinHeapInsert(thiz->hTmrMinHeap, timeoutInfo); -#if 0 - - do { - collision = RB_INSERT(NwGtpv2cActiveTimerList, &(thiz->activeTimerList), timeoutInfo); - - if(!collision) - break; - - NW_LOG(thiz, NW_LOG_LEVEL_WARN, "timer collision!"); - timeoutInfo->tvTimeout.tv_usec++; /* HACK: In case there is a collision, schedule this event 1 usec later */ - - if(timeoutInfo->tvTimeout.tv_usec > (999999 /*1000000 - 1*/)) { - timeoutInfo->tvTimeout.tv_usec = 0; - timeoutInfo->tvTimeout.tv_sec++; - } - } while (1); - -#endif - - if(thiz->activeTimerInfo) { - if(NW_GTPV2C_TIMER_CMP_P(&(thiz->activeTimerInfo->tvTimeout), &(timeoutInfo->tvTimeout), >)) { - NW_LOG(thiz, NW_LOG_LEVEL_DEBG, "Stopping active timer 0x%"PRIxPTR" for info 0x%p!", - thiz->activeTimerInfo->hTimer, thiz->activeTimerInfo); - rc = thiz->tmrMgr.tmrStopCallback(thiz->tmrMgr.tmrMgrHandle, thiz->activeTimerInfo->hTimer); - NW_ASSERT(NW_OK == rc); - } else { - NW_LOG(thiz, NW_LOG_LEVEL_DEBG, "Already Started timer 0x%"PRIxPTR" for info 0x%p!", - thiz->activeTimerInfo->hTimer, thiz->activeTimerInfo); - *phTimer = (NwGtpv2cTimerHandleT) timeoutInfo; - NW_LEAVE(thiz); - return NW_OK; - } - } - - rc = thiz->tmrMgr.tmrStartCallback(thiz->tmrMgr.tmrMgrHandle, - timeoutSec, - timeoutUsec, - tmrType, - (void*)timeoutInfo, - &timeoutInfo->hTimer); - NW_LOG(thiz, NW_LOG_LEVEL_DEBG, "Started timer 0x%"PRIxPTR" for info 0x%p!", - timeoutInfo->hTimer, timeoutInfo); - NW_ASSERT(NW_OK == rc); - thiz->activeTimerInfo = timeoutInfo; - - } - - *phTimer = (NwGtpv2cTimerHandleT) timeoutInfo; - NW_LEAVE(thiz); - - return rc; -} - -NwRcT -nwGtpv2cStartTimerOld(NwGtpv2cStackT* thiz, - uint32_t timeoutSec, - uint32_t timeoutUsec, - uint32_t tmrType, - NwRcT (*timeoutCallbackFunc)(void*), - void* timeoutCallbackArg, - NwGtpv2cTimerHandleT *phTimer) -{ - NwRcT rc = NW_OK; - struct timeval tv; - NwGtpv2cTimeoutInfoT *timeoutInfo; - NwGtpv2cTimeoutInfoT *collision; - - NW_ASSERT(thiz != NULL); - - NW_ENTER(thiz); - - if(gpGtpv2cTimeoutInfoPool) { - timeoutInfo = gpGtpv2cTimeoutInfoPool; - gpGtpv2cTimeoutInfoPool = gpGtpv2cTimeoutInfoPool->next; - } else { - NW_GTPV2C_MALLOC(thiz, sizeof(NwGtpv2cTimeoutInfoT), timeoutInfo, NwGtpv2cTimeoutInfoT*); - } - - if(timeoutInfo) { - timeoutInfo->tmrType = tmrType; - timeoutInfo->timeoutArg = timeoutCallbackArg; - timeoutInfo->timeoutCallbackFunc = timeoutCallbackFunc; - timeoutInfo->hStack = (NwGtpv2cStackHandleT)thiz; - - NW_ASSERT(gettimeofday(&tv, NULL) == 0); - NW_ASSERT(gettimeofday(&timeoutInfo->tvTimeout, NULL) == 0); - - timeoutInfo->tvTimeout.tv_sec = timeoutSec; - timeoutInfo->tvTimeout.tv_usec = timeoutUsec; - NW_GTPV2C_TIMER_ADD(&tv, &timeoutInfo->tvTimeout, &timeoutInfo->tvTimeout); - - do { - collision = RB_INSERT(NwGtpv2cActiveTimerList, &(thiz->activeTimerList), timeoutInfo); - - if(!collision) - break; - - NW_LOG(thiz, NW_LOG_LEVEL_WARN, "timer collision!"); - timeoutInfo->tvTimeout.tv_usec++; /* HACK: In case there is a collision, schedule this event 1 usec later */ - - if(timeoutInfo->tvTimeout.tv_usec > (999999 /*1000000 - 1*/)) { - timeoutInfo->tvTimeout.tv_usec = 0; - timeoutInfo->tvTimeout.tv_sec++; - } - } while (1); - - if(thiz->activeTimerInfo) { - if(NW_GTPV2C_TIMER_CMP_P(&(thiz->activeTimerInfo->tvTimeout), &(timeoutInfo->tvTimeout), >)) { - NW_LOG(thiz, NW_LOG_LEVEL_DEBG, "Stopping active timer 0x%"PRIxPTR" for info 0x%p!", - thiz->activeTimerInfo->hTimer, thiz->activeTimerInfo); - rc = thiz->tmrMgr.tmrStopCallback(thiz->tmrMgr.tmrMgrHandle, thiz->activeTimerInfo->hTimer); - NW_ASSERT(NW_OK == rc); - } else { - NW_LOG(thiz, NW_LOG_LEVEL_DEBG, "Already Started timer 0x%"PRIxPTR" for info 0x%p!", - thiz->activeTimerInfo->hTimer, thiz->activeTimerInfo); - *phTimer = (NwGtpv2cTimerHandleT) timeoutInfo; - NW_LEAVE(thiz); - return NW_OK; - } - } - - rc = thiz->tmrMgr.tmrStartCallback(thiz->tmrMgr.tmrMgrHandle, timeoutSec, timeoutUsec, tmrType, (void*)timeoutInfo, &timeoutInfo->hTimer); - NW_LOG(thiz, NW_LOG_LEVEL_DEBG, "Started timer 0x%"PRIxPTR" for info 0x%p!", - timeoutInfo->hTimer, timeoutInfo); - NW_ASSERT(NW_OK == rc); - thiz->activeTimerInfo = timeoutInfo; - - } - - *phTimer = (NwGtpv2cTimerHandleT) timeoutInfo; - NW_LEAVE(thiz); - - return rc; -} - -/** - * Stop Timer with ULP Timer Manager - */ -NwRcT -nwGtpv2cStopTimer(NwGtpv2cStackT* thiz, - NwGtpv2cTimerHandleT hTimer) -{ - NwRcT rc = NW_OK; - struct timeval tv; - NwGtpv2cTimeoutInfoT *timeoutInfo; - - NW_ASSERT(thiz != NULL); - - NW_ENTER(thiz); - - timeoutInfo = (NwGtpv2cTimeoutInfoT*) hTimer; - - rc = nwGtpv2cTmrMinHeapRemove(thiz->hTmrMinHeap, timeoutInfo->timerMinHeapIndex); - timeoutInfo->next = gpGtpv2cTimeoutInfoPool; - gpGtpv2cTimeoutInfoPool = timeoutInfo; - - NW_LOG(thiz, NW_LOG_LEVEL_DEBG, "Stopping active timer 0x%"PRIxPTR" for info 0x%p!", - timeoutInfo->hTimer, timeoutInfo); - - if(thiz->activeTimerInfo == timeoutInfo) { - NW_LOG(thiz, NW_LOG_LEVEL_DEBG, "Stopping active timer 0x%"PRIxPTR" for info 0x%p!", - timeoutInfo->hTimer, timeoutInfo); - rc = thiz->tmrMgr.tmrStopCallback(thiz->tmrMgr.tmrMgrHandle, timeoutInfo->hTimer); - thiz->activeTimerInfo = NULL; - NW_ASSERT(NW_OK == rc); - - timeoutInfo = nwGtpv2cTmrMinHeapPeek(thiz->hTmrMinHeap); - - if(timeoutInfo) { - NW_ASSERT(gettimeofday(&tv, NULL) == 0); - - if(NW_GTPV2C_TIMER_CMP_P(&timeoutInfo->tvTimeout, &tv, <)) { - thiz->activeTimerInfo = timeoutInfo; - rc = nwGtpv2cProcessTimeout(timeoutInfo); - NW_ASSERT(NW_OK == rc); - } else { - NW_GTPV2C_TIMER_SUB(&timeoutInfo->tvTimeout, &tv, &tv); - rc = thiz->tmrMgr.tmrStartCallback(thiz->tmrMgr.tmrMgrHandle, tv.tv_sec, tv.tv_usec, timeoutInfo->tmrType, (void*)timeoutInfo, &timeoutInfo->hTimer); - NW_ASSERT(NW_OK == rc); - - NW_LOG(thiz, NW_LOG_LEVEL_DEBG, "Started timer 0x%"PRIxPTR" for info 0x%p!", - timeoutInfo->hTimer, timeoutInfo); - thiz->activeTimerInfo = timeoutInfo; - } - } - } - - NW_LEAVE(thiz); - - return rc; -} - -NwRcT -nwGtpv2cStopTimerOld(NwGtpv2cStackT* thiz, - NwGtpv2cTimerHandleT hTimer) -{ - NwRcT rc = NW_OK; - struct timeval tv; - NwGtpv2cTimeoutInfoT *timeoutInfo; - - NW_ASSERT(thiz != NULL); - - NW_ENTER(thiz); - - timeoutInfo = (NwGtpv2cTimeoutInfoT*) hTimer; - - RB_REMOVE(NwGtpv2cActiveTimerList, &(thiz->activeTimerList), timeoutInfo); - timeoutInfo->next = gpGtpv2cTimeoutInfoPool; - gpGtpv2cTimeoutInfoPool = timeoutInfo; - - NW_LOG(thiz, NW_LOG_LEVEL_DEBG, "Stopping active timer 0x%"PRIxPTR" for info 0x%p!", - timeoutInfo->hTimer, timeoutInfo); - - if(thiz->activeTimerInfo == timeoutInfo) { - NW_LOG(thiz, NW_LOG_LEVEL_DEBG, "Stopping active timer 0x%"PRIxPTR" for info 0x%p!", - timeoutInfo->hTimer, timeoutInfo); - rc = thiz->tmrMgr.tmrStopCallback(thiz->tmrMgr.tmrMgrHandle, timeoutInfo->hTimer); - thiz->activeTimerInfo = NULL; - NW_ASSERT(NW_OK == rc); - - timeoutInfo = RB_MIN(NwGtpv2cActiveTimerList, &(thiz->activeTimerList)); - - if(timeoutInfo) { - NW_ASSERT(gettimeofday(&tv, NULL) == 0); - - if(NW_GTPV2C_TIMER_CMP_P(&timeoutInfo->tvTimeout, &tv, <)) { - thiz->activeTimerInfo = timeoutInfo; - rc = nwGtpv2cProcessTimeout(timeoutInfo); - NW_ASSERT(NW_OK == rc); - } else { - NW_GTPV2C_TIMER_SUB(&timeoutInfo->tvTimeout, &tv, &tv); - rc = thiz->tmrMgr.tmrStartCallback(thiz->tmrMgr.tmrMgrHandle, tv.tv_sec, tv.tv_usec, timeoutInfo->tmrType, (void*)timeoutInfo, &timeoutInfo->hTimer); - NW_ASSERT(NW_OK == rc); - - NW_LOG(thiz, NW_LOG_LEVEL_DEBG, "Started timer 0x%"PRIxPTR" for info 0x%p!", - timeoutInfo->hTimer, timeoutInfo); - thiz->activeTimerInfo = timeoutInfo; - } - } - } - - NW_LEAVE(thiz); - - return rc; -} - -#ifdef __cplusplus -} -#endif - -/*--------------------------------------------------------------------------* - * E N D O F F I L E * - *--------------------------------------------------------------------------*/ - diff --git a/openair-cn/GTPV2-C/nwgtpv2c-0.11/src/NwGtpv2cMsg.c b/openair-cn/GTPV2-C/nwgtpv2c-0.11/src/NwGtpv2cMsg.c deleted file mode 100644 index e566a08594..0000000000 --- a/openair-cn/GTPV2-C/nwgtpv2c-0.11/src/NwGtpv2cMsg.c +++ /dev/null @@ -1,750 +0,0 @@ -/*----------------------------------------------------------------------------* - * * - * n w - g t p v 2 c * - * G P R S T u n n e l i n g P r o t o c o l v 2 c S t a c k * - * * - * * - * Copyright (c) 2010-2011 Amit Chawre * - * All rights reserved. * - * * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright * - * notice, this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - *----------------------------------------------------------------------------*/ - -#include -#include -#include -#include - -#include "NwTypes.h" -#include "NwLog.h" -#include "NwUtils.h" -#include "NwGtpv2cLog.h" -#include "NwGtpv2c.h" -#include "NwGtpv2cPrivate.h" -#include "NwGtpv2cIe.h" -#include "NwGtpv2cMsg.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/*----------------------------------------------------------------------------* - * P R I V A T E F U N C T I O N S * - *----------------------------------------------------------------------------*/ - -static NwGtpv2cMsgT* gpGtpv2cMsgPool = NULL; - -/*----------------------------------------------------------------------------* - * P U B L I C F U N C T I O N S * - *----------------------------------------------------------------------------*/ - -NwRcT -nwGtpv2cMsgNew( NW_IN NwGtpv2cStackHandleT hGtpcStackHandle, - NW_IN uint8_t teidPresent, - NW_IN uint8_t msgType, - NW_IN uint32_t teid, - NW_IN uint32_t seqNum, - NW_OUT NwGtpv2cMsgHandleT *phMsg) -{ - NwGtpv2cStackT* pStack = (NwGtpv2cStackT*) hGtpcStackHandle; - NwGtpv2cMsgT *pMsg; - - NW_ASSERT(pStack); - - if(gpGtpv2cMsgPool) { - pMsg = gpGtpv2cMsgPool; - gpGtpv2cMsgPool = gpGtpv2cMsgPool->next; - } else { - NW_GTPV2C_MALLOC(pStack, sizeof(NwGtpv2cMsgT), pMsg, NwGtpv2cMsgT*); - } - - if(pMsg) { - pMsg->version = NW_GTP_VERSION; - pMsg->teidPresent = teidPresent; - pMsg->msgType = msgType; - pMsg->teid = teid; - pMsg->seqNum = seqNum; - pMsg->msgLen = (NW_GTPV2C_EPC_SPECIFIC_HEADER_SIZE - (teidPresent ? 0 : 4)); - - pMsg->groupedIeEncodeStack.top = 0; - pMsg->hStack = hGtpcStackHandle; - - *phMsg = (NwGtpv2cMsgHandleT) pMsg; - NW_LOG(pStack, NW_LOG_LEVEL_DEBG, "Created message %p!", pMsg); - return NW_OK; - } - - return NW_FAILURE; -} - -NwRcT -nwGtpv2cMsgFromBufferNew( NW_IN NwGtpv2cStackHandleT hGtpcStackHandle, - NW_IN uint8_t* pBuf, - NW_IN uint32_t bufLen, - NW_OUT NwGtpv2cMsgHandleT *phMsg) -{ - NwGtpv2cStackT* pStack = (NwGtpv2cStackT*) hGtpcStackHandle; - NwGtpv2cMsgT *pMsg; - - NW_ASSERT(pStack); - - if(gpGtpv2cMsgPool) { - pMsg = gpGtpv2cMsgPool; - gpGtpv2cMsgPool = gpGtpv2cMsgPool->next; - } else { - NW_GTPV2C_MALLOC(pStack, sizeof(NwGtpv2cMsgT), pMsg, NwGtpv2cMsgT*); - } - - if(pMsg) { - *phMsg = (NwGtpv2cMsgHandleT) pMsg; - memcpy(pMsg->msgBuf, pBuf, bufLen); - pMsg->msgLen = bufLen; - - pMsg->version = ((*pBuf) & 0xE0) >> 5; - pMsg->teidPresent = ((*pBuf) & 0x08) >> 3; - pBuf++; - - pMsg->msgType = *(pBuf); - pBuf += 3; - - if(pMsg->teidPresent) { - pMsg->teid = ntohl(*((uint32_t*)(pBuf))); - pBuf += 4; - } - - memcpy(((uint8_t*)&pMsg->seqNum) + 1, pBuf, 3); - pMsg->seqNum = ntohl(pMsg->seqNum); - - pMsg->hStack = hGtpcStackHandle; - NW_LOG(pStack, NW_LOG_LEVEL_DEBG, "Created message %p!", pMsg); - return NW_OK; - } - - return NW_FAILURE; -} - -NwRcT -nwGtpv2cMsgDelete( NW_IN NwGtpv2cStackHandleT hGtpcStackHandle, - NW_IN NwGtpv2cMsgHandleT hMsg) -{ - NwGtpv2cStackT* pStack = (NwGtpv2cStackT*) hGtpcStackHandle; - NW_LOG(pStack, NW_LOG_LEVEL_DEBG, "Purging message %"PRIxPTR"!", hMsg); - - ((NwGtpv2cMsgT*)hMsg)->next = gpGtpv2cMsgPool; - gpGtpv2cMsgPool = (NwGtpv2cMsgT*) hMsg; - - return NW_OK; -} - -/** - * Set TEID for gtpv2c message. - * - * @param[in] hMsg : Message handle. - * @param[in] teid: TEID value. - */ - -NwRcT -nwGtpv2cMsgSetTeid(NW_IN NwGtpv2cMsgHandleT hMsg, uint32_t teid) -{ - NwGtpv2cMsgT *thiz = (NwGtpv2cMsgT*) hMsg; - thiz->teid = teid; - return NW_OK; -} - -/** - * Set TEID present flag for gtpv2c message. - * - * @param[in] hMsg : Message handle. - * @param[in] teidPesent: Flag boolean value. - */ - -NwRcT -nwGtpv2cMsgSetTeidPresent(NW_IN NwGtpv2cMsgHandleT hMsg, NwBoolT teidPresent) -{ - NwGtpv2cMsgT *thiz = (NwGtpv2cMsgT*) hMsg; - thiz->teidPresent = teidPresent; - return NW_OK; -} - -/** - * Set sequence for gtpv2c message. - * - * @param[in] hMsg : Message handle. - * @param[in] seqNum: Flag boolean value. - */ - -NwRcT -nwGtpv2cMsgSetSeqNumber(NW_IN NwGtpv2cMsgHandleT hMsg, uint32_t seqNum) -{ - NwGtpv2cMsgT *thiz = (NwGtpv2cMsgT*) hMsg; - thiz->seqNum = seqNum; - return NW_OK; -} - -/** - * Get TEID present for gtpv2c message. - * - * @param[in] hMsg : Message handle. - */ - -uint32_t -nwGtpv2cMsgGetTeid(NW_IN NwGtpv2cMsgHandleT hMsg) -{ - NwGtpv2cMsgT *thiz = (NwGtpv2cMsgT*) hMsg; - return (thiz->teid); -} - -/** - * Get TEID present for gtpv2c message. - * - * @param[in] hMsg : Message handle. - */ - -NwBoolT -nwGtpv2cMsgGetTeidPresent(NW_IN NwGtpv2cMsgHandleT hMsg) -{ - NwGtpv2cMsgT *thiz = (NwGtpv2cMsgT*) hMsg; - return (thiz->teidPresent); -} - -/** - * Get sequence number for gtpv2c message. - * - * @param[in] hMsg : Message handle. - */ - -uint32_t -nwGtpv2cMsgGetSeqNumber(NW_IN NwGtpv2cMsgHandleT hMsg) -{ - NwGtpv2cMsgT *thiz = (NwGtpv2cMsgT*) hMsg; - return (thiz->seqNum); -} - -/** - * Get msg type for gtpv2c message. - * - * @param[in] hMsg : Message handle. - */ - -uint32_t -nwGtpv2cMsgGetMsgType(NW_IN NwGtpv2cMsgHandleT hMsg) -{ - NwGtpv2cMsgT *thiz = (NwGtpv2cMsgT*) hMsg; - return (thiz->msgType); -} - -/** - * Get msg type for gtpv2c message. - * - * @param[in] hMsg : Message handle. - */ - -uint32_t -nwGtpv2cMsgGetLength(NW_IN NwGtpv2cMsgHandleT hMsg) -{ - NwGtpv2cMsgT *thiz = (NwGtpv2cMsgT*) hMsg; - return (thiz->msgLen); -} - - -NwRcT -nwGtpv2cMsgAddIeTV1(NW_IN NwGtpv2cMsgHandleT hMsg, - NW_IN uint8_t type, - NW_IN uint8_t instance, - NW_IN uint8_t value) -{ - NwGtpv2cMsgT *pMsg = (NwGtpv2cMsgT*) hMsg; - NwGtpv2cIeTv1T *pIe; - - pIe = (NwGtpv2cIeTv1T*) (pMsg->msgBuf + pMsg->msgLen); - - pIe->t = type; - pIe->l = htons(0x0001); - pIe->i = instance & 0x00ff; - pIe->v = value; - - pMsg->msgLen += sizeof(NwGtpv2cIeTv1T); - - return NW_OK; -} - -NwRcT -nwGtpv2cMsgAddIeTV2(NW_IN NwGtpv2cMsgHandleT hMsg, - NW_IN uint8_t type, - NW_IN uint8_t instance, - NW_IN uint16_t value) -{ - NwGtpv2cMsgT *pMsg = (NwGtpv2cMsgT*) hMsg; - NwGtpv2cIeTv2T *pIe; - - pIe = (NwGtpv2cIeTv2T*) (pMsg->msgBuf + pMsg->msgLen); - - pIe->t = type; - pIe->l = htons(0x0002); - pIe->i = instance & 0x00ff; - pIe->v = htons(value); - - pMsg->msgLen += sizeof(NwGtpv2cIeTv2T); - - return NW_OK; -} - -NwRcT -nwGtpv2cMsgAddIeTV4(NW_IN NwGtpv2cMsgHandleT hMsg, - NW_IN uint8_t type, - NW_IN uint8_t instance, - NW_IN uint32_t value) -{ - NwGtpv2cMsgT *pMsg = (NwGtpv2cMsgT*) hMsg; - NwGtpv2cIeTv4T *pIe; - - pIe = (NwGtpv2cIeTv4T*) (pMsg->msgBuf + pMsg->msgLen); - - pIe->t = type; - pIe->l = htons(0x0004); - pIe->i = instance & 0x00ff; - pIe->v = htonl(value); - - pMsg->msgLen += sizeof(NwGtpv2cIeTv4T); - - return NW_OK; -} - -NwRcT -nwGtpv2cMsgAddIe(NW_IN NwGtpv2cMsgHandleT hMsg, - NW_IN uint8_t type, - NW_IN uint16_t length, - NW_IN uint8_t instance, - NW_IN uint8_t* pVal) -{ - NwGtpv2cMsgT *pMsg = (NwGtpv2cMsgT*) hMsg; - NwGtpv2cIeTlvT *pIe; - - pIe = (NwGtpv2cIeTlvT*) (pMsg->msgBuf + pMsg->msgLen); - - pIe->t = type; - pIe->l = htons(length); - pIe->i = instance & 0x00ff; - - memcpy(((uint8_t*)pIe) + 4, pVal, length); - pMsg->msgLen += (4 + length); - - return NW_OK; -} - -NwRcT -nwGtpv2cMsgGroupedIeStart(NW_IN NwGtpv2cMsgHandleT hMsg, - NW_IN uint8_t type, - NW_IN uint8_t instance) -{ - NwGtpv2cMsgT *pMsg = (NwGtpv2cMsgT*) hMsg; - NwGtpv2cIeTlvT *pIe; - - pIe = (NwGtpv2cIeTlvT*) (pMsg->msgBuf + pMsg->msgLen); - - pIe->t = type; - pIe->i = instance & 0x00ff; - pMsg->msgLen += (4); - pIe->l = (pMsg->msgLen); - - NW_ASSERT(pMsg->groupedIeEncodeStack.top < NW_GTPV2C_MAX_GROUPED_IE_DEPTH); - - pMsg->groupedIeEncodeStack.pIe[pMsg->groupedIeEncodeStack.top] = pIe; - pMsg->groupedIeEncodeStack.top++; - - return NW_OK; -} - -NwRcT -nwGtpv2cMsgGroupedIeEnd(NW_IN NwGtpv2cMsgHandleT hMsg) -{ - NwGtpv2cMsgT *pMsg = (NwGtpv2cMsgT*) hMsg; - NwGtpv2cIeTlvT *pIe; - - NW_ASSERT(pMsg->groupedIeEncodeStack.top > 0); - - pMsg->groupedIeEncodeStack.top--; - pIe = pMsg->groupedIeEncodeStack.pIe[pMsg->groupedIeEncodeStack.top]; - - pIe->l = htons(pMsg->msgLen - pIe->l); - - return NW_OK; -} - -NwRcT -nwGtpv2cMsgAddIeCause(NW_IN NwGtpv2cMsgHandleT hMsg, - NW_IN uint8_t instance, - NW_IN uint8_t causeValue, - NW_IN uint8_t bitFlags, - NW_IN uint8_t offendingIeType, - NW_IN uint8_t offendingIeInstance) -{ - uint8_t causeBuf[8]; - - causeBuf[0] = causeValue; - causeBuf[1] = bitFlags; - - if(offendingIeType) { - causeBuf[2] = offendingIeType; - causeBuf[3] = 0; - causeBuf[4] = 0; - causeBuf[5] = (offendingIeInstance & 0x0f); - } - - return (nwGtpv2cMsgAddIe(hMsg, NW_GTPV2C_IE_CAUSE, (offendingIeType? 6 : 2), instance, causeBuf)); -} - -NwRcT -nwGtpv2cMsgAddIeFteid(NW_IN NwGtpv2cMsgHandleT hMsg, - NW_IN uint8_t instance, - NW_IN uint8_t ifType, - NW_IN uint32_t teidOrGreKey, - NW_IN uint32_t ipv4Addr, - NW_IN uint8_t* pIpv6Addr) -{ - - uint8_t fteidBuf[32]; - uint8_t *pFteidBuf = fteidBuf; - - fteidBuf[0] = (ifType & 0x1F); - pFteidBuf++; - - *((uint32_t*)(pFteidBuf)) = htonl((teidOrGreKey)); - pFteidBuf += 4; - - if(ipv4Addr) { - fteidBuf[0] |= (0x01 << 7); - *((uint32_t*)(pFteidBuf)) = htonl(ipv4Addr); - pFteidBuf += 4; - } - - if(pIpv6Addr) { - fteidBuf[0] |= (0x01 << 6); - memcpy((pFteidBuf), pIpv6Addr, 16); - pFteidBuf += 16; - } - - return (nwGtpv2cMsgAddIe(hMsg, NW_GTPV2C_IE_FTEID, (pFteidBuf - fteidBuf), instance, fteidBuf)); -} - - -NwBoolT -nwGtpv2cMsgIsIePresent(NW_IN NwGtpv2cMsgHandleT hMsg, - NW_IN uint8_t type, - NW_IN uint8_t instance) -{ - NwGtpv2cMsgT *thiz = (NwGtpv2cMsgT*) hMsg; - - if((NwGtpv2cIeTv1T*) thiz->pIe[type][instance]) - return NW_TRUE; - - return NW_FALSE; -} - -NwRcT -nwGtpv2cMsgGetIeTV1(NW_IN NwGtpv2cMsgHandleT hMsg, - NW_IN uint8_t type, - NW_IN uint8_t instance, - NW_OUT uint8_t* pVal) -{ - NwGtpv2cMsgT *thiz = (NwGtpv2cMsgT*) hMsg; - NwGtpv2cIeTv1T *pIe; - NW_ASSERT(instance <= NW_GTPV2C_IE_INSTANCE_MAXIMUM); - - if(thiz->isIeValid[type][instance]) { - pIe = (NwGtpv2cIeTv1T*) thiz->pIe[type][instance]; - - if(ntohs(pIe->l) != 0x01) - return NW_GTPV2C_IE_INCORRECT; - - if(pVal) *pVal = pIe->v; - - return NW_OK; - } - - return NW_GTPV2C_IE_MISSING; -} - -NwRcT -nwGtpv2cMsgGetIeTV2( NW_IN NwGtpv2cMsgHandleT hMsg, - NW_IN uint8_t type, - NW_IN uint8_t instance, - NW_OUT uint16_t* pVal) -{ - NwGtpv2cMsgT *thiz = (NwGtpv2cMsgT*) hMsg; - NwGtpv2cIeTv2T *pIe; - NW_ASSERT(instance <= NW_GTPV2C_IE_INSTANCE_MAXIMUM); - - if(thiz->isIeValid[type][instance]) { - pIe = (NwGtpv2cIeTv2T*) thiz->pIe[type][instance]; - - if(ntohs(pIe->l) != 0x02) - return NW_GTPV2C_IE_INCORRECT; - - if(pVal) *pVal = ntohs(pIe->v); - - return NW_OK; - } - - return NW_GTPV2C_IE_MISSING; -} - -NwRcT -nwGtpv2cMsgGetIeTV4( NW_IN NwGtpv2cMsgHandleT hMsg, - NW_IN uint8_t type, - NW_IN uint8_t instance, - NW_OUT uint32_t* pVal) -{ - NwGtpv2cMsgT *thiz = (NwGtpv2cMsgT*) hMsg; - NwGtpv2cIeTv4T *pIe; - NW_ASSERT(instance <= NW_GTPV2C_IE_INSTANCE_MAXIMUM); - - if(thiz->isIeValid[type][instance]) { - pIe = (NwGtpv2cIeTv4T*) thiz->pIe[type][instance]; - - if(ntohs(pIe->l) != 0x04) - return NW_GTPV2C_IE_INCORRECT; - - if(pVal) *pVal = ntohl(pIe->v); - - return NW_OK; - } - - return NW_GTPV2C_IE_MISSING; -} - -NwRcT -nwGtpv2cMsgGetIeTV8( NW_IN NwGtpv2cMsgHandleT hMsg, - NW_IN uint8_t type, - NW_IN uint8_t instance, - NW_OUT uint64_t* pVal) -{ - NwGtpv2cMsgT *thiz = (NwGtpv2cMsgT*) hMsg; - NwGtpv2cIeTv8T *pIe; - NW_ASSERT(instance <= NW_GTPV2C_IE_INSTANCE_MAXIMUM); - - if(thiz->isIeValid[type][instance]) { - pIe = (NwGtpv2cIeTv8T*) thiz->pIe[type][instance]; - - if(ntohs(pIe->l) != 0x08) - return NW_GTPV2C_IE_INCORRECT; - - if(pVal) *pVal = NW_NTOHLL((pIe->v)); - - return NW_OK; - } - - NW_LOG(thiz->hStack, NW_LOG_LEVEL_ERRO, "Cannot retrieve IE of type %u instance %u !", type, instance); - return NW_GTPV2C_IE_MISSING; -} - -NwRcT -nwGtpv2cMsgGetIeTlv( NW_IN NwGtpv2cMsgHandleT hMsg, - NW_IN uint8_t type, - NW_IN uint8_t instance, - NW_IN uint16_t maxLen, - NW_OUT uint8_t* pVal, - NW_OUT uint16_t* pLen) -{ - NwGtpv2cMsgT *thiz = (NwGtpv2cMsgT*) hMsg; - NwGtpv2cIeTlvT *pIe; - NW_ASSERT(instance <= NW_GTPV2C_IE_INSTANCE_MAXIMUM); - - if(thiz->isIeValid[type][instance]) { - pIe = (NwGtpv2cIeTlvT*) thiz->pIe[type][instance]; - - if(ntohs(pIe->l) <= maxLen) { - if(pVal) memcpy(pVal, ((uint8_t*) pIe) + 4, ntohs(pIe->l)); - - if(pLen) *pLen = ntohs(pIe->l); - - return NW_OK; - } - } - - return NW_GTPV2C_IE_MISSING; -} - -NwRcT -nwGtpv2cMsgGetIeTlvP( NW_IN NwGtpv2cMsgHandleT hMsg, - NW_IN uint8_t type, - NW_IN uint8_t instance, - NW_OUT uint8_t** ppVal, - NW_OUT uint16_t* pLen) -{ - NwGtpv2cMsgT *thiz = (NwGtpv2cMsgT*) hMsg; - NwGtpv2cIeTlvT *pIe; - NW_ASSERT(instance <= NW_GTPV2C_IE_INSTANCE_MAXIMUM); - - if(thiz->isIeValid[type][instance]) { - pIe = (NwGtpv2cIeTlvT*) thiz->pIe[type][instance]; - - if(ppVal) *ppVal = ((uint8_t*) pIe) + 4; - - if(pLen) *pLen = ntohs(pIe->l); - - return NW_OK; - } - - return NW_GTPV2C_IE_MISSING; -} - -NwRcT -nwGtpv2cMsgGetIeCause(NW_IN NwGtpv2cMsgHandleT hMsg, - NW_IN uint8_t instance, - NW_OUT uint8_t* causeValue, - NW_OUT uint8_t* flags, - NW_OUT uint8_t* offendingIeType, - NW_OUT uint8_t* offendingIeInstance) -{ - NwGtpv2cMsgT *thiz = (NwGtpv2cMsgT*) hMsg; - NwGtpv2cIeTlvT *pIe; - - NW_ASSERT(instance <= NW_GTPV2C_IE_INSTANCE_MAXIMUM); - - if(thiz->isIeValid[NW_GTPV2C_IE_CAUSE][instance]) { - pIe = (NwGtpv2cIeTlvT*) thiz->pIe[NW_GTPV2C_IE_CAUSE][instance]; - *causeValue = *((uint8_t*)(((uint8_t*)pIe) + 4)); - *flags = *((uint8_t*)(((uint8_t*)pIe) + 5)); - - if(pIe->l == 6) { - *offendingIeType = *((uint8_t*)(((uint8_t*)pIe) + 6)); - *offendingIeType = *((uint8_t*)(((uint8_t*)pIe) + 8)); - } - - return NW_OK; - } - - return NW_GTPV2C_IE_MISSING; -} - -NwRcT -nwGtpv2cMsgGetIeFteid(NW_IN NwGtpv2cMsgHandleT hMsg, - NW_IN uint8_t instance, - NW_OUT uint8_t* ifType, - NW_OUT uint32_t* teidOrGreKey, - NW_OUT uint32_t* ipv4Addr, - NW_OUT uint8_t* pIpv6Addr) -{ - NwGtpv2cMsgT *thiz = (NwGtpv2cMsgT*) hMsg; - NwGtpv2cIeTlvT *pIe; - - NW_ASSERT(instance <= NW_GTPV2C_IE_INSTANCE_MAXIMUM); - - if(thiz->isIeValid[NW_GTPV2C_IE_FTEID][instance]) { - pIe = (NwGtpv2cIeTlvT*) thiz->pIe[NW_GTPV2C_IE_FTEID][instance]; - uint8_t flags; - uint8_t* pIeValue = ((uint8_t*) pIe) + 4; - flags = (*pIeValue) & 0xE0; - *ifType = (*pIeValue) & 0x1F; - pIeValue += 1; - - *teidOrGreKey = ntohl(*((uint32_t*)(pIeValue))); - pIeValue += 4; - - if(flags & 0x80) { - *ipv4Addr = ntohl(*((uint32_t*)(pIeValue))); - pIeValue += 4; - } - - return NW_OK; - } - - return NW_GTPV2C_IE_MISSING; -} - -NwRcT -nwGtpv2cMsgHexDump(NwGtpv2cMsgHandleT hMsg, FILE* fp) -{ - - NwGtpv2cMsgT* pMsg = (NwGtpv2cMsgT*) hMsg; - uint8_t* data = pMsg->msgBuf; - uint32_t size = pMsg->msgLen; - - unsigned char *p = (unsigned char*)data; - unsigned char c; - int n; - char bytestr[4] = {0}; - char addrstr[10] = {0}; - char hexstr[ 16*3 + 5] = {0}; - char charstr[16*1 + 5] = {0}; - fprintf((FILE*)fp, "\n"); - - for(n=1; n<=size; n++) { - if (n%16 == 1) { - /* store address for this line */ - snprintf(addrstr, sizeof(addrstr), "%.4lx", - ((unsigned long)p-(unsigned long)data) ); - } - - c = *p; - - if (isalnum(c) == 0) { - c = '.'; - } - - /* store hex str (for left side) */ - snprintf(bytestr, sizeof(bytestr), "%02X ", *p); - strncat(hexstr, bytestr, sizeof(hexstr)-strlen(hexstr)-1); - - /* store char str (for right side) */ - snprintf(bytestr, sizeof(bytestr), "%c", c); - strncat(charstr, bytestr, sizeof(charstr)-strlen(charstr)-1); - - if(n%16 == 0) { - /* line completed */ - fprintf((FILE*)fp, "[%4.4s] %-50.50s %s\n", addrstr, hexstr, charstr); - hexstr[0] = 0; - charstr[0] = 0; - } else if(n%8 == 0) { - /* half line: add whitespaces */ - strncat(hexstr, " ", sizeof(hexstr)-strlen(hexstr)-1); - strncat(charstr, " ", sizeof(charstr)-strlen(charstr)-1); - } - - p++; /* next byte */ - } - - if (strlen(hexstr) > 0) { - /* print rest of buffer if not empty */ - fprintf((FILE*)fp, "[%4.4s] %-50.50s %s\n", addrstr, hexstr, charstr); - - } - - fprintf((FILE*)fp, "\n"); - - return NW_OK; -} - -#ifdef __cplusplus -} -#endif - - - -/*--------------------------------------------------------------------------* - * E N D O F F I L E * - *--------------------------------------------------------------------------*/ - diff --git a/openair-cn/GTPV2-C/nwgtpv2c-0.11/src/NwGtpv2cMsgIeParseInfo.c b/openair-cn/GTPV2-C/nwgtpv2c-0.11/src/NwGtpv2cMsgIeParseInfo.c deleted file mode 100644 index 22607df8aa..0000000000 --- a/openair-cn/GTPV2-C/nwgtpv2c-0.11/src/NwGtpv2cMsgIeParseInfo.c +++ /dev/null @@ -1,703 +0,0 @@ -/*----------------------------------------------------------------------------* - * * - * n w - g t p v 2 c * - * G P R S T u n n e l i n g P r o t o c o l v 2 c S t a c k * - * * - * * - * Copyright (c) 2010-2011 Amit Chawre * - * All rights reserved. * - * * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright * - * notice, this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - *----------------------------------------------------------------------------*/ - -#include -#include - -#include "NwTypes.h" -#include "NwLog.h" -#include "NwUtils.h" -#include "NwGtpv2cLog.h" -#include "NwGtpv2c.h" -#include "NwGtpv2cPrivate.h" -#include "NwGtpv2cIe.h" -#include "NwGtpv2cMsg.h" - - -#ifdef __cplusplus -extern "C" { -#endif - - -typedef struct NwGtpv2cMsgIeInfo { - uint8_t ieType; - uint8_t ieMinLength; - uint8_t ieInstance; - uint8_t iePresence; - struct NwGtpv2cMsgIeInfo *pGroupedIeInfo; -} NwGtpv2cMsgIeInfoT; - -static -NwGtpv2cMsgIeInfoT createSessionReqBearerCtxtTobeCreatedIeInfoTbl[] = { - { NW_GTPV2C_IE_EBI , 1, NW_GTPV2C_IE_INSTANCE_ZERO , NW_GTPV2C_IE_PRESENCE_MANDATORY , NULL}, - { NW_GTPV2C_IE_BEARER_TFT , 0, NW_GTPV2C_IE_INSTANCE_ZERO , NW_GTPV2C_IE_PRESENCE_OPTIONAL , NULL}, - { NW_GTPV2C_IE_FTEID , 9, NW_GTPV2C_IE_INSTANCE_ZERO , NW_GTPV2C_IE_PRESENCE_CONDITIONAL , NULL}, - { NW_GTPV2C_IE_FTEID , 9, NW_GTPV2C_IE_INSTANCE_ONE , NW_GTPV2C_IE_PRESENCE_CONDITIONAL , NULL}, - { NW_GTPV2C_IE_FTEID , 9, NW_GTPV2C_IE_INSTANCE_TWO , NW_GTPV2C_IE_PRESENCE_CONDITIONAL , NULL}, - { NW_GTPV2C_IE_FTEID , 9, NW_GTPV2C_IE_INSTANCE_THREE , NW_GTPV2C_IE_PRESENCE_CONDITIONAL , NULL}, - { NW_GTPV2C_IE_FTEID , 9, NW_GTPV2C_IE_INSTANCE_FOUR , NW_GTPV2C_IE_PRESENCE_CONDITIONAL , NULL}, - { NW_GTPV2C_IE_BEARER_LEVEL_QOS, 18, NW_GTPV2C_IE_INSTANCE_ZERO , NW_GTPV2C_IE_PRESENCE_MANDATORY , NULL}, - // { NW_GTPV2C_IE_IMSI , 0, NW_GTPV2C_IE_INSTANCE_ZERO , NW_GTPV2C_IE_PRESENCE_CONDITIONAL , NULL}, - - /* Do not add below this */ - { 0, 0, 0} -}; - -static -NwGtpv2cMsgIeInfoT createSessionReqBearerCtxtTobeRemovedIeInfoTbl[] = { - { NW_GTPV2C_IE_IMSI , 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL}, - - /* Do not add below this */ - { 0, 0, 0} -}; - -static -NwGtpv2cMsgIeInfoT echoRspIeInfoTbl[] = { - { NW_GTPV2C_IE_RECOVERY , 1, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_MANDATORY, NULL}, - - /* Do not add below this */ - { 0, 0, 0} -}; - -static -NwGtpv2cMsgIeInfoT createSessionReqIeInfoTbl[] = { - { NW_GTPV2C_IE_IMSI , 8, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL}, - { NW_GTPV2C_IE_MSISDN , 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL}, - { NW_GTPV2C_IE_MEI , 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL}, - { NW_GTPV2C_IE_FTEID , 9, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_MANDATORY , NULL}, - { NW_GTPV2C_IE_FTEID , 9, NW_GTPV2C_IE_INSTANCE_ONE , NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL}, - { NW_GTPV2C_IE_RAT_TYPE , 1, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_MANDATORY , NULL}, - { NW_GTPV2C_IE_INDICATION , 3, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL}, - { NW_GTPV2C_IE_APN , 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_MANDATORY , NULL}, - { NW_GTPV2C_IE_APN_RESTRICTION, 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_MANDATORY , NULL}, - { NW_GTPV2C_IE_SELECTION_MODE , 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_MANDATORY , NULL}, - { NW_GTPV2C_IE_PDN_TYPE , 1, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_MANDATORY , NULL}, - { NW_GTPV2C_IE_PAA , 5, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_MANDATORY , NULL}, - { NW_GTPV2C_IE_AMBR , 8, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL}, - { NW_GTPV2C_IE_EBI , 1, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL}, - { NW_GTPV2C_IE_PCO , 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL}, - { NW_GTPV2C_IE_TRACE_INFORMATION, 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL}, - { NW_GTPV2C_IE_FQ_CSID , 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL}, - { NW_GTPV2C_IE_FQ_CSID , 0, NW_GTPV2C_IE_INSTANCE_ONE , NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL}, - { NW_GTPV2C_IE_BEARER_CONTEXT , 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_MANDATORY , createSessionReqBearerCtxtTobeCreatedIeInfoTbl}, - { NW_GTPV2C_IE_BEARER_CONTEXT , 0, NW_GTPV2C_IE_INSTANCE_ONE , NW_GTPV2C_IE_PRESENCE_CONDITIONAL, createSessionReqBearerCtxtTobeRemovedIeInfoTbl}, - { NW_GTPV2C_IE_SERVING_NETWORK, 3, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_MANDATORY , NULL}, - { NW_GTPV2C_IE_RECOVERY , 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL}, - { NW_GTPV2C_IE_CHARGING_CHARACTERISTICS, 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL}, - { NW_GTPV2C_IE_LDN , 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_OPTIONAL , NULL }, - { NW_GTPV2C_IE_LDN , 0, NW_GTPV2C_IE_INSTANCE_ONE , NW_GTPV2C_IE_PRESENCE_OPTIONAL , NULL }, - { NW_GTPV2C_IE_PRIVATE_EXTENSION, 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_OPTIONAL , NULL }, - - /* Do not add below this */ - { 0, 0, 0} -}; - -static -NwGtpv2cMsgIeInfoT modifyBearerReqIeInfoTbl[] = { - { NW_GTPV2C_IE_MEI , 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_SERVING_NETWORK, 3, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL}, - { NW_GTPV2C_IE_ULI , 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_RAT_TYPE , 1, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_INDICATION , 3, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_FTEID , 9, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_BEARER_CONTEXT , 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_MANDATORY , NULL }, - { NW_GTPV2C_IE_BEARER_CONTEXT , 0, NW_GTPV2C_IE_INSTANCE_ONE , NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_PRIVATE_EXTENSION, 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_OPTIONAL , NULL }, - - /* Do not add below this */ - { 0, 0, 0} -}; - -static -NwGtpv2cMsgIeInfoT deleteSessionReqIeInfoTbl[] = { - { NW_GTPV2C_IE_CAUSE , 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_EBI , 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_ULI , 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_INDICATION , 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_PCO , 0, NW_GTPV2C_IE_INSTANCE_ONE , NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_RECOVERY , 1, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_PRIVATE_EXTENSION, 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_OPTIONAL , NULL }, - - /* Do not add below this */ - { 0, 0, 0} -}; - -static -NwGtpv2cMsgIeInfoT createSessionRspIeInfoTbl[] = { - { NW_GTPV2C_IE_CAUSE , 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_MANDATORY , NULL }, - { NW_GTPV2C_IE_PAA , 5, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_APN_RESTRICTION, 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_FTEID , 9, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_FTEID , 9, NW_GTPV2C_IE_INSTANCE_ONE , NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_BEARER_CONTEXT , 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_MANDATORY , NULL }, - { NW_GTPV2C_IE_BEARER_CONTEXT , 0, NW_GTPV2C_IE_INSTANCE_ONE , NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_RECOVERY , 1, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_PRIVATE_EXTENSION, 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_OPTIONAL , NULL }, - - /* Do not add below this */ - { 0, 0, 0} -}; - -static -NwGtpv2cMsgIeInfoT modifyBearerRspIeInfoTbl[] = { - { NW_GTPV2C_IE_CAUSE , 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_MANDATORY , NULL }, - { NW_GTPV2C_IE_PAA , 5, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_APN_RESTRICTION, 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_FTEID , 9, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_BEARER_CONTEXT , 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_RECOVERY , 1, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_PRIVATE_EXTENSION, 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_OPTIONAL , NULL }, - - /* Do not add below this */ - { 0, 0, 0} -}; - -static -NwGtpv2cMsgIeInfoT deleteSessionRspIeInfoTbl[] = { - { NW_GTPV2C_IE_CAUSE , 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_MANDATORY , NULL }, - { NW_GTPV2C_IE_RECOVERY , 1, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_PCO , 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_PRIVATE_EXTENSION, 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_OPTIONAL , NULL }, - - /* Do not add below this */ - { 0, 0, 0} -}; - -/* Message sent over s10 interface */ -static -NwGtpv2cMsgIeInfoT identificationReqIeInfoTbl[] = { - { NW_GTPV2C_IE_GUTI , 6, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_COMPLETE_REQUEST_MESSAGE, 1, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_SERVING_NETWORK, 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL_OPTIONAL, NULL }, - { NW_GTPV2C_IE_PRIVATE_EXTENSION, 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_OPTIONAL , NULL }, - - /* Do not add below this */ - { 0, 0, 0} -}; - -static -NwGtpv2cMsgIeInfoT identificationRspIeInfoTbl[] = { - { NW_GTPV2C_IE_CAUSE , 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_MANDATORY , NULL }, - { NW_GTPV2C_IE_IMSI , 8, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_MM_CONTEXT , 1, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_TRACE_INFORMATION, 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL_OPTIONAL, NULL }, - { NW_GTPV2C_IE_PRIVATE_EXTENSION, 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_OPTIONAL , NULL }, - - /* Do not add below this */ - { 0, 0, 0} -}; - -static -NwGtpv2cMsgIeInfoT contextReqIeInfoTbl[] = { - { NW_GTPV2C_IE_IMSI , 8, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_GUTI , 5, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_ULI , 7, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_PTMSI , 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_COMPLETE_REQUEST_MESSAGE, 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_FTEID , 9, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_UDP_SOURCE_PORT_NUMBER, 9, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_RAT_TYPE , 1, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_INDICATION , 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_OPTIONAL , NULL }, - { NW_GTPV2C_IE_HOP_COUNTER , 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_OPTIONAL , NULL }, - { NW_GTPV2C_IE_SERVING_NETWORK, 3, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL_OPTIONAL, NULL }, - { NW_GTPV2C_IE_LDN , 3, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_OPTIONAL , NULL }, - { NW_GTPV2C_IE_PRIVATE_EXTENSION, 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_OPTIONAL , NULL }, - - /* Do not add below this */ - { 0, 0, 0} -}; - -static -NwGtpv2cMsgIeInfoT contextRspIeInfoTbl[] = { - { NW_GTPV2C_IE_CAUSE , 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_MANDATORY , NULL }, - { NW_GTPV2C_IE_IMSI , 8, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL , NULL }, - { NW_GTPV2C_IE_MM_CONTEXT , 4, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL , NULL }, - { NW_GTPV2C_IE_PDN_CONNECTION , 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL , NULL }, - { NW_GTPV2C_IE_FTEID , 9, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL , NULL }, - { NW_GTPV2C_IE_FTEID , 9, NW_GTPV2C_IE_INSTANCE_ONE , NW_GTPV2C_IE_PRESENCE_CONDITIONAL , NULL }, - { NW_GTPV2C_IE_FQDN , 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL , NULL }, - { NW_GTPV2C_IE_INDICATION , 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL , NULL }, - { NW_GTPV2C_IE_TRACE_INFORMATION, 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL , NULL }, - { NW_GTPV2C_IE_IP_ADDRESS , 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL , NULL }, - { NW_GTPV2C_IE_IP_ADDRESS , 0, NW_GTPV2C_IE_INSTANCE_ONE , NW_GTPV2C_IE_PRESENCE_CONDITIONAL , NULL }, - { NW_GTPV2C_IE_RFSP_INDEX , 2, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL_OPTIONAL, NULL }, - { NW_GTPV2C_IE_RFSP_INDEX , 2, NW_GTPV2C_IE_INSTANCE_ONE , NW_GTPV2C_IE_PRESENCE_CONDITIONAL_OPTIONAL, NULL }, - { NW_GTPV2C_IE_UE_TIME_ZONE , 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL_OPTIONAL, NULL }, - { NW_GTPV2C_IE_LDN , 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_OPTIONAL , NULL }, - { NW_GTPV2C_IE_PRIVATE_EXTENSION, 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_OPTIONAL , NULL }, - - /* Do not add below this */ - { 0, 0, 0} -}; - -static -NwGtpv2cMsgIeInfoT contextAckIeInfoTbl[] = { - { NW_GTPV2C_IE_CAUSE , 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_MANDATORY , NULL }, - { NW_GTPV2C_IE_INDICATION , 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_PRIVATE_EXTENSION, 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_OPTIONAL , NULL }, - - /* Do not add below this */ - { 0, 0, 0} -}; - -static -NwGtpv2cMsgIeInfoT forwardRelocationReqIeInfoTbl[] = { - { NW_GTPV2C_IE_IMSI , 8, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_FTEID , 9, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_MANDATORY , NULL }, - { NW_GTPV2C_IE_PDN_CONNECTION , 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_MANDATORY , NULL }, - { NW_GTPV2C_IE_FTEID , 9, NW_GTPV2C_IE_INSTANCE_ONE , NW_GTPV2C_IE_PRESENCE_MANDATORY , NULL }, - { NW_GTPV2C_IE_FQDN , 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_MM_CONTEXT , 4, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_MANDATORY , NULL }, - { NW_GTPV2C_IE_INDICATION , 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_F_CONTAINER , 1, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_F_CONTAINER , 1, NW_GTPV2C_IE_INSTANCE_ONE , NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_TARGET_IDENTIFICATION, 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_IP_ADDRESS , 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_IP_ADDRESS , 0, NW_GTPV2C_IE_INSTANCE_ONE , NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_F_CAUSE , 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_F_CAUSE , 0, NW_GTPV2C_IE_INSTANCE_ONE , NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_F_CONTAINER , 1, NW_GTPV2C_IE_INSTANCE_TWO , NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_SOURCE_IDENTIFICATION, 1, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_F_CAUSE , 0, NW_GTPV2C_IE_INSTANCE_TWO , NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_SELECTED_PLMN_ID, 0, NW_GTPV2C_IE_INSTANCE_ONE , NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_RECOVERY , 1, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_TRACE_INFORMATION, 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_RFSP_INDEX , 2, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL_OPTIONAL, NULL }, - { NW_GTPV2C_IE_RFSP_INDEX , 2, NW_GTPV2C_IE_INSTANCE_ONE , NW_GTPV2C_IE_PRESENCE_CONDITIONAL_OPTIONAL, NULL }, - { NW_GTPV2C_IE_CSG_ID , 4, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL_OPTIONAL, NULL }, - { NW_GTPV2C_IE_CSG_MEMBERSHIP_INDICATION, 1, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL_OPTIONAL, NULL }, - { NW_GTPV2C_IE_UE_TIME_ZONE , 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL_OPTIONAL, NULL }, - { NW_GTPV2C_IE_LDN , 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_OPTIONAL , NULL }, - { NW_GTPV2C_IE_ADDITIONAL_MM_CTXT_FOR_SRVCC,0,NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL_OPTIONAL, NULL }, - { NW_GTPV2C_IE_ADDITIONAL_FLAGS_FOR_SRVCC, 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL_OPTIONAL, NULL }, - { NW_GTPV2C_IE_MSISDN , 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL_OPTIONAL, NULL }, - { NW_GTPV2C_IE_PRIVATE_EXTENSION, 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_OPTIONAL , NULL }, - - /* Do not add below this */ - { 0, 0, 0 } -}; - -static -NwGtpv2cMsgIeInfoT forwardRelocationRspIeInfoTbl[] = { - { NW_GTPV2C_IE_CAUSE , 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_MANDATORY , NULL }, - { NW_GTPV2C_IE_FTEID , 9, NW_GTPV2C_IE_INSTANCE_ONE , NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_INDICATION , 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_BEARER_CONTEXT , 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_BEARER_CONTEXT , 0, NW_GTPV2C_IE_INSTANCE_ONE , NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_BEARER_CONTEXT , 0, NW_GTPV2C_IE_INSTANCE_TWO , NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_F_CAUSE , 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_F_CAUSE , 0, NW_GTPV2C_IE_INSTANCE_ONE , NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_F_CONTAINER , 1, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_F_CONTAINER , 1, NW_GTPV2C_IE_INSTANCE_ONE , NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_F_CONTAINER , 1, NW_GTPV2C_IE_INSTANCE_TWO , NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_F_CAUSE , 0, NW_GTPV2C_IE_INSTANCE_TWO , NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_LDN , 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_OPTIONAL , NULL }, - { NW_GTPV2C_IE_PRIVATE_EXTENSION, 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_OPTIONAL , NULL }, - - /* Do not add below this */ - { 0, 0, 0} -}; - -static -NwGtpv2cMsgIeInfoT forwardRelocationCompleteNtfIeInfoTbl[] = { - { NW_GTPV2C_IE_INDICATION , 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_CONDITIONAL, NULL }, - { NW_GTPV2C_IE_PRIVATE_EXTENSION, 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_OPTIONAL , NULL }, - - /* Do not add below this */ - { 0, 0, 0} -}; - -static -NwGtpv2cMsgIeInfoT forwardRelocationCompleteAckIeInfoTbl[] = { - { NW_GTPV2C_IE_CAUSE , 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_MANDATORY , NULL }, - { NW_GTPV2C_IE_RECOVERY , 1, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_OPTIONAL , NULL }, - { NW_GTPV2C_IE_PRIVATE_EXTENSION, 0, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_OPTIONAL , NULL }, - - /* Do not add below this */ - { 0, 0, 0} -}; - -/*----------------------------------------------------------------------------* - * P R I V A T E F U N C T I O N S * - *----------------------------------------------------------------------------*/ - -static uint32_t -nwGtpv2cMsgGroupedIeCount(NwGtpv2cMsgIeInfoT *pMsgIeInfo) -{ - uint32_t count = 0; - NwGtpv2cMsgIeInfoT *pGroupedIeInfo = pMsgIeInfo; - - while (pGroupedIeInfo++) { - if (pGroupedIeInfo->ieType == 0) { - break; - } - - count ++; - } - - return count; -} - -static NwRcT -nwGtpv2cMsgIeParseInfoUpdate(NwGtpv2cMsgIeParseInfoT *thiz, - NwGtpv2cMsgIeInfoT *pMsgIeInfo) -{ - uint32_t i, j; - - for (i = 0; pMsgIeInfo[i].ieType; i++) { - if (pMsgIeInfo[i].pGroupedIeInfo) { - NwGtpv2cGroupedIeParseInfoT *pMsgIeParseInfo; - - NW_GTPV2C_MALLOC(thiz->hStack, sizeof(NwGtpv2cGroupedIeParseInfoT), - pMsgIeParseInfo, NwGtpv2cGroupedIeParseInfoT*); - - pMsgIeParseInfo->groupedIeType = pMsgIeInfo[i].ieType; - pMsgIeParseInfo->hStack = thiz->hStack; - - for (j = 0; pMsgIeInfo[i].pGroupedIeInfo[j].ieType; j++) { - pMsgIeParseInfo->ieParseInfo[pMsgIeInfo[i].pGroupedIeInfo[j].ieType][pMsgIeInfo[i].pGroupedIeInfo[j].ieInstance].ieMinLength = - pMsgIeInfo[i].pGroupedIeInfo[j].ieMinLength; - pMsgIeParseInfo->ieParseInfo[pMsgIeInfo[i].pGroupedIeInfo[j].ieType][pMsgIeInfo[i].pGroupedIeInfo[j].ieInstance].iePresence = - pMsgIeInfo[i].pGroupedIeInfo[j].iePresence; - - if(pMsgIeInfo[i].pGroupedIeInfo[j].iePresence == NW_GTPV2C_IE_PRESENCE_MANDATORY) - pMsgIeParseInfo->mandatoryIeCount++; - } - - thiz->ieParseInfo[pMsgIeInfo[i].ieType][pMsgIeInfo[i].ieInstance].pGroupedIeInfo = pMsgIeParseInfo; - } else { - thiz->ieParseInfo[pMsgIeInfo[i].ieType][pMsgIeInfo[i].ieInstance].pGroupedIeInfo = NULL; - } - - thiz->ieParseInfo[pMsgIeInfo[i].ieType][pMsgIeInfo[i].ieInstance].iePresence = pMsgIeInfo[i].iePresence; - thiz->ieParseInfo[pMsgIeInfo[i].ieType][pMsgIeInfo[i].ieInstance].ieMinLength = pMsgIeInfo[i].ieMinLength; - - if(pMsgIeInfo[i].iePresence == NW_GTPV2C_IE_PRESENCE_MANDATORY) - thiz->mandatoryIeCount++; - } - - return NW_OK; -} - -static NwRcT -nwGtpv2cMsgGroupedIeParse(NW_IN NwGtpv2cGroupedIeParseInfoT* thiz, - NW_IN uint8_t ieType, - NW_IN uint16_t ieLength, - NW_IN uint8_t ieInstance, - NW_IN uint8_t *pIeValue) -{ - NW_ASSERT(thiz); - - NW_LOG(thiz->hStack, NW_LOG_LEVEL_DEBG, "Received grouped IE %u with instance %u of length %u in msg-type %u!", - ieType, ieInstance, ieLength, thiz->groupedIeType); - - return NW_OK; -} - -/*----------------------------------------------------------------------------* - * P U B L I C F U N C T I O N S * - *----------------------------------------------------------------------------*/ - -/** - * Constructor - * @return Pointer to the object on success. - */ - -NwGtpv2cMsgIeParseInfoT* -nwGtpv2cMsgIeParseInfoNew(NwGtpv2cStackHandleT hStack, uint8_t msgType) -{ - NwRcT rc; - NwGtpv2cMsgIeParseInfoT *thiz; - - NW_GTPV2C_MALLOC(hStack, sizeof(NwGtpv2cMsgIeParseInfoT), thiz, NwGtpv2cMsgIeParseInfoT*); - - if(thiz) { - memset(thiz, 0, sizeof(NwGtpv2cMsgIeParseInfoT)); - - thiz->hStack = hStack; - thiz->msgType = msgType; - - switch(msgType) { - case NW_GTP_ECHO_RSP: { - rc = nwGtpv2cMsgIeParseInfoUpdate(thiz, echoRspIeInfoTbl); - NW_ASSERT(NW_OK == rc); - } - break; - - case NW_GTP_CREATE_SESSION_REQ: { - rc = nwGtpv2cMsgIeParseInfoUpdate(thiz, createSessionReqIeInfoTbl); - NW_ASSERT(NW_OK == rc); - } - break; - - case NW_GTP_CREATE_SESSION_RSP: { - rc = nwGtpv2cMsgIeParseInfoUpdate(thiz, createSessionRspIeInfoTbl); - NW_ASSERT(NW_OK == rc); - } - break; - - case NW_GTP_DELETE_SESSION_REQ: { - rc = nwGtpv2cMsgIeParseInfoUpdate(thiz, deleteSessionReqIeInfoTbl); - NW_ASSERT(NW_OK == rc); - } - break; - - case NW_GTP_DELETE_SESSION_RSP: { - rc = nwGtpv2cMsgIeParseInfoUpdate(thiz, deleteSessionRspIeInfoTbl); - NW_ASSERT(NW_OK == rc); - } - break; - - case NW_GTP_MODIFY_BEARER_REQ: { - rc = nwGtpv2cMsgIeParseInfoUpdate(thiz, modifyBearerReqIeInfoTbl); - NW_ASSERT(NW_OK == rc); - } - break; - - case NW_GTP_MODIFY_BEARER_RSP: { - rc = nwGtpv2cMsgIeParseInfoUpdate(thiz, modifyBearerRspIeInfoTbl); - NW_ASSERT(NW_OK == rc); - } - break; - - case NW_GTP_FORWARD_RELOCATION_REQ: { - rc = nwGtpv2cMsgIeParseInfoUpdate(thiz, forwardRelocationReqIeInfoTbl); - NW_ASSERT(NW_OK == rc); - } - break; - - case NW_GTP_FORWARD_RELOCATION_RSP: { - rc = nwGtpv2cMsgIeParseInfoUpdate(thiz, forwardRelocationRspIeInfoTbl); - NW_ASSERT(NW_OK == rc); - } - break; - - case NW_GTP_FORWARD_RELOCATION_COMPLETE_NTF: { - rc = nwGtpv2cMsgIeParseInfoUpdate(thiz, forwardRelocationCompleteNtfIeInfoTbl); - NW_ASSERT(NW_OK == rc); - } - break; - - case NW_GTP_FORWARD_RELOCATION_COMPLETE_ACK: { - rc = nwGtpv2cMsgIeParseInfoUpdate(thiz, forwardRelocationCompleteAckIeInfoTbl); - NW_ASSERT(NW_OK == rc); - } - break; - - case NW_GTP_CONTEXT_REQ: { - rc = nwGtpv2cMsgIeParseInfoUpdate(thiz, contextReqIeInfoTbl); - NW_ASSERT(NW_OK == rc); - } - break; - - case NW_GTP_CONTEXT_RSP: { - rc = nwGtpv2cMsgIeParseInfoUpdate(thiz, contextRspIeInfoTbl); - NW_ASSERT(NW_OK == rc); - } - break; - - case NW_GTP_CONTEXT_ACK: { - rc = nwGtpv2cMsgIeParseInfoUpdate(thiz, contextAckIeInfoTbl); - NW_ASSERT(NW_OK == rc); - } - break; - - case NW_GTP_IDENTIFICATION_REQ: { - rc = nwGtpv2cMsgIeParseInfoUpdate(thiz, identificationReqIeInfoTbl); - NW_ASSERT(NW_OK == rc); - } - break; - - case NW_GTP_IDENTIFICATION_RSP: { - rc = nwGtpv2cMsgIeParseInfoUpdate(thiz, identificationRspIeInfoTbl); - NW_ASSERT(NW_OK == rc); - } - break; - - default: { - free(thiz); - thiz = NULL; - } - break; - } - } - - return thiz; -} - -/** - * Destructor - * @return NW_OK on success. - */ - -NwRcT -nwGtpv2cMsgIeParseInfoDelete(NwGtpv2cMsgIeParseInfoT* thiz) -{ - NW_GTPV2C_FREE(thiz->hStack, thiz); - return NW_OK; -} - -/** - * Parse message - * @return NW_OK on success. - */ - -NwRcT -nwGtpv2cMsgIeParse(NW_IN NwGtpv2cMsgIeParseInfoT* thiz, - NW_IN NwGtpv2cMsgHandleT hMsg, - NW_INOUT NwGtpv2cErrorT *pError) -{ - NwRcT rc = NW_OK; - uint16_t mandatoryIeCount =0; - uint8_t *pIeBufStart; - uint8_t *pIeBufEnd; - uint16_t ieType; - uint16_t ieLength; - uint16_t ieInstance; - NwGtpv2cIeTlvT *pIe; - NwGtpv2cMsgT *pMsg = (NwGtpv2cMsgT*) hMsg; - uint8_t flags = *((uint8_t*)(pMsg->msgBuf)); - - pIeBufStart = (uint8_t *) (pMsg->msgBuf + (flags & 0x08 ? 12: 8)); - pIeBufEnd = (uint8_t *) (pMsg->msgBuf + pMsg->msgLen); - - //memset(pMsg->pIe, 0, sizeof(uint8_t*) * (NW_GTPV2C_IE_TYPE_MAXIMUM) * (NW_GTPV2C_IE_INSTANCE_MAXIMUM)); - memset(pMsg->isIeValid, (NW_FALSE), sizeof(uint8_t) * (NW_GTPV2C_IE_TYPE_MAXIMUM) * (NW_GTPV2C_IE_INSTANCE_MAXIMUM)); - - while (pIeBufStart < pIeBufEnd) { - pIe = (NwGtpv2cIeTlvT*) pIeBufStart; - ieType = pIe->t; - ieLength = ntohs(pIe->l); - ieInstance = pIe->i & 0x0F; - - NW_ASSERT(NW_GTPV2C_IE_INSTANCE_MAXIMUM >= ieInstance); - - NW_LOG(thiz->hStack, NW_LOG_LEVEL_DEBG, "Received IE %u with instance %u of length %u in msg-type %u!", ieType, ieInstance, ieLength, thiz->msgType); - - if(pIeBufStart + 4 + ieLength > pIeBufEnd) { - NW_LOG(thiz->hStack, NW_LOG_LEVEL_ERRO, "Invalid length for IE of type %u and instance %u!", ieType, ieInstance); - pError->cause = NW_GTPV2C_CAUSE_INVALID_LENGTH; - pError->offendingIe.type = ieType; - pError->offendingIe.instance = ieInstance; - return NW_FAILURE; - } - - if((thiz->ieParseInfo[ieType][ieInstance].iePresence)) { - if((ieLength < (thiz->ieParseInfo[ieType][ieInstance].ieMinLength))) { - if(thiz->ieParseInfo[ieType][ieInstance].iePresence == NW_GTPV2C_IE_PRESENCE_OPTIONAL) { - /* Ignore TLV */ - pIeBufStart += (ieLength + 4); - continue; - } else { - pError->cause = NW_GTPV2C_CAUSE_MANDATORY_IE_INCORRECT; - pError->offendingIe.type = ieType; - pError->offendingIe.instance = ieInstance; - NW_LOG(thiz->hStack, NW_LOG_LEVEL_ERRO, "Mandatory IE of type %u and instance %u incorrect!", ieType, ieInstance); - return NW_FAILURE; - } - } - - if(pMsg->isIeValid[ieType][ieInstance] == NW_TRUE) { - /* - * If an information element is repeated in a GTP signalling - * message in which repetition of the information element is - * not specified, only the contents of the information element - * appearing first shall be handled and all subsequent repetitions - * of the information element shall be ignored. - * TODO: Add handling for IEs for which repetition is allowed. - */ - pIeBufStart += (ieLength + 4); - continue; - } - - pMsg->pIe[ieType][ieInstance] = (uint8_t*) pIeBufStart; - pMsg->isIeValid[ieType][ieInstance] = NW_TRUE; - - if(thiz->ieParseInfo[ieType][ieInstance].pGroupedIeInfo) { - /* Parse the grouped IE */ - rc = nwGtpv2cMsgGroupedIeParse(thiz->ieParseInfo[ieType][ieInstance].pGroupedIeInfo, ieType, ieLength, ieInstance, ((uint8_t*) pIe) + 4); - - if (rc != NW_OK) { - pError->cause = NW_GTPV2C_CAUSE_MANDATORY_IE_INCORRECT; - pError->offendingIe.type = ieType; - pError->offendingIe.instance = ieInstance; - NW_LOG(thiz->hStack, NW_LOG_LEVEL_ERRO, "Mandatory IE of type %u and instance %u incorrect!", ieType, ieInstance); - return NW_FAILURE; - } - } - - if(thiz->ieParseInfo[ieType][ieInstance].iePresence == NW_GTPV2C_IE_PRESENCE_MANDATORY) { - mandatoryIeCount++; - } - } else { - NW_LOG(thiz->hStack, NW_LOG_LEVEL_WARN, "Unexpected IE %u with instance %u of length %u received in msg %u!", ieType, ieInstance, ieLength, thiz->msgType); - } - - pIeBufStart += (ieLength + 4); - } - - if((NW_OK == rc) && (mandatoryIeCount != thiz->mandatoryIeCount)) { - for(ieType = 0; ieType < NW_GTPV2C_IE_TYPE_MAXIMUM; ieType++) { - for(ieInstance = 0; ieInstance < NW_GTPV2C_IE_INSTANCE_MAXIMUM; ieInstance++) { - if(thiz->ieParseInfo[ieType][ieInstance].iePresence == NW_GTPV2C_IE_PRESENCE_MANDATORY) { - if(pMsg->isIeValid[ieType][ieInstance] == NW_FALSE) { - NW_LOG(thiz->hStack, NW_LOG_LEVEL_ERRO, "Mandatory IE of type %u and instance %u missing in msg type %u", ieType, ieInstance, pMsg->msgType); - pError->cause = NW_GTPV2C_CAUSE_MANDATORY_IE_MISSING; - pError->offendingIe.type = ieType; - pError->offendingIe.instance = ieInstance; - return NW_FAILURE; - } - } - } - } - - NW_LOG(thiz->hStack, NW_LOG_LEVEL_CRIT, "Unknown mandatory IE missing. Msg parser formed incorrectly!"); - pError->cause = NW_GTPV2C_CAUSE_MANDATORY_IE_MISSING; - pError->offendingIe.type = 0; - pError->offendingIe.instance = 0; - return NW_FAILURE; - } - - pError->cause = NW_GTPV2C_CAUSE_REQUEST_ACCEPTED; - return NW_OK; -} - - -#ifdef __cplusplus -} -#endif - -/*--------------------------------------------------------------------------* - * E N D O F F I L E * - *--------------------------------------------------------------------------*/ - diff --git a/openair-cn/GTPV2-C/nwgtpv2c-0.11/src/NwGtpv2cMsgParser.c b/openair-cn/GTPV2-C/nwgtpv2c-0.11/src/NwGtpv2cMsgParser.c deleted file mode 100644 index a19ddc1bcc..0000000000 --- a/openair-cn/GTPV2-C/nwgtpv2c-0.11/src/NwGtpv2cMsgParser.c +++ /dev/null @@ -1,293 +0,0 @@ -/*----------------------------------------------------------------------------* - * * - * n w - g t p v 2 c * - * G P R S T u n n e l i n g P r o t o c o l v 2 c S t a c k * - * * - * * - * Copyright (c) 2010-2011 Amit Chawre * - * All rights reserved. * - * * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright * - * notice, this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - *----------------------------------------------------------------------------*/ - -#include "NwTypes.h" -#include "NwUtils.h" -#include "NwGtpv2cLog.h" -#include "NwGtpv2c.h" -#include "NwGtpv2cPrivate.h" -#include "NwGtpv2cIe.h" -#include "NwGtpv2cMsg.h" -#include "NwGtpv2cMsgParser.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * Allocate a gtpv2c message Parser. - * - * @param[in] hGtpcStackHandle : gtpv2c stack handle. - * @param[in] msgType : Message type for this message parser. - * @param[out] pthiz : Pointer to message parser handle. - */ - -NwRcT -nwGtpv2cMsgParserNew( NW_IN NwGtpv2cStackHandleT hGtpcStackHandle, - NW_IN uint8_t msgType, - NW_IN NwRcT (*ieReadCallback) (uint8_t ieType, - uint8_t ieLength, - uint8_t ieInstance, - uint8_t* ieValue, - void* ieReadCallbackArg), - NW_IN void* ieReadCallbackArg, - NW_IN NwGtpv2cMsgParserT **pthiz) -{ - NwGtpv2cMsgParserT* thiz; - // NW_GTPV2C_MALLOC(hGtpcStackHandle, sizeof(NwGtpv2cMsgParserT), thiz, NwGtpv2cMsgParserT*); - thiz = (NwGtpv2cMsgParserT*) malloc (sizeof(NwGtpv2cMsgParserT)); - - if(thiz) { - memset(thiz, 0, sizeof(NwGtpv2cMsgParserT)); - thiz->msgType = msgType; - thiz->hStack = hGtpcStackHandle; - *pthiz = thiz; - thiz->ieReadCallback = ieReadCallback; - thiz->ieReadCallbackArg = ieReadCallbackArg; - return NW_OK; - } - - return NW_FAILURE; -} - -/** - * Free a gtpv2c message parser. - * - * @param[in] hGtpcStackHandle : gtpv2c stack handle. - * @param[in] thiz : Message parser handle. - */ - -NwRcT -nwGtpv2cMsgParserDelete( NW_IN NwGtpv2cStackHandleT hGtpcStackHandle, - NW_IN NwGtpv2cMsgParserT* thiz) -{ - NW_GTPV2C_FREE(hGtpcStackHandle, thiz); - return NW_OK; -} - -NwRcT -nwGtpv2cMsgParserUpdateIeReadCallback( NW_IN NwGtpv2cMsgParserT* thiz, - NW_IN NwRcT (*ieReadCallback) (uint8_t ieType, - uint8_t ieLength, - uint8_t ieInstance, - uint8_t* ieValue, - void* ieReadCallbackArg)) -{ - if(thiz) { - thiz->ieReadCallback = ieReadCallback; - return NW_OK; - } - - return NW_FAILURE; -} - -NwRcT -nwGtpv2cMsgParserUpdateIeReadCallbackArg( NW_IN NwGtpv2cMsgParserT* thiz, - NW_IN void* ieReadCallbackArg) -{ - if(thiz) { - thiz->ieReadCallbackArg = ieReadCallbackArg; - return NW_OK; - } - - return NW_FAILURE; -} - -NwRcT -nwGtpv2cMsgParserAddIe( NW_IN NwGtpv2cMsgParserT* thiz, - NW_IN uint8_t ieType, - NW_IN uint8_t ieInstance, - NW_IN uint8_t iePresence, - NW_IN NwRcT (*ieReadCallback) (uint8_t ieType, - uint8_t ieLength, - uint8_t ieInstance, - uint8_t* ieValue, - void* ieReadCallbackArg), - NW_IN void* ieReadCallbackArg) -{ - NW_ASSERT(thiz); - - if(thiz->ieParseInfo[ieType][ieInstance].iePresence == 0) { - NW_ASSERT(ieInstance <= NW_GTPV2C_IE_INSTANCE_MAXIMUM); - - thiz->ieParseInfo[ieType][ieInstance].ieReadCallback = ieReadCallback; - thiz->ieParseInfo[ieType][ieInstance].ieReadCallbackArg = ieReadCallbackArg; - thiz->ieParseInfo[ieType][ieInstance].iePresence = iePresence; - - if (iePresence == NW_GTPV2C_IE_PRESENCE_MANDATORY) { - thiz->mandatoryIeCount++; - } - } else { - NW_LOG(thiz->hStack, NW_LOG_LEVEL_ERRO, "Cannot add IE to parser for type %u and instance %u. IE info already exists!", ieType, ieInstance); - } - - return NW_OK; -} - -NwRcT -nwGtpv2cMsgParserUpdateIe( NW_IN NwGtpv2cMsgParserT* thiz, - NW_IN uint8_t ieType, - NW_IN uint8_t ieInstance, - NW_IN uint8_t iePresence, - NW_IN NwRcT (*ieReadCallback) (uint8_t ieType, - uint8_t ieLength, - uint8_t ieInstance, - uint8_t* ieValue, - void* ieReadCallbackArg), - NW_IN void* ieReadCallbackArg) -{ - NW_ASSERT(thiz); - - if(thiz->ieParseInfo[ieType][ieInstance].iePresence) { - thiz->ieParseInfo[ieType][ieInstance].ieReadCallback = ieReadCallback; - thiz->ieParseInfo[ieType][ieInstance].ieReadCallbackArg = ieReadCallbackArg; - - thiz->ieParseInfo[ieType][ieInstance].iePresence = iePresence; - } else { - NW_LOG(thiz->hStack, NW_LOG_LEVEL_ERRO, "Cannot update IE info for type %u and instance %u. IE info does not exist!", ieType, ieInstance); - } - - - return NW_OK; -} - - - -NwRcT -nwGtpv2cMsgParserRun( NW_IN NwGtpv2cMsgParserT *thiz, - NW_IN NwGtpv2cMsgHandleT hMsg, - NW_OUT uint8_t *pOffendingIeType, - NW_OUT uint8_t *pOffendingIeInstance, - NW_OUT uint16_t *pOffendingIeLength) -{ - NwRcT rc = NW_OK; - uint8_t flags; - uint16_t mandatoryIeCount =0; - NwGtpv2cIeTlvT *pIe; - uint8_t *pIeStart; - uint8_t *pIeEnd; - uint16_t ieLength; - NwGtpv2cMsgT *pMsg = (NwGtpv2cMsgT*) hMsg; - - NW_ASSERT(pMsg); - flags = *((uint8_t*)(pMsg->msgBuf)); - pIeStart = (uint8_t *) (pMsg->msgBuf + (flags & 0x08 ? 12: 8)); - pIeEnd = (uint8_t *) (pMsg->msgBuf + pMsg->msgLen); - - memset(thiz->pIe, 0, sizeof(uint8_t*) * (NW_GTPV2C_IE_TYPE_MAXIMUM) * (NW_GTPV2C_IE_INSTANCE_MAXIMUM)); - memset(pMsg->pIe, 0, sizeof(uint8_t*) * (NW_GTPV2C_IE_TYPE_MAXIMUM) * (NW_GTPV2C_IE_INSTANCE_MAXIMUM)); - - while (pIeStart < pIeEnd) { - pIe = (NwGtpv2cIeTlvT*) pIeStart; - ieLength = ntohs(pIe->l); - - if(pIeStart + 4 + ieLength > pIeEnd) { - *pOffendingIeType = pIe->t; - *pOffendingIeLength = pIe->l; - *pOffendingIeInstance = pIe->i; - return NW_GTPV2C_MSG_MALFORMED; - } - - if((thiz->ieParseInfo[pIe->t][pIe->i].iePresence)) { - thiz->pIe[pIe->t][pIe->i] = (uint8_t*) pIeStart; - pMsg->pIe[pIe->t][pIe->i] = (uint8_t*) pIeStart; - - NW_LOG(thiz->hStack, NW_LOG_LEVEL_DEBG, "Received IE %u of length %u!", pIe->t, ieLength); - - if((thiz->ieParseInfo[pIe->t][pIe->i].ieReadCallback) != NULL ) { - rc = thiz->ieParseInfo[pIe->t][pIe->i].ieReadCallback(pIe->t, ieLength, pIe->i, pIeStart + 4, thiz->ieParseInfo[pIe->t][pIe->i].ieReadCallbackArg); - - if(NW_OK == rc) { - if(thiz->ieParseInfo[pIe->t][pIe->i].iePresence == NW_GTPV2C_IE_PRESENCE_MANDATORY) - mandatoryIeCount++; - } else { - NW_LOG(thiz->hStack, NW_LOG_LEVEL_ERRO, "Error while parsing IE %u with instance %u and length %u!", pIe->t, pIe->i, ieLength); - break; - } - } else { - if((thiz->ieReadCallback) != NULL ) { - NW_LOG(thiz->hStack, NW_LOG_LEVEL_DEBG, "Received IE %u of length %u!", pIe->t, ieLength); - rc = thiz->ieReadCallback(pIe->t, ieLength, pIe->i, pIeStart + 4, thiz->ieReadCallbackArg); - - if(NW_OK == rc) { - if(thiz->ieParseInfo[pIe->t][pIe->i].iePresence == NW_GTPV2C_IE_PRESENCE_MANDATORY) - mandatoryIeCount++; - } else { - NW_LOG(thiz->hStack, NW_LOG_LEVEL_ERRO, "Error while parsing IE %u of length %u!", pIe->t, ieLength); - break; - } - } else { - NW_LOG(thiz->hStack, NW_LOG_LEVEL_WARN, "No parse method defined for received IE type %u of length %u in message %u!", pIe->t, ieLength, thiz->msgType); - } - } - } else { - NW_LOG(thiz->hStack, NW_LOG_LEVEL_WARN, "Unexpected IE %u of length %u received in msg %u!", pIe->t, ieLength, thiz->msgType); - } - - pIeStart += (ieLength + 4); - } - - if((NW_OK == rc) && (mandatoryIeCount != thiz->mandatoryIeCount)) { - uint16_t t, i; - *pOffendingIeType = 0; - *pOffendingIeInstance = 0; - *pOffendingIeLength = 0; - - for(t = 0; t < NW_GTPV2C_IE_TYPE_MAXIMUM; t++) { - for(i = 0; i < NW_GTPV2C_IE_INSTANCE_MAXIMUM; i++) { - if(thiz->ieParseInfo[t][i].iePresence == NW_GTPV2C_IE_PRESENCE_MANDATORY) { - if(thiz->pIe[t][i] == NULL) { - *pOffendingIeType = t; - *pOffendingIeInstance = i; - return NW_GTPV2C_MANDATORY_IE_MISSING; - } - } - } - } - - NW_LOG(thiz->hStack, NW_LOG_LEVEL_WARN, "Unknown mandatory IE missing. Parser formed incorrectly! %u:%u", mandatoryIeCount, thiz->mandatoryIeCount); - return NW_GTPV2C_MANDATORY_IE_MISSING; - } - - return rc; -} - -#ifdef __cplusplus -} -#endif - - -/*--------------------------------------------------------------------------* - * E N D O F F I L E * - *--------------------------------------------------------------------------*/ - diff --git a/openair-cn/GTPV2-C/nwgtpv2c-0.11/src/NwGtpv2cTrxn.c b/openair-cn/GTPV2-C/nwgtpv2c-0.11/src/NwGtpv2cTrxn.c deleted file mode 100644 index 4d052d05f1..0000000000 --- a/openair-cn/GTPV2-C/nwgtpv2c-0.11/src/NwGtpv2cTrxn.c +++ /dev/null @@ -1,389 +0,0 @@ -/*----------------------------------------------------------------------------* - * * - * n w - g t p v 2 c * - * G P R S T u n n e l i n g P r o t o c o l v 2 c S t a c k * - * * - * * - * Copyright (c) 2010-2011 Amit Chawre * - * All rights reserved. * - * * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright * - * notice, this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - *----------------------------------------------------------------------------*/ - -#include -#include - -#include "NwTypes.h" -#include "NwLog.h" -#include "NwUtils.h" -#include "NwGtpv2cLog.h" -#include "NwGtpv2c.h" -#include "NwGtpv2cPrivate.h" -#include "NwGtpv2cTrxn.h" - -/*--------------------------------------------------------------------------* - * P R I V A T E D E C L A R A T I O N S * - *--------------------------------------------------------------------------*/ - -#ifdef __cplusplus -extern "C" { -#endif - -static NwGtpv2cTrxnT* gpGtpv2cTrxnPool = NULL; - -/*--------------------------------------------------------------------------* - * P R I V A T E F U N C T I O N S * - *--------------------------------------------------------------------------*/ - -/*--------------------------------------------------------------------------- - * Send msg retransmission to peer via data request to UDP Entity - *--------------------------------------------------------------------------*/ - -static NwRcT -nwGtpv2cTrxnSendMsgRetransmission(NwGtpv2cTrxnT* thiz) -{ - NwRcT rc ; - - NW_ASSERT(thiz); - - NW_ASSERT(thiz->pMsg); - - rc = thiz->pStack->udp.udpDataReqCallback(thiz->pStack->udp.hUdp, - thiz->pMsg->msgBuf, - thiz->pMsg->msgLen, - thiz->peerIp, - thiz->peerPort); - - thiz->maxRetries--; - - return rc; -} - -static NwRcT -nwGtpv2cTrxnPeerRspWaitTimeout(void* arg) -{ - NwRcT rc = NW_OK; - NwGtpv2cTrxnT* thiz; - NwGtpv2cStackT* pStack; - - thiz = ((NwGtpv2cTrxnT*)arg); - pStack = thiz->pStack; - - NW_ASSERT(pStack); - - NW_LOG(pStack, NW_LOG_LEVEL_WARN, "T3 Response timer expired for transaction 0x%p", - thiz); - - thiz->hRspTmr = 0; - - if(thiz->maxRetries) { - rc = nwGtpv2cTrxnSendMsgRetransmission(thiz); - NW_ASSERT(NW_OK == rc); - - rc = nwGtpv2cStartTimer(thiz->pStack, thiz->t3Timer, 0, NW_GTPV2C_TMR_TYPE_ONE_SHOT, nwGtpv2cTrxnPeerRspWaitTimeout, thiz, &thiz->hRspTmr); - } else { - NwGtpv2cUlpApiT ulpApi; - - ulpApi.hMsg = 0; - ulpApi.apiType = NW_GTPV2C_ULP_API_RSP_FAILURE_IND; - - ulpApi.apiInfo.rspFailureInfo.hUlpTrxn = thiz->hUlpTrxn; - ulpApi.apiInfo.rspFailureInfo.hUlpTunnel = ( (thiz->hTunnel) ? ((NwGtpv2cTunnelT*)(thiz->hTunnel))->hUlpTunnel : 0 ); - - NW_LOG(pStack, NW_LOG_LEVEL_ERRO, "N3 retries expired for transaction 0x%p", - thiz); - RB_REMOVE(NwGtpv2cOutstandingTxSeqNumTrxnMap, &(pStack->outstandingTxSeqNumMap), thiz); - rc = nwGtpv2cTrxnDelete(&thiz); - - rc = pStack->ulp.ulpReqCallback(pStack->ulp.hUlp, &ulpApi); - } - - return rc; -} - -static NwRcT -nwGtpv2cTrxnDuplicateRequestWaitTimeout(void* arg) -{ - NwRcT rc = NW_OK; - NwGtpv2cTrxnT* thiz; - NwGtpv2cStackT* pStack; - - thiz = ((NwGtpv2cTrxnT*)arg); - - NW_ASSERT(thiz); - pStack = thiz->pStack; - - NW_ASSERT(pStack); - - NW_LOG(pStack, NW_LOG_LEVEL_DEBG, "Duplicate request hold timer expired for transaction 0x%p", - thiz); - - thiz->hRspTmr = 0; - - RB_REMOVE(NwGtpv2cOutstandingRxSeqNumTrxnMap, &(pStack->outstandingRxSeqNumMap), thiz); - rc = nwGtpv2cTrxnDelete(&thiz); - NW_ASSERT(NW_OK == rc); - - return rc; -} - -/** - * Start timer to wait for rsp of a req message - * - * @param[in] thiz : Pointer to transaction - * @param[in] timeoutCallbackFunc : Timeout handler callback function. - * @return NW_OK on success. - */ - -NwRcT -nwGtpv2cTrxnStartPeerRspWaitTimer(NwGtpv2cTrxnT* thiz) -{ - NwRcT rc; - rc = nwGtpv2cStartTimer(thiz->pStack, thiz->t3Timer, 0, NW_GTPV2C_TMR_TYPE_ONE_SHOT, nwGtpv2cTrxnPeerRspWaitTimeout, thiz, &thiz->hRspTmr); - return rc; -} - -/** - Start timer to wait before pruginf a req tran for which response has been sent - - @param[in] thiz : Pointer to transaction - @return NW_OK on success. - */ - -NwRcT -nwGtpv2cTrxnStartDulpicateRequestWaitTimer(NwGtpv2cTrxnT* thiz) -{ - NwRcT rc; - - rc = nwGtpv2cStartTimer(thiz->pStack, thiz->t3Timer * thiz->maxRetries, 0, NW_GTPV2C_TMR_TYPE_ONE_SHOT, nwGtpv2cTrxnDuplicateRequestWaitTimeout, thiz, &thiz->hRspTmr); - - return rc; -} - -/** - Send timer stop request to TmrMgr Entity. - - @param[in] thiz : Pointer to transaction - @return NW_OK on success. - */ - -static NwRcT -nwGtpv2cTrxnStopPeerRspTimer(NwGtpv2cTrxnT* thiz) -{ - NwRcT rc; - - NW_ASSERT(thiz->pStack->tmrMgr.tmrStopCallback != NULL); - - rc = nwGtpv2cStopTimer(thiz->pStack, thiz->hRspTmr); - thiz->hRspTmr = 0; - - return rc; -} - -/*--------------------------------------------------------------------------* - * P U B L I C F U N C T I O N S * - *--------------------------------------------------------------------------*/ - -/** - * Constructor - * - * @param[in] thiz : Pointer to stack - * @param[out] ppTrxn : Pointer to pointer to Trxn object. - * @return NW_OK on success. - */ -NwGtpv2cTrxnT* -nwGtpv2cTrxnNew( NW_IN NwGtpv2cStackT* thiz) -{ - NwGtpv2cTrxnT *pTrxn; - - if(gpGtpv2cTrxnPool) { - pTrxn = gpGtpv2cTrxnPool; - gpGtpv2cTrxnPool = gpGtpv2cTrxnPool->next; - } else { - NW_GTPV2C_MALLOC(thiz, sizeof(NwGtpv2cTrxnT), pTrxn, NwGtpv2cTrxnT*); - } - - if (pTrxn) { - pTrxn->pStack = thiz; - pTrxn->pMsg = NULL; - pTrxn->maxRetries = 2; - pTrxn->t3Timer = 2; - pTrxn->seqNum = thiz->seqNum; - - /* Increment sequence number */ - thiz->seqNum++; - - if(thiz->seqNum == 0x800000) - thiz->seqNum = 0; - - } - - NW_LOG(thiz, NW_LOG_LEVEL_DEBG, "Created transaction 0x%p", pTrxn); - - return pTrxn; -} - -/** - * Overloaded Constructor - * - * @param[in] thiz : Pointer to stack. - * @param[in] seqNum : Sequence number for this transaction. - * @return Pointer to Trxn object. - */ -NwGtpv2cTrxnT* -nwGtpv2cTrxnWithSeqNumNew( NW_IN NwGtpv2cStackT* thiz, - NW_IN uint32_t seqNum) -{ - NwGtpv2cTrxnT *pTrxn; - - if(gpGtpv2cTrxnPool) { - pTrxn = gpGtpv2cTrxnPool; - gpGtpv2cTrxnPool = gpGtpv2cTrxnPool->next; - } else { - NW_GTPV2C_MALLOC(thiz, sizeof(NwGtpv2cTrxnT), pTrxn, NwGtpv2cTrxnT*); - } - - if (pTrxn) { - pTrxn->pStack = thiz; - pTrxn->pMsg = NULL; - pTrxn->maxRetries = 2; - pTrxn->t3Timer = 2; - pTrxn->seqNum = seqNum; - pTrxn->pMsg = NULL; - } - - NW_LOG(thiz, NW_LOG_LEVEL_ERRO, "Created transaction 0x%p", pTrxn); - - return pTrxn; -} - -/** - * Another overloaded constructor. Create transaction as outstanding - * RX transaction for detecting duplicated requests. - * - * @param[in] thiz : Pointer to stack. - * @param[in] teidLocal : Trxn teid. - * @param[in] peerIp : Peer Ip address. - * @param[in] peerPort : Peer Ip port. - * @param[in] seqNum : Seq Number. - * @return NW_OK on success. - */ - -NwGtpv2cTrxnT* -nwGtpv2cTrxnOutstandingRxNew( NW_IN NwGtpv2cStackT* thiz, - NW_IN uint32_t teidLocal, - NW_IN uint32_t peerIp, - NW_IN uint32_t peerPort, - NW_IN uint32_t seqNum) -{ - NwRcT rc; - NwGtpv2cTrxnT *pTrxn, *pCollision; - - if(gpGtpv2cTrxnPool) { - pTrxn = gpGtpv2cTrxnPool; - gpGtpv2cTrxnPool = gpGtpv2cTrxnPool->next; - } else { - NW_GTPV2C_MALLOC(thiz, sizeof(NwGtpv2cTrxnT), pTrxn, NwGtpv2cTrxnT*); - } - - if (pTrxn) { - pTrxn->pStack = thiz; - pTrxn->maxRetries = 2; - pTrxn->t3Timer = 2; - pTrxn->seqNum = seqNum; - pTrxn->peerIp = peerIp; - pTrxn->peerPort = peerPort; - pTrxn->pMsg = NULL; - pTrxn->hRspTmr = 0; - - pCollision = RB_INSERT(NwGtpv2cOutstandingRxSeqNumTrxnMap, &(thiz->outstandingRxSeqNumMap), pTrxn); - - if(pCollision) { - NW_LOG(thiz, NW_LOG_LEVEL_WARN, "Duplicate request message received for seq num 0x%x!", - (uint32_t) seqNum); - - /* Case of duplicate request message from peer. Retransmit response. */ - if(pCollision->pMsg) { - rc = pCollision->pStack->udp.udpDataReqCallback(pCollision->pStack->udp.hUdp, - pCollision->pMsg->msgBuf, - pCollision->pMsg->msgLen, - pCollision->peerIp, - pCollision->peerPort); - } - - rc = nwGtpv2cTrxnDelete(&pTrxn); - NW_ASSERT(NW_OK == rc); - pTrxn = NULL; - } - } - - if(pTrxn) - NW_LOG(thiz, NW_LOG_LEVEL_DEBG, "Created outstanding RX transaction 0x%p", - pTrxn); - - return (pTrxn); -} - -/** - * Destructor - * - * @param[out] pthiz : Pointer to pointer to Trxn object. - * @return NW_OK on success. - */ -NwRcT -nwGtpv2cTrxnDelete( NW_INOUT NwGtpv2cTrxnT **pthiz) -{ - NwRcT rc = NW_OK; - NwGtpv2cStackT* pStack; - NwGtpv2cTrxnT *thiz = *pthiz; - - pStack = thiz->pStack; - - if(thiz->hRspTmr) { - rc = nwGtpv2cTrxnStopPeerRspTimer(thiz); - NW_ASSERT(NW_OK == rc); - } - - if(thiz->pMsg) { - rc = nwGtpv2cMsgDelete((NwGtpv2cStackHandleT)pStack, (NwGtpv2cMsgHandleT)thiz->pMsg); - NW_ASSERT(NW_OK == rc); - } - - NW_LOG(pStack, NW_LOG_LEVEL_DEBG, "Purging transaction 0x%p", thiz); - - thiz->next = gpGtpv2cTrxnPool; - gpGtpv2cTrxnPool = thiz; - - *pthiz = NULL; - return rc; -} - -#ifdef __cplusplus -} -#endif - -/*--------------------------------------------------------------------------* - * E N D O F F I L E * - *--------------------------------------------------------------------------*/ - diff --git a/openair-cn/GTPV2-C/nwgtpv2c-0.11/src/NwGtpv2cTunnel.c b/openair-cn/GTPV2-C/nwgtpv2c-0.11/src/NwGtpv2cTunnel.c deleted file mode 100644 index 865d2c155a..0000000000 --- a/openair-cn/GTPV2-C/nwgtpv2c-0.11/src/NwGtpv2cTunnel.c +++ /dev/null @@ -1,95 +0,0 @@ -/*----------------------------------------------------------------------------* - * * - * n w - g t p v 2 c * - * G P R S T u n n e l i n g P r o t o c o l v 2 c S t a c k * - * * - * * - * Copyright (c) 2010-2011 Amit Chawre * - * All rights reserved. * - * * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright * - * notice, this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - *----------------------------------------------------------------------------*/ - -#include -#include -#include - -#include "NwTypes.h" -#include "NwUtils.h" -#include "NwError.h" -#include "NwGtpv2cPrivate.h" -#include "NwGtpv2cTunnel.h" - -#ifdef __cplusplus -extern "C" { -#endif - -static NwGtpv2cTunnelT* gpGtpv2cTunnelPool = NULL; - -NwGtpv2cTunnelT* -nwGtpv2cTunnelNew(struct NwGtpv2cStack *pStack, uint32_t teid, uint32_t ipv4AddrRemote, NwGtpv2cUlpTunnelHandleT hUlpTunnel) -{ - NwGtpv2cTunnelT* thiz; - - if(gpGtpv2cTunnelPool) { - thiz = gpGtpv2cTunnelPool; - gpGtpv2cTunnelPool = gpGtpv2cTunnelPool->next; - } else { - NW_GTPV2C_MALLOC(pStack, sizeof(NwGtpv2cTunnelT), thiz, NwGtpv2cTunnelT*); - } - - if(thiz) { - memset(thiz, 0, sizeof(NwGtpv2cTunnelT)); - thiz->teid = teid; - thiz->ipv4AddrRemote = ipv4AddrRemote; - thiz->hUlpTunnel = hUlpTunnel; - } - - return thiz; -} - -NwRcT -nwGtpv2cTunnelDelete(struct NwGtpv2cStack *pStack, NwGtpv2cTunnelT* thiz) -{ - thiz->next = gpGtpv2cTunnelPool; - gpGtpv2cTunnelPool = thiz; - - return NW_OK; -} - -NwRcT -nwGtpv2cTunnelGetUlpTunnelHandle( NwGtpv2cTunnelT* thiz, NwGtpv2cUlpTunnelHandleT* phUlpTunnel) -{ - *phUlpTunnel = (thiz? thiz->hUlpTunnel : 0x00000000); - return NW_OK; -} - -#ifdef __cplusplus -} -#endif - -/*--------------------------------------------------------------------------* - * E N D O F F I L E * - *--------------------------------------------------------------------------*/ - diff --git a/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/Makefile.am b/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/Makefile.am deleted file mode 100644 index da32172d9a..0000000000 --- a/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/Makefile.am +++ /dev/null @@ -1,6 +0,0 @@ -# this is example-file: Makefile.am - -# the subdirectories of the project to go into -SUBDIRS = \ - nw-egtping\ - nw-helloworld diff --git a/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-egtping/Makefile.am b/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-egtping/Makefile.am deleted file mode 100644 index 3674445989..0000000000 --- a/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-egtping/Makefile.am +++ /dev/null @@ -1,24 +0,0 @@ -AM_CFLAGS = -D__WITH_LIBEVENT__ \ - -I$(top_srcdir)/shared \ - -I$(top_srcdir)/include \ - -I$(top_srcdir)/test-app/nw-udp \ - -I$(top_srcdir)/test-app/nw-log \ - @AM_CFLAGS@ - -if ENABLE_TESTS_APP -bin_PROGRAMS = egtping - -egtping_SOURCES = \ - NwEvt.h\ - NwMiniLogMgrEntity.h\ - NwMiniTmrMgrEntity.h\ - NwMiniUlpEntity.h\ - NwMiniUdpEntity.h\ - NwMiniLogMgrEntity.c\ - NwMiniTmrMgrEntity.c\ - NwMiniUlpEntity.c\ - NwMiniUdpEntity.c\ - NwEgtPingMain.c - -egtping_LDADD = $(top_builddir)/src/libNwGtpv2c.a -levent $(AM_LDFLAGS) -endif \ No newline at end of file diff --git a/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-egtping/NwEgtPingMain.c b/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-egtping/NwEgtPingMain.c deleted file mode 100644 index a346ab1faf..0000000000 --- a/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-egtping/NwEgtPingMain.c +++ /dev/null @@ -1,280 +0,0 @@ -/*----------------------------------------------------------------------------* - * Copyright (C) 2010 Amit Chawre. * - *----------------------------------------------------------------------------*/ - - -/** - * @file NwEgtPingMain.c - * @brief This is a program demostrating usage of nw-gtpv2c library for eGTP ping. -*/ - -#include -#include -#include -#include -#include "NwEvt.h" -#include "NwLog.h" -#include "NwGtpv2c.h" - -#include "NwMiniLogMgrEntity.h" -#include "NwMiniTmrMgrEntity.h" -#include "NwMiniUdpEntity.h" -#include "NwMiniUlpEntity.h" - -#ifndef NW_ASSERT -#define NW_ASSERT assert -#endif - -static -NwCharT* gLogLevelStr[] = {"EMER", "ALER", "CRIT", "ERRO", "WARN", "NOTI", "INFO", "DEBG"}; - - -typedef struct NwEgtPingS { - uint8_t localIpStr[20]; - uint8_t targetIpStr[20]; - uint32_t pingInterval; - uint32_t pingCount; - NwGtpv2cNodeUlpT ulpObj; - NwGtpv2cNodeUdpT udpObj; -} NwEgtPingT; - -static NwGtpv2cNodeUlpT ulpObj; -static NwGtpv2cNodeUdpT udpObj; - -static NwEgtPingT egtPing; - -void nwEgtPingHandleSignal(int sigNum) -{ - printf("\n--- %s ("NW_IPV4_ADDR") EGTPING statistics --- ", egtPing.targetIpStr, NW_IPV4_ADDR_FORMAT(inet_addr(egtPing.targetIpStr))); - printf("\n%u requests sent, %u response received, %d%% packet loss \n\n", udpObj.packetsSent, udpObj.packetsRcvd, - (udpObj.packetsSent ? 100 * (udpObj.packetsSent - udpObj.packetsRcvd ) / udpObj.packetsSent : 0) ); - exit(sigNum); -} - -NwRcT -nwEgtPingHelp() -{ - printf("Usage: egtping [-i interval] [-c count] [-l local-ip] "); - printf("\n [-t3 t3-time] [-n3 n3-count] destination"); - printf("\n"); - printf("\n -i : Interval between two echo request messages. (Default: 1 sec)"); - printf("\n -c : Stop after sending count pings. (Default: Infinite)"); - printf("\n -t : GTP T3 timeout value. (Default: 2 sec)"); - printf("\n -n : GTP N3 count value. (Default: 2 sec)"); - printf("\n -l : Local IP adddress to use. (Default: All local IPs)"); - printf("\n -h : Show this message."); - printf("\n"); - printf("\n"); -} - -NwRcT -nwEgtPingParseCmdLineOpts(int argc, char* argv[]) -{ - NwRcT rc = NW_OK; - int i = 0; - i++; - - egtPing.pingInterval = 1; - egtPing.pingCount = 0xffffffff; - - if(argc < 2) - return NW_FAILURE; - - if( (argc == 2) && - ((strcmp("--help", argv[i]) == 0) - || (strcmp(argv[i], "-h") == 0))) - return NW_FAILURE; - - while( i < argc - 1) { - NW_LOG(NW_LOG_LEVEL_DEBG, "Processing cmdline arg %s", argv[i]); - - if((strcmp("--local-ip", argv[i]) == 0) - || (strcmp(argv[i], "-l") == 0)) { - i++; - - if(i >= (argc - 1)) - return NW_FAILURE; - - strcpy(egtPing.localIpStr, (argv[i])); - - } else if((strcmp("--interval", argv[i]) == 0) - || (strcmp(argv[i], "-i") == 0)) { - i++; - - if(i >= (argc - 1)) - return NW_FAILURE; - - egtPing.pingInterval = atoi(argv[i]); - - } else if((strcmp("--count", argv[i]) == 0) - || (strcmp(argv[i], "-c") == 0)) { - i++; - - if(i >= (argc - 1)) - return NW_FAILURE; - - egtPing.pingCount = atoi(argv[i]); - } else if((strcmp("--help", argv[i]) == 0) - || (strcmp(argv[i], "-h") == 0)) { - rc = NW_FAILURE; - } else { - return NW_FAILURE; - } - - i++; - } - - strcpy(egtPing.targetIpStr, (argv[i])); - - return rc; -} - -/*--------------------------------------------------------------------------- - * T H E M A I N F U N C T I O N - *--------------------------------------------------------------------------*/ - -int main(int argc, char* argv[]) -{ - NwRcT rc; - uint32_t logLevel; - uint8_t* logLevelStr; - - NwGtpv2cStackHandleT hGtpv2cStack = 0; - - NwGtpv2cUlpEntityT ulp; - NwGtpv2cUdpEntityT udp; - NwGtpv2cTimerMgrEntityT tmrMgr; - NwGtpv2cLogMgrEntityT logMgr; - - printf("EGTPING 0.1, Copyright (C) 2011 Amit Chawre.\n"); - rc = nwEgtPingParseCmdLineOpts(argc, argv); - - if(rc != NW_OK) { - rc = nwEgtPingHelp(); - exit(rc); - } - - logLevelStr = getenv ("NW_LOG_LEVEL"); - - if(logLevelStr == NULL) { - logLevel = NW_LOG_LEVEL_INFO; - } else { - if(strncmp(logLevelStr, "EMER",4) == 0) - logLevel = NW_LOG_LEVEL_EMER; - else if(strncmp(logLevelStr, "ALER",4) == 0) - logLevel = NW_LOG_LEVEL_ALER; - else if(strncmp(logLevelStr, "CRIT",4) == 0) - logLevel = NW_LOG_LEVEL_CRIT; - else if(strncmp(logLevelStr, "ERRO",4) == 0) - logLevel = NW_LOG_LEVEL_ERRO ; - else if(strncmp(logLevelStr, "WARN",4) == 0) - logLevel = NW_LOG_LEVEL_WARN; - else if(strncmp(logLevelStr, "NOTI",4) == 0) - logLevel = NW_LOG_LEVEL_NOTI; - else if(strncmp(logLevelStr, "INFO",4) == 0) - logLevel = NW_LOG_LEVEL_INFO; - else if(strncmp(logLevelStr, "DEBG",4) == 0) - logLevel = NW_LOG_LEVEL_DEBG; - } - - /*--------------------------------------------------------------------------- - * Initialize event library - *--------------------------------------------------------------------------*/ - - NW_EVT_INIT(); - - /*--------------------------------------------------------------------------- - * Initialize Log Manager - *--------------------------------------------------------------------------*/ - nwMiniLogMgrInit(nwMiniLogMgrGetInstance(), logLevel); - - /*--------------------------------------------------------------------------- - * Initialize Gtpv2c Stack Instance - *--------------------------------------------------------------------------*/ - rc = nwGtpv2cInitialize(&hGtpv2cStack); - - if(rc != NW_OK) { - NW_LOG(NW_LOG_LEVEL_ERRO, "Failed to create gtpv2c stack instance. Error '%u' occured", rc); - exit(1); - } - - rc = nwGtpv2cSetLogLevel(hGtpv2cStack, logLevel); - - /*--------------------------------------------------------------------------- - * Set up Ulp Entity - *--------------------------------------------------------------------------*/ - rc = nwGtpv2cUlpInit(&ulpObj, hGtpv2cStack, egtPing.localIpStr); - NW_ASSERT(NW_OK == rc); - - ulp.hUlp = (NwGtpv2cUlpHandleT) &ulpObj; - ulp.ulpReqCallback = nwGtpv2cUlpProcessStackReqCallback; - - rc = nwGtpv2cSetUlpEntity(hGtpv2cStack, &ulp); - NW_ASSERT(NW_OK == rc); - - /*--------------------------------------------------------------------------- - * Set up Udp Entity - *--------------------------------------------------------------------------*/ - rc = nwGtpv2cUdpInit(&udpObj, hGtpv2cStack, egtPing.localIpStr); - NW_ASSERT(NW_OK == rc); - - udp.hUdp = (NwGtpv2cUdpHandleT) &udpObj; - udp.udpDataReqCallback = nwGtpv2cUdpDataReq; - - rc = nwGtpv2cSetUdpEntity(hGtpv2cStack, &udp); - NW_ASSERT(NW_OK == rc); - - /*--------------------------------------------------------------------------- - * Set up Log Entity - *--------------------------------------------------------------------------*/ - tmrMgr.tmrMgrHandle = 0; - tmrMgr.tmrStartCallback = nwTimerStart; - tmrMgr.tmrStopCallback = nwTimerStop; - - rc = nwGtpv2cSetTimerMgrEntity(hGtpv2cStack, &tmrMgr); - NW_ASSERT(NW_OK == rc); - - /*--------------------------------------------------------------------------- - * Set up Log Entity - *--------------------------------------------------------------------------*/ - logMgr.logMgrHandle = (NwGtpv2cLogMgrHandleT) nwMiniLogMgrGetInstance(); - logMgr.logReqCallback = nwMiniLogMgrLogRequest; - - rc = nwGtpv2cSetLogMgrEntity(hGtpv2cStack, &logMgr); - NW_ASSERT(NW_OK == rc); - - /*--------------------------------------------------------------------------- - * Send Message Request to Gtpv2c Stack Instance - *--------------------------------------------------------------------------*/ - NW_LOG(NW_LOG_LEVEL_NOTI, "EGTPING %s ("NW_IPV4_ADDR")", egtPing.targetIpStr, NW_IPV4_ADDR_FORMAT(inet_addr(egtPing.targetIpStr))); - rc = nwGtpv2cUlpPing(&ulpObj, - inet_addr(egtPing.targetIpStr), - egtPing.pingCount, - egtPing.pingInterval, - 2, - 3); - NW_ASSERT(NW_OK == rc); - - /*--------------------------------------------------------------------------- - * Install signal handler - *--------------------------------------------------------------------------*/ - signal(SIGINT, nwEgtPingHandleSignal); - - /*--------------------------------------------------------------------------- - * Event loop - *--------------------------------------------------------------------------*/ - - NW_EVT_LOOP(); - NW_LOG(NW_LOG_LEVEL_ERRO, "Exit from eventloop, no events to process!"); - - /*--------------------------------------------------------------------------- - * Destroy Gtpv2c Stack Instance - *--------------------------------------------------------------------------*/ - rc = nwGtpv2cFinalize(hGtpv2cStack); - - if(rc != NW_OK) { - NW_LOG(NW_LOG_LEVEL_ERRO, "Failed to finalize gtpv2c stack instance. Error '%u' occured", rc); - } - - return rc; -} diff --git a/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-egtping/NwEvt.h b/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-egtping/NwEvt.h deleted file mode 100644 index 6df5794a5f..0000000000 --- a/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-egtping/NwEvt.h +++ /dev/null @@ -1,80 +0,0 @@ -/*----------------------------------------------------------------------------* - * * - * Copyright (c) 2010-2011 Amit Chawre * - * All rights reserved. * - * * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright * - * notice, this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - *----------------------------------------------------------------------------*/ - -#ifndef __NW_EVT_H__ -#define __NW_EVT_H__ -/** - * @file NwEvt.h - * @brief -*/ - -#ifdef __WITH_LIBEVENT__ - -#include - -typedef struct event NwEventT; - -#define NW_EVT_READ (EV_READ) -#define NW_EVT_PERSIST (EV_PERSIST) -#define NW_EVT_CALLBACK(__cbFunc) __cbFunc(int fd, short event, void *arg) -#define NW_TMR_CALLBACK(__cbFunc) __cbFunc(int fd, short event, void *arg) - -#define NW_EVT_INIT event_init -#define NW_EVT_LOOP event_dispatch - -#define NW_EVENT_ADD(__ev, __evSelObj, __evCallback, __evCallbackArg, __evFlags) \ - do { \ - event_set(&(__ev), __evSelObj, __evFlags, __evCallback, __evCallbackArg); \ - event_add(&(__ev), NULL); \ - } while(0) - -#else - -#warning "Event library not defined!" - -/* HACK : Defining dummy values for compilation!*/ - -typedef struct { - int __tbd; -} NwEventT; - -#define NW_EVT_READ (0) -#define NW_EVT_PERSIST (1) -#define NW_EVT_CALLBACK(__cbFunc) __cbFunc(void *arg) -#define NW_TMR_CALLBACK(__cbFunc) __cbFunc(void *arg) - - -#define NW_EVT_INIT() do { printf("error: Event library not defined!\n"); exit (0); } while(0) -#define NW_EVT_LOOP() do { printf("error: Event library not defined!\n"); exit (0); } while(0) -#define NW_EVENT_ADD(...) do { printf("error: Event library not defined!\n"); exit (0); } while(0) - - -#endif - -#endif /* __NW_EVT_H__ */ diff --git a/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-egtping/NwMiniLogMgrEntity.c b/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-egtping/NwMiniLogMgrEntity.c deleted file mode 100644 index 585f7fa7c7..0000000000 --- a/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-egtping/NwMiniLogMgrEntity.c +++ /dev/null @@ -1,70 +0,0 @@ -/*----------------------------------------------------------------------------* - * * - * M I N I M A L I S T I C L O G M G R E N T I T Y * - * * - * Copyright (C) 2010 Amit Chawre. * - * * - *----------------------------------------------------------------------------*/ - -/** - * @file hello-world.c - * @brief This file contains example of a minimalistic log manager entity. -*/ - -#include -#include -#include "NwEvt.h" -#include "NwTypes.h" -#include "NwError.h" -#include "NwLog.h" -#include "NwGtpv2c.h" - -#include "NwMiniLogMgrEntity.h" - -#ifdef __cplusplus -extern "C" { -#endif - -static -NwCharT* gLogLevelStr[] = {"EMER", "ALER", "CRIT", "ERRO", "WARN", "NOTI", "INFO", "DEBG"}; - -NwMiniLogMgrT __gLogMgr; - - -/*--------------------------------------------------------------------------- - * Public functions - *--------------------------------------------------------------------------*/ - -NwMiniLogMgrT* nwMiniLogMgrGetInstance() -{ - return &(__gLogMgr); -} - -NwRcT nwMiniLogMgrInit(NwMiniLogMgrT* thiz, uint32_t logLevel ) -{ - thiz->logLevel = logLevel; - return NW_OK; -} - -NwRcT nwMiniLogMgrSetLogLevel(NwMiniLogMgrT* thiz, uint32_t logLevel) -{ - thiz->logLevel = logLevel; -} - -NwRcT nwMiniLogMgrLogRequest (NwGtpv2cLogMgrHandleT hLogMgr, - uint32_t logLevel, - NwCharT* file, - uint32_t line, - NwCharT* logStr) -{ - NwMiniLogMgrT* thiz = (NwMiniLogMgrT*) hLogMgr; - - if(thiz->logLevel >= logLevel) - //printf("NWEGTPSTK %s - %s <%s,%u>\n", gLogLevelStr[logLevel], logStr, basename(file), line); - return NW_OK; -} - -#ifdef __cplusplus -} -#endif - diff --git a/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-egtping/NwMiniLogMgrEntity.h b/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-egtping/NwMiniLogMgrEntity.h deleted file mode 100644 index 3f37dec409..0000000000 --- a/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-egtping/NwMiniLogMgrEntity.h +++ /dev/null @@ -1,89 +0,0 @@ -/*----------------------------------------------------------------------------* - * * - * M I N I M A L I S T I C L O G M G R E N T I T Y * - * * - * Copyright (C) 2010 Amit Chawre. * - * * - *----------------------------------------------------------------------------*/ - -/** - * @file hello-world.c - * @brief This file contains example of a minimalistic log manager entity. -*/ - -#include -#include -#include "NwEvt.h" -#include "NwLog.h" - -#ifndef NW_ASSERT -#define NW_ASSERT assert -#endif - -#ifndef __NW_MINI_LOG_MGR_H__ -#define __NW_MINI_LOG_MGR_H__ - -#define NW_LOG( _logLevel, ...) \ - do { \ - if((nwMiniLogMgrGetInstance())->logLevel >= _logLevel) \ - { \ - char _logStr[1024]; \ - snprintf(_logStr, 1024, __VA_ARGS__); \ - printf("%s \n", _logStr);\ - } \ - } while(0) - -/** - * MiniLogMgr Class Definition - */ -typedef struct NwMiniLogMgr { - uint8_t logLevel; /*< Log level */ -} NwMiniLogMgrT; - - -/*--------------------------------------------------------------------------- - * Public functions - *--------------------------------------------------------------------------*/ - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * Get global singleton MiniLogMgr instance - */ -NwMiniLogMgrT* nwMiniLogMgrGetInstance(); - -/** - * Initialize MiniLogMgr - * @param thiz : Pointer to global singleton MiniLogMgr instance - * @param logLevel : Log Level - */ -NwRcT nwMiniLogMgrInit(NwMiniLogMgrT* thiz, uint32_t logLevel ); - -/** - * Set MiniLogMgr log level - * @param thiz : Pointer to global singleton MiniLogMgr instance - * @param logLevel : Log Level - */ -NwRcT nwMiniLogMgrSetLogLevel(NwMiniLogMgrT* thiz, uint32_t logLevel); - -/** - * Process log request from stack - * @param thiz : Pointer to global singleton MiniLogMgr instance - * @param logLevel : Log Level - * @param file : Filename - * @param line : Line Number - * @param logStr : Log string - */ -NwRcT nwMiniLogMgrLogRequest (NwGtpv2cLogMgrHandleT logMgrHandle, - uint32_t logLevel, - NwCharT* file, - uint32_t line, - NwCharT* logStr); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-egtping/NwMiniTmrMgrEntity.c b/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-egtping/NwMiniTmrMgrEntity.c deleted file mode 100644 index 7b5553aa6b..0000000000 --- a/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-egtping/NwMiniTmrMgrEntity.c +++ /dev/null @@ -1,97 +0,0 @@ -/*----------------------------------------------------------------------------* - * * - * M I N I M A L I S T I C T M R M G R E N T I T Y * - * * - * Copyright (C) 2010 Amit Chawre. * - * * - *----------------------------------------------------------------------------*/ - -/** - * @file NwMiniTmrMgrEntity.c - * @brief This file ontains example of a minimalistic timer manager entity. -*/ - -#include -#include -#include "NwEvt.h" -#include "NwGtpv2c.h" -#include "NwMiniLogMgrEntity.h" -#include "NwMiniTmrMgrEntity.h" - -#ifndef NW_ASSERT -#define NW_ASSERT assert -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -static -NwCharT* gLogLevelStr[] = {"EMER", "ALER", "CRIT", "ERRO", "WARN", "NOTI", "INFO", "DEBG"}; - -/*--------------------------------------------------------------------------- - * Private functions - *--------------------------------------------------------------------------*/ - -static void -NW_TMR_CALLBACK(nwGtpv2cNodeHandleStackTimerTimeout) -{ - NwRcT rc; - NwGtpv2cNodeTmrT *pTmr = (NwGtpv2cNodeTmrT*) arg; - - /* - * Send Timeout Request to Gtpv2c Stack Instance - */ - rc = nwGtpv2cProcessTimeout(pTmr->timeoutArg); - NW_ASSERT(NW_OK == rc); - - free(pTmr); - - return; -} - -/*--------------------------------------------------------------------------- - * Public functions - *--------------------------------------------------------------------------*/ - -NwRcT nwTimerStart( NwGtpv2cTimerMgrHandleT tmrMgrHandle, - uint32_t timeoutSec, - uint32_t timeoutUsec, - uint32_t tmrType, - void* timeoutArg, - NwGtpv2cTimerHandleT* hTmr) -{ - NwRcT rc = NW_OK; - NwGtpv2cNodeTmrT *pTmr; - struct timeval tv; - - pTmr = (NwGtpv2cNodeTmrT*) malloc(sizeof(NwGtpv2cNodeTmrT)); - - /* set the timevalues*/ - timerclear(&tv); - tv.tv_sec = timeoutSec; - tv.tv_usec = timeoutUsec; - - pTmr->timeoutArg = timeoutArg; - evtimer_set(&pTmr->ev, nwGtpv2cNodeHandleStackTimerTimeout, pTmr); - - /*add event*/ - - event_add(&(pTmr->ev), &tv); - - *hTmr = (NwGtpv2cTimerHandleT)pTmr; - - return rc; -} - -NwRcT nwTimerStop( NwGtpv2cTimerMgrHandleT tmrMgrHandle, - NwGtpv2cTimerHandleT hTmr) -{ - evtimer_del(&(((NwGtpv2cNodeTmrT*)hTmr)->ev)); - free((void*)hTmr); - return NW_OK; -} - -#ifdef __cplusplus -} -#endif diff --git a/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-egtping/NwMiniTmrMgrEntity.h b/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-egtping/NwMiniTmrMgrEntity.h deleted file mode 100644 index 85970c6cc2..0000000000 --- a/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-egtping/NwMiniTmrMgrEntity.h +++ /dev/null @@ -1,57 +0,0 @@ -/*----------------------------------------------------------------------------* - * * - * M I N I M A L I S T I C T M R M G R E N T I T Y * - * * - * Copyright (C) 2010 Amit Chawre. * - * * - *----------------------------------------------------------------------------*/ - - -/** - * @file NwMiniTmrMgrEntity.c - * @brief This file ontains example of a minimalistic timer manager entity. -*/ - -#include -#include -#include "NwEvt.h" -#include "NwLog.h" - -#ifndef NW_ASSERT -#define NW_ASSERT assert -#endif - -#ifndef __NW_MINI_TMR_MGR_H__ -#define __NW_MINI_TMR_MGR_H__ - -typedef struct { - uint8_t _tbd; -} NwGtpv2cNodeTmrMgrT; - -typedef struct { - NwEventT ev; - void* timeoutArg; -} NwGtpv2cNodeTmrT; - - -#ifdef __cplusplus -extern "C" { -#endif - -NwRcT nwTimerStart( NwGtpv2cTimerMgrHandleT tmrMgrHandle, - uint32_t timeoutSec, - uint32_t timeoutUsec, - uint32_t tmrType, - void* timeoutArg, - NwGtpv2cTimerHandleT* hTmr); - - -NwRcT nwTimerStop( NwGtpv2cTimerMgrHandleT tmrMgrHandle, - NwGtpv2cTimerHandleT hTmr); - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-egtping/NwMiniUdpEntity.c b/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-egtping/NwMiniUdpEntity.c deleted file mode 100644 index 16f5f2bcea..0000000000 --- a/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-egtping/NwMiniUdpEntity.c +++ /dev/null @@ -1,218 +0,0 @@ -/*----------------------------------------------------------------------------* - * * - * M I N I M A L I S T I C U D P E N T I T Y * - * * - * Copyright (C) 2010 Amit Chawre. * - * * - *----------------------------------------------------------------------------*/ - - -/** - * @file NwMiniUdpEntity.c - * @brief This file contains example of a minimalistic ULP entity. -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include "NwEvt.h" -#include "NwGtpv2c.h" -#include "NwMiniLogMgrEntity.h" -#include "NwMiniUdpEntity.h" - -#ifndef NW_ASSERT -#define NW_ASSERT assert -#endif - -#define MAX_UDP_PAYLOAD_LEN (4096) - -#ifdef __cplusplus -extern "C" { -#endif - -static -NwCharT* gLogLevelStr[] = {"EMER", "ALER", "CRIT", "ERRO", "WARN", "NOTI", "INFO", "DEBG"}; - -static int yes = 1; -/*--------------------------------------------------------------------------- - * Private functions - *--------------------------------------------------------------------------*/ - -static -void NW_EVT_CALLBACK(nwUdpDataIndicationCallbackData) -{ - NwRcT rc; - uint8_t udpBuf[MAX_UDP_PAYLOAD_LEN]; - NwS32T bytesRead; - struct sockaddr_in peer; - uint32_t peerLen; - NwGtpv2cNodeUdpT* thiz = (NwGtpv2cNodeUdpT*) arg; - - peerLen = sizeof(peer); - - bytesRead = recvfrom(fd, udpBuf, MAX_UDP_PAYLOAD_LEN , 0, (struct sockaddr *) &peer,(socklen_t*) &peerLen); - - if(bytesRead > 0) { - thiz->packetsRcvd++; - NW_LOG(NW_LOG_LEVEL_DEBG, "Received UDP message of size %u from peer %u.%u.%u.%u:%u", bytesRead, - (peer.sin_addr.s_addr & 0x000000ff), - (peer.sin_addr.s_addr & 0x0000ff00) >> 8, - (peer.sin_addr.s_addr & 0x00ff0000) >> 16, - (peer.sin_addr.s_addr & 0xff000000) >> 24, - ntohs(peer.sin_port)); - rc = nwGtpv2cProcessUdpReq(thiz->hGtpv2cStack, udpBuf, bytesRead, ntohs(peer.sin_port), ntohl(peer.sin_addr.s_addr)); - } else { - switch (errno) { - - case ENETUNREACH: - NW_LOG(NW_LOG_LEVEL_ERRO, "Network not reachable", errno, strerror(errno)); - break; - - case EHOSTUNREACH: - NW_LOG(NW_LOG_LEVEL_ERRO, "Host not reachable", errno, strerror(errno)); - break; - - case ECONNREFUSED: - NW_LOG(NW_LOG_LEVEL_ERRO, "Port not reachable", errno, strerror(errno)); - break; - - default: - NW_LOG(NW_LOG_LEVEL_ERRO, "%s", strerror(errno)); - } - - nwGtpv2cUdpReset(thiz); - } - - return; -} - - -/*--------------------------------------------------------------------------- - * Public functions - *--------------------------------------------------------------------------*/ - -NwRcT nwGtpv2cUdpInit(NwGtpv2cNodeUdpT* thiz, NwGtpv2cStackHandleT hGtpv2cStack, uint8_t* ipAddrStr) -{ - int sd; - struct sockaddr_in addr; - - sd = socket(AF_INET, SOCK_DGRAM, 0); - - if (sd < 0) { - NW_LOG(NW_LOG_LEVEL_ERRO, "%s", strerror(errno)); - NW_ASSERT(0); - } - - addr.sin_family = AF_INET; - addr.sin_port = htons(2123); - addr.sin_addr.s_addr = (strlen(ipAddrStr) ? inet_addr(ipAddrStr) : INADDR_ANY); - memset(addr.sin_zero, '\0', sizeof (addr.sin_zero)); - - if(bind(sd, (struct sockaddr *)&addr, sizeof(addr)) < 0) { - NW_LOG(NW_LOG_LEVEL_ERRO, "Error - %s", strerror(errno)); - NW_ASSERT(0); - } - - yes = 1; - - if (setsockopt(sd, SOL_IP, IP_RECVERR, &yes, sizeof(yes))) { - NW_LOG(NW_LOG_LEVEL_ERRO, "%s", strerror(errno)); - NW_ASSERT(0); - } - - NW_EVENT_ADD((thiz->ev), sd, nwUdpDataIndicationCallbackData, thiz, NW_EVT_READ | NW_EVT_PERSIST); - - thiz->ipv4Addr = addr.sin_addr.s_addr; - thiz->hSocket = sd; - thiz->hGtpv2cStack = hGtpv2cStack; - - return NW_OK; -} - -NwRcT nwGtpv2cUdpDestroy(NwGtpv2cNodeUdpT* thiz) -{ - close(thiz->hSocket); -} - -NwRcT nwGtpv2cUdpReset(NwGtpv2cNodeUdpT* thiz) -{ - int sd; - struct sockaddr_in addr; - - event_del(&thiz->ev); - close(thiz->hSocket); - - sd = socket(AF_INET, SOCK_DGRAM, 0); - - if (sd < 0) { - NW_LOG(NW_LOG_LEVEL_ERRO, "%s", strerror(errno)); - NW_ASSERT(0); - } - - addr.sin_family = AF_INET; - addr.sin_port = htons(2123); - addr.sin_addr.s_addr = (thiz->ipv4Addr); - memset(addr.sin_zero, '\0', sizeof (addr.sin_zero)); - - if(bind(sd, (struct sockaddr *)&addr, sizeof(addr)) < 0) { - NW_LOG(NW_LOG_LEVEL_ERRO, "%s", strerror(errno)); - NW_ASSERT(0); - } - - yes = 1; - - if (setsockopt(sd, SOL_IP, IP_RECVERR, &yes, sizeof(yes))) { - NW_LOG(NW_LOG_LEVEL_ERRO, "%s", strerror(errno)); - NW_ASSERT(0); - } - - NW_EVENT_ADD((thiz->ev), sd, nwUdpDataIndicationCallbackData, thiz, (NW_EVT_READ | NW_EVT_PERSIST)); - - thiz->hSocket = sd; - - return NW_OK; -} - -NwRcT nwGtpv2cUdpDataReq(NwGtpv2cUdpHandleT udpHandle, - uint8_t* dataBuf, - uint32_t dataSize, - uint32_t peerIp, - uint32_t peerPort) -{ - struct sockaddr_in peerAddr; - NwS32T bytesSent; - NwGtpv2cNodeUdpT* thiz = (NwGtpv2cNodeUdpT*) udpHandle; - - NW_LOG(NW_LOG_LEVEL_DEBG, "Sending %u bytes of data to %u.%u.%u.%u:%u", dataSize, - (peerIp & 0xff000000) >> 24, - (peerIp & 0x00ff0000) >> 16, - (peerIp & 0x0000ff00) >> 8, - (peerIp & 0x000000ff), - peerPort); - - peerAddr.sin_family = AF_INET; - peerAddr.sin_port = htons(peerPort); - peerAddr.sin_addr.s_addr = htonl(peerIp); - memset(peerAddr.sin_zero, '\0', sizeof (peerAddr.sin_zero)); - - bytesSent = sendto (thiz->hSocket, dataBuf, dataSize, 0, (struct sockaddr *) &peerAddr, sizeof(peerAddr)); - - if(bytesSent < 0) { - NW_LOG(NW_LOG_LEVEL_ERRO, "sendto - %s", strerror(errno)); - } else { - thiz->packetsSent++; - } - - return NW_OK; -} - - -#ifdef __cplusplus -} -#endif - diff --git a/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-egtping/NwMiniUdpEntity.h b/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-egtping/NwMiniUdpEntity.h deleted file mode 100644 index 37061e95e4..0000000000 --- a/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-egtping/NwMiniUdpEntity.h +++ /dev/null @@ -1,56 +0,0 @@ -/*----------------------------------------------------------------------------* - * * - * M I N I M A L I S T I C U D P E N T I T Y * - * * - * Copyright (C) 2010 Amit Chawre. * - * * - *----------------------------------------------------------------------------*/ - - -/** - * @file NwMiniUdpEntity.c - * @brief This file contains example of a minimalistic ULP entity. -*/ - -#include -#include -#include "NwEvt.h" -#include "NwLog.h" - -#ifndef NW_ASSERT -#define NW_ASSERT assert -#endif - -#ifndef __NW_MINI_UDP_ENTITY_H__ -#define __NW_MINI_UDP_ENTITY_H__ - -typedef struct { - uint32_t ipv4Addr; - uint32_t hSocket; - NwEventT ev; - NwGtpv2cStackHandleT hGtpv2cStack; - uint32_t packetsSent; - uint32_t packetsRcvd; -} NwGtpv2cNodeUdpT; - -#ifdef __cplusplus -extern "C" { -#endif - -NwRcT nwGtpv2cUdpInit(NwGtpv2cNodeUdpT* thiz, NwGtpv2cStackHandleT hGtpv2cStack, uint8_t* ipAddrStr); - -NwRcT nwGtpv2cUdpDestroy(NwGtpv2cNodeUdpT* thiz); - -NwRcT nwGtpv2cUdpDataReq(NwGtpv2cUdpHandleT udpHandle, - uint8_t* dataBuf, - uint32_t dataSize, - uint32_t peerIp, - uint32_t peerPort); - -NwRcT nwGtpv2cUdpReset(NwGtpv2cNodeUdpT* thiz); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-egtping/NwMiniUlpEntity.c b/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-egtping/NwMiniUlpEntity.c deleted file mode 100644 index fc5cc809d0..0000000000 --- a/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-egtping/NwMiniUlpEntity.c +++ /dev/null @@ -1,220 +0,0 @@ -/*----------------------------------------------------------------------------* - * * - * M I N I M A L I S T I C U L P E N T I T Y * - * * - * Copyright (C) 2010 Amit Chawre. * - * * - *----------------------------------------------------------------------------*/ - -/** - * @file NwMiniUlpEntity.c - * @brief This file contains example of a minimalistic ULP entity. -*/ - -#include -#include -#include -#include -#include "NwEvt.h" -#include "NwGtpv2c.h" -#include "NwGtpv2cIe.h" -#include "NwGtpv2cMsg.h" -#include "NwGtpv2cMsgParser.h" -#include "NwMiniLogMgrEntity.h" -#include "NwMiniUlpEntity.h" - -#ifndef NW_ASSERT -#define NW_ASSERT assert -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -static -NwCharT* gLogLevelStr[] = {"EMER", "ALER", "CRIT", "ERRO", "WARN", "NOTI", "INFO", "DEBG"}; - -/*--------------------------------------------------------------------------- - * Public Functions - *--------------------------------------------------------------------------*/ - -NwRcT -nwGtpv2cUlpInit(NwGtpv2cNodeUlpT* thiz, NwGtpv2cStackHandleT hGtpv2cStack, char* peerIpStr) -{ - NwRcT rc; - thiz->hGtpv2cStack = hGtpv2cStack; - strcpy(thiz->peerIpStr, peerIpStr); - return NW_OK; -} - -NwRcT -nwGtpv2cUlpDestroy(NwGtpv2cNodeUlpT* thiz) -{ - NW_ASSERT(thiz); - memset(thiz, 0, sizeof(NwGtpv2cNodeUlpT)); - return NW_OK; -} - -typedef struct NwGtpv2cPeerS { - uint32_t ipv4Addr; - uint32_t pingCount; - uint32_t pingInterval; - uint32_t t3Time; - uint32_t n3Count; - - uint32_t sendTimeStamp; - NwGtpv2cTunnelHandleT hTunnel; -} NwGtpv2cPeerT; - -NwGtpv2cPeerT* -nwGtpv2cUlpCreatePeerContext(NwGtpv2cNodeUlpT* thiz, uint32_t peerIp) -{ - NwRcT rc; - NwGtpv2cUlpApiT ulpReq; - NwGtpv2cPeerT *pPeer = (NwGtpv2cPeerT*) malloc(sizeof(NwGtpv2cPeerT)); - - if(pPeer) { - pPeer->ipv4Addr = peerIp; - - /* - * Send Message Request to Gtpv2c Stack Instance - */ - - ulpReq.apiType = NW_GTPV2C_ULP_CREATE_LOCAL_TUNNEL; - - ulpReq.apiInfo.createLocalTunnelInfo.hTunnel = 0; - ulpReq.apiInfo.createLocalTunnelInfo.hUlpTunnel = (NwGtpv2cUlpTrxnHandleT)thiz; - ulpReq.apiInfo.createLocalTunnelInfo.teidLocal = (NwGtpv2cUlpTrxnHandleT)0; - ulpReq.apiInfo.createLocalTunnelInfo.peerIp = htonl(peerIp); - - rc = nwGtpv2cProcessUlpReq(thiz->hGtpv2cStack, &ulpReq); - NW_ASSERT(NW_OK == rc); - pPeer->hTunnel = ulpReq.apiInfo.createLocalTunnelInfo.hTunnel; - } - - return pPeer; - -} - -NwRcT -nwGtpv2cUlpSendEchoRequestToPeer(NwGtpv2cNodeUlpT* thiz, NwGtpv2cPeerT *pPeer) -{ - NwRcT rc; - struct timeval tv; - NwGtpv2cUlpApiT ulpReq; - /* - * Send Message Request to Gtpv2c Stack Instance - */ - - ulpReq.apiType = NW_GTPV2C_ULP_API_INITIAL_REQ; - - ulpReq.apiInfo.initialReqInfo.hTunnel = pPeer->hTunnel; - ulpReq.apiInfo.initialReqInfo.hUlpTrxn = (NwGtpv2cUlpTrxnHandleT)pPeer; - ulpReq.apiInfo.initialReqInfo.hUlpTunnel = (NwGtpv2cUlpTunnelHandleT)pPeer; - - rc = nwGtpv2cMsgNew( thiz->hGtpv2cStack, - NW_FALSE, - NW_GTP_ECHO_REQ, - 0, - 0, - &(ulpReq.hMsg)); - - NW_ASSERT(NW_OK == rc); - - rc = nwGtpv2cMsgAddIeTV1((ulpReq.hMsg), NW_GTPV2C_IE_RECOVERY, 0, thiz->restartCounter); - NW_ASSERT(NW_OK == rc); - - NW_ASSERT(gettimeofday(&tv, NULL) == 0); - pPeer->sendTimeStamp = (tv.tv_sec * 1000000) + tv.tv_usec; - - rc = nwGtpv2cProcessUlpReq(thiz->hGtpv2cStack, &ulpReq); - NW_ASSERT(NW_OK == rc); - - return NW_OK; -} - -NwRcT -nwGtpv2cUlpPing(NwGtpv2cNodeUlpT* thiz, - uint32_t peerIp, - uint32_t pingCount, - uint32_t pingInterval, - uint32_t t3Time, - uint32_t n3Count) -{ - NwRcT rc; - NwGtpv2cPeerT *pPeer; - NwGtpv2cUlpApiT ulpReq; - - pPeer = nwGtpv2cUlpCreatePeerContext(thiz, peerIp); - - pPeer->pingCount = pingCount; - pPeer->pingInterval = pingInterval; - pPeer->t3Time = t3Time; - pPeer->n3Count = n3Count; - /* - * Send Echo Request to peer - */ - - rc = nwGtpv2cUlpSendEchoRequestToPeer(thiz, pPeer); - - return rc; -} - -NwRcT -nwGtpv2cUlpProcessStackReqCallback (NwGtpv2cUlpHandleT hUlp, - NwGtpv2cUlpApiT *pUlpApi) -{ - NwRcT rc; - uint32_t seqNum; - uint32_t len; - uint32_t recvTimeStamp; - struct timeval tv; - NwGtpv2cPeerT *pPeer; - NwGtpv2cNodeUlpT* thiz; - NW_ASSERT(pUlpApi != NULL); - - thiz = (NwGtpv2cNodeUlpT*) hUlp; - - switch(pUlpApi->apiType) { - case NW_GTPV2C_ULP_API_TRIGGERED_RSP_IND: { - pPeer = (NwGtpv2cPeerT*)pUlpApi->apiInfo.triggeredRspIndInfo.hUlpTrxn; - - if(pUlpApi->apiInfo.triggeredRspIndInfo.msgType == NW_GTP_ECHO_RSP) { - seqNum = nwGtpv2cMsgGetSeqNumber(pUlpApi->hMsg); - len = nwGtpv2cMsgGetLength(pUlpApi->hMsg); - - NW_ASSERT(gettimeofday(&tv, NULL) == 0); - recvTimeStamp = (tv.tv_sec * 1000000) + tv.tv_usec; - - NW_LOG(NW_LOG_LEVEL_NOTI, "%u bytes of response from "NW_IPV4_ADDR": gtp_seq=%u time=%2.2f ms", len, NW_IPV4_ADDR_FORMAT(pPeer->ipv4Addr), seqNum, - (float) (recvTimeStamp - pPeer->sendTimeStamp) / 1000 ); - - if(pPeer->pingCount) { - sleep(pPeer->pingInterval); - rc = nwGtpv2cUlpSendEchoRequestToPeer(thiz, pPeer); - - if(pPeer->pingCount != 0xffffffff) pPeer->pingCount--; - } - } - - } - break; - - case NW_GTPV2C_ULP_API_RSP_FAILURE_IND: { - pPeer = (NwGtpv2cPeerT*)pUlpApi->apiInfo.rspFailureInfo.hUlpTrxn; - NW_LOG(NW_LOG_LEVEL_DEBG, "No response from "NW_IPV4_ADDR" (2123)!", NW_IPV4_ADDR_FORMAT(pPeer->ipv4Addr)); - rc = nwGtpv2cUlpSendEchoRequestToPeer(thiz, pPeer); - } - break; - - default: - NW_LOG(NW_LOG_LEVEL_WARN, "Received undefined UlpApi from gtpv2c stack!"); - } - - return NW_OK; -} - -#ifdef __cplusplus -} -#endif - diff --git a/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-egtping/NwMiniUlpEntity.h b/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-egtping/NwMiniUlpEntity.h deleted file mode 100644 index 3f56bf58e8..0000000000 --- a/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-egtping/NwMiniUlpEntity.h +++ /dev/null @@ -1,54 +0,0 @@ -/*----------------------------------------------------------------------------* - * * - * M I N I M A L I S T I C U L P E N T I T Y * - * * - * Copyright (C) 2010 Amit Chawre. * - * * - *----------------------------------------------------------------------------*/ - -/** - * @file NwMiniUlpEntity.h - * @brief This file contains example of a minimalistic ULP entity. -*/ - -#include -#include -#include "NwEvt.h" -#include "NwLog.h" - -#ifndef __NW_MINI_ULP_H__ -#define __NW_MINI_ULP_H__ - -typedef struct { - uint8_t peerIpStr[16]; - uint32_t restartCounter; - NwGtpv2cStackHandleT hGtpv2cStack; -} NwGtpv2cNodeUlpT; - -#ifdef __cplusplus -extern "C" { -#endif - -NwRcT -nwGtpv2cUlpInit(NwGtpv2cNodeUlpT* thiz, NwGtpv2cStackHandleT hGtpv2cStack, char* peerIpStr ); - -NwRcT -nwGtpv2cUlpDestroy(NwGtpv2cNodeUlpT* thiz); - -NwRcT -nwGtpv2cUlpProcessStackReqCallback (NwGtpv2cUlpHandleT hUlp, - NwGtpv2cUlpApiT *pUlpApi); - -NwRcT -nwGtpv2cUlpPing(NwGtpv2cNodeUlpT* thiz, - uint32_t peerIp, - uint32_t pingCount, - uint32_t pingInterval, - uint32_t t3Time, - uint32_t n3Count); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-helloworld/Makefile.am b/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-helloworld/Makefile.am deleted file mode 100644 index 0cf90d9111..0000000000 --- a/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-helloworld/Makefile.am +++ /dev/null @@ -1,21 +0,0 @@ -AM_CFLAGS = -D__WITH_LIBEVENT__ \ - -I$(top_srcdir)/shared -I$(top_srcdir)/include \ - -I$(top_srcdir)/test-app/nw-udp -I$(top_srcdir)/test-app/nw-log \ - @AM_CFLAGS@ - -if ENABLE_TESTS_APP -bin_PROGRAMS = helloworld -helloworld_SOURCES = \ - NwEvt.h\ - NwMiniLogMgrEntity.h\ - NwMiniTmrMgrEntity.h\ - NwMiniUlpEntity.h\ - NwMiniUdpEntity.h\ - NwMiniLogMgrEntity.c\ - NwMiniTmrMgrEntity.c\ - NwMiniUlpEntity.c\ - NwMiniUdpEntity.c\ - helloworld.c - -helloworld_LDADD = $(top_builddir)/src/libNwGtpv2c.a -levent $(AM_LDFLAGS) -endif \ No newline at end of file diff --git a/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-helloworld/NwEvt.h b/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-helloworld/NwEvt.h deleted file mode 100644 index 6df5794a5f..0000000000 --- a/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-helloworld/NwEvt.h +++ /dev/null @@ -1,80 +0,0 @@ -/*----------------------------------------------------------------------------* - * * - * Copyright (c) 2010-2011 Amit Chawre * - * All rights reserved. * - * * - * Redistribution and use in source and binary forms, with or without * - * modification, are permitted provided that the following conditions * - * are met: * - * * - * 1. Redistributions of source code must retain the above copyright * - * notice, this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright * - * notice, this list of conditions and the following disclaimer in the * - * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products * - * derived from this software without specific prior written permission. * - * * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - *----------------------------------------------------------------------------*/ - -#ifndef __NW_EVT_H__ -#define __NW_EVT_H__ -/** - * @file NwEvt.h - * @brief -*/ - -#ifdef __WITH_LIBEVENT__ - -#include - -typedef struct event NwEventT; - -#define NW_EVT_READ (EV_READ) -#define NW_EVT_PERSIST (EV_PERSIST) -#define NW_EVT_CALLBACK(__cbFunc) __cbFunc(int fd, short event, void *arg) -#define NW_TMR_CALLBACK(__cbFunc) __cbFunc(int fd, short event, void *arg) - -#define NW_EVT_INIT event_init -#define NW_EVT_LOOP event_dispatch - -#define NW_EVENT_ADD(__ev, __evSelObj, __evCallback, __evCallbackArg, __evFlags) \ - do { \ - event_set(&(__ev), __evSelObj, __evFlags, __evCallback, __evCallbackArg); \ - event_add(&(__ev), NULL); \ - } while(0) - -#else - -#warning "Event library not defined!" - -/* HACK : Defining dummy values for compilation!*/ - -typedef struct { - int __tbd; -} NwEventT; - -#define NW_EVT_READ (0) -#define NW_EVT_PERSIST (1) -#define NW_EVT_CALLBACK(__cbFunc) __cbFunc(void *arg) -#define NW_TMR_CALLBACK(__cbFunc) __cbFunc(void *arg) - - -#define NW_EVT_INIT() do { printf("error: Event library not defined!\n"); exit (0); } while(0) -#define NW_EVT_LOOP() do { printf("error: Event library not defined!\n"); exit (0); } while(0) -#define NW_EVENT_ADD(...) do { printf("error: Event library not defined!\n"); exit (0); } while(0) - - -#endif - -#endif /* __NW_EVT_H__ */ diff --git a/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-helloworld/NwMiniLogMgrEntity.c b/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-helloworld/NwMiniLogMgrEntity.c deleted file mode 100644 index 3ebc6a3a23..0000000000 --- a/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-helloworld/NwMiniLogMgrEntity.c +++ /dev/null @@ -1,71 +0,0 @@ -/*----------------------------------------------------------------------------* - * * - * M I N I M A L I S T I C L O G M G R E N T I T Y * - * * - * Copyright (C) 2010 Amit Chawre. * - * * - *----------------------------------------------------------------------------*/ - -/** - * @file hello-world.c - * @brief This file contains example of a minimalistic log manager entity. -*/ - -#include -#include -#include "NwEvt.h" -#include "NwTypes.h" -#include "NwError.h" -#include "NwLog.h" -#include "NwGtpv2c.h" - -#include "NwMiniLogMgrEntity.h" - -#ifdef __cplusplus -extern "C" { -#endif - -static -NwCharT* gLogLevelStr[] = {"EMER", "ALER", "CRIT", "ERRO", "WARN", "NOTI", "INFO", "DEBG"}; - -NwMiniLogMgrT __gLogMgr; - - -/*--------------------------------------------------------------------------- - * Public functions - *--------------------------------------------------------------------------*/ - -NwMiniLogMgrT* nwMiniLogMgrGetInstance() -{ - return &(__gLogMgr); -} - -NwRcT nwMiniLogMgrInit(NwMiniLogMgrT* thiz, uint32_t logLevel ) -{ - thiz->logLevel = logLevel; - return NW_OK; -} - -NwRcT nwMiniLogMgrSetLogLevel(NwMiniLogMgrT* thiz, uint32_t logLevel) -{ - thiz->logLevel = logLevel; -} - -NwRcT nwMiniLogMgrLogRequest (NwGtpv2cLogMgrHandleT hLogMgr, - uint32_t logLevel, - NwCharT* file, - uint32_t line, - NwCharT* logStr) -{ - NwMiniLogMgrT* thiz = (NwMiniLogMgrT*) hLogMgr; - - if(thiz->logLevel >= logLevel) - printf("NWGTPV2C-STK %s - %s <%s,%u>\n", gLogLevelStr[logLevel], logStr, basename(file), line); - - return NW_OK; -} - -#ifdef __cplusplus -} -#endif - diff --git a/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-helloworld/NwMiniLogMgrEntity.h b/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-helloworld/NwMiniLogMgrEntity.h deleted file mode 100644 index 361a2c6d95..0000000000 --- a/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-helloworld/NwMiniLogMgrEntity.h +++ /dev/null @@ -1,89 +0,0 @@ -/*----------------------------------------------------------------------------* - * * - * M I N I M A L I S T I C L O G M G R E N T I T Y * - * * - * Copyright (C) 2010 Amit Chawre. * - * * - *----------------------------------------------------------------------------*/ - -/** - * @file hello-world.c - * @brief This file contains example of a minimalistic log manager entity. -*/ - -#include -#include -#include "NwEvt.h" -#include "NwLog.h" - -#ifndef NW_ASSERT -#define NW_ASSERT assert -#endif - -#ifndef __NW_MINI_LOG_MGR_H__ -#define __NW_MINI_LOG_MGR_H__ - -#define NW_LOG( _logLevel, ...) \ - do { \ - if((nwMiniLogMgrGetInstance())->logLevel >= _logLevel) \ - { \ - char _logStr[1024]; \ - snprintf(_logStr, 1024, __VA_ARGS__); \ - printf("NWGTPV2C-APP %s - %s <%s,%u>\n", gLogLevelStr[_logLevel], _logStr, basename(__FILE__), __LINE__);\ - } \ - } while(0) - -/** - * MiniLogMgr Class Definition - */ -typedef struct NwMiniLogMgr { - uint8_t logLevel; /*< Log level */ -} NwMiniLogMgrT; - - -/*--------------------------------------------------------------------------- - * Public functions - *--------------------------------------------------------------------------*/ - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * Get global singleton MiniLogMgr instance - */ -NwMiniLogMgrT* nwMiniLogMgrGetInstance(); - -/** - * Initialize MiniLogMgr - * @param thiz : Pointer to global singleton MiniLogMgr instance - * @param logLevel : Log Level - */ -NwRcT nwMiniLogMgrInit(NwMiniLogMgrT* thiz, uint32_t logLevel ); - -/** - * Set MiniLogMgr log level - * @param thiz : Pointer to global singleton MiniLogMgr instance - * @param logLevel : Log Level - */ -NwRcT nwMiniLogMgrSetLogLevel(NwMiniLogMgrT* thiz, uint32_t logLevel); - -/** - * Process log request from stack - * @param thiz : Pointer to global singleton MiniLogMgr instance - * @param logLevel : Log Level - * @param file : Filename - * @param line : Line Number - * @param logStr : Log string - */ -NwRcT nwMiniLogMgrLogRequest (NwGtpv2cLogMgrHandleT logMgrHandle, - uint32_t logLevel, - NwCharT* file, - uint32_t line, - NwCharT* logStr); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-helloworld/NwMiniTmrMgrEntity.c b/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-helloworld/NwMiniTmrMgrEntity.c deleted file mode 100644 index 38d2ee6374..0000000000 --- a/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-helloworld/NwMiniTmrMgrEntity.c +++ /dev/null @@ -1,100 +0,0 @@ -/*----------------------------------------------------------------------------* - * * - * M I N I M A L I S T I C T M R M G R E N T I T Y * - * * - * Copyright (C) 2010 Amit Chawre. * - * * - *----------------------------------------------------------------------------*/ - -/** - * @file NwMiniTmrMgrEntity.c - * @brief This file ontains example of a minimalistic timer manager entity. -*/ - -#include -#include -#include "NwEvt.h" -#include "NwGtpv2c.h" -#include "NwMiniLogMgrEntity.h" -#include "NwMiniTmrMgrEntity.h" - -#ifndef NW_ASSERT -#define NW_ASSERT assert -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -static -NwCharT* gLogLevelStr[] = {"EMER", "ALER", "CRIT", "ERRO", "WARN", "NOTI", "INFO", "DEBG"}; - -/*--------------------------------------------------------------------------- - * Private functions - *--------------------------------------------------------------------------*/ - -static void -NW_TMR_CALLBACK(nwGtpv2cNodeHandleStackTimerTimeout) -{ - NwRcT rc; - NwGtpv2cNodeTmrT *pTmr = (NwGtpv2cNodeTmrT*) arg; - - /* - * Send Timeout Request to Gtpv2c Stack Instance - */ - rc = nwGtpv2cProcessTimeout(pTmr->timeoutArg); - NW_ASSERT(NW_OK == rc); - - free(pTmr); - - return; -} - -/*--------------------------------------------------------------------------- - * Public functions - *--------------------------------------------------------------------------*/ - -NwRcT nwTimerStart( NwGtpv2cTimerMgrHandleT tmrMgrHandle, - uint32_t timeoutSec, - uint32_t timeoutUsec, - uint32_t tmrType, - void* timeoutArg, - NwGtpv2cTimerHandleT* hTmr) -{ - NwRcT rc = NW_OK; - NwGtpv2cNodeTmrT *pTmr; - struct timeval tv; - - NW_LOG(NW_LOG_LEVEL_DEBG, "Received start timer request from stack with timer type %u, arg %x, for %u sec and %u usec", tmrType, timeoutArg, timeoutSec, timeoutUsec); - - pTmr = (NwGtpv2cNodeTmrT*) malloc(sizeof(NwGtpv2cNodeTmrT)); - - /* set the timevalues*/ - timerclear(&tv); - tv.tv_sec = timeoutSec; - tv.tv_usec = timeoutUsec; - - pTmr->timeoutArg = timeoutArg; - evtimer_set(&pTmr->ev, nwGtpv2cNodeHandleStackTimerTimeout, pTmr); - - /*add event*/ - - event_add(&(pTmr->ev), &tv); - - *hTmr = (NwGtpv2cTimerHandleT)pTmr; - - return rc; -} - -NwRcT nwTimerStop( NwGtpv2cTimerMgrHandleT tmrMgrHandle, - NwGtpv2cTimerHandleT hTmr) -{ - NW_LOG(NW_LOG_LEVEL_DEBG, "Received stop timer request from stack for timer handle %u", hTmr); - evtimer_del(&(((NwGtpv2cNodeTmrT*)hTmr)->ev)); - free((void*)hTmr); - return NW_OK; -} - -#ifdef __cplusplus -} -#endif diff --git a/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-helloworld/NwMiniTmrMgrEntity.h b/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-helloworld/NwMiniTmrMgrEntity.h deleted file mode 100644 index 85970c6cc2..0000000000 --- a/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-helloworld/NwMiniTmrMgrEntity.h +++ /dev/null @@ -1,57 +0,0 @@ -/*----------------------------------------------------------------------------* - * * - * M I N I M A L I S T I C T M R M G R E N T I T Y * - * * - * Copyright (C) 2010 Amit Chawre. * - * * - *----------------------------------------------------------------------------*/ - - -/** - * @file NwMiniTmrMgrEntity.c - * @brief This file ontains example of a minimalistic timer manager entity. -*/ - -#include -#include -#include "NwEvt.h" -#include "NwLog.h" - -#ifndef NW_ASSERT -#define NW_ASSERT assert -#endif - -#ifndef __NW_MINI_TMR_MGR_H__ -#define __NW_MINI_TMR_MGR_H__ - -typedef struct { - uint8_t _tbd; -} NwGtpv2cNodeTmrMgrT; - -typedef struct { - NwEventT ev; - void* timeoutArg; -} NwGtpv2cNodeTmrT; - - -#ifdef __cplusplus -extern "C" { -#endif - -NwRcT nwTimerStart( NwGtpv2cTimerMgrHandleT tmrMgrHandle, - uint32_t timeoutSec, - uint32_t timeoutUsec, - uint32_t tmrType, - void* timeoutArg, - NwGtpv2cTimerHandleT* hTmr); - - -NwRcT nwTimerStop( NwGtpv2cTimerMgrHandleT tmrMgrHandle, - NwGtpv2cTimerHandleT hTmr); - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-helloworld/NwMiniUdpEntity.c b/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-helloworld/NwMiniUdpEntity.c deleted file mode 100644 index a5352349f5..0000000000 --- a/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-helloworld/NwMiniUdpEntity.c +++ /dev/null @@ -1,149 +0,0 @@ -/*----------------------------------------------------------------------------* - * * - * M I N I M A L I S T I C U D P E N T I T Y * - * * - * Copyright (C) 2010 Amit Chawre. * - * * - *----------------------------------------------------------------------------*/ - - -/** - * @file NwMiniUdpEntity.c - * @brief This file contains example of a minimalistic ULP entity. -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include "NwEvt.h" -#include "NwGtpv2c.h" -#include "NwMiniLogMgrEntity.h" -#include "NwMiniUdpEntity.h" - -#ifndef NW_ASSERT -#define NW_ASSERT assert -#endif - -#define MAX_UDP_PAYLOAD_LEN (4096) - -#ifdef __cplusplus -extern "C" { -#endif - -static -NwCharT* gLogLevelStr[] = {"EMER", "ALER", "CRIT", "ERRO", "WARN", "NOTI", "INFO", "DEBG"}; - -/*--------------------------------------------------------------------------- - * Private functions - *--------------------------------------------------------------------------*/ - -static -void NW_EVT_CALLBACK(nwUdpDataIndicationCallbackData) -{ - NwRcT rc; - uint8_t udpBuf[MAX_UDP_PAYLOAD_LEN]; - NwS32T bytesRead; - uint32_t peerLen; - struct sockaddr_in peer; - NwGtpv2cNodeUdpT* thiz = (NwGtpv2cNodeUdpT*) arg; - - peerLen = sizeof(peer); - - bytesRead = recvfrom(fd, udpBuf, MAX_UDP_PAYLOAD_LEN , 0, (struct sockaddr *) &peer,(socklen_t*) &peerLen); - - if(bytesRead) { - uint32_t peerIp = (peer.sin_addr.s_addr); - NW_LOG(NW_LOG_LEVEL_DEBG, "Received UDP message of size %u from peer %u.%u.%u.%u:%u", bytesRead, - (peerIp & 0x000000ff), - (peerIp & 0x0000ff00) >> 8, - (peerIp & 0x00ff0000) >> 16, - (peerIp & 0xff000000) >> 24, - ntohs(peer.sin_port)); - rc = nwGtpv2cProcessUdpReq(thiz->hGtpv2cStack, udpBuf, bytesRead, ntohs(peer.sin_port), ntohl(peer.sin_addr.s_addr)); - } else { - NW_LOG(NW_LOG_LEVEL_ERRO, "%s", strerror(errno)); - } -} - - -/*--------------------------------------------------------------------------- - * Public functions - *--------------------------------------------------------------------------*/ - -NwRcT nwGtpv2cUdpInit(NwGtpv2cNodeUdpT* thiz, NwGtpv2cStackHandleT hGtpv2cStack, uint8_t* ipv4Addr) -{ - int sd; - struct sockaddr_in addr; - - sd = socket(AF_INET, SOCK_DGRAM, 0); - - if (sd < 0) { - NW_LOG(NW_LOG_LEVEL_ERRO, "%s", strerror(errno)); - NW_ASSERT(0); - } - - addr.sin_family = AF_INET; - addr.sin_port = htons(2123); - addr.sin_addr.s_addr = inet_addr(ipv4Addr); - memset(addr.sin_zero, '\0', sizeof (addr.sin_zero)); - - if(bind(sd, (struct sockaddr *)&addr, sizeof(addr)) < 0) { - NW_LOG(NW_LOG_LEVEL_ERRO, "%s", strerror(errno)); - NW_ASSERT(0); - } - - NW_EVENT_ADD((thiz->ev), sd, nwUdpDataIndicationCallbackData, thiz, NW_EVT_READ | NW_EVT_PERSIST); - - thiz->hSocket = sd; - thiz->hGtpv2cStack = hGtpv2cStack; - - return NW_OK; -} - -NwRcT nwGtpv2cUdpDestroy(NwGtpv2cNodeUdpT* thiz) -{ - close(thiz->hSocket); -} - -NwRcT nwGtpv2cUdpDataReq(NwGtpv2cUdpHandleT udpHandle, - uint8_t* dataBuf, - uint32_t dataSize, - uint32_t peerIp, - uint32_t peerPort) -{ - struct sockaddr_in peerAddr; - NwS32T bytesSent; - NwGtpv2cNodeUdpT* thiz = (NwGtpv2cNodeUdpT*) udpHandle; - - NW_LOG(NW_LOG_LEVEL_DEBG, "Sending buf of size %u for on handle %x to peer %u.%u.%u.%u:%u", dataSize, udpHandle, - (peerIp & 0xff000000) >> 24, - (peerIp & 0x00ff0000) >> 16, - (peerIp & 0x0000ff00) >> 8, - (peerIp & 0x000000ff), - peerPort); - - peerAddr.sin_family = AF_INET; - peerAddr.sin_port = htons(peerPort); - peerAddr.sin_addr.s_addr = htonl(peerIp); - memset(peerAddr.sin_zero, '\0', sizeof (peerAddr.sin_zero)); - - bytesSent = sendto (thiz->hSocket, dataBuf, dataSize, 0, (struct sockaddr *) &peerAddr, sizeof(peerAddr)); - - if(bytesSent < 0) { - NW_LOG(NW_LOG_LEVEL_ERRO, "%s", strerror(errno)); - NW_ASSERT(0); - } - - return NW_OK; -} - - -#ifdef __cplusplus -} -#endif - diff --git a/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-helloworld/NwMiniUdpEntity.h b/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-helloworld/NwMiniUdpEntity.h deleted file mode 100644 index 4f1bb3eef9..0000000000 --- a/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-helloworld/NwMiniUdpEntity.h +++ /dev/null @@ -1,51 +0,0 @@ -/*----------------------------------------------------------------------------* - * * - * M I N I M A L I S T I C U D P E N T I T Y * - * * - * Copyright (C) 2010 Amit Chawre. * - * * - *----------------------------------------------------------------------------*/ - - -/** - * @file NwMiniUdpEntity.c - * @brief This file contains example of a minimalistic ULP entity. -*/ - -#include -#include -#include "NwEvt.h" -#include "NwLog.h" - -#ifndef NW_ASSERT -#define NW_ASSERT assert -#endif - -#ifndef __NW_MINI_UDP_ENTITY_H__ -#define __NW_MINI_UDP_ENTITY_H__ - -typedef struct { - uint32_t hSocket; - NwEventT ev; - NwGtpv2cStackHandleT hGtpv2cStack; -} NwGtpv2cNodeUdpT; - -#ifdef __cplusplus -extern "C" { -#endif - -NwRcT nwGtpv2cUdpInit(NwGtpv2cNodeUdpT* thiz, NwGtpv2cStackHandleT hGtpv2cStack, uint8_t* ipv4Addr); - -NwRcT nwGtpv2cUdpDestroy(NwGtpv2cNodeUdpT* thiz); - -NwRcT nwGtpv2cUdpDataReq(NwGtpv2cUdpHandleT udpHandle, - uint8_t* dataBuf, - uint32_t dataSize, - uint32_t peerIp, - uint32_t peerPort); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-helloworld/NwMiniUlpEntity.c b/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-helloworld/NwMiniUlpEntity.c deleted file mode 100644 index 82bc6580af..0000000000 --- a/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-helloworld/NwMiniUlpEntity.c +++ /dev/null @@ -1,278 +0,0 @@ -/*----------------------------------------------------------------------------* - * * - * M I N I M A L I S T I C U L P E N T I T Y * - * * - * Copyright (C) 2010 Amit Chawre. * - * * - *----------------------------------------------------------------------------*/ - -/** - * @file NwMiniUlpEntity.c - * @brief This file contains example of a minimalistic ULP entity. -*/ - -#include -#include -#include -#include "NwEvt.h" -#include "NwGtpv2c.h" -#include "NwGtpv2cIe.h" -#include "NwGtpv2cMsg.h" -#include "NwGtpv2cMsgParser.h" -#include "NwMiniLogMgrEntity.h" -#include "NwMiniUlpEntity.h" - -#ifndef NW_ASSERT -#define NW_ASSERT assert -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -static -NwCharT* gLogLevelStr[] = {"EMER", "ALER", "CRIT", "ERRO", "WARN", "NOTI", "INFO", "DEBG"}; - -static NwRcT -nwGtpv2cCreateSessionRequestIeIndication(uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t* ieValue, void* arg) -{ - NW_LOG(NW_LOG_LEVEL_DEBG, "Received IE Parse Indication for of type %u, length %u, instance %u!", ieType, ieLength, ieInstance); - return NW_OK; -} - -/*--------------------------------------------------------------------------- - * Public Functions - *--------------------------------------------------------------------------*/ - -NwRcT -nwGtpv2cUlpInit(NwGtpv2cNodeUlpT* thiz, NwGtpv2cStackHandleT hGtpv2cStack, char* peerIpStr) -{ - NwRcT rc; - thiz->hGtpv2cStack = hGtpv2cStack; - strcpy(thiz->peerIpStr, peerIpStr); - return NW_OK; -} - -NwRcT -nwGtpv2cUlpDestroy(NwGtpv2cNodeUlpT* thiz) -{ - NW_ASSERT(thiz); - memset(thiz, 0, sizeof(NwGtpv2cNodeUlpT)); - return NW_OK; -} - -NwRcT -nwGtpv2cUlpSenEchoRequestToPeer(NwGtpv2cNodeUlpT* thiz, uint32_t peerIp) -{ - NwRcT rc; - NwGtpv2cUlpApiT ulpReq; - /* - * Send Message Request to Gtpv2c Stack Instance - */ - - ulpReq.apiType = NW_GTPV2C_ULP_API_INITIAL_REQ; - - ulpReq.apiInfo.initialReqInfo.hTunnel = 0; - ulpReq.apiInfo.initialReqInfo.hUlpTrxn = (NwGtpv2cUlpTrxnHandleT)thiz; - ulpReq.apiInfo.initialReqInfo.hUlpTunnel = (NwGtpv2cUlpTrxnHandleT)thiz; - ulpReq.apiInfo.initialReqInfo.teidLocal = (NwGtpv2cUlpTrxnHandleT)0; - ulpReq.apiInfo.initialReqInfo.peerIp = htonl(peerIp); - - rc = nwGtpv2cMsgNew( thiz->hGtpv2cStack, - NW_FALSE, - NW_GTP_ECHO_REQ, - 0, - 0, - &(ulpReq.hMsg)); - - NW_ASSERT(NW_OK == rc); - - rc = nwGtpv2cMsgAddIeTV1((ulpReq.hMsg), NW_GTPV2C_IE_RECOVERY, 0, thiz->restartCounter); - NW_ASSERT(NW_OK == rc); - - rc = nwGtpv2cProcessUlpReq(thiz->hGtpv2cStack, &ulpReq); - NW_ASSERT(NW_OK == rc); - - return NW_OK; -} - -NwRcT -nwGtpv2cUlpCreateSessionRequestToPeer(NwGtpv2cNodeUlpT* thiz) -{ - NwRcT rc; - NwGtpv2cUlpApiT ulpReq; - - /* - * Send Message Request to Gtpv2c Stack Instance - */ - - ulpReq.apiType = (NW_GTPV2C_ULP_API_INITIAL_REQ | NW_GTPV2C_ULP_API_FLAG_CREATE_LOCAL_TUNNEL); - - ulpReq.apiInfo.initialReqInfo.hUlpTrxn = (NwGtpv2cUlpTrxnHandleT)thiz; - ulpReq.apiInfo.initialReqInfo.teidLocal = (NwGtpv2cUlpTrxnHandleT)thiz; - ulpReq.apiInfo.initialReqInfo.peerIp = ntohl(inet_addr(thiz->peerIpStr)); - - rc = nwGtpv2cMsgNew( thiz->hGtpv2cStack, - NW_TRUE, - NW_GTP_CREATE_SESSION_REQ, - 0, - 0, - &(ulpReq.hMsg)); - - NW_ASSERT(NW_OK == rc); - - rc = nwGtpv2cMsgAddIeTV1((ulpReq.hMsg), NW_GTPV2C_IE_RECOVERY, 0, thiz->restartCounter); - NW_ASSERT(NW_OK == rc); - - rc = nwGtpv2cProcessUlpReq(thiz->hGtpv2cStack, &ulpReq); - NW_ASSERT(NW_OK == rc); - - return NW_OK; -} - -NwRcT -nwGtpv2cUlpProcessStackReqCallback (NwGtpv2cUlpHandleT hUlp, - NwGtpv2cUlpApiT *pUlpApi) -{ - NwRcT rc; - NwGtpv2cNodeUlpT* thiz; - NW_ASSERT(pUlpApi != NULL); - - thiz = (NwGtpv2cNodeUlpT*) hUlp; - - switch(pUlpApi->apiType) { - - case NW_GTPV2C_ULP_API_INITIAL_REQ_IND: { - NwGtpv2cUlpApiT ulpReq; - NwGtpv2cMsgParserT *pMsgParser; - NW_LOG(NW_LOG_LEVEL_DEBG, "Received NW_GTPV2C_ULP_API_INITIAL_REQ_IND from gtpv2c stack! %X:%u", pUlpApi->apiInfo.initialReqIndInfo.peerIp, pUlpApi->apiInfo.initialReqIndInfo.peerPort); - - rc = nwGtpv2cMsgParserNew(thiz->hGtpv2cStack, NW_GTP_CREATE_SESSION_REQ, nwGtpv2cCreateSessionRequestIeIndication, NULL, &pMsgParser); - NW_ASSERT(NW_OK == rc); - - if(pUlpApi->apiInfo.initialReqIndInfo.msgType == NW_GTP_CREATE_SESSION_REQ) { - - struct { - uint8_t causeValue; - uint8_t spare:5; - uint8_t pce:1; - uint8_t bce:1; - uint8_t cs:1; - } cause; - - - rc = nwGtpv2cMsgParserAddIe(pMsgParser, NW_GTPV2C_IE_RECOVERY, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_MANDATORY, nwGtpv2cCreateSessionRequestIeIndication, NULL); - NW_ASSERT(NW_OK == rc); - - uint8_t offendingIeType, OffendingIeLength; - rc = nwGtpv2cMsgParserRun(pMsgParser, (pUlpApi->hMsg), &offendingIeType, &OffendingIeLength); - - if( rc != NW_OK ) { - switch(rc) { - case NW_GTPV2C_MANDATORY_IE_MISSING: - NW_LOG(NW_LOG_LEVEL_ERRO, "Mandatory IE type '%u' of instance '%u' missing!", offendingIeType, OffendingIeLength); - cause.causeValue = NW_GTPV2C_CAUSE_MANDATORY_IE_MISSING; - break; - - default: - NW_LOG(NW_LOG_LEVEL_ERRO, "Unknown message parse error!"); - cause.causeValue = 0; - break; - } - - } else { - cause.causeValue = NW_GTPV2C_CAUSE_REQUEST_ACCEPTED; - } - - /* - * Send Message Request to Gtpv2c Stack Instance - */ - ulpReq.apiType = NW_GTPV2C_ULP_API_TRIGGERED_RSP; - - ulpReq.apiInfo.triggeredRspInfo.hTrxn = pUlpApi->apiInfo.initialReqIndInfo.hTrxn; - - rc = nwGtpv2cMsgNew( thiz->hGtpv2cStack, - NW_TRUE, - NW_GTP_CREATE_SESSION_RSP, - 0, - nwGtpv2cMsgGetSeqNumber(pUlpApi->hMsg), - &(ulpReq.hMsg)); - - rc = nwGtpv2cMsgAddIe((ulpReq.hMsg), NW_GTPV2C_IE_CAUSE, 2, 0, (uint8_t*)&cause); - NW_ASSERT(NW_OK == rc); - - NW_LOG(NW_LOG_LEVEL_NOTI, "Received NW_GTP_CREATE_SESSION_REQ, Sending NW_GTP_CREATE_SESSION_RSP!"); - rc = nwGtpv2cProcessUlpReq(thiz->hGtpv2cStack, &ulpReq); - NW_ASSERT(NW_OK == rc); - } - - rc = nwGtpv2cMsgParserDelete(thiz->hGtpv2cStack, pMsgParser); - NW_ASSERT(NW_OK == rc); - - rc = nwGtpv2cMsgDelete(thiz->hGtpv2cStack, (pUlpApi->hMsg)); - NW_ASSERT(NW_OK == rc); - - } - break; - - case NW_GTPV2C_ULP_API_TRIGGERED_RSP_IND: { - NwGtpv2cUlpApiT ulpReq; - NwGtpv2cMsgParserT *pMsgParser; - NW_LOG(NW_LOG_LEVEL_DEBG, "Received NW_GTPV2C_ULP_API_TRIGGERED_RSP_IND from gtpv2c stack!", pUlpApi->apiInfo.triggeredRspIndInfo, pUlpApi->apiInfo.triggeredRspIndInfo); - - rc = nwGtpv2cMsgParserNew(thiz->hGtpv2cStack, NW_GTP_CREATE_SESSION_REQ, nwGtpv2cCreateSessionRequestIeIndication, NULL, &pMsgParser); - NW_ASSERT(NW_OK == rc); - - if(pUlpApi->apiInfo.triggeredRspIndInfo.msgType == NW_GTP_CREATE_SESSION_RSP) { - rc = nwGtpv2cMsgParserAddIe(pMsgParser, NW_GTPV2C_IE_CAUSE, NW_GTPV2C_IE_INSTANCE_ZERO, NW_GTPV2C_IE_PRESENCE_MANDATORY, nwGtpv2cCreateSessionRequestIeIndication, NULL); - NW_ASSERT(NW_OK == rc); - - uint8_t offendingIeType, OffendingIeLength; - rc = nwGtpv2cMsgParserRun(pMsgParser, (pUlpApi->hMsg), &offendingIeType, &OffendingIeLength); - - if( rc != NW_OK ) { - switch(rc) { - case NW_GTPV2C_MANDATORY_IE_MISSING: - NW_LOG(NW_LOG_LEVEL_ERRO, "Mandatory IE Missing!"); - break; - - default: - NW_LOG(NW_LOG_LEVEL_ERRO, "Unknown message parse error!"); - break; - - } - - } - - /* - * Send Message Request to Gtpv2c Stack Instance - */ - NW_LOG(NW_LOG_LEVEL_NOTI, "Received NW_GTP_CREATE_SESSION_RSP, Sending NW_GTP_CREATE_SESSION_REQ!"); - nwGtpv2cUlpCreateSessionRequestToPeer(thiz); - } - - rc = nwGtpv2cMsgParserDelete(thiz->hGtpv2cStack, pMsgParser); - NW_ASSERT(NW_OK == rc); - - rc = nwGtpv2cMsgDelete(thiz->hGtpv2cStack, (pUlpApi->hMsg)); - NW_ASSERT(NW_OK == rc); - - } - break; - - case NW_GTPV2C_ULP_API_RSP_FAILURE_IND: { - NW_LOG(NW_LOG_LEVEL_ERRO, "Received NW_GTPV2C_ULP_API_RSP_FAILURE from gtpv2c stack for transaction '%x'!", thiz); - } - break; - - default: - NW_LOG(NW_LOG_LEVEL_WARN, "Received undefined UlpApi from gtpv2c stack!"); - } - - return NW_OK; -} - -#ifdef __cplusplus -} -#endif - diff --git a/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-helloworld/NwMiniUlpEntity.h b/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-helloworld/NwMiniUlpEntity.h deleted file mode 100644 index e92a6ba6bc..0000000000 --- a/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-helloworld/NwMiniUlpEntity.h +++ /dev/null @@ -1,49 +0,0 @@ -/*----------------------------------------------------------------------------* - * * - * M I N I M A L I S T I C U L P E N T I T Y * - * * - * Copyright (C) 2010 Amit Chawre. * - * * - *----------------------------------------------------------------------------*/ - -/** - * @file NwMiniUlpEntity.h - * @brief This file contains example of a minimalistic ULP entity. -*/ - -#include -#include -#include "NwEvt.h" -#include "NwLog.h" - -#ifndef __NW_MINI_ULP_H__ -#define __NW_MINI_ULP_H__ - -typedef struct { - uint8_t peerIpStr[16]; - uint32_t restartCounter; - NwGtpv2cStackHandleT hGtpv2cStack; -} NwGtpv2cNodeUlpT; - -#ifdef __cplusplus -extern "C" { -#endif - -NwRcT -nwGtpv2cUlpInit(NwGtpv2cNodeUlpT* thiz, NwGtpv2cStackHandleT hGtpv2cStack, char* peerIpStr ); - -NwRcT -nwGtpv2cUlpDestroy(NwGtpv2cNodeUlpT* thiz); - -NwRcT -nwGtpv2cUlpCreateSessionRequestToPeer(NwGtpv2cNodeUlpT* thiz); - -NwRcT -nwGtpv2cUlpProcessStackReqCallback (NwGtpv2cUlpHandleT hUlp, - NwGtpv2cUlpApiT *pUlpApi); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-helloworld/helloworld.c b/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-helloworld/helloworld.c deleted file mode 100644 index 2b78e104e2..0000000000 --- a/openair-cn/GTPV2-C/nwgtpv2c-0.11/test-app/nw-helloworld/helloworld.c +++ /dev/null @@ -1,179 +0,0 @@ -/*----------------------------------------------------------------------------* - * * - * n w - g t p v 2 c * - * G P R S T u n n e l i n g P r o t o c o l v 2 c S t a c k * - * * - * M I N I M A L I S T I C D E M O N S T R A T I O N * - * * - * Copyright (C) 2010 Amit Chawre. * - * * - *----------------------------------------------------------------------------*/ - - -/** - * @file hello-world.c - * @brief This is a test program demostrating usage of nw-gtpv2c library. -*/ - -#include -#include -#include "NwEvt.h" -#include "NwLog.h" -#include "NwGtpv2c.h" - -#include "NwMiniLogMgrEntity.h" -#include "NwMiniTmrMgrEntity.h" -#include "NwMiniUdpEntity.h" -#include "NwMiniUlpEntity.h" - -#ifndef NW_ASSERT -#define NW_ASSERT assert -#endif - -static -NwCharT* gLogLevelStr[] = {"EMER", "ALER", "CRIT", "ERRO", "WARN", "NOTI", "INFO", "DEBG"}; - -/*--------------------------------------------------------------------------- - * T H E M A I N F U N C T I O N - *--------------------------------------------------------------------------*/ - -int main(int argc, char* argv[]) -{ - NwRcT rc; - uint32_t logLevel; - uint8_t* logLevelStr; - - NwGtpv2cStackHandleT hGtpv2cStack = 0; - - NwGtpv2cNodeUlpT ulpObj; - NwGtpv2cNodeUdpT udpObj; - - - NwGtpv2cUlpEntityT ulp; - NwGtpv2cUdpEntityT udp; - NwGtpv2cTimerMgrEntityT tmrMgr; - NwGtpv2cLogMgrEntityT logMgr; - - if(argc != 3) { - printf("Usage: %s \n", argv[0]); - exit(0); - } - - logLevelStr = getenv ("NW_LOG_LEVEL"); - - if(logLevelStr == NULL) { - logLevel = NW_LOG_LEVEL_INFO; - } else { - if(strncmp(logLevelStr, "EMER",4) == 0) - logLevel = NW_LOG_LEVEL_EMER; - else if(strncmp(logLevelStr, "ALER",4) == 0) - logLevel = NW_LOG_LEVEL_ALER; - else if(strncmp(logLevelStr, "CRIT",4) == 0) - logLevel = NW_LOG_LEVEL_CRIT; - else if(strncmp(logLevelStr, "ERRO",4) == 0) - logLevel = NW_LOG_LEVEL_ERRO ; - else if(strncmp(logLevelStr, "WARN",4) == 0) - logLevel = NW_LOG_LEVEL_WARN; - else if(strncmp(logLevelStr, "NOTI",4) == 0) - logLevel = NW_LOG_LEVEL_NOTI; - else if(strncmp(logLevelStr, "INFO",4) == 0) - logLevel = NW_LOG_LEVEL_INFO; - else if(strncmp(logLevelStr, "DEBG",4) == 0) - logLevel = NW_LOG_LEVEL_DEBG; - } - - /*--------------------------------------------------------------------------- - * Initialize event library - *--------------------------------------------------------------------------*/ - - NW_EVT_INIT(); - - /*--------------------------------------------------------------------------- - * Initialize Log Manager - *--------------------------------------------------------------------------*/ - nwMiniLogMgrInit(nwMiniLogMgrGetInstance(), logLevel); - - /*--------------------------------------------------------------------------- - * Initialize Gtpv2c Stack Instance - *--------------------------------------------------------------------------*/ - rc = nwGtpv2cInitialize(&hGtpv2cStack); - - if(rc != NW_OK) { - NW_LOG(NW_LOG_LEVEL_ERRO, "Failed to create gtpv2c stack instance. Error '%u' occured", rc); - exit(1); - } - - NW_LOG(NW_LOG_LEVEL_INFO, "Gtpv2c Stack Handle '%X' Creation Successful!", hGtpv2cStack); - - rc = nwGtpv2cSetLogLevel(hGtpv2cStack, logLevel); - - /*--------------------------------------------------------------------------- - * Set up Ulp Entity - *--------------------------------------------------------------------------*/ - rc = nwGtpv2cUlpInit(&ulpObj, hGtpv2cStack, argv[2]); - NW_ASSERT(NW_OK == rc); - - ulp.hUlp = (NwGtpv2cUlpHandleT) &ulpObj; - ulp.ulpReqCallback = nwGtpv2cUlpProcessStackReqCallback; - - rc = nwGtpv2cSetUlpEntity(hGtpv2cStack, &ulp); - NW_ASSERT(NW_OK == rc); - - /*--------------------------------------------------------------------------- - * Set up Udp Entity - *--------------------------------------------------------------------------*/ - rc = nwGtpv2cUdpInit(&udpObj, hGtpv2cStack, (argv[1])); - NW_ASSERT(NW_OK == rc); - - udp.hUdp = (NwGtpv2cUdpHandleT) &udpObj; - udp.udpDataReqCallback = nwGtpv2cUdpDataReq; - - rc = nwGtpv2cSetUdpEntity(hGtpv2cStack, &udp); - NW_ASSERT(NW_OK == rc); - - /*--------------------------------------------------------------------------- - * Set up Log Entity - *--------------------------------------------------------------------------*/ - tmrMgr.tmrMgrHandle = 0; - tmrMgr.tmrStartCallback = nwTimerStart; - tmrMgr.tmrStopCallback = nwTimerStop; - - rc = nwGtpv2cSetTimerMgrEntity(hGtpv2cStack, &tmrMgr); - NW_ASSERT(NW_OK == rc); - - /*--------------------------------------------------------------------------- - * Set up Log Entity - *--------------------------------------------------------------------------*/ - logMgr.logMgrHandle = (NwGtpv2cLogMgrHandleT) nwMiniLogMgrGetInstance(); - logMgr.logReqCallback = nwMiniLogMgrLogRequest; - - rc = nwGtpv2cSetLogMgrEntity(hGtpv2cStack, &logMgr); - NW_ASSERT(NW_OK == rc); - - /*--------------------------------------------------------------------------- - * Send Message Request to Gtpv2c Stack Instance - *--------------------------------------------------------------------------*/ - //rc = nwGtpv2cUlpCreateSessionRequestToPeer(&ulpObj); - rc = nwGtpv2cUlpSenEchoRequestToPeer(&ulpObj, inet_addr(argv[2])); - NW_ASSERT(NW_OK == rc); - - /*--------------------------------------------------------------------------- - * Event loop - *--------------------------------------------------------------------------*/ - - NW_EVT_LOOP(); - NW_LOG(NW_LOG_LEVEL_ERRO, "Exit from eventloop, no events to process!"); - - /*--------------------------------------------------------------------------- - * Destroy Gtpv2c Stack Instance - *--------------------------------------------------------------------------*/ - rc = nwGtpv2cFinalize(hGtpv2cStack); - - if(rc != NW_OK) { - NW_LOG(NW_LOG_LEVEL_ERRO, "Failed to finalize gtpv2c stack instance. Error '%u' occured", rc); - } else { - NW_LOG(NW_LOG_LEVEL_INFO, "Gtpv2c Stack Handle '%X' Finalize Successful!", hGtpv2cStack); - } - - return rc; -} diff --git a/openair-cn/INSTALL b/openair-cn/INSTALL deleted file mode 100644 index 2099840756..0000000000 --- a/openair-cn/INSTALL +++ /dev/null @@ -1,370 +0,0 @@ -Installation Instructions -************************* - -Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation, -Inc. - - Copying and distribution of this file, with or without modification, -are permitted in any medium without royalty provided the copyright -notice and this notice are preserved. This file is offered as-is, -without warranty of any kind. - -Basic Installation -================== - - 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 -below. The lack of an optional feature in a given package is not -necessarily a bug. More recommendations for GNU packages can be found -in *note Makefile Conventions: (standards)Makefile Conventions. - - The `configure' shell script attempts to guess correct values for -various system-dependent variables used during compilation. It uses -those values to create a `Makefile' in each directory of the package. -It may also create one or more `.h' files containing system-dependent -definitions. Finally, it creates a shell script `config.status' that -you can run in the future to recreate the current configuration, and a -file `config.log' containing compiler output (useful mainly for -debugging `configure'). - - It can also use an optional file (typically called `config.cache' -and enabled with `--cache-file=config.cache' or simply `-C') that saves -the results of its tests to speed up reconfiguring. Caching is -disabled by default to prevent problems with accidental use of stale -cache files. - - If you need to do unusual things to compile the package, please try -to figure out how `configure' could check whether to do them, and mail -diffs or instructions to the address given in the `README' so they can -be considered for the next release. If you are using the cache, and at -some point `config.cache' contains results you don't want to keep, you -may remove or edit it. - - The file `configure.ac' (or `configure.in') is used to create -`configure' by a program called `autoconf'. You need `configure.ac' if -you want to change it or regenerate `configure' using a newer version -of `autoconf'. - - The simplest way to compile this package is: - - 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. - - Running `configure' might take a while. While running, it prints - some messages telling which features it is checking for. - - 2. Type `make' to compile the package. - - 3. Optionally, type `make check' to run any self-tests that come with - the package, generally using the just-built uninstalled binaries. - - 4. Type `make install' to install the programs and any data files and - documentation. When installing into a prefix owned by root, it is - recommended that the package be configured and built as a regular - user, and only the `make install' phase executed with root - privileges. - - 5. Optionally, type `make installcheck' to repeat any self-tests, but - this time using the binaries in their final installed location. - This target does not install anything. Running this target as a - regular user, particularly if the prior `make install' required - root privileges, verifies that the installation completed - correctly. - - 6. You can remove the program binaries and object files from the - source code directory by typing `make clean'. To also remove the - files that `configure' created (so you can compile the package for - a different kind of computer), type `make distclean'. There is - also a `make maintainer-clean' target, but that is intended mainly - for the package's developers. If you use it, you may have to get - all sorts of other programs in order to regenerate files that came - with the distribution. - - 7. Often, you can also type `make uninstall' to remove the installed - files again. In practice, not all packages have tested that - uninstallation works correctly, even though it is required by the - GNU Coding Standards. - - 8. Some packages, particularly those that use Automake, provide `make - distcheck', which can by used by developers to test that all other - targets like `make install' and `make uninstall' work correctly. - This target is generally not run by end users. - -Compilers and Options -===================== - - Some systems require unusual options for compilation or linking that -the `configure' script does not know about. Run `./configure --help' -for details on some of the pertinent environment variables. - - You can give `configure' initial values for configuration parameters -by setting variables in the command line or in the environment. Here -is an example: - - ./configure CC=c99 CFLAGS=-g LIBS=-lposix - - *Note Defining Variables::, for more details. - -Compiling For Multiple Architectures -==================================== - - You can compile the package for more than one kind of computer at the -same time, by placing the object files for each architecture in their -own directory. To do this, you can use GNU `make'. `cd' to the -directory where you want the object files and executables to go and run -the `configure' script. `configure' automatically checks for the -source code in the directory that `configure' is in and in `..'. This -is known as a "VPATH" build. - - With a non-GNU `make', it is safer to compile the package for one -architecture at a time in the source code directory. After you have -installed the package for one architecture, use `make distclean' before -reconfiguring for another architecture. - - On MacOS X 10.5 and later systems, you can create libraries and -executables that work on multiple system types--known as "fat" or -"universal" binaries--by specifying multiple `-arch' options to the -compiler but only a single `-arch' option to the preprocessor. Like -this: - - ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ - CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ - CPP="gcc -E" CXXCPP="g++ -E" - - This is not guaranteed to produce working output in all cases, you -may have to build one architecture at a time and combine the results -using the `lipo' tool if you have problems. - -Installation Names -================== - - By default, `make install' installs the package's commands under -`/usr/local/bin', include files under `/usr/local/include', etc. You -can specify an installation prefix other than `/usr/local' by giving -`configure' the option `--prefix=PREFIX', where PREFIX must be an -absolute file name. - - You can specify separate installation prefixes for -architecture-specific files and architecture-independent files. If you -pass the option `--exec-prefix=PREFIX' to `configure', the package uses -PREFIX as the prefix for installing programs and libraries. -Documentation and other data files still use the regular prefix. - - In addition, if you use an unusual directory layout you can give -options like `--bindir=DIR' to specify different values for particular -kinds of files. Run `configure --help' for a list of the directories -you can set and what kinds of files go in them. In general, the -default for these options is expressed in terms of `${prefix}', so that -specifying just `--prefix' will affect all of the other directory -specifications that were not explicitly provided. - - The most portable way to affect installation locations is to pass the -correct locations to `configure'; however, many packages provide one or -both of the following shortcuts of passing variable assignments to the -`make install' command line to change installation locations without -having to reconfigure or recompile. - - The first method involves providing an override variable for each -affected directory. For example, `make install -prefix=/alternate/directory' will choose an alternate location for all -directory configuration variables that were expressed in terms of -`${prefix}'. Any directories that were specified during `configure', -but not in terms of `${prefix}', must each be overridden at install -time for the entire installation to be relocated. The approach of -makefile variable overrides for each directory variable is required by -the GNU Coding Standards, and ideally causes no recompilation. -However, some platforms have known limitations with the semantics of -shared libraries that end up requiring recompilation when using this -method, particularly noticeable in packages that use GNU Libtool. - - The second method involves providing the `DESTDIR' variable. For -example, `make install DESTDIR=/alternate/directory' will prepend -`/alternate/directory' before all installation names. The approach of -`DESTDIR' overrides is not required by the GNU Coding Standards, and -does not work on platforms that have drive letters. On the other hand, -it does better at avoiding recompilation issues, and works well even -when some directory options were not specified in terms of `${prefix}' -at `configure' time. - -Optional Features -================= - - If the package supports it, you can cause programs to be installed -with an extra prefix or suffix on their names by giving `configure' the -option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. - - Some packages pay attention to `--enable-FEATURE' options to -`configure', where FEATURE indicates an optional part of the package. -They may also pay attention to `--with-PACKAGE' options, where PACKAGE -is something like `gnu-as' or `x' (for the X Window System). The -`README' should mention any `--enable-' and `--with-' options that the -package recognizes. - - For packages that use the X Window System, `configure' can usually -find the X include and library files automatically, but if it doesn't, -you can use the `configure' options `--x-includes=DIR' and -`--x-libraries=DIR' to specify their locations. - - Some packages offer the ability to configure how verbose the -execution of `make' will be. For these packages, running `./configure ---enable-silent-rules' sets the default to minimal output, which can be -overridden with `make V=1'; while running `./configure ---disable-silent-rules' sets the default to verbose, which can be -overridden with `make V=0'. - -Particular systems -================== - - On HP-UX, the default C compiler is not ANSI C compatible. If GNU -CC is not installed, it is recommended to use the following options in -order to use an ANSI C compiler: - - ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" - -and if that doesn't work, install pre-built binaries of GCC for HP-UX. - - HP-UX `make' updates targets which have the same time stamps as -their prerequisites, which makes it generally unusable when shipped -generated files such as `configure' are involved. Use GNU `make' -instead. - - On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot -parse its `' header file. The option `-nodtk' can be used as -a workaround. If GNU CC is not installed, it is therefore recommended -to try - - ./configure CC="cc" - -and if that doesn't work, try - - ./configure CC="cc -nodtk" - - On Solaris, don't put `/usr/ucb' early in your `PATH'. This -directory contains several dysfunctional programs; working variants of -these programs are available in `/usr/bin'. So, if you need `/usr/ucb' -in your `PATH', put it _after_ `/usr/bin'. - - On Haiku, software installed for all users goes in `/boot/common', -not `/usr/local'. It is recommended to use the following options: - - ./configure --prefix=/boot/common - -Specifying the System Type -========================== - - There may be some features `configure' cannot figure out -automatically, but needs to determine by the type of machine the package -will run on. Usually, assuming the package is built to be run on the -_same_ architectures, `configure' can figure that out, but if it prints -a message saying it cannot guess the machine type, give it the -`--build=TYPE' option. TYPE can either be a short name for the system -type, such as `sun4', or a canonical name which has the form: - - CPU-COMPANY-SYSTEM - -where SYSTEM can have one of these forms: - - OS - KERNEL-OS - - See the file `config.sub' for the possible values of each field. If -`config.sub' isn't included in this package, then this package doesn't -need to know the machine type. - - If you are _building_ compiler tools for cross-compiling, you should -use the option `--target=TYPE' to select the type of system they will -produce code for. - - If you want to _use_ a cross compiler, that generates code for a -platform different from the build platform, you should specify the -"host" platform (i.e., that on which the generated programs will -eventually be run) with `--host=TYPE'. - -Sharing Defaults -================ - - If you want to set default values for `configure' scripts to share, -you can create a site shell script called `config.site' that gives -default values for variables like `CC', `cache_file', and `prefix'. -`configure' looks for `PREFIX/share/config.site' if it exists, then -`PREFIX/etc/config.site' if it exists. Or, you can set the -`CONFIG_SITE' environment variable to the location of the site script. -A warning: not all `configure' scripts look for a site script. - -Defining Variables -================== - - Variables not defined in a site shell script can be set in the -environment passed to `configure'. However, some packages may run -configure again during the build, and the customized values of these -variables may be lost. In order to avoid this problem, you should set -them in the `configure' command line, using `VAR=value'. For example: - - ./configure CC=/usr/local2/bin/gcc - -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 limitation. Until the limitation is lifted, you can use -this workaround: - - CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash - -`configure' Invocation -====================== - - `configure' recognizes the following options to control how it -operates. - -`--help' -`-h' - Print a summary of all of the options to `configure', and exit. - -`--help=short' -`--help=recursive' - Print a summary of the options unique to this package's - `configure', and exit. The `short' variant lists options used - only in the top level, while the `recursive' variant lists options - also present in any nested packages. - -`--version' -`-V' - Print the version of Autoconf used to generate the `configure' - script, and exit. - -`--cache-file=FILE' - Enable the cache: use and save the results of the tests in FILE, - traditionally `config.cache'. FILE defaults to `/dev/null' to - disable caching. - -`--config-cache' -`-C' - Alias for `--cache-file=config.cache'. - -`--quiet' -`--silent' -`-q' - Do not print messages saying which checks are being made. To - suppress all normal output, redirect it to `/dev/null' (any error - messages will still be shown). - -`--srcdir=DIR' - Look for the package's source code in directory DIR. Usually - `configure' can determine that directory automatically. - -`--prefix=DIR' - Use DIR as the installation prefix. *note Installation Names:: - for more details, including other options available for fine-tuning - the installation locations. - -`--no-create' -`-n' - Run the configure checks, but stop before creating any output - files. - -`configure' also accepts some other, not widely useful, options. Run -`configure --help' for more details. diff --git a/openair-cn/MME_APP/Makefile.am b/openair-cn/MME_APP/Makefile.am deleted file mode 100644 index c736fb38ba..0000000000 --- a/openair-cn/MME_APP/Makefile.am +++ /dev/null @@ -1,59 +0,0 @@ -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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 . -# -# Contact Information -# OpenAirInterface Admin: openair_admin@eurecom.fr -# OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr -# -# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. -# -################################################################################ -AM_CFLAGS = \ - @ADD_CFLAGS@ \ - -I$(top_srcdir)/COMMON \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/api/network \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/include \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/ies \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/emm/msg \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/esm/msg \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/util \ - -I$(top_srcdir)/INTERTASK_INTERFACE \ - -I$(top_srcdir)/S1AP \ - -I$(top_srcdir)/SGW-LITE \ - -I$(top_srcdir)/S6A \ - -I$(top_srcdir)/SCTP \ - -I$(top_srcdir)/SECU \ - -I$(top_srcdir)/UTILS - -noinst_LTLIBRARIES = libmmeapp.la -libmmeapp_la_LDFLAGS = -all-static - -libmmeapp_la_SOURCES = \ - mme_app_capabilities.c \ - mme_app_context.c \ - mme_app_main.c mme_app_defs.h \ - mme_app_bearer.c \ - mme_app_authentication.c \ - mme_app_location.c \ - mme_app_statistics.c mme_app_statistics.h \ - mme_app_defs.h mme_app_extern.h \ - mme_app_itti_messaging.h \ - s6a_2_nas_cause.c diff --git a/openair-cn/MME_APP/mme_app_authentication.c b/openair-cn/MME_APP/mme_app_authentication.c deleted file mode 100644 index d10e7d645b..0000000000 --- a/openair-cn/MME_APP/mme_app_authentication.c +++ /dev/null @@ -1,365 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - - -#include -#include -#include -#include - -#include "msc.h" -#include "intertask_interface.h" -#include "mme_app_itti_messaging.h" - -#include "mme_config.h" - -#include "mme_app_ue_context.h" -#include "mme_app_defs.h" -#include "mcc_mnc_itu.h" - -#include "assertions.h" - -static -int mme_app_request_authentication_info(const char *imsi, - const uint8_t nb_of_vectors, - const plmn_t *plmn, - const uint8_t *auts); - -static -int mme_app_request_authentication_info(const char *imsi, - const uint8_t nb_of_vectors, - const plmn_t *plmn, - const uint8_t *auts) -{ - s6a_auth_info_req_t *auth_info_req = NULL; - MessageDef *message_p = NULL; - int imsi_length = strlen(imsi); - - DevAssert(plmn != NULL); - - message_p = itti_alloc_new_message(TASK_MME_APP, S6A_AUTH_INFO_REQ); - - auth_info_req = &message_p->ittiMsg.s6a_auth_info_req; - memset(auth_info_req, 0, sizeof(*auth_info_req)); - - strncpy(auth_info_req->imsi, imsi, imsi_length); - auth_info_req->imsi_length = imsi_length; - //MME_APP_IMSI_TO_STRING(imsi, auth_info_req->imsi); - - memcpy(&auth_info_req->visited_plmn, plmn, sizeof(plmn_t)); - MME_APP_DEBUG("%s visited_plmn MCC %X%X%X MNC %X%X%X\n", - __FUNCTION__, - auth_info_req->visited_plmn.MCCdigit1, - auth_info_req->visited_plmn.MCCdigit2, - auth_info_req->visited_plmn.MCCdigit3, - auth_info_req->visited_plmn.MNCdigit1, - auth_info_req->visited_plmn.MNCdigit2, - auth_info_req->visited_plmn.MNCdigit3); - uint8_t *ptr = (uint8_t *)&auth_info_req->visited_plmn; - MME_APP_DEBUG("%s visited_plmn %02X%02X%02X\n", - __FUNCTION__, - ptr[0], - ptr[1], - ptr[2]); - - auth_info_req->nb_of_vectors = nb_of_vectors; - - if (auts != NULL) { - auth_info_req->re_synchronization = 1; - memcpy(auth_info_req->auts, auts, sizeof(auth_info_req->auts)); - } else { - auth_info_req->re_synchronization = 0; - memset(auth_info_req->auts, 0, sizeof(auth_info_req->auts)); - } - - MSC_LOG_TX_MESSAGE( - MSC_MMEAPP_MME, - MSC_S6A_MME, - NULL,0, - "0 S6A_AUTH_INFO_REQ IMSI %s visited_plmn %02X%02X%02X re_sync %u", - imsi,ptr[0],ptr[1],ptr[2],auth_info_req->re_synchronization); - - return itti_send_msg_to_task(TASK_S6A, INSTANCE_DEFAULT, message_p); -} - -int mme_app_handle_nas_auth_resp(const nas_auth_resp_t * const nas_auth_resp_pP) -{ - struct ue_context_s *ue_context = NULL; - uint64_t imsi = 0; - - DevAssert(nas_auth_resp_pP != NULL); - - MME_APP_STRING_TO_IMSI((char *)nas_auth_resp_pP->imsi, &imsi); - - MME_APP_DEBUG("Handling imsi %"IMSI_FORMAT"\n", imsi); - - - if ((ue_context = mme_ue_context_exists_imsi(&mme_app_desc.mme_ue_contexts, - imsi)) == NULL) { - MME_APP_ERROR("That's embarrassing as we don't know this IMSI\n"); - MSC_LOG_EVENT( - MSC_MMEAPP_MME, - "0 NAS_AUTH_RESP Unknown imsi %"IMSI_FORMAT,imsi); - AssertFatal(0, "That's embarrassing as we don't know this IMSI\n"); - return -1; - } - - /* Consider the UE authenticated */ - ue_context->imsi_auth = IMSI_AUTHENTICATED; - - /* TODO: Get keys... */ - - /* Now generate S6A ULR */ - { - MessageDef *message_p = NULL; - s6a_update_location_req_t *s6a_ulr = NULL; - - message_p = itti_alloc_new_message(TASK_MME_APP, S6A_UPDATE_LOCATION_REQ); - - if (message_p == NULL) { - return -1; - } - - s6a_ulr = &message_p->ittiMsg.s6a_update_location_req; - - memcpy(s6a_ulr->imsi, nas_auth_resp_pP->imsi, 16); - s6a_ulr->initial_attach = INITIAL_ATTACH; - s6a_ulr->rat_type = RAT_EUTRAN; - /* Check if we already have UE data */ - s6a_ulr->skip_subscriber_data = 0; - - MSC_LOG_TX_MESSAGE( - MSC_MMEAPP_MME, - MSC_S6A_MME, - NULL,0, - " S6A_UPDATE_LOCATION_REQ IMSI %s RAT_EUTRAN", - imsi); - - return itti_send_msg_to_task(TASK_S6A, INSTANCE_DEFAULT, message_p); - } - return -1; -} - -int -mme_app_handle_authentication_info_answer( - const s6a_auth_info_ans_t * const s6a_auth_info_ans_pP) -{ - struct ue_context_s *ue_context = NULL; - uint64_t imsi = 0; - - DevAssert(s6a_auth_info_ans_pP != NULL); - - MME_APP_STRING_TO_IMSI((char *)s6a_auth_info_ans_pP->imsi, &imsi); - - MME_APP_DEBUG("Handling imsi %"IMSI_FORMAT"\n", imsi); - - - if ((ue_context = mme_ue_context_exists_imsi(&mme_app_desc.mme_ue_contexts, - imsi)) == NULL) { - MME_APP_ERROR("That's embarrassing as we don't know this IMSI\n"); - MSC_LOG_EVENT( - MSC_MMEAPP_MME, - "0 S6A_AUTH_INFO_ANS Unknown imsi %"IMSI_FORMAT,imsi); - return -1; - } - - if ((s6a_auth_info_ans_pP->result.present == S6A_RESULT_BASE) && - (s6a_auth_info_ans_pP->result.choice.base == DIAMETER_SUCCESS)) { - /* S6A procedure has succeeded. - * We have to request UE authentication. - */ - - /* Check that list is not empty and contain only one element */ - DevCheck(s6a_auth_info_ans_pP->auth_info.nb_of_vectors == 1, - s6a_auth_info_ans_pP->auth_info.nb_of_vectors, 1, 0); - - if (ue_context->vector_list == NULL) { - ue_context->vector_list = malloc(sizeof(eutran_vector_t)); - DevAssert(ue_context->vector_list != NULL); - } else { - /* Some vector already exist */ - ue_context->vector_list = realloc( - ue_context->vector_list, - (ue_context->nb_of_vectors + s6a_auth_info_ans_pP->auth_info.nb_of_vectors) * sizeof(eutran_vector_t)); - - DevAssert(ue_context->vector_list != NULL); - } - - memcpy(&ue_context->vector_list[ue_context->nb_of_vectors], - &s6a_auth_info_ans_pP->auth_info.eutran_vector, sizeof(eutran_vector_t)); - - ue_context->vector_in_use = &ue_context->vector_list[ue_context->nb_of_vectors]; - - ue_context->nb_of_vectors += s6a_auth_info_ans_pP->auth_info.nb_of_vectors; - - MME_APP_DEBUG("INFORMING NAS ABOUT AUTH RESP SUCCESS got %u vector(s)\n", - s6a_auth_info_ans_pP->auth_info.nb_of_vectors); - - mme_app_itti_auth_rsp(ue_context->ue_id, - 1, - &s6a_auth_info_ans_pP->auth_info.eutran_vector); - } else { - MME_APP_ERROR("INFORMING NAS ABOUT AUTH RESP ERROR CODE\n"); - MSC_LOG_EVENT( - MSC_MMEAPP_MME, - "0 S6A_AUTH_INFO_ANS S6A Failure imsi %"IMSI_FORMAT,imsi); - - - - /* Inform NAS layer with the right failure */ - if (s6a_auth_info_ans_pP->result.present == S6A_RESULT_BASE) { - mme_app_itti_auth_fail(ue_context->ue_id, s6a_error_2_nas_cause( - s6a_auth_info_ans_pP->result.choice.base, 0)); - } else { - mme_app_itti_auth_fail(ue_context->ue_id, s6a_error_2_nas_cause( - s6a_auth_info_ans_pP->result.choice.experimental, 1)); - } - } - - return 0; -} - - -void -mme_app_handle_nas_auth_param_req( - const nas_auth_param_req_t * const nas_auth_param_req_pP) -{ - plmn_t *visited_plmn = NULL; - struct ue_context_s *ue_context = NULL; - uint64_t imsi = 0; - int mnc_length = 0; - plmn_t visited_plmn_from_req = { - .MCCdigit3 = 0, - .MCCdigit2 = 0, - .MCCdigit1 = 0, - .MNCdigit1 = 0, - .MNCdigit2 = 0, - .MNCdigit3 = 0, - }; - DevAssert(nas_auth_param_req_pP != NULL); - - visited_plmn = &visited_plmn_from_req; - - visited_plmn_from_req.MCCdigit1 = nas_auth_param_req_pP->imsi[0]; - visited_plmn_from_req.MCCdigit2 = nas_auth_param_req_pP->imsi[1]; - visited_plmn_from_req.MCCdigit3 = nas_auth_param_req_pP->imsi[2]; - - mnc_length = find_mnc_length( - nas_auth_param_req_pP->imsi[0], - nas_auth_param_req_pP->imsi[1], - nas_auth_param_req_pP->imsi[2], - nas_auth_param_req_pP->imsi[3], - nas_auth_param_req_pP->imsi[4], - nas_auth_param_req_pP->imsi[5] - ); - - if (mnc_length == 2) { - visited_plmn_from_req.MNCdigit1 = nas_auth_param_req_pP->imsi[3]; - visited_plmn_from_req.MNCdigit2 = nas_auth_param_req_pP->imsi[4]; - visited_plmn_from_req.MNCdigit3 = 15; - } else if (mnc_length == 3) { - visited_plmn_from_req.MNCdigit1 = nas_auth_param_req_pP->imsi[3]; - visited_plmn_from_req.MNCdigit2 = nas_auth_param_req_pP->imsi[4]; - visited_plmn_from_req.MNCdigit3 = nas_auth_param_req_pP->imsi[5]; - } else { - AssertFatal(0, "MNC Not found (mcc_mnc_list)"); - } - - if (mnc_length == 3) { - MME_APP_DEBUG("%s visited_plmn_from_req %1d%1d%1d.%1d%1d%1d\n", - __FUNCTION__, - visited_plmn_from_req.MCCdigit1, - visited_plmn_from_req.MCCdigit2, - visited_plmn_from_req.MCCdigit3, - visited_plmn_from_req.MNCdigit1, - visited_plmn_from_req.MNCdigit2, - visited_plmn_from_req.MNCdigit3); - } else { - MME_APP_DEBUG("%s visited_plmn_from_req %1d%1d%1d.%1d%1d\n", - __FUNCTION__, - visited_plmn_from_req.MCCdigit1, - visited_plmn_from_req.MCCdigit2, - visited_plmn_from_req.MCCdigit3, - visited_plmn_from_req.MNCdigit1, - visited_plmn_from_req.MNCdigit2); - } - - MME_APP_STRING_TO_IMSI(nas_auth_param_req_pP->imsi, &imsi); - - MME_APP_DEBUG("%s Handling imsi %"IMSI_FORMAT"\n", __FUNCTION__, imsi); - MME_APP_DEBUG("%s Handling imsi from req %s (mnc length %d)\n", - __FUNCTION__, - nas_auth_param_req_pP->imsi, - mnc_length); - - /* Fetch the context associated with this IMSI */ - ue_context = mme_ue_context_exists_imsi(&mme_app_desc.mme_ue_contexts, imsi); - - if (ue_context == NULL) { - /* Currently no context available -> trigger an authentication request - * to the HSS. - */ - MME_APP_DEBUG("UE context search by IMSI failed, try by ue id\n"); - ue_context = mme_ue_context_exists_nas_ue_id(&mme_app_desc.mme_ue_contexts, nas_auth_param_req_pP->ue_id); - - if (ue_context == NULL) { - // should have been created by initial ue message - MME_APP_ERROR("UE context doesn't exist -> create one\n"); - - if ((ue_context = mme_create_new_ue_context()) == NULL) { - /* Error during ue context malloc */ - /* TODO */ - DevMessage("mme_create_new_ue_context"); - return; - } - - ue_context->ue_id = nas_auth_param_req_pP->ue_id; - ue_context->mme_ue_s1ap_id = nas_auth_param_req_pP->ue_id; - DevAssert(mme_insert_ue_context(&mme_app_desc.mme_ue_contexts, ue_context) == 0); - } - - ue_context->imsi = imsi; - - /* We have no vector for this UE, send an authentication request - * to the HSS. - */ - - /* Acquire the current time */ - time(&ue_context->cell_age); - - memcpy(&ue_context->guti.gummei.plmn, visited_plmn, sizeof(plmn_t)); - MME_APP_DEBUG("and we have no auth. vector for it, request" - " authentication information\n"); - mme_app_request_authentication_info(nas_auth_param_req_pP->imsi, 1, visited_plmn, NULL); - } else { - memcpy(&ue_context->guti.gummei.plmn, visited_plmn, sizeof(plmn_t)); - - mme_app_request_authentication_info(nas_auth_param_req_pP->imsi, 1, visited_plmn, nas_auth_param_req_pP->auts); - } -} diff --git a/openair-cn/MME_APP/mme_app_bearer.c b/openair-cn/MME_APP/mme_app_bearer.c deleted file mode 100644 index fd909b198e..0000000000 --- a/openair-cn/MME_APP/mme_app_bearer.c +++ /dev/null @@ -1,906 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -/*! \file mme_app_bearer.c -* \brief -* \author Sebastien ROUX, Lionel Gauthier -* \company Eurecom -* \email: lionel.gauthier@eurecom.fr -*/ -#include -#include -#include - -#include "intertask_interface.h" -#include "mme_config.h" - -#include "mme_app_extern.h" -#include "mme_app_ue_context.h" -#include "mme_app_defs.h" -#include "sgw_lite_ie_defs.h" - -#include "secu_defs.h" - -#include "assertions.h" -#include "common_types.h" -#include "msc.h" - - -//------------------------------------------------------------------------------ -int -mme_app_send_s11_release_access_bearers_req( - struct ue_context_s * const ue_context_pP) -//------------------------------------------------------------------------------ -{ - uint8_t i = 0; - task_id_t to_task = TASK_UNKNOWN; - /* Keep the identifier to the default APN */ - context_identifier_t context_identifier; - MessageDef *message_p = NULL; - SgwReleaseAccessBearersRequest *release_access_bearers_request_p = NULL; - - - DevAssert(ue_context_pP != NULL); - -#if !defined(ENABLE_STANDALONE_EPC) - to_task = TASK_S11; -#else - to_task = TASK_SPGW_APP; -#endif - - message_p = itti_alloc_new_message(TASK_MME_APP, SGW_RELEASE_ACCESS_BEARERS_REQUEST); - release_access_bearers_request_p = &message_p->ittiMsg.sgwReleaseAccessBearersRequest; - memset(release_access_bearers_request_p, 0, sizeof(SgwReleaseAccessBearersRequest)); - - release_access_bearers_request_p->teid = ue_context_pP->sgw_s11_teid; - release_access_bearers_request_p->num_rabs = 1; - release_access_bearers_request_p->list_of_rabs[0] = ue_context_pP->default_bearer_id; - release_access_bearers_request_p->originating_node = NODE_TYPE_MME; - - MSC_LOG_TX_MESSAGE( - MSC_MMEAPP_MME, - (to_task == TASK_S11) ? MSC_S11_MME:MSC_SP_GWAPP_MME, - NULL,0, - "0 SGW_RELEASE_ACCESS_BEARERS_REQUEST teid %u ebi %u", - release_access_bearers_request_p->teid, - release_access_bearers_request_p->list_of_rabs[0]); - - itti_send_msg_to_task(to_task, INSTANCE_DEFAULT, message_p); -} - - - -//------------------------------------------------------------------------------ -int -mme_app_send_s11_create_session_req( - struct ue_context_s * const ue_context_pP) -//------------------------------------------------------------------------------ -{ - uint8_t i = 0; - task_id_t to_task = TASK_UNKNOWN; - /* Keep the identifier to the default APN */ - context_identifier_t context_identifier; - MessageDef *message_p = NULL; - SgwCreateSessionRequest *session_request_p = NULL; - struct apn_configuration_s *default_apn_p = NULL; - - - DevAssert(ue_context_pP != NULL); - -#if !defined(ENABLE_STANDALONE_EPC) - to_task = TASK_S11; -#else - to_task = TASK_SPGW_APP; -#endif - - - MME_APP_DEBUG("Handling imsi %"IMSI_FORMAT"\n", ue_context_pP->imsi); - - if (ue_context_pP->sub_status != SS_SERVICE_GRANTED) { - /* HSS rejected the bearer creation or roaming is not allowed for this - * UE. This result will trigger an ESM Failure message sent to UE. - */ - DevMessage("Not implemented: ACCESS NOT GRANTED, send ESM Failure to NAS\n"); - } - - message_p = itti_alloc_new_message(TASK_MME_APP, SGW_CREATE_SESSION_REQUEST); - - /* WARNING: - * Some parameters should be provided by NAS Layer: - * - ue_time_zone - * - mei - * - uli - * - uci - * Some parameters should be provided by HSS: - * - PGW address for CP - * - paa - * - ambr - * and by MME Application layer: - * - selection_mode - * Set these parameters with random values for now. - */ - - session_request_p = &message_p->ittiMsg.sgwCreateSessionRequest; - memset(session_request_p, 0, sizeof(SgwCreateSessionRequest)); - - /* As the create session request is the first exchanged message and as - * no tunnel had been previously setup, the distant teid is set to 0. - * The remote teid will be provided in the response message. - */ - session_request_p->teid = 0; - - MME_APP_IMSI_TO_STRING(ue_context_pP->imsi, (char *)session_request_p->imsi.digit); - // message content was set to 0 - session_request_p->imsi.length = strlen((const char *)session_request_p->imsi.digit); - - /* Copy the MSISDN */ - memcpy( - session_request_p->msisdn.digit, - ue_context_pP->msisdn, - ue_context_pP->msisdn_length); - session_request_p->msisdn.length = ue_context_pP->msisdn_length; - - session_request_p->rat_type = RAT_EUTRAN; - - /* Copy the subscribed ambr to the sgw create session request message */ - memcpy( - &session_request_p->ambr, - &ue_context_pP->subscribed_ambr, - sizeof(ambr_t)); - - if (ue_context_pP->apn_profile.nb_apns == 0) { - DevMessage("No APN returned by the HSS"); - } - - context_identifier = ue_context_pP->apn_profile.context_identifier; - - for (i = 0; i < ue_context_pP->apn_profile.nb_apns; i++) { - default_apn_p = &ue_context_pP->apn_profile.apn_configuration[i]; - - /* OK we got our default APN */ - if (default_apn_p->context_identifier == context_identifier) - break; - } - - if (!default_apn_p) { - /* Unfortunately we didn't find our default APN... */ - DevMessage("No default APN found"); - } - - memcpy(&session_request_p->bearer_to_create.bearer_level_qos.gbr, - &default_apn_p->ambr, sizeof(ambr_t)); - memcpy(&session_request_p->bearer_to_create.bearer_level_qos.mbr, - &default_apn_p->ambr, sizeof(ambr_t)); - - session_request_p->bearer_to_create.bearer_level_qos.qci = - default_apn_p->subscribed_qos.qci; - - session_request_p->bearer_to_create.bearer_level_qos.pvi = - default_apn_p->subscribed_qos.allocation_retention_priority.pre_emp_vulnerability; - session_request_p->bearer_to_create.bearer_level_qos.pci = - default_apn_p->subscribed_qos.allocation_retention_priority.pre_emp_capability; - session_request_p->bearer_to_create.bearer_level_qos.pl = - default_apn_p->subscribed_qos.allocation_retention_priority.priority_level; - - /* Asking for default bearer in initial UE message. - * Use the address of ue_context as unique TEID: Need to find better here - * and will generate unique id only for 32 bits platforms. - */ - session_request_p->sender_fteid_for_cp.teid = (uint32_t)ue_context_pP; - session_request_p->sender_fteid_for_cp.interface_type = S11_MME_GTP_C; - session_request_p->bearer_to_create.eps_bearer_id = 5; - - ue_context_pP->mme_s11_teid = session_request_p->sender_fteid_for_cp.teid; - ue_context_pP->sgw_s11_teid = 0; - - memcpy(session_request_p->apn, default_apn_p->service_selection, - default_apn_p->service_selection_length); - - /* Set PDN type for pdn_type and PAA even if this IE is redundant */ - session_request_p->pdn_type = default_apn_p->pdn_type; - session_request_p->paa.pdn_type = default_apn_p->pdn_type; - - if (default_apn_p->nb_ip_address == 0) { - /* UE DHCPv4 allocated ip address */ - memset(session_request_p->paa.ipv4_address, 0, 4); - memset(session_request_p->paa.ipv6_address, 0, 16); - } else { - uint8_t j; - - for (j = 0; j < default_apn_p->nb_ip_address; j++) { - ip_address_t *ip_address; - ip_address = &default_apn_p->ip_address[j]; - - if (ip_address->pdn_type == IPv4) { - memcpy(session_request_p->paa.ipv4_address, ip_address->address.ipv4_address, 4); - } else if (ip_address->pdn_type == IPv6) { - memcpy(session_request_p->paa.ipv6_address, ip_address->address.ipv6_address, 16); - } - - // free(ip_address); - } - } - - if ((ue_context_pP->pending_pdn_connectivity_req_pco.length >= PCO_MIN_LENGTH) && (ue_context_pP->pending_pdn_connectivity_req_pco.length <= PCO_MAX_LENGTH)) { - memcpy(&session_request_p->pco.byte[0], - &ue_context_pP->pending_pdn_connectivity_req_pco.byte[0], - ue_context_pP->pending_pdn_connectivity_req_pco.length); - session_request_p->pco.length = ue_context_pP->pending_pdn_connectivity_req_pco.length; - } - - config_read_lock(&mme_config); - session_request_p->peer_ip = mme_config.ipv4.sgw_ip_address_for_S11; - config_unlock(&mme_config); - - session_request_p->serving_network.mcc[0] = ue_context_pP->e_utran_cgi.plmn.MCCdigit1; - session_request_p->serving_network.mcc[1] = ue_context_pP->e_utran_cgi.plmn.MCCdigit2; - session_request_p->serving_network.mcc[2] = ue_context_pP->e_utran_cgi.plmn.MCCdigit3; - - session_request_p->serving_network.mnc[0] = ue_context_pP->e_utran_cgi.plmn.MNCdigit1; - session_request_p->serving_network.mnc[1] = ue_context_pP->e_utran_cgi.plmn.MNCdigit2; - session_request_p->serving_network.mnc[2] = ue_context_pP->e_utran_cgi.plmn.MNCdigit3; - - session_request_p->selection_mode = MS_O_N_P_APN_S_V; - - MSC_LOG_TX_MESSAGE( - MSC_MMEAPP_MME, - (to_task == TASK_S11) ? MSC_S11_MME:MSC_SP_GWAPP_MME, - NULL,0, - "0 SGW_CREATE_SESSION_REQUEST imsi %"IMSI_FORMAT,ue_context_pP->imsi); - - return itti_send_msg_to_task(to_task, INSTANCE_DEFAULT, message_p); -} - - - -//------------------------------------------------------------------------------ -int -mme_app_handle_nas_pdn_connectivity_req( - nas_pdn_connectivity_req_t * const nas_pdn_connectivity_req_pP) -//------------------------------------------------------------------------------ -{ - struct ue_context_s *ue_context_p = NULL; - uint64_t imsi = 0; - - MME_APP_DEBUG("Received NAS_PDN_CONNECTIVITY_REQ from NAS\n"); - DevAssert(nas_pdn_connectivity_req_pP != NULL); - - MME_APP_STRING_TO_IMSI((char *)nas_pdn_connectivity_req_pP->imsi, &imsi); - - MME_APP_DEBUG("Handling imsi %"IMSI_FORMAT"\n", imsi); - - - if ((ue_context_p = mme_ue_context_exists_imsi(&mme_app_desc.mme_ue_contexts, - imsi)) == NULL) { - MSC_LOG_EVENT( - MSC_MMEAPP_MME, - "NAS_PDN_CONNECTIVITY_REQ Unknown imsi %"IMSI_FORMAT,imsi); - MME_APP_ERROR("That's embarrassing as we don't know this IMSI\n"); - return -1; - } - - /* Consider the UE authenticated */ - ue_context_p->imsi_auth = IMSI_AUTHENTICATED; - - // Temp: save request, in near future merge wisely params in context - memset(ue_context_p->pending_pdn_connectivity_req_imsi,0, 16); - AssertFatal((nas_pdn_connectivity_req_pP->imsi_length > 0) && - (nas_pdn_connectivity_req_pP->imsi_length < 16), - "BAD IMSI LENGTH %d", nas_pdn_connectivity_req_pP->imsi_length); - - AssertFatal((nas_pdn_connectivity_req_pP->imsi_length > 0) && - (nas_pdn_connectivity_req_pP->imsi_length < 16), - "STOP ON IMSI LENGTH %d", nas_pdn_connectivity_req_pP->imsi_length); - memcpy(ue_context_p->pending_pdn_connectivity_req_imsi, - nas_pdn_connectivity_req_pP->imsi, - nas_pdn_connectivity_req_pP->imsi_length); - ue_context_p->pending_pdn_connectivity_req_imsi_length = nas_pdn_connectivity_req_pP->imsi_length; - DUP_OCTET_STRING(nas_pdn_connectivity_req_pP->apn, ue_context_p->pending_pdn_connectivity_req_apn); - FREE_OCTET_STRING(nas_pdn_connectivity_req_pP->apn) - // dup OctetString - DUP_OCTET_STRING(nas_pdn_connectivity_req_pP->pdn_addr, ue_context_p->pending_pdn_connectivity_req_pdn_addr); - FREE_OCTET_STRING(nas_pdn_connectivity_req_pP->pdn_addr) - ue_context_p->pending_pdn_connectivity_req_pti = nas_pdn_connectivity_req_pP->pti; - ue_context_p->pending_pdn_connectivity_req_ue_id = nas_pdn_connectivity_req_pP->ue_id; - - memcpy(&ue_context_p->pending_pdn_connectivity_req_pco.byte[0], - &nas_pdn_connectivity_req_pP->pco.byte[0], - nas_pdn_connectivity_req_pP->pco.length); - ue_context_p->pending_pdn_connectivity_req_pco.length = nas_pdn_connectivity_req_pP->pco.length; - - memcpy(&ue_context_p->pending_pdn_connectivity_req_qos, - &nas_pdn_connectivity_req_pP->qos, - sizeof(network_qos_t)); - ue_context_p->pending_pdn_connectivity_req_proc_data = nas_pdn_connectivity_req_pP->proc_data; - nas_pdn_connectivity_req_pP->proc_data = NULL; - ue_context_p->pending_pdn_connectivity_req_request_type = nas_pdn_connectivity_req_pP->request_type; - - //if ((nas_pdn_connectivity_req_pP->apn.value == NULL) || (nas_pdn_connectivity_req_pP->apn.length == 0)) { - /* TODO: Get keys... */ - /* Now generate S6A ULR */ - return mme_app_send_s6a_update_location_req(ue_context_p); - //} else { - //return mme_app_send_s11_create_session_req(ue_context_p); - - //} - //return -1; -} - - - -// sent by NAS -//------------------------------------------------------------------------------ -void -mme_app_handle_conn_est_cnf( - const nas_conn_est_cnf_t * const nas_conn_est_cnf_pP) -//------------------------------------------------------------------------------ -{ - struct ue_context_s *ue_context_p = NULL; - MessageDef *message_p = NULL; - mme_app_connection_establishment_cnf_t *establishment_cnf_p = NULL; - bearer_context_t *current_bearer_p = NULL; - ebi_t bearer_id = 0; - uint8_t keNB[32]; - - MME_APP_DEBUG("Received NAS_CONNECTION_ESTABLISHMENT_CNF from NAS\n"); - - ue_context_p = mme_ue_context_exists_nas_ue_id(&mme_app_desc.mme_ue_contexts, nas_conn_est_cnf_pP->UEid); - - - if (ue_context_p == NULL) { - MSC_LOG_EVENT( - MSC_MMEAPP_MME, - "NAS_CONNECTION_ESTABLISHMENT_CNF Unknown ue %u",nas_conn_est_cnf_pP->UEid); - MME_APP_ERROR("UE context doesn't exist for UE %06"PRIX32"/dec%u\n", - nas_conn_est_cnf_pP->UEid, - nas_conn_est_cnf_pP->UEid); - return; - } - - message_p = itti_alloc_new_message(TASK_MME_APP, MME_APP_CONNECTION_ESTABLISHMENT_CNF); - establishment_cnf_p = &message_p->ittiMsg.mme_app_connection_establishment_cnf; - memset(establishment_cnf_p, 0, sizeof(mme_app_connection_establishment_cnf_t)); - - memcpy(&establishment_cnf_p->nas_conn_est_cnf, - nas_conn_est_cnf_pP, - sizeof(nas_conn_est_cnf_t)); - - bearer_id = ue_context_p->default_bearer_id; - current_bearer_p = &ue_context_p->eps_bearers[bearer_id]; - establishment_cnf_p->eps_bearer_id = bearer_id; - - establishment_cnf_p->bearer_s1u_sgw_fteid.interface_type = S1_U_SGW_GTP_U; - establishment_cnf_p->bearer_s1u_sgw_fteid.teid = current_bearer_p->s_gw_teid; - - if ((current_bearer_p->s_gw_address.pdn_type == IPv4) || - (current_bearer_p->s_gw_address.pdn_type == IPv4_AND_v6)) { - establishment_cnf_p->bearer_s1u_sgw_fteid.ipv4 = 1; - memcpy(&establishment_cnf_p->bearer_s1u_sgw_fteid.ipv4_address, - current_bearer_p->s_gw_address.address.ipv4_address, - 4); - } - - if ((current_bearer_p->s_gw_address.pdn_type == IPv6) || - (current_bearer_p->s_gw_address.pdn_type == IPv4_AND_v6)) { - establishment_cnf_p->bearer_s1u_sgw_fteid.ipv6 = 1; - memcpy(establishment_cnf_p->bearer_s1u_sgw_fteid.ipv6_address, - current_bearer_p->s_gw_address.address.ipv6_address, - 16); - } - - establishment_cnf_p->bearer_qos_qci = current_bearer_p->qci; - establishment_cnf_p->bearer_qos_prio_level = current_bearer_p->prio_level; - establishment_cnf_p->bearer_qos_pre_emp_vulnerability = current_bearer_p->pre_emp_vulnerability; - establishment_cnf_p->bearer_qos_pre_emp_capability = current_bearer_p->pre_emp_capability; -#warning "Check ue_context_p ambr" - establishment_cnf_p->ambr.br_ul = ue_context_p->subscribed_ambr.br_ul; - establishment_cnf_p->ambr.br_dl = ue_context_p->subscribed_ambr.br_dl; - - establishment_cnf_p->security_capabilities_encryption_algorithms = nas_conn_est_cnf_pP->selected_encryption_algorithm; - establishment_cnf_p->security_capabilities_integrity_algorithms = nas_conn_est_cnf_pP->selected_integrity_algorithm; - MME_APP_DEBUG("security_capabilities_encryption_algorithms 0x%04X\n", establishment_cnf_p->security_capabilities_encryption_algorithms); - MME_APP_DEBUG("security_capabilities_integrity_algorithms 0x%04X\n", establishment_cnf_p->security_capabilities_integrity_algorithms); - - MME_APP_DEBUG("Derive keNB with UL NAS COUNT %x\n", nas_conn_est_cnf_pP->ul_nas_count); - derive_keNB(ue_context_p->vector_in_use->kasme, nas_conn_est_cnf_pP->ul_nas_count, keNB); //156 - memcpy(establishment_cnf_p->keNB, keNB, 32); - - MSC_LOG_TX_MESSAGE( - MSC_MMEAPP_MME, - MSC_S1AP_MME, - NULL,0, - "0 MME_APP_CONNECTION_ESTABLISHMENT_CNF ebi %u s1u_sgw teid %u qci %u prio level %u sea 0x%x sia 0x%x", - establishment_cnf_p->eps_bearer_id, - establishment_cnf_p->bearer_s1u_sgw_fteid.teid, - establishment_cnf_p->bearer_qos_qci, - establishment_cnf_p->bearer_qos_prio_level, - establishment_cnf_p->security_capabilities_encryption_algorithms, - establishment_cnf_p->security_capabilities_integrity_algorithms); - - itti_send_msg_to_task(TASK_S1AP, INSTANCE_DEFAULT, message_p); -} - - - -// sent by S1AP -//------------------------------------------------------------------------------ -void -mme_app_handle_conn_est_ind( - const mme_app_connection_establishment_ind_t * const conn_est_ind_pP) -//------------------------------------------------------------------------------ -{ - struct ue_context_s *ue_context_p = NULL; - MessageDef *message_p = NULL; - - MME_APP_DEBUG("Received MME_APP_CONNECTION_ESTABLISHMENT_IND from S1AP\n"); - - ue_context_p = mme_ue_context_exists_mme_ue_s1ap_id( - &mme_app_desc.mme_ue_contexts, - conn_est_ind_pP->mme_ue_s1ap_id); - - - - if (ue_context_p == NULL) { - MME_APP_DEBUG("We didn't find this mme_ue_s1ap_id in list of UE: %06"PRIX32"/dec%u\n", - conn_est_ind_pP->mme_ue_s1ap_id, - conn_est_ind_pP->mme_ue_s1ap_id); - MME_APP_DEBUG("UE context doesn't exist -> create one\n"); - - if ((ue_context_p = mme_create_new_ue_context()) == NULL) { - /* Error during ue context malloc */ - /* TODO */ - DevMessage("mme_create_new_ue_context"); - return; - } - - // S1AP UE ID AND NAS UE ID ARE THE SAME - ue_context_p->mme_ue_s1ap_id = conn_est_ind_pP->mme_ue_s1ap_id; - ue_context_p->ue_id = conn_est_ind_pP->mme_ue_s1ap_id; - DevAssert(mme_insert_ue_context(&mme_app_desc.mme_ue_contexts, ue_context_p) == 0); - - // tests - ue_context_p = mme_ue_context_exists_mme_ue_s1ap_id( - &mme_app_desc.mme_ue_contexts, - conn_est_ind_pP->mme_ue_s1ap_id); - AssertFatal(ue_context_p != NULL, "mme_ue_context_exists_mme_ue_s1ap_id Failed"); - ue_context_p = mme_ue_context_exists_nas_ue_id( - &mme_app_desc.mme_ue_contexts, - conn_est_ind_pP->mme_ue_s1ap_id); - AssertFatal(ue_context_p != NULL, "mme_ue_context_exists_nas_ue_id Failed"); - } - - message_p = itti_alloc_new_message(TASK_MME_APP, NAS_CONNECTION_ESTABLISHMENT_IND); - memcpy(&NAS_CONN_EST_IND(message_p).nas, - &conn_est_ind_pP->nas, - sizeof (nas_establish_ind_t)); - - - MSC_LOG_TX_MESSAGE( - MSC_MMEAPP_MME, - MSC_NAS_MME, - NULL,0, - "0 NAS_CONNECTION_ESTABLISHMENT_IND"); - - itti_send_msg_to_task(TASK_NAS_MME, INSTANCE_DEFAULT, message_p); -} - - - -//------------------------------------------------------------------------------ -int -mme_app_handle_create_sess_resp( - const SgwCreateSessionResponse * const create_sess_resp_pP) -//------------------------------------------------------------------------------ -{ - struct ue_context_s *ue_context_p = NULL; - bearer_context_t *current_bearer_p = NULL; - MessageDef *message_p = NULL; - - int16_t bearer_id; - - DevAssert(create_sess_resp_pP != NULL); - - MME_APP_DEBUG("Received SGW_CREATE_SESSION_RESPONSE from S+P-GW\n"); - - ue_context_p = mme_ue_context_exists_s11_teid(&mme_app_desc.mme_ue_contexts, - create_sess_resp_pP->teid); - - - if (ue_context_p == NULL) { - MME_APP_DEBUG("We didn't find this teid in list of UE: %08x\n", - create_sess_resp_pP->teid); - return -1; - } - - /* Store the S-GW teid */ - ue_context_p->sgw_s11_teid = create_sess_resp_pP->s11_sgw_teid.teid; - - //--------------------------------------------------------- - // Process SgwCreateSessionResponse.bearer_context_created - //--------------------------------------------------------- - bearer_id = create_sess_resp_pP->bearer_context_created.eps_bearer_id/* - 5*/; - /* Depending on s11 result we have to send reject or accept for bearers */ - DevCheck((bearer_id < BEARERS_PER_UE) && (bearer_id >= 0), - bearer_id, - BEARERS_PER_UE, - 0); - ue_context_p->default_bearer_id = bearer_id; - - if (create_sess_resp_pP->bearer_context_created.cause != REQUEST_ACCEPTED) { - DevMessage("Cases where bearer cause != REQUEST_ACCEPTED are not handled\n"); - } - - DevAssert(create_sess_resp_pP->bearer_context_created.s1u_sgw_fteid.interface_type == S1_U_SGW_GTP_U); - - /* Updating statistics */ - mme_app_desc.mme_ue_contexts.nb_bearers_managed++; - mme_app_desc.mme_ue_contexts.nb_bearers_since_last_stat++; - - current_bearer_p = &ue_context_p->eps_bearers[bearer_id]; - current_bearer_p->s_gw_teid = create_sess_resp_pP->bearer_context_created.s1u_sgw_fteid.teid; - - switch (create_sess_resp_pP->bearer_context_created.s1u_sgw_fteid.ipv4 + - (create_sess_resp_pP->bearer_context_created.s1u_sgw_fteid.ipv6 << 1)) { - default: - case 0: { - /* No address provided: impossible case */ - DevMessage("No ip address for user-plane provided...\n"); - } - break; - - case 1: { - /* Only IPv4 address */ - current_bearer_p->s_gw_address.pdn_type = IPv4; - memcpy(current_bearer_p->s_gw_address.address.ipv4_address, - &create_sess_resp_pP->bearer_context_created.s1u_sgw_fteid.ipv4_address, 4); - } - break; - - case 2: { - /* Only IPv6 address */ - current_bearer_p->s_gw_address.pdn_type = IPv6; - memcpy(current_bearer_p->s_gw_address.address.ipv6_address, - create_sess_resp_pP->bearer_context_created.s1u_sgw_fteid.ipv6_address, 16); - } - break; - - case 3: { - /* Both IPv4 and Ipv6 */ - current_bearer_p->s_gw_address.pdn_type = IPv4_AND_v6; - memcpy(current_bearer_p->s_gw_address.address.ipv4_address, - &create_sess_resp_pP->bearer_context_created.s1u_sgw_fteid.ipv4_address, 4); - memcpy(current_bearer_p->s_gw_address.address.ipv6_address, - create_sess_resp_pP->bearer_context_created.s1u_sgw_fteid.ipv6_address, 16); - } - break; - } - - current_bearer_p->p_gw_teid = create_sess_resp_pP->bearer_context_created.s5_s8_u_pgw_fteid.teid; - memset(¤t_bearer_p->p_gw_address,0, sizeof(ip_address_t)); - - if (create_sess_resp_pP->bearer_context_created.bearer_level_qos != NULL) { - current_bearer_p->qci = create_sess_resp_pP->bearer_context_created.bearer_level_qos->qci; - current_bearer_p->prio_level = create_sess_resp_pP->bearer_context_created.bearer_level_qos->pl; - current_bearer_p->pre_emp_vulnerability = create_sess_resp_pP->bearer_context_created.bearer_level_qos->pvi; - current_bearer_p->pre_emp_capability = create_sess_resp_pP->bearer_context_created.bearer_level_qos->pci; - MME_APP_DEBUG("%s set qci %u in bearer %u\n", - __FUNCTION__, - current_bearer_p->qci, - ue_context_p->default_bearer_id); - } else { - // if null, it is not modified - //current_bearer_p->qci = ue_context_p->pending_pdn_connectivity_req_qos.qci; -#warning "may force QCI here to 9" - current_bearer_p->qci = 9; - current_bearer_p->prio_level = 1; - current_bearer_p->pre_emp_vulnerability = 0; - current_bearer_p->pre_emp_capability = 0; - MME_APP_DEBUG("%s set qci %u in bearer %u (qos not modified by S/P-GW)\n", - __FUNCTION__, - current_bearer_p->qci, - ue_context_p->default_bearer_id); - } - - mme_app_dump_ue_contexts(&mme_app_desc.mme_ue_contexts); - - { - //uint8_t *keNB = NULL; - - message_p = itti_alloc_new_message(TASK_MME_APP, NAS_PDN_CONNECTIVITY_RSP); - memset((void*)&message_p->ittiMsg.nas_pdn_connectivity_rsp, - 0, - sizeof(nas_pdn_connectivity_rsp_t)); - - // moved to NAS_CONNECTION_ESTABLISHMENT_CONF, keNB not handled in NAS MME - //derive_keNB(ue_context_p->vector_in_use->kasme, 156, &keNB); - //memcpy(NAS_PDN_CONNECTIVITY_RSP(message_p).keNB, keNB, 32); - - //free(keNB); - - NAS_PDN_CONNECTIVITY_RSP(message_p).pti = ue_context_p->pending_pdn_connectivity_req_pti; // NAS internal ref - NAS_PDN_CONNECTIVITY_RSP(message_p).ue_id = ue_context_p->pending_pdn_connectivity_req_ue_id; // NAS internal ref - - // TO REWORK: - if ((ue_context_p->pending_pdn_connectivity_req_apn.value != NULL) - && (ue_context_p->pending_pdn_connectivity_req_apn.length != 0)) { - DUP_OCTET_STRING( - ue_context_p->pending_pdn_connectivity_req_apn, - NAS_PDN_CONNECTIVITY_RSP(message_p).apn); - MME_APP_DEBUG("SET APN FROM NAS PDN CONNECTIVITY CREATE: %s\n", NAS_PDN_CONNECTIVITY_RSP(message_p).apn.value); - } else { - int i; - context_identifier_t context_identifier = ue_context_p->apn_profile.context_identifier; - - for (i = 0; i < ue_context_p->apn_profile.nb_apns; i++) { - if (ue_context_p->apn_profile.apn_configuration[i].context_identifier == context_identifier) { - AssertFatal(ue_context_p->apn_profile.apn_configuration[i].service_selection_length > 0, "Bad APN string (len = 0)"); - - if (ue_context_p->apn_profile.apn_configuration[i].service_selection_length > 0) { - NAS_PDN_CONNECTIVITY_RSP(message_p).apn.value = malloc(ue_context_p->apn_profile.apn_configuration[i].service_selection_length + 1); - NAS_PDN_CONNECTIVITY_RSP(message_p).apn.length = ue_context_p->apn_profile.apn_configuration[i].service_selection_length; - AssertFatal(ue_context_p->apn_profile.apn_configuration[i].service_selection_length <= APN_MAX_LENGTH, - "Bad APN string length %d", - ue_context_p->apn_profile.apn_configuration[i].service_selection_length); - memcpy(NAS_PDN_CONNECTIVITY_RSP(message_p).apn.value, - ue_context_p->apn_profile.apn_configuration[i].service_selection, - ue_context_p->apn_profile.apn_configuration[i].service_selection_length); - NAS_PDN_CONNECTIVITY_RSP(message_p).apn.value[ue_context_p->apn_profile.apn_configuration[i].service_selection_length] = '\0'; - MME_APP_DEBUG("SET APN FROM HSS ULA: %s\n", NAS_PDN_CONNECTIVITY_RSP(message_p).apn.value); - break; - } - } - } - } - - MME_APP_DEBUG("APN: %s\n", NAS_PDN_CONNECTIVITY_RSP(message_p).apn.value); - - switch (create_sess_resp_pP->paa.pdn_type) { - case IPv4: - NAS_PDN_CONNECTIVITY_RSP(message_p).pdn_addr.length = 4; - NAS_PDN_CONNECTIVITY_RSP(message_p).pdn_addr.value = malloc(NAS_PDN_CONNECTIVITY_RSP(message_p).pdn_addr.length+1); - DevAssert(NAS_PDN_CONNECTIVITY_RSP(message_p).pdn_addr.value != NULL); - memcpy( - NAS_PDN_CONNECTIVITY_RSP(message_p).pdn_addr.value, - create_sess_resp_pP->paa.ipv4_address, - NAS_PDN_CONNECTIVITY_RSP(message_p).pdn_addr.length); - NAS_PDN_CONNECTIVITY_RSP(message_p).pdn_addr.value[NAS_PDN_CONNECTIVITY_RSP(message_p).pdn_addr.length] = '0'; - break; - - case IPv6: - DevAssert(create_sess_resp_pP->paa.ipv6_prefix_length == 64); // NAS seems to only support 64 bits - NAS_PDN_CONNECTIVITY_RSP(message_p).pdn_addr.length = create_sess_resp_pP->paa.ipv6_prefix_length/8; - NAS_PDN_CONNECTIVITY_RSP(message_p).pdn_addr.value = malloc(NAS_PDN_CONNECTIVITY_RSP(message_p).pdn_addr.length+1); - DevAssert(NAS_PDN_CONNECTIVITY_RSP(message_p).pdn_addr.value != NULL); - memcpy( - NAS_PDN_CONNECTIVITY_RSP(message_p).pdn_addr.value, - create_sess_resp_pP->paa.ipv6_address, - NAS_PDN_CONNECTIVITY_RSP(message_p).pdn_addr.length); - NAS_PDN_CONNECTIVITY_RSP(message_p).pdn_addr.value[NAS_PDN_CONNECTIVITY_RSP(message_p).pdn_addr.length] = '0'; - break; - - case IPv4_AND_v6: - DevAssert(create_sess_resp_pP->paa.ipv6_prefix_length == 64); // NAS seems to only support 64 bits - NAS_PDN_CONNECTIVITY_RSP(message_p).pdn_addr.length = 4 + create_sess_resp_pP->paa.ipv6_prefix_length/8; - NAS_PDN_CONNECTIVITY_RSP(message_p).pdn_addr.value = malloc(NAS_PDN_CONNECTIVITY_RSP(message_p).pdn_addr.length+1); - DevAssert(NAS_PDN_CONNECTIVITY_RSP(message_p).pdn_addr.value != NULL); - memcpy( - NAS_PDN_CONNECTIVITY_RSP(message_p).pdn_addr.value, - create_sess_resp_pP->paa.ipv4_address, - 4); - memcpy( - &NAS_PDN_CONNECTIVITY_RSP(message_p).pdn_addr.value[4], - create_sess_resp_pP->paa.ipv6_address, - create_sess_resp_pP->paa.ipv6_prefix_length/8); - NAS_PDN_CONNECTIVITY_RSP(message_p).pdn_addr.value[NAS_PDN_CONNECTIVITY_RSP(message_p).pdn_addr.length] = '0'; - break; - - case IPv4_OR_v6: - NAS_PDN_CONNECTIVITY_RSP(message_p).pdn_addr.length = 4; - NAS_PDN_CONNECTIVITY_RSP(message_p).pdn_addr.value = malloc(NAS_PDN_CONNECTIVITY_RSP(message_p).pdn_addr.length+1); - DevAssert(NAS_PDN_CONNECTIVITY_RSP(message_p).pdn_addr.value != NULL); - memcpy( - NAS_PDN_CONNECTIVITY_RSP(message_p).pdn_addr.value, - create_sess_resp_pP->paa.ipv4_address, - NAS_PDN_CONNECTIVITY_RSP(message_p).pdn_addr.length); - NAS_PDN_CONNECTIVITY_RSP(message_p).pdn_addr.value[NAS_PDN_CONNECTIVITY_RSP(message_p).pdn_addr.length] = '0'; - break; - - default: - DevAssert(0); - } - - NAS_PDN_CONNECTIVITY_RSP(message_p).pdn_type = create_sess_resp_pP->paa.pdn_type; - NAS_PDN_CONNECTIVITY_RSP(message_p).proc_data = ue_context_p->pending_pdn_connectivity_req_proc_data; // NAS internal ref - ue_context_p->pending_pdn_connectivity_req_proc_data = NULL; - -#warning "QOS hardcoded here" - //memcpy(&NAS_PDN_CONNECTIVITY_RSP(message_p).qos, - // &ue_context_p->pending_pdn_connectivity_req_qos, - // sizeof(network_qos_t)); - NAS_PDN_CONNECTIVITY_RSP(message_p).qos.gbrUL = 64; /* 64=64kb/s Guaranteed Bit Rate for uplink */ - NAS_PDN_CONNECTIVITY_RSP(message_p).qos.gbrDL = 120; /* 120=512kb/s Guaranteed Bit Rate for downlink */ - NAS_PDN_CONNECTIVITY_RSP(message_p).qos.mbrUL = 72; /* 72=128kb/s Maximum Bit Rate for uplink */ - NAS_PDN_CONNECTIVITY_RSP(message_p).qos.mbrDL = 135; /*135=1024kb/s Maximum Bit Rate for downlink */ - NAS_PDN_CONNECTIVITY_RSP(message_p).qos.qci = 9; /* QoS Class Identifier */ - - NAS_PDN_CONNECTIVITY_RSP(message_p).request_type = ue_context_p->pending_pdn_connectivity_req_request_type; // NAS internal ref - ue_context_p->pending_pdn_connectivity_req_request_type = 0; - - // here at this point OctetString are saved in resp, no loss of memory (apn, pdn_addr) - - NAS_PDN_CONNECTIVITY_RSP(message_p).eNB_ue_s1ap_id = ue_context_p->eNB_ue_s1ap_id; - NAS_PDN_CONNECTIVITY_RSP(message_p).mme_ue_s1ap_id = ue_context_p->mme_ue_s1ap_id; - - NAS_PDN_CONNECTIVITY_RSP(message_p).ebi = bearer_id; - - NAS_PDN_CONNECTIVITY_RSP(message_p).qci = current_bearer_p->qci; - NAS_PDN_CONNECTIVITY_RSP(message_p).prio_level = current_bearer_p->prio_level; - NAS_PDN_CONNECTIVITY_RSP(message_p).pre_emp_vulnerability = current_bearer_p->pre_emp_vulnerability; - NAS_PDN_CONNECTIVITY_RSP(message_p).pre_emp_capability = current_bearer_p->pre_emp_capability; - - NAS_PDN_CONNECTIVITY_RSP(message_p).sgw_s1u_teid = current_bearer_p->s_gw_teid; - memcpy(&NAS_PDN_CONNECTIVITY_RSP(message_p).sgw_s1u_address, - ¤t_bearer_p->s_gw_address, sizeof(ip_address_t)); - - NAS_PDN_CONNECTIVITY_RSP(message_p).ambr.br_ul = ue_context_p->subscribed_ambr.br_ul; - NAS_PDN_CONNECTIVITY_RSP(message_p).ambr.br_dl = ue_context_p->subscribed_ambr.br_dl; - - - memcpy(&NAS_PDN_CONNECTIVITY_RSP(message_p).pco.byte[0], - &create_sess_resp_pP->pco.byte[0], - create_sess_resp_pP->pco.length); - NAS_PDN_CONNECTIVITY_RSP(message_p).pco.length = create_sess_resp_pP->pco.length; - - MSC_LOG_TX_MESSAGE( - MSC_MMEAPP_MME, - MSC_NAS_MME, - NULL,0, - "0 NAS_PDN_CONNECTIVITY_RSP sgw_s1u_teid %u ebi %u qci %u prio %u", - current_bearer_p->s_gw_teid, - bearer_id, - current_bearer_p->qci, - current_bearer_p->prio_level); - - return itti_send_msg_to_task(TASK_NAS_MME, INSTANCE_DEFAULT, message_p); - } - return 0; -} - - - -//------------------------------------------------------------------------------ -void -mme_app_handle_initial_context_setup_rsp( - const mme_app_initial_context_setup_rsp_t * const initial_ctxt_setup_rsp_pP) -//------------------------------------------------------------------------------ -{ - struct ue_context_s *ue_context_p = NULL; - MessageDef *message_p = NULL; - task_id_t to_task = TASK_UNKNOWN; - - MME_APP_DEBUG("Received MME_APP_INITIAL_CONTEXT_SETUP_RSP from S1AP\n"); - - ue_context_p = mme_ue_context_exists_mme_ue_s1ap_id( - &mme_app_desc.mme_ue_contexts, - initial_ctxt_setup_rsp_pP->mme_ue_s1ap_id); - - - if (ue_context_p == NULL) { - MME_APP_DEBUG("We didn't find this mme_ue_s1ap_id in list of UE: %08x %d(dec)\n", - initial_ctxt_setup_rsp_pP->mme_ue_s1ap_id, - initial_ctxt_setup_rsp_pP->mme_ue_s1ap_id); - MSC_LOG_EVENT( - MSC_MMEAPP_MME, - "MME_APP_INITIAL_CONTEXT_SETUP_RSP Unknown ue %u",initial_ctxt_setup_rsp_pP->mme_ue_s1ap_id); - return; - } - -#if !defined(ENABLE_STANDALONE_EPC) - to_task = TASK_S11; -#else - to_task = TASK_SPGW_APP; -#endif - - message_p = itti_alloc_new_message(TASK_MME_APP, SGW_MODIFY_BEARER_REQUEST); - - AssertFatal(message_p != NULL, "itti_alloc_new_message Failed"); - memset((void*)&message_p->ittiMsg.sgwModifyBearerRequest, - 0, - sizeof(SgwModifyBearerRequest)); - - SGW_MODIFY_BEARER_REQUEST(message_p).teid = ue_context_p->sgw_s11_teid; - - /* Delay Value in integer multiples of 50 millisecs, or zero */ - SGW_MODIFY_BEARER_REQUEST(message_p).delay_dl_packet_notif_req = 0; // TO DO - - SGW_MODIFY_BEARER_REQUEST(message_p).bearer_context_to_modify.eps_bearer_id = initial_ctxt_setup_rsp_pP->eps_bearer_id; - memcpy(&SGW_MODIFY_BEARER_REQUEST(message_p).bearer_context_to_modify.s1_eNB_fteid, - &initial_ctxt_setup_rsp_pP->bearer_s1u_enb_fteid, - sizeof(SGW_MODIFY_BEARER_REQUEST(message_p).bearer_context_to_modify.s1_eNB_fteid)); - - SGW_MODIFY_BEARER_REQUEST(message_p).mme_fq_csid.node_id_type = GLOBAL_UNICAST_IPv4; // TO DO - SGW_MODIFY_BEARER_REQUEST(message_p).mme_fq_csid.csid = 0; // TO DO ... - SGW_MODIFY_BEARER_REQUEST(message_p).indication_flags = 0; // TO DO - SGW_MODIFY_BEARER_REQUEST(message_p).rat_type = RAT_EUTRAN; - - /* S11 stack specific parameter. Not used in standalone epc mode */ - SGW_MODIFY_BEARER_REQUEST(message_p).trxn = NULL; - - - MSC_LOG_TX_MESSAGE( - MSC_MMEAPP_MME, - (to_task == TASK_S11) ? MSC_S11_MME:MSC_SP_GWAPP_MME, - NULL,0, - "0 SGW_MODIFY_BEARER_REQUEST teid %u ebi %u", - SGW_MODIFY_BEARER_REQUEST(message_p).teid, - SGW_MODIFY_BEARER_REQUEST(message_p).bearer_context_to_modify.eps_bearer_id); - - - itti_send_msg_to_task(to_task, INSTANCE_DEFAULT, message_p); -} - - - -//------------------------------------------------------------------------------ -void mme_app_handle_release_access_bearers_resp( - const SgwReleaseAccessBearersResponse * const rel_access_bearers_rsp_pP) -//------------------------------------------------------------------------------ -{ - MessageDef *message_p = NULL; - struct ue_context_s *ue_context_p = NULL; - - ue_context_p = mme_ue_context_exists_s11_teid(&mme_app_desc.mme_ue_contexts, - rel_access_bearers_rsp_pP->teid); - - - if (ue_context_p == NULL) { - MME_APP_DEBUG("We didn't find this teid in list of UE: %06"PRIX32"\n", - rel_access_bearers_rsp_pP->teid); - return; - } - - message_p = itti_alloc_new_message(TASK_MME_APP, S1AP_UE_CONTEXT_RELEASE_COMMAND); - - AssertFatal(message_p != NULL, "itti_alloc_new_message Failed"); - memset((void*)&message_p->ittiMsg.s1ap_ue_context_release_command, - 0, - sizeof(s1ap_ue_context_release_command_t)); - - S1AP_UE_CONTEXT_RELEASE_COMMAND(message_p).mme_ue_s1ap_id = ue_context_p->mme_ue_s1ap_id; - MSC_LOG_TX_MESSAGE( - MSC_MMEAPP_MME, - MSC_S1AP_MME, - NULL,0, - "0 S1AP_UE_CONTEXT_RELEASE_COMMAND mme_ue_s1ap_id %06"PRIX32" ", - S1AP_UE_CONTEXT_RELEASE_COMMAND(message_p).mme_ue_s1ap_id); - - - itti_send_msg_to_task(TASK_S1AP, INSTANCE_DEFAULT, message_p); -} - diff --git a/openair-cn/MME_APP/mme_app_capabilities.c b/openair-cn/MME_APP/mme_app_capabilities.c deleted file mode 100755 index 83a857ce91..0000000000 --- a/openair-cn/MME_APP/mme_app_capabilities.c +++ /dev/null @@ -1,62 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -/*! \file mme_app_capabilities.c -* \brief -* \author Lionel Gauthier -* \company Eurecom -* \email: lionel.gauthier@eurecom.fr -*/ -#include -#include -#include - -#include "intertask_interface.h" -#include "mme_config.h" - -#include "mme_app_extern.h" -#include "mme_app_ue_context.h" -#include "mme_app_defs.h" - -#include "secu_defs.h" - -#include "assertions.h" -#include "common_types.h" - -int -mme_app_handle_s1ap_ue_capabilities_ind( - const s1ap_ue_cap_ind_t const * s1ap_ue_cap_ind_pP) -{ - DevAssert(s1ap_ue_cap_ind_pP != NULL); - //unsigned eNB_ue_s1ap_id:24; - //uint32_t mme_ue_s1ap_id; - //uint8_t radio_capabilities[100]; - //uint32_t radio_capabilities_length; - return 0; -} diff --git a/openair-cn/MME_APP/mme_app_config.c b/openair-cn/MME_APP/mme_app_config.c deleted file mode 100755 index 2fabb43ab1..0000000000 --- a/openair-cn/MME_APP/mme_app_config.c +++ /dev/null @@ -1,307 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -/*! \file mme_app_config.c - * \brief - * \author Lionel GAUTHIER - * \version 1.0 - * \company Eurecom - * \email: lionel.gauthier@eurecom.fr - */ -#define MME_APP -#define MME_APP_CONFIG_C - -#include -#include -#include "mme_app_config.h" - -int mme_app_config_init(char* lib_config_file_name_pP, mme_app_config_t* config_pP) -{ - - config_t cfg; - config_setting_t *setting_sgw = NULL; - char *sgw_interface_name_for_S1u_S12_S4_up = NULL; - char *sgw_ipv4_address_for_S1u_S12_S4_up = NULL; - char *sgw_interface_name_for_S5_S8_up = NULL; - char *sgw_ipv4_address_for_S5_S8_up = NULL; - char *sgw_interface_name_for_S11 = NULL; - char *sgw_ipv4_address_for_S11 = NULL; - - config_setting_t *setting_pgw = NULL; - config_setting_t *subsetting = NULL; - config_setting_t *sub2setting = NULL; - char *pgw_interface_name_for_S5_S8 = NULL; - char *pgw_ipv4_address_for_S5_S8 = NULL; - char *pgw_interface_name_for_SGI = NULL; - char *pgw_ipv4_address_for_SGI = NULL; - - char *delimiters=NULL; - char *saveptr1= NULL; - char *astring = NULL; - char *atoken = NULL; - char *atoken2 = NULL; - char *address = NULL; - char *cidr = NULL; - char *mask = NULL; - int num = 0; - int i = 0; - int jh, jn; - unsigned char buf_in6_addr[sizeof(struct in6_addr)]; - struct in6_addr addr6_start; - struct in6_addr addr6_mask; - int prefix_mask; - uint64_t counter64; - unsigned char buf_in_addr[sizeof(struct in_addr)]; - struct in_addr addr_start; - struct in_addr addr_end; - - - memset((char*)config_pP, 0 , sizeof(mme_app_config_t)); - - config_init(&cfg); - - if(lib_config_file_name_pP != NULL) { - /* Read the file. If there is an error, report it and exit. */ - if(! config_read_file(&cfg, lib_config_file_name_pP)) { - MME_APP_ERROR("%s:%d - %s\n", lib_config_file_name_pP, config_error_line(&cfg), config_error_text(&cfg)); - config_destroy(&cfg); - AssertFatal (1 == 0, "Failed to parse eNB configuration file %s!\n", lib_config_file_name_pP); - } - } else { - SPGW_APP_ERROR("No SP-GW configuration file provided!\n"); - config_destroy(&cfg); - AssertFatal (0, "No SP-GW configuration file provided!\n"); - } - - setting_sgw = config_lookup(&cfg, SGW_CONFIG_STRING_SGW_CONFIG); - - if(setting_sgw != NULL) { - subsetting = config_setting_get_member (setting_sgw, SGW_CONFIG_STRING_NETWORK_INTERFACES_CONFIG); - - if(subsetting != NULL) { - if( ( - config_setting_lookup_string( subsetting, SGW_CONFIG_STRING_SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP, (const char **)&sgw_interface_name_for_S1u_S12_S4_up) - && config_setting_lookup_string( subsetting, SGW_CONFIG_STRING_SGW_IPV4_ADDRESS_FOR_S1U_S12_S4_UP, (const char **)&sgw_ipv4_address_for_S1u_S12_S4_up) - && config_setting_lookup_string( subsetting, SGW_CONFIG_STRING_SGW_INTERFACE_NAME_FOR_S5_S8_UP, (const char **)&sgw_interface_name_for_S5_S8_up) - && config_setting_lookup_string( subsetting, SGW_CONFIG_STRING_SGW_IPV4_ADDRESS_FOR_S5_S8_UP, (const char **)&sgw_ipv4_address_for_S5_S8_up) - && config_setting_lookup_string( subsetting, SGW_CONFIG_STRING_SGW_INTERFACE_NAME_FOR_S11, (const char **)&sgw_interface_name_for_S11) - && config_setting_lookup_string( subsetting, SGW_CONFIG_STRING_SGW_IPV4_ADDRESS_FOR_S11, (const char **)&sgw_ipv4_address_for_S11) - ) - ) { - config_pP->sgw_config.ipv4.sgw_interface_name_for_S1u_S12_S4_up = strdup(sgw_interface_name_for_S1u_S12_S4_up); - cidr = strdup(sgw_ipv4_address_for_S1u_S12_S4_up); - address = strtok(cidr, "/"); - mask = strtok(NULL, "/"); - IPV4_STR_ADDR_TO_INT_NWBO ( address, config_pP->sgw_config.ipv4.sgw_ipv4_address_for_S1u_S12_S4_up, "BAD IP ADDRESS FORMAT FOR S1u_S12_S4 !\n" ) - config_pP->sgw_config.ipv4.sgw_ip_netmask_for_S1u_S12_S4_up = atoi(mask); - free(cidr); - - config_pP->sgw_config.ipv4.sgw_interface_name_for_S5_S8_up = strdup(sgw_interface_name_for_S5_S8_up); - cidr = strdup(sgw_ipv4_address_for_S5_S8_up); - address = strtok(cidr, "/"); - mask = strtok(NULL, "/"); - IPV4_STR_ADDR_TO_INT_NWBO ( address, config_pP->sgw_config.ipv4.sgw_ipv4_address_for_S5_S8_up, "BAD IP ADDRESS FORMAT FOR S5_S8 !\n" ) - config_pP->sgw_config.ipv4.sgw_ip_netmask_for_S5_S8_up = atoi(mask); - free(cidr); - - config_pP->sgw_config.ipv4.sgw_interface_name_for_S11 = strdup(sgw_interface_name_for_S11); - cidr = strdup(sgw_ipv4_address_for_S11); - address = strtok(cidr, "/"); - mask = strtok(NULL, "/"); - IPV4_STR_ADDR_TO_INT_NWBO ( address, config_pP->sgw_config.ipv4.sgw_ipv4_address_for_S11, "BAD IP ADDRESS FORMAT FOR S11 !\n" ) - config_pP->sgw_config.ipv4.sgw_ip_netmask_for_S11 = atoi(mask); - free(cidr); - } - } - } - - setting_pgw = config_lookup(&cfg, PGW_CONFIG_STRING_PGW_CONFIG); - - if(setting_pgw != NULL) { - subsetting = config_setting_get_member (setting_pgw, SGW_CONFIG_STRING_NETWORK_INTERFACES_CONFIG); - - if(subsetting != NULL) { - if( ( - config_setting_lookup_string(subsetting, - PGW_CONFIG_STRING_PGW_INTERFACE_NAME_FOR_S5_S8, - (const char **)&pgw_interface_name_for_S5_S8) - && config_setting_lookup_string(subsetting, - PGW_CONFIG_STRING_PGW_IPV4_ADDRESS_FOR_S5_S8, - (const char **)&pgw_ipv4_address_for_S5_S8) - && config_setting_lookup_string(subsetting, - PGW_CONFIG_STRING_PGW_INTERFACE_NAME_FOR_SGI, - (const char **)&pgw_interface_name_for_SGI) - && config_setting_lookup_string(subsetting, - PGW_CONFIG_STRING_PGW_IPV4_ADDR_FOR_SGI, - (const char **)&pgw_ipv4_address_for_SGI) - ) - ) { - config_pP->pgw_config.ipv4.pgw_interface_name_for_S5_S8 = strdup(pgw_interface_name_for_S5_S8); - cidr = strdup(pgw_ipv4_address_for_S5_S8); - address = strtok(cidr, "/"); - mask = strtok(NULL, "/"); - IPV4_STR_ADDR_TO_INT_NWBO ( address, config_pP->pgw_config.ipv4.pgw_ipv4_address_for_S5_S8, "BAD IP ADDRESS FORMAT FOR S5_S8 !\n" ) - config_pP->pgw_config.ipv4.pgw_ip_netmask_for_S5_S8 = atoi(mask); - free(cidr); - - config_pP->pgw_config.ipv4.pgw_interface_name_for_SGI = strdup(pgw_interface_name_for_SGI); - cidr = strdup(pgw_ipv4_address_for_SGI); - address = strtok(cidr, "/"); - mask = strtok(NULL, "/"); - IPV4_STR_ADDR_TO_INT_NWBO ( address, config_pP->pgw_config.ipv4.pgw_ipv4_address_for_SGI, "BAD IP ADDRESS FORMAT FOR SGI !\n" ) - config_pP->pgw_config.ipv4.pgw_ip_netmask_for_SGI = atoi(mask); - free(cidr); - } - } - - subsetting = config_setting_get_member (setting_pgw, PGW_CONFIG_STRING_IP_ADDRESS_POOL); - - if(subsetting != NULL) { - sub2setting = config_setting_get_member (subsetting, PGW_CONFIG_STRING_IPV4_ADDRESS_LIST); - - if(sub2setting != NULL) { - num = config_setting_length(sub2setting); - - for (i = 0; i < num; i++) { - astring = config_setting_get_string_elem(sub2setting,i); - - if (astring != NULL) { - trim(astring, strlen(astring)+1); - - if (inet_pton(AF_INET, astring, buf_in_addr) < 1) { - // failure, test if there is a range specified in the string - atoken = strtok(astring, PGW_CONFIG_STRING_IP_ADDRESS_RANGE_DELIMITERS); - - if (inet_pton(AF_INET, astring, buf_in_addr) == 1) { - memcpy (&addr_start, buf_in_addr, sizeof(struct in_addr)); - // valid address - atoken2 = strtok(NULL, PGW_CONFIG_STRING_IP_ADDRESS_RANGE_DELIMITERS); - - if (inet_pton(AF_INET, atoken2, buf_in_addr) == 1) { - memcpy (&addr_end, buf_in_addr, sizeof(struct in_addr)); - - // valid address - for (jh = ntohl(addr_start.s_addr); jh <= ntohl(addr_end.s_addr); jh++) { - DevAssert(PGW_MAX_ALLOCATED_PDN_ADDRESSES > config_pP->pgw_config.pool_pdn_addresses.num_ipv4_addresses); - jn = htonl(jh); - - if (IN_CLASSA(addr_start.s_addr)) { - if ((jh & 0xFF) && (jh & 0xFF) != 0xFF) { - config_pP->pgw_config.pool_pdn_addresses.ipv4_addresses[config_pP->pgw_config.pool_pdn_addresses.num_ipv4_addresses++].s_addr = jn; - } - } else if (IN_CLASSB(addr_start.s_addr)) { - if ((jh & 0xFF) && (jh & 0xFF) != 0xFF) { - config_pP->pgw_config.pool_pdn_addresses.ipv4_addresses[config_pP->pgw_config.pool_pdn_addresses.num_ipv4_addresses++].s_addr = jn; - } - } else if (IN_CLASSC(addr_start.s_addr)) { - if ((jh & 0xFF) && (jh & 0xFF) != 0xFF) { - config_pP->pgw_config.pool_pdn_addresses.ipv4_addresses[config_pP->pgw_config.pool_pdn_addresses.num_ipv4_addresses++].s_addr = jn; - } - } else { - printf("ERROR ON ADDRESS CLASS %d.%d.%d.%d\n", NIPADDR(jn)); - } - } - } - } - } else { - DevAssert(PGW_MAX_ALLOCATED_PDN_ADDRESSES > config_pP->pgw_config.pool_pdn_addresses.num_ipv4_addresses); - memcpy (&addr_start, buf_in_addr, sizeof(struct in_addr)); - config_pP->pgw_config.pool_pdn_addresses.ipv4_addresses[config_pP->pgw_config.pool_pdn_addresses.num_ipv4_addresses++].s_addr = addr_start.s_addr; - } - } - } - } - - sub2setting = config_setting_get_member (subsetting, PGW_CONFIG_STRING_IPV6_ADDRESS_LIST); - - if(sub2setting != NULL) { - num = config_setting_length(sub2setting); - - for (i = 0; i < num; i++) { - astring = config_setting_get_string_elem(sub2setting,i); - - if (astring != NULL) { - trim(astring, strlen(astring)+1); - - if (inet_pton(AF_INET6, astring, buf_in6_addr) < 1) { - // failure, test if there is a range specified in the string - atoken = strtok(astring, PGW_CONFIG_STRING_IPV6_PREFIX_DELIMITER); - - if (inet_pton(AF_INET6, astring, buf_in6_addr) == 1) { - atoken2 = strtok(NULL, PGW_CONFIG_STRING_IPV6_PREFIX_DELIMITER); - prefix_mask = atoi(atoken2); - // arbitrary values - DevAssert((prefix_mask < 128) && (prefix_mask >= 64)); - - memcpy (&addr6_start, buf_in6_addr, sizeof(struct in6_addr)); - memcpy (&addr6_mask, buf_in6_addr, sizeof(struct in6_addr)); - sgw_ipv6_mask_in6_addr(&addr6_mask, prefix_mask); - - if (memcmp(&addr6_start, &addr6_mask, sizeof(struct in6_addr)) != 0) { - AssertFatal(0, "BAD IPV6 ADDR CONFIG/MASK PAIRING %s/%d\n", astring, prefix_mask); - } - - counter64 = 0xFFFFFFFFFFFFFFFF >> prefix_mask; // address Prefix_mask/0..0 not valid - - do { - addr6_start.s6_addr32[3] = addr6_start.s6_addr32[3] + htonl(1); - - if (addr6_start.s6_addr32[3] == 0) { - addr6_start.s6_addr32[2] = addr6_start.s6_addr32[2] + htonl(1); - - if (addr6_start.s6_addr32[2] == 0) { - // should not happen since mask is no less than 64 - addr6_start.s6_addr32[1] = addr6_start.s6_addr32[1] + htonl(1); - - if (addr6_start.s6_addr32[1] == 0) { - addr6_start.s6_addr32[0] = addr6_start.s6_addr32[0] + htonl(1); - } - } - } - - memcpy (&config_pP->pgw_config.pool_pdn_addresses.ipv6_addresses[config_pP->pgw_config.pool_pdn_addresses.num_ipv6_addresses++], - &addr6_start, - sizeof(struct in6_addr)); - counter64 = counter64 - 1; - } while (counter64 > 0); - } - } else { - DevAssert(PGW_MAX_ALLOCATED_PDN_ADDRESSES > config_pP->pgw_config.pool_pdn_addresses.num_ipv6_addresses); - memcpy (&config_pP->pgw_config.pool_pdn_addresses.ipv6_addresses[config_pP->pgw_config.pool_pdn_addresses.num_ipv6_addresses++], - buf_in6_addr, - sizeof(struct in6_addr)); - } - } - } - } - } - } - - return 0; -} diff --git a/openair-cn/MME_APP/mme_app_config.h b/openair-cn/MME_APP/mme_app_config.h deleted file mode 100755 index 047678d60d..0000000000 --- a/openair-cn/MME_APP/mme_app_config.h +++ /dev/null @@ -1,41 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -/*! \file mme_app_config.h - * \brief - * \author Lionel GAUTHIER - * \version 1.0 - * \company Eurecom - * \email: lionel.gauthier@eurecom.fr - */ -#ifndef MME_APP_CONFIG_H_ -#define MME_APP_CONFIG_H_ - - -#endif /* MME_APP_CONFIG_H_ */ diff --git a/openair-cn/MME_APP/mme_app_context.c b/openair-cn/MME_APP/mme_app_context.c deleted file mode 100644 index f7ca54f8da..0000000000 --- a/openair-cn/MME_APP/mme_app_context.c +++ /dev/null @@ -1,555 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - - -#include -#include -#include -#include -#include -#include - -#include - -#include "intertask_interface.h" -#include "mme_config.h" - -#include "assertions.h" -#include "conversions.h" -#include "tree.h" -#include "enum_string.h" -#include "common_types.h" - -#include "mme_app_extern.h" -#include "mme_app_ue_context.h" -#include "mme_app_defs.h" -#include "msc.h" - -int ue_context_compare_identifiers(struct ue_context_s *p1, - struct ue_context_s *p2); - -RB_PROTOTYPE(ue_context_map, ue_context_s, rb_entry, - ue_context_compare_identifiers); - -RB_GENERATE(ue_context_map, ue_context_s, rb_entry, - ue_context_compare_identifiers); - -//------------------------------------------------------------------------------ -extern inline int ue_context_compare_identifiers( - struct ue_context_s *p1, struct ue_context_s *p2) -//------------------------------------------------------------------------------ -{ - MME_APP_DEBUG(" ue_context_compare_identifiers IMSI %"SCNu64"\n", p1->imsi); - MME_APP_DEBUG(" ue_context_compare_identifiers mme_s11_teid %08x\n" , p1->mme_s11_teid); - MME_APP_DEBUG(" ue_context_compare_identifiers mme_ue_s1ap_id %08x\n" , p1->mme_ue_s1ap_id); - MME_APP_DEBUG(" ue_context_compare_identifiers ue_id %08x\n" , p1->ue_id); - - if (p1->imsi > 0) { - MME_APP_DEBUG(" with IMSI %"SCNu64"\n", p2->imsi); - - /* if IMSI provided */ - if (p1->imsi > p2->imsi) { - return 1; - } - - if (p1->imsi < p2->imsi) { - return -1; - } - } else if (p1->mme_s11_teid > 0) { - MME_APP_DEBUG(" with mme_s11_teid %08x\n", p2->mme_s11_teid); - - /* if s11 teid provided */ - if (p1->mme_s11_teid > p2->mme_s11_teid) { - return 1; - } - - if (p1->mme_s11_teid < p2->mme_s11_teid) { - return -1; - } - } else if (p1->mme_ue_s1ap_id > 0) { - MME_APP_DEBUG(" with mme_ue_s1ap_id %08x\n", p2->mme_ue_s1ap_id); - - /* if s1ap ue id provided */ - if (p1->mme_ue_s1ap_id > p2->mme_ue_s1ap_id) { - return 1; - } - - if (p1->mme_ue_s1ap_id < p2->mme_ue_s1ap_id) { - return -1; - } - } else if (p1->ue_id > 0) { - MME_APP_DEBUG(" with ue_id %08x\n", p2->ue_id); - - /* if nas ue_id provided */ - if (p1->ue_id > p2->ue_id) { - return 1; - } - - if (p1->ue_id < p2->ue_id) { - return -1; - } - } else { - uint16_t mcc1; - uint16_t mnc1; - uint16_t mnc1_len; - uint16_t mcc2; - uint16_t mnc2; - uint16_t mnc2_len; - - PLMN_T_TO_MCC_MNC(p1->guti.gummei.plmn, mcc1, mnc1, mnc1_len); - PLMN_T_TO_MCC_MNC(p1->guti.gummei.plmn, mcc2, mnc2, mnc2_len); - - /* else compare by GUTI */ - if ((p1->guti.m_tmsi < p2->guti.m_tmsi) && - (p1->guti.gummei.MMEcode < p2->guti.gummei.MMEcode) && - (p1->guti.gummei.MMEgid < p2->guti.gummei.MMEgid) && - (mcc1 < mcc2) && - (mnc1 < mnc2) && - (mnc1_len < mnc2_len)) - return 1; - - if ((p1->guti.m_tmsi > p2->guti.m_tmsi) && - (p1->guti.gummei.MMEcode > p2->guti.gummei.MMEcode) && - (p1->guti.gummei.MMEgid > p2->guti.gummei.MMEgid) && - (mcc1 > mcc2) && - (mnc1 > mnc2) && - (mnc1_len > mnc2_len)) - return -1; - } - - /* Match -> return 0 */ - return 0; -} - -//------------------------------------------------------------------------------ -ue_context_t *mme_create_new_ue_context(void) -//------------------------------------------------------------------------------ -{ - ue_context_t *new_p; - - new_p = malloc(sizeof(ue_context_t)); - - if (new_p == NULL) { - return NULL; - } - - memset(new_p, 0, sizeof(ue_context_t)); - return new_p; -} - - -//------------------------------------------------------------------------------ -struct ue_context_s *mme_ue_context_exists_imsi(mme_ue_context_t *mme_ue_context, - mme_app_imsi_t imsi) -//------------------------------------------------------------------------------ -{ - struct ue_context_s reference; - - DevAssert(mme_ue_context != NULL); - - memset(&reference, 0, sizeof(struct ue_context_s)); - reference.imsi = imsi; - return RB_FIND(ue_context_map, &mme_ue_context->ue_context_tree, - &reference); -} - - -//------------------------------------------------------------------------------ -struct ue_context_s *mme_ue_context_exists_s11_teid(mme_ue_context_t *mme_ue_context, - uint32_t teid) -//------------------------------------------------------------------------------ -{ - struct ue_context_s reference; - - DevAssert(mme_ue_context != NULL); - - memset(&reference, 0, sizeof(struct ue_context_s)); - reference.mme_s11_teid = teid; - return RB_FIND(ue_context_map, &mme_ue_context->ue_context_tree, - &reference); -} - - - -//------------------------------------------------------------------------------ -ue_context_t *mme_ue_context_exists_mme_ue_s1ap_id( - mme_ue_context_t *mme_ue_context, - uint32_t mme_ue_s1ap_id) -//------------------------------------------------------------------------------ -{ - struct ue_context_s reference; - - DevAssert(mme_ue_context != NULL); - - memset(&reference, 0, sizeof(struct ue_context_s)); - reference.mme_ue_s1ap_id = mme_ue_s1ap_id; - return RB_FIND(ue_context_map, &mme_ue_context->ue_context_tree, - &reference); -} - - - -//------------------------------------------------------------------------------ -ue_context_t *mme_ue_context_exists_nas_ue_id( - mme_ue_context_t *mme_ue_context, - uint32_t nas_ue_id) -//------------------------------------------------------------------------------ -{ - struct ue_context_s reference; - - DevAssert(mme_ue_context != NULL); - - memset(&reference, 0, sizeof(struct ue_context_s)); - reference.ue_id = nas_ue_id; - return RB_FIND(ue_context_map, &mme_ue_context->ue_context_tree, - &reference); -} - - - - -//------------------------------------------------------------------------------ -ue_context_t *mme_ue_context_exists_guti(mme_ue_context_t *mme_ue_context, - GUTI_t guti) -//------------------------------------------------------------------------------ -{ - struct ue_context_s reference; - - DevAssert(mme_ue_context != NULL); - - memset(&reference, 0, sizeof(struct ue_context_s)); - - memcpy(&reference.guti, &guti, sizeof(GUTI_t)); - - return RB_FIND(ue_context_map, &mme_ue_context->ue_context_tree, - &reference); -} - -//------------------------------------------------------------------------------ -int mme_insert_ue_context(mme_ue_context_t *mme_ue_context, struct ue_context_s *ue_context_p) -//------------------------------------------------------------------------------ -{ - struct ue_context_s *collision_p = NULL; - - DevAssert(mme_ue_context != NULL); - DevAssert(ue_context_p != NULL); - - /* Updating statistics */ - mme_ue_context->nb_ue_managed++; - mme_ue_context->nb_ue_since_last_stat++; - - collision_p = RB_INSERT(ue_context_map, &mme_ue_context->ue_context_tree, - ue_context_p); - - if (collision_p != NULL) { - fprintf(stderr, "This ue context already exists...\n"); - return -1; - } - - return 0; -} - - - -//------------------------------------------------------------------------------ -void mme_remove_ue_context(mme_ue_context_t *mme_ue_context, struct ue_context_s *ue_context_p) -//------------------------------------------------------------------------------ -{ - struct ue_context_s *collision_p = NULL; - - DevAssert(mme_ue_context != NULL); - DevAssert(ue_context_p != NULL); - - /* Updating statistics */ - mme_ue_context->nb_ue_managed++; - mme_ue_context->nb_ue_since_last_stat++; - - collision_p = RB_REMOVE(ue_context_map, &mme_ue_context->ue_context_tree, - ue_context_p); -#warning "TODO mme_ue_context_free_content" - //TODO mme_ue_context_free_content(ue_context_p); - free(ue_context_p); - return 0; -} - -//------------------------------------------------------------------------------ -void mme_app_dump_ue_contexts(mme_ue_context_t *mme_ue_context) -//------------------------------------------------------------------------------ -{ - struct ue_context_s *context_p; - - MME_APP_DEBUG("-----------------------UE contexts-----------------------\n"); - RB_FOREACH(context_p, ue_context_map, &mme_ue_context->ue_context_tree) { - uint8_t j; - - MME_APP_DEBUG(" - IMSI ...........: %"SCNu64"\n", context_p->imsi); - MME_APP_DEBUG(" | m_tmsi | mmec | mmegid | mcc | mnc |\n"); - MME_APP_DEBUG(" - GUTI............: | %08x | %02x | %04x | %03u | %03u |\n", - context_p->guti.m_tmsi, context_p->guti.gummei.MMEcode, - context_p->guti.gummei.MMEgid, - /* TODO check if two or three digits MNC... */ - context_p->guti.gummei.plmn.MCCdigit3 * 100 + - context_p->guti.gummei.plmn.MCCdigit2 * 10 + - context_p->guti.gummei.plmn.MCCdigit1, - context_p->guti.gummei.plmn.MNCdigit3 * 100 + - context_p->guti.gummei.plmn.MNCdigit2 * 10 + - context_p->guti.gummei.plmn.MNCdigit1); - MME_APP_DEBUG(" - Authenticated ..: %s\n", - (context_p->imsi_auth == IMSI_UNAUTHENTICATED) ? "FALSE": "TRUE"); - MME_APP_DEBUG(" - eNB UE s1ap ID .: %08x\n", context_p->eNB_ue_s1ap_id); - MME_APP_DEBUG(" - MME UE s1ap ID .: %08x\n", context_p->mme_ue_s1ap_id); - MME_APP_DEBUG(" - MME S11 TEID ...: %08x\n", context_p->mme_s11_teid); - MME_APP_DEBUG(" - SGW S11 TEID ...: %08x\n", context_p->sgw_s11_teid); - MME_APP_DEBUG(" | mcc | mnc | cell id |\n"); - MME_APP_DEBUG(" - E-UTRAN CGI ....: | %03u | %03u | %08x |\n", - context_p->e_utran_cgi.plmn.MCCdigit3 * 100 + - context_p->e_utran_cgi.plmn.MCCdigit2 * 10 + - context_p->e_utran_cgi.plmn.MCCdigit1, - context_p->e_utran_cgi.plmn.MNCdigit3 * 100 + - context_p->e_utran_cgi.plmn.MNCdigit2 * 10 + - context_p->e_utran_cgi.plmn.MNCdigit1, - context_p->e_utran_cgi.cell_identity); - /* Ctime return a \n in the string */ - MME_APP_DEBUG(" - Last acquired ..: %s", ctime(&context_p->cell_age)); - - /* Display UE info only if we know them */ - if (context_p->subscription_known == SUBSCRIPTION_KNOWN) { - MME_APP_DEBUG(" - Status .........: %s\n", - (context_p->sub_status == SS_SERVICE_GRANTED) ? "Granted" : "Barred"); -#define DISPLAY_BIT_MASK_PRESENT(mASK) \ - ((context_p->access_restriction_data & mASK) ? 'X' : 'O') - MME_APP_DEBUG(" (O = allowed, X = !O) |UTRAN|GERAN|GAN|HSDPA EVO|E_UTRAN|HO TO NO 3GPP|\n"); - MME_APP_DEBUG(" - Access restriction | %c | %c | %c | %c | %c | %c |\n", - DISPLAY_BIT_MASK_PRESENT(ARD_UTRAN_NOT_ALLOWED), - DISPLAY_BIT_MASK_PRESENT(ARD_GERAN_NOT_ALLOWED), - DISPLAY_BIT_MASK_PRESENT(ARD_GAN_NOT_ALLOWED), - DISPLAY_BIT_MASK_PRESENT(ARD_I_HSDPA_EVO_NOT_ALLOWED), - DISPLAY_BIT_MASK_PRESENT(ARD_E_UTRAN_NOT_ALLOWED), - DISPLAY_BIT_MASK_PRESENT(ARD_HO_TO_NON_3GPP_NOT_ALLOWED)); - MME_APP_DEBUG(" - Access Mode ....: %s\n", - ACCESS_MODE_TO_STRING(context_p->access_mode)); - MME_APP_DEBUG(" - MSISDN .........: %-*s\n", - MSISDN_LENGTH, context_p->msisdn); - MME_APP_DEBUG(" - RAU/TAU timer ..: %u\n", context_p->rau_tau_timer); - MME_APP_DEBUG(" - IMEISV .........: %*s\n", 15, - context_p->me_identity.imeisv); - MME_APP_DEBUG(" - AMBR (bits/s) ( Downlink | Uplink )\n"); - MME_APP_DEBUG(" Subscribed ...: (%010"PRIu64"|%010"PRIu64")\n", - context_p->subscribed_ambr.br_dl, - context_p->subscribed_ambr.br_ul); - MME_APP_DEBUG(" Allocated ....: (%010"PRIu64"|%010"PRIu64")\n", - context_p->used_ambr.br_dl, context_p->used_ambr.br_ul); - MME_APP_DEBUG(" - Known vectors ..: %u\n", context_p->nb_of_vectors); - - for (j = 0; j < context_p->nb_of_vectors; j++) { - int k; - char xres_string[3 * XRES_LENGTH_MAX + 1]; - eutran_vector_t *vector_p; - - vector_p = &context_p->vector_list[j]; - - MME_APP_DEBUG(" - RAND ..: "RAND_FORMAT"\n", - RAND_DISPLAY(vector_p->rand)); - MME_APP_DEBUG(" - AUTN ..: "AUTN_FORMAT"\n", - AUTN_DISPLAY(vector_p->autn)); - MME_APP_DEBUG(" - KASME .: "KASME_FORMAT"\n", - KASME_DISPLAY_1(vector_p->kasme)); - MME_APP_DEBUG(" "KASME_FORMAT"\n", - KASME_DISPLAY_2(vector_p->kasme)); - - for (k = 0; k < vector_p->xres.size; k++) { - sprintf(&xres_string[k * 3], "%02x,", vector_p->xres.data[k]); - } - - xres_string[k * 3 - 1] = '\0'; - MME_APP_DEBUG(" - XRES ..: %s\n", xres_string); - } - - MME_APP_DEBUG(" - PDN List:\n"); - - for (j = 0; j < context_p->apn_profile.nb_apns; j++) { - struct apn_configuration_s *apn_config_p; - - apn_config_p = &context_p->apn_profile.apn_configuration[j]; - - /* Default APN ? */ - MME_APP_DEBUG(" - Default APN ...: %s\n", - (apn_config_p->context_identifier == context_p->apn_profile.context_identifier) - ? "TRUE" : "FALSE"); - MME_APP_DEBUG(" - APN ...........: %s\n", apn_config_p->service_selection); - MME_APP_DEBUG(" - AMBR (bits/s) ( Downlink | Uplink )\n"); - MME_APP_DEBUG(" (%010"PRIu64"|%010"PRIu64")\n", - apn_config_p->ambr.br_dl, apn_config_p->ambr.br_ul); - MME_APP_DEBUG(" - PDN type ......: %s\n", - PDN_TYPE_TO_STRING(apn_config_p->pdn_type)); - MME_APP_DEBUG(" - QOS\n"); - MME_APP_DEBUG(" QCI .........: %u\n", - apn_config_p->subscribed_qos.qci); - MME_APP_DEBUG(" Prio level ..: %u\n", - apn_config_p->subscribed_qos.allocation_retention_priority.priority_level); - MME_APP_DEBUG(" Pre-emp vul .: %s\n", - (apn_config_p->subscribed_qos.allocation_retention_priority.pre_emp_vulnerability - == PRE_EMPTION_VULNERABILITY_ENABLED) ? "ENABLED" : "DISABLED"); - MME_APP_DEBUG(" Pre-emp cap .: %s\n", - (apn_config_p->subscribed_qos.allocation_retention_priority.pre_emp_capability - == PRE_EMPTION_CAPABILITY_ENABLED) ? "ENABLED" : "DISABLED"); - - if (apn_config_p->nb_ip_address == 0) { - MME_APP_DEBUG(" IP addr .....: Dynamic allocation\n"); - } else { - int i; - MME_APP_DEBUG(" IP addresses :\n"); - - for (i = 0; i < apn_config_p->nb_ip_address; i++) { - if (apn_config_p->ip_address[i].pdn_type == IPv4) { - MME_APP_DEBUG(" ["IPV4_ADDR"]\n", - IPV4_ADDR_DISPLAY_8(apn_config_p->ip_address[i].address.ipv4_address)); - } else { - char ipv6[40]; - inet_ntop(AF_INET6, apn_config_p->ip_address[i].address.ipv6_address,ipv6, 40); - MME_APP_DEBUG(" [%s]\n", ipv6); - } - } - } - - MME_APP_DEBUG("\n"); - } - - MME_APP_DEBUG(" - Bearer List:\n"); - - for (j = 0; j < BEARERS_PER_UE; j++) { - bearer_context_t *bearer_context_p; - - bearer_context_p = &context_p->eps_bearers[j]; - - if (bearer_context_p->s_gw_teid != 0) { - MME_APP_DEBUG(" Bearer id .......: %02u\n", j); - MME_APP_DEBUG(" S-GW TEID (UP)...: %08x\n", bearer_context_p->s_gw_teid); - MME_APP_DEBUG(" P-GW TEID (UP)...: %08x\n", bearer_context_p->p_gw_teid); - MME_APP_DEBUG(" QCI .............: %u\n", - bearer_context_p->qci); - MME_APP_DEBUG(" Priority level ..: %u\n", - bearer_context_p->prio_level); - MME_APP_DEBUG(" Pre-emp vul .....: %s\n", - (bearer_context_p->pre_emp_vulnerability - == PRE_EMPTION_VULNERABILITY_ENABLED) ? "ENABLED" : "DISABLED"); - MME_APP_DEBUG(" Pre-emp cap .....: %s\n", - (bearer_context_p->pre_emp_capability - == PRE_EMPTION_CAPABILITY_ENABLED) ? "ENABLED" : "DISABLED"); - } - } - } - } - MME_APP_DEBUG("---------------------------------------------------------\n"); -} - - -//------------------------------------------------------------------------------ -void mme_app_handle_s1ap_ue_context_release_req(const s1ap_ue_context_release_req_t const *s1ap_ue_context_release_req) -//------------------------------------------------------------------------------ -{ - struct ue_context_s *ue_context_p = NULL; - MessageDef *message_p = NULL; - - MME_APP_DEBUG("Received S1AP_UE_CONTEXT_RELEASE_REQ from S1AP\n"); - ue_context_p = mme_ue_context_exists_nas_ue_id(&mme_app_desc.mme_ue_contexts, s1ap_ue_context_release_req->mme_ue_s1ap_id); - - if (ue_context_p == NULL) { - MSC_LOG_EVENT( - MSC_MMEAPP_MME, - "0 S1AP_UE_CONTEXT_RELEASE_REQ Unknown mme_ue_s1ap_id 0x%06"PRIX32" ",s1ap_ue_context_release_req->mme_ue_s1ap_id); - MME_APP_ERROR("UE context doesn't exist for UE 0x%06"PRIX32"/dec%u\n", - s1ap_ue_context_release_req->mme_ue_s1ap_id, - s1ap_ue_context_release_req->mme_ue_s1ap_id); - return; - } - if ((ue_context_p->mme_s11_teid == 0) && - (ue_context_p->sgw_s11_teid == 0)) { - // no session was created, no need for releasing bearers in SGW - message_p = itti_alloc_new_message(TASK_MME_APP, S1AP_UE_CONTEXT_RELEASE_COMMAND); - - AssertFatal(message_p != NULL, "itti_alloc_new_message Failed"); - memset((void*)&message_p->ittiMsg.s1ap_ue_context_release_command, - 0, - sizeof(s1ap_ue_context_release_command_t)); - - S1AP_UE_CONTEXT_RELEASE_COMMAND(message_p).mme_ue_s1ap_id = ue_context_p->mme_ue_s1ap_id; - MSC_LOG_TX_MESSAGE( - MSC_MMEAPP_MME, - MSC_S1AP_MME, - NULL,0, - "0 S1AP_UE_CONTEXT_RELEASE_COMMAND mme_ue_s1ap_id %06"PRIX32" ", - S1AP_UE_CONTEXT_RELEASE_COMMAND(message_p).mme_ue_s1ap_id); - - - itti_send_msg_to_task(TASK_S1AP, INSTANCE_DEFAULT, message_p); - } else { - mme_app_send_s11_release_access_bearers_req(ue_context_p); - } -} - - -//------------------------------------------------------------------------------ -void mme_app_handle_s1ap_ue_context_release_complete(const s1ap_ue_context_release_complete_t const *s1ap_ue_context_release_complete) -//------------------------------------------------------------------------------ -{ - struct ue_context_s *ue_context_p = NULL; - MessageDef *message_p = NULL; - - MME_APP_DEBUG("Received S1AP_UE_CONTEXT_RELEASE_COMPLETE from S1AP\n"); - - ue_context_p = mme_ue_context_exists_nas_ue_id(&mme_app_desc.mme_ue_contexts, s1ap_ue_context_release_complete->mme_ue_s1ap_id); - - if (ue_context_p == NULL) { - MSC_LOG_EVENT( - MSC_MMEAPP_MME, - "0 S1AP_UE_CONTEXT_RELEASE_COMPLETE Unknown mme_ue_s1ap_id 0x%06"PRIX32" ",s1ap_ue_context_release_complete->mme_ue_s1ap_id); - MME_APP_ERROR("UE context doesn't exist for mme_ue_s1ap_id 0x%06"PRIX32"/dec%u\n", - s1ap_ue_context_release_complete->mme_ue_s1ap_id, - s1ap_ue_context_release_complete->mme_ue_s1ap_id); - return; - } - message_p = itti_alloc_new_message(TASK_MME_APP, S1AP_DEREGISTER_UE_REQ); - memset((void*)&message_p->ittiMsg.s1ap_deregister_ue_req, - 0, - sizeof(s1ap_deregister_ue_req_t)); - - S1AP_DEREGISTER_UE_REQ(message_p).mme_ue_s1ap_id = s1ap_ue_context_release_complete->mme_ue_s1ap_id; - - - MSC_LOG_TX_MESSAGE( - MSC_MMEAPP_MME, - MSC_NAS_MME, - NULL,0, - "0 S1AP_DEREGISTER_UE_REQ"); - - itti_send_msg_to_task(TASK_NAS_MME, INSTANCE_DEFAULT, message_p); - - mme_remove_ue_context(&mme_app_desc.mme_ue_contexts, ue_context_p); -} diff --git a/openair-cn/MME_APP/mme_app_defs.h b/openair-cn/MME_APP/mme_app_defs.h deleted file mode 100644 index 11fbfdc2c8..0000000000 --- a/openair-cn/MME_APP/mme_app_defs.h +++ /dev/null @@ -1,92 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - - -/* This file contains definitions related to mme applicative layer and should - * not be included within other layers. - * Use mme_app_extern.h to expose mme applicative layer procedures/data. - */ - -#include "intertask_interface.h" -#include "mme_app_ue_context.h" - -#ifndef MME_APP_DEFS_H_ -#define MME_APP_DEFS_H_ - -#ifndef MME_APP_DEBUG -# define MME_APP_DEBUG(x, args...) do { fprintf(stdout, "[MMEA][D]"x, ##args); } while(0) -#endif -#ifndef MME_APP_ERROR -# define MME_APP_ERROR(x, args...) do { fprintf(stdout, "[MMEA][E]"x, ##args); } while(0) -#endif - -typedef struct { - /* UE contexts + some statistics variables */ - mme_ue_context_t mme_ue_contexts; - - long statistic_timer_id; - uint32_t statistic_timer_period; -} mme_app_desc_t; - -extern mme_app_desc_t mme_app_desc; - - -#if defined(DISABLE_USE_NAS) -int mme_app_handle_attach_req(nas_attach_req_t *attach_req_p); -#endif - -int mme_app_handle_s1ap_ue_capabilities_ind (const s1ap_ue_cap_ind_t const * s1ap_ue_cap_ind_pP); - -int mme_app_send_s11_create_session_req (struct ue_context_s * const ue_context_pP); - -int mme_app_send_s6a_update_location_req (struct ue_context_s * const ue_context_pP); - -int mme_app_handle_s6a_update_location_ans (const s6a_update_location_ans_t * const ula_pP); - -int mme_app_handle_nas_pdn_connectivity_req ( nas_pdn_connectivity_req_t * const nas_pdn_connectivity_req_p); - -void mme_app_handle_conn_est_cnf (const nas_conn_est_cnf_t * const nas_conn_est_cnf_pP); - -void mme_app_handle_conn_est_ind (const mme_app_connection_establishment_ind_t * const conn_est_ind_pP); - -int mme_app_handle_create_sess_resp (const SgwCreateSessionResponse * const create_sess_resp_pP); - -int mme_app_handle_establish_ind (const nas_establish_ind_t * const nas_establish_ind_pP); - -int mme_app_handle_authentication_info_answer(const s6a_auth_info_ans_t * const s6a_auth_info_ans_pP); - -int mme_app_handle_nas_auth_resp (const nas_auth_resp_t * const nas_auth_resp_pP); - -nas_cause_t s6a_error_2_nas_cause (const uint32_t s6a_errorP, const int experimentalP); - -void mme_app_handle_nas_auth_param_req (const nas_auth_param_req_t * const nas_auth_param_req_pP); - -void mme_app_handle_initial_context_setup_rsp(const mme_app_initial_context_setup_rsp_t * const initial_ctxt_setup_rsp_pP); - -#endif /* MME_APP_DEFS_H_ */ diff --git a/openair-cn/MME_APP/mme_app_extern.h b/openair-cn/MME_APP/mme_app_extern.h deleted file mode 100644 index b34a849aff..0000000000 --- a/openair-cn/MME_APP/mme_app_extern.h +++ /dev/null @@ -1,36 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - - -#ifndef MME_APP_EXTERN_H_ -#define MME_APP_EXTERN_H_ - -int mme_app_init(const mme_config_t *mme_config); - -#endif /* MME_APP_EXTERN_H_ */ diff --git a/openair-cn/MME_APP/mme_app_itti_messaging.h b/openair-cn/MME_APP/mme_app_itti_messaging.h deleted file mode 100644 index df23ba7d7e..0000000000 --- a/openair-cn/MME_APP/mme_app_itti_messaging.h +++ /dev/null @@ -1,81 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - - -#ifndef MME_APP_ITTI_MESSAGING_H_ -#define MME_APP_ITTI_MESSAGING_H_ - -static inline void -mme_app_itti_auth_fail( - const uint32_t ue_id, - const nas_cause_t cause) -{ - MessageDef *message_p; - - - message_p = itti_alloc_new_message(TASK_MME_APP, NAS_AUTHENTICATION_PARAM_FAIL); - - NAS_AUTHENTICATION_PARAM_FAIL(message_p).ue_id = ue_id; - NAS_AUTHENTICATION_PARAM_FAIL(message_p).cause = cause; - - MSC_LOG_TX_MESSAGE( - MSC_MMEAPP_MME, - MSC_NAS_MME, - NULL,0, - "0 NAS_AUTHENTICATION_PARAM_FAIL ue_id %06"PRIX32" cause %u", - ue_id, cause); - - itti_send_msg_to_task(TASK_NAS_MME, INSTANCE_DEFAULT, message_p); -} - - - -static inline void mme_app_itti_auth_rsp( - const uint32_t ue_id, - const uint8_t nb_vectors, - const eutran_vector_t * const vector) -{ - MessageDef *message_p; - - message_p = itti_alloc_new_message(TASK_MME_APP, NAS_AUTHENTICATION_PARAM_RSP); - - NAS_AUTHENTICATION_PARAM_RSP(message_p).ue_id = ue_id; - NAS_AUTHENTICATION_PARAM_RSP(message_p).nb_vectors = nb_vectors; - memcpy(&NAS_AUTHENTICATION_PARAM_RSP(message_p).vector, vector, sizeof(*vector)); - - MSC_LOG_TX_MESSAGE( - MSC_MMEAPP_MME, - MSC_NAS_MME, - NULL,0, - "0 NAS_AUTHENTICATION_PARAM_RSP ue_id %06"PRIX32" nb_vectors %u", - ue_id, nb_vectors); - itti_send_msg_to_task(TASK_NAS_MME, INSTANCE_DEFAULT, message_p); -} - -#endif /* MME_APP_ITTI_MESSAGING_H_ */ diff --git a/openair-cn/MME_APP/mme_app_location.c b/openair-cn/MME_APP/mme_app_location.c deleted file mode 100755 index 969b7b6ffb..0000000000 --- a/openair-cn/MME_APP/mme_app_location.c +++ /dev/null @@ -1,167 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -/*! \file mme_app_location.c - * \brief - * \author Sebastien ROUX, Lionel GAUTHIER - * \version 1.0 - * \company Eurecom - * \email: lionel.gauthier@eurecom.fr - */ - -#include -#include -#include - -#include "intertask_interface.h" -#include "mme_config.h" - -#include "mme_app_extern.h" -#include "mme_app_ue_context.h" -#include "mme_app_defs.h" - -#include "secu_defs.h" - -#include "assertions.h" -#include "common_types.h" -#include "msc.h" - - -int -mme_app_send_s6a_update_location_req( - struct ue_context_s * const ue_context_pP) -{ - struct ue_context_s *ue_context_p = NULL; - uint64_t imsi = 0; - MessageDef *message_p = NULL; - s6a_update_location_req_t *s6a_ulr_p = NULL; - - - MME_APP_STRING_TO_IMSI((char *)ue_context_pP->pending_pdn_connectivity_req_imsi, &imsi); - - MME_APP_DEBUG("Handling imsi %"IMSI_FORMAT"\n", imsi); - - if ((ue_context_p = mme_ue_context_exists_imsi(&mme_app_desc.mme_ue_contexts, - imsi)) == NULL) { - MME_APP_ERROR("That's embarrassing as we don't know this IMSI\n"); - return -1; - } - - message_p = itti_alloc_new_message(TASK_MME_APP, S6A_UPDATE_LOCATION_REQ); - - if (message_p == NULL) { - return -1; - } - - s6a_ulr_p = &message_p->ittiMsg.s6a_update_location_req; - memset((void*)s6a_ulr_p, 0, sizeof(s6a_update_location_req_t)); - - MME_APP_IMSI_TO_STRING(imsi, s6a_ulr_p->imsi); - s6a_ulr_p->imsi_length = strlen(s6a_ulr_p->imsi); - s6a_ulr_p->initial_attach = INITIAL_ATTACH; - memcpy(&s6a_ulr_p->visited_plmn, &ue_context_p->guti.gummei.plmn, sizeof(plmn_t)); - s6a_ulr_p->rat_type = RAT_EUTRAN; - /* Check if we already have UE data */ - s6a_ulr_p->skip_subscriber_data = 0; - - MSC_LOG_TX_MESSAGE( - MSC_MMEAPP_MME, - MSC_S6A_MME, - NULL,0, - "0 S6A_UPDATE_LOCATION_REQ imsi %"IMSI_FORMAT,imsi); - - return itti_send_msg_to_task(TASK_S6A, INSTANCE_DEFAULT, message_p); -} - - - -int -mme_app_handle_s6a_update_location_ans( - const s6a_update_location_ans_t * const ula_pP) -{ - uint64_t imsi = 0; - struct ue_context_s *ue_context_p = NULL; - - DevAssert(ula_pP != NULL); - - if (ula_pP->result.present == S6A_RESULT_BASE) { - if (ula_pP->result.choice.base != DIAMETER_SUCCESS) { - /* The update location procedure has failed. Notify the NAS layer - * and don't initiate the bearer creation on S-GW side. - */ - MME_APP_DEBUG("ULR/ULA procedure returned non success (ULA.result.choice.base=%d)\n", ula_pP->result.choice.base); - DevMessage("ULR/ULA procedure returned non success\n"); - } - } else { - /* The update location procedure has failed. Notify the NAS layer - * and don't initiate the bearer creation on S-GW side. - */ - MME_APP_DEBUG("ULR/ULA procedure returned non success (ULA.result.present=%d)\n", ula_pP->result.present); - DevMessage("ULR/ULA procedure returned non success\n"); - } - - MME_APP_STRING_TO_IMSI((char *)ula_pP->imsi, &imsi); - - MME_APP_DEBUG("%s Handling imsi %"IMSI_FORMAT"\n", __FUNCTION__, imsi); - - - if ((ue_context_p = mme_ue_context_exists_imsi(&mme_app_desc.mme_ue_contexts, imsi)) == NULL) { - MME_APP_ERROR("That's embarrassing as we don't know this IMSI\n"); - MSC_LOG_EVENT( - MSC_MMEAPP_MME, - "0 S6A_UPDATE_LOCATION unknown imsi %"IMSI_FORMAT,imsi); - return -1; - } - - ue_context_p->subscription_known = SUBSCRIPTION_KNOWN; - - ue_context_p->sub_status = ula_pP->subscription_data.subscriber_status; - ue_context_p->access_restriction_data = ula_pP->subscription_data.access_restriction; - - /* Copy the subscribed ambr to the sgw create session request message */ - memcpy(&ue_context_p->subscribed_ambr, &ula_pP->subscription_data.subscribed_ambr, - sizeof(ambr_t)); - memcpy( - ue_context_p->msisdn, - ula_pP->subscription_data.msisdn, - ula_pP->subscription_data.msisdn_length); - ue_context_p->msisdn_length = ula_pP->subscription_data.msisdn_length; - AssertFatal(ula_pP->subscription_data.msisdn_length != 0, "MSISDN LENGTH IS 0"); - AssertFatal(ula_pP->subscription_data.msisdn_length <= MSISDN_LENGTH, "MSISDN LENGTH is too high %u", MSISDN_LENGTH); - ue_context_p->msisdn[ue_context_p->msisdn_length] = '\0'; - - ue_context_p->rau_tau_timer = ula_pP->subscription_data.rau_tau_timer; - ue_context_p->access_mode = ula_pP->subscription_data.access_mode; - - memcpy(&ue_context_p->apn_profile, &ula_pP->subscription_data.apn_config_profile, - sizeof(apn_config_profile_t)); - - return mme_app_send_s11_create_session_req(ue_context_p); -} - diff --git a/openair-cn/MME_APP/mme_app_main.c b/openair-cn/MME_APP/mme_app_main.c deleted file mode 100644 index ddd00e1faf..0000000000 --- a/openair-cn/MME_APP/mme_app_main.c +++ /dev/null @@ -1,205 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - - -#include -#include -#include - -#include "intertask_interface.h" -#include "mme_config.h" -#include "timer.h" - -#include "mme_app_extern.h" -#include "mme_app_ue_context.h" -#include "mme_app_defs.h" -#include "mme_app_statistics.h" - -#include "assertions.h" -#include "msc.h" - -mme_app_desc_t mme_app_desc; - -void *mme_app_thread(void *args); - -void *mme_app_thread(void *args) -{ - itti_mark_task_ready(TASK_MME_APP); - MSC_START_USE(); - - while(1) { - MessageDef *received_message_p = NULL; - /* Trying to fetch a message from the message queue. - * If the queue is empty, this function will block till a - * message is sent to the task. - */ - itti_receive_msg(TASK_MME_APP, &received_message_p); - DevAssert(received_message_p != NULL); - - switch (ITTI_MSG_ID(received_message_p)) { - case S6A_AUTH_INFO_ANS: { - /* We received the authentication vectors from HSS, trigger a ULR - * for now. Normaly should trigger an authentication procedure with UE. - */ - mme_app_handle_authentication_info_answer(&received_message_p->ittiMsg.s6a_auth_info_ans); - } - break; - - case S6A_UPDATE_LOCATION_ANS: { - /* We received the update location answer message from HSS -> Handle it */ - mme_app_handle_s6a_update_location_ans(&received_message_p->ittiMsg.s6a_update_location_ans); - } - break; - - case SGW_CREATE_SESSION_RESPONSE: { - mme_app_handle_create_sess_resp(&received_message_p->ittiMsg.sgwCreateSessionResponse); - } - break; - - case SGW_MODIFY_BEARER_RESPONSE: { - MME_APP_DEBUG(" TO DO HANDLE SGW_MODIFY_BEARER_RESPONSE"); - // TO DO - } - break; - - case SGW_RELEASE_ACCESS_BEARERS_RESPONSE: { - mme_app_handle_release_access_bearers_resp(&received_message_p->ittiMsg.sgwReleaseAccessBearersResponse); - } - break; - -#if defined(DISABLE_USE_NAS) - - case NAS_ATTACH_REQ: { - mme_app_handle_attach_req(&received_message_p->ittiMsg.nas_attach_req); - } - break; - - case NAS_AUTHENTICATION_RESP: { - mme_app_handle_nas_auth_resp(&received_message_p->ittiMsg.nas_auth_resp); - } - break; -#else - - case NAS_AUTHENTICATION_PARAM_REQ: { - mme_app_handle_nas_auth_param_req(&received_message_p->ittiMsg.nas_auth_param_req); - } - break; -#endif - - case NAS_PDN_CONNECTIVITY_REQ: { - mme_app_handle_nas_pdn_connectivity_req(&received_message_p->ittiMsg.nas_pdn_connectivity_req); - } - break; - - case NAS_CONNECTION_ESTABLISHMENT_CNF: { - mme_app_handle_conn_est_cnf(&NAS_CONNECTION_ESTABLISHMENT_CNF(received_message_p)); - } - break; - - // From S1AP Initiating Message/EMM Attach Request - case MME_APP_CONNECTION_ESTABLISHMENT_IND: { - mme_app_handle_conn_est_ind(&MME_APP_CONNECTION_ESTABLISHMENT_IND(received_message_p)); - } - break; - - case MME_APP_INITIAL_CONTEXT_SETUP_RSP: { - mme_app_handle_initial_context_setup_rsp(&MME_APP_INITIAL_CONTEXT_SETUP_RSP(received_message_p)); - } - break; - - case TIMER_HAS_EXPIRED: { - /* Check if it is the statistic timer */ - if (received_message_p->ittiMsg.timer_has_expired.timer_id == - mme_app_desc.statistic_timer_id) { - mme_app_statistics_display(); - } - } - break; - - case TERMINATE_MESSAGE: { - /* Termination message received TODO -> release any data allocated */ - itti_exit_task(); - } - break; - - case S1AP_UE_CAPABILITIES_IND: { - mme_app_handle_s1ap_ue_capabilities_ind(&received_message_p->ittiMsg.s1ap_ue_cap_ind); - } - break; - - case S1AP_UE_CONTEXT_RELEASE_REQ: { - mme_app_handle_s1ap_ue_context_release_req(&received_message_p->ittiMsg.s1ap_ue_context_release_req); - } - break; - - case S1AP_UE_CONTEXT_RELEASE_COMPLETE: { - mme_app_handle_s1ap_ue_context_release_complete(&received_message_p->ittiMsg.s1ap_ue_context_release_complete); - } - break; - default: { - MME_APP_DEBUG("Unkwnon message ID %d:%s\n", - ITTI_MSG_ID(received_message_p), ITTI_MSG_NAME(received_message_p)); - AssertFatal(0, "Unkwnon message ID %d:%s\n", - ITTI_MSG_ID(received_message_p), ITTI_MSG_NAME(received_message_p)); - } - break; - } - - itti_free(ITTI_MSG_ORIGIN_ID(received_message_p), received_message_p); - received_message_p = NULL; - } - - return NULL; -} - -int mme_app_init(const mme_config_t *mme_config_p) -{ - MME_APP_DEBUG("Initializing MME applicative layer\n"); - - memset(&mme_app_desc, 0, sizeof(mme_app_desc)); - - /* Create the thread associated with MME applicative layer */ - if (itti_create_task(TASK_MME_APP, &mme_app_thread, NULL) < 0) { - MME_APP_ERROR("MME APP create task failed\n"); - return -1; - } - - mme_app_desc.statistic_timer_period = mme_config_p->mme_statistic_timer; - - /* Request for periodic timer */ - if (timer_setup(mme_config_p->mme_statistic_timer, 0, TASK_MME_APP, INSTANCE_DEFAULT, - TIMER_PERIODIC, NULL, &mme_app_desc.statistic_timer_id) < 0) { - MME_APP_ERROR("Failed to request new timer for statistics with %ds " - "of periocidity\n", mme_config_p->mme_statistic_timer); - mme_app_desc.statistic_timer_id = 0; - } - - MME_APP_DEBUG("Initializing MME applicative layer: DONE\n"); - return 0; -} diff --git a/openair-cn/MME_APP/mme_app_statistics.c b/openair-cn/MME_APP/mme_app_statistics.c deleted file mode 100644 index e9eea88a42..0000000000 --- a/openair-cn/MME_APP/mme_app_statistics.c +++ /dev/null @@ -1,55 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -#include -#include - -#include "intertask_interface.h" - -#include "mme_app_ue_context.h" -#include "mme_app_defs.h" -#include "mme_app_statistics.h" - -int -mme_app_statistics_display(void) -{ - fprintf(stdout, "================== Statistics ==================\n"); - fprintf(stdout, " | Global | Since last display |\n"); - fprintf(stdout, "UE | %10u | %10u |\n", - mme_app_desc.mme_ue_contexts.nb_ue_managed, - mme_app_desc.mme_ue_contexts.nb_ue_since_last_stat); - fprintf(stdout, "Bearers | %10u | %10u |\n", - mme_app_desc.mme_ue_contexts.nb_bearers_managed, - mme_app_desc.mme_ue_contexts.nb_bearers_since_last_stat); - - mme_app_desc.mme_ue_contexts.nb_ue_since_last_stat = 0; - mme_app_desc.mme_ue_contexts.nb_bearers_since_last_stat = 0; - - return 0; -} diff --git a/openair-cn/MME_APP/mme_app_statistics.h b/openair-cn/MME_APP/mme_app_statistics.h deleted file mode 100644 index 886cb9acd8..0000000000 --- a/openair-cn/MME_APP/mme_app_statistics.h +++ /dev/null @@ -1,35 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -#ifndef MME_APP_STATISTICS_H_ -#define MME_APP_STATISTICS_H_ - -int mme_app_statistics_display(void); - -#endif /* MME_APP_STATISTICS_H_ */ diff --git a/openair-cn/MME_APP/mme_app_ue_context.h b/openair-cn/MME_APP/mme_app_ue_context.h deleted file mode 100644 index d87f0fa4c0..0000000000 --- a/openair-cn/MME_APP/mme_app_ue_context.h +++ /dev/null @@ -1,265 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - - -/*! \file mme_app_ue_context.h - * \brief MME applicative layer - * \author Sebastien ROUX - * \date 2013 - * \version 1.0 - * @defgroup _mme_app_impl_ MME applicative layer - * @ingroup _ref_implementation_ - * @{ - */ - -#include -#include /* For sscanf formats */ -#include /* to provide time_t */ - -#include "s1ap_messages_types.h" -#include "nas_messages_types.h" -#include "s6a_messages_types.h" -#include "security_types.h" -#include "tree.h" - -#ifndef MME_APP_UE_CONTEXT_H_ -#define MME_APP_UE_CONTEXT_H_ - -typedef enum { - ECM_IDLE, - ECM_CONNECTED, - ECM_DEREGISTERED, -} mm_state_t; - -typedef uint64_t mme_app_imsi_t; - -#define IMSI_FORMAT SCNu64 - -/* Convert the IMSI contained by a char string NULL terminated to uint64_t */ -#define MME_APP_STRING_TO_IMSI(sTRING, iMSI) sscanf(sTRING, "%"IMSI_FORMAT, iMSI) -#define MME_APP_IMSI_TO_STRING(iMSI, sTRING) snprintf(sTRING, IMSI_DIGITS_MAX+1, "%"IMSI_FORMAT, iMSI) - -/** @struct bearer_context_t - * @brief Parameters that should be kept for an eps bearer. - */ -typedef struct bearer_context_s { - /* S-GW Tunnel Endpoint for User-Plane */ - Teid_t s_gw_teid; - - /* S-GW IP address for User-Plane */ - ip_address_t s_gw_address; - - /* P-GW Tunnel Endpoint for User-Plane */ - Teid_t p_gw_teid; - - /* P-GW IP address for User-Plane */ - ip_address_t p_gw_address; - - /* QoS for this bearer */ - qci_t qci; - priority_level_t prio_level; - pre_emp_vulnerability_t pre_emp_vulnerability; - pre_emp_capability_t pre_emp_capability; - - /* TODO: add TFT */ -} bearer_context_t; - -/** @struct ue_context_t - * @brief Useful parameters to know in MME application layer. They are set - * according to 3GPP TS.23.401 #5.7.2 - */ -typedef struct ue_context_s { - /* Tree entry */ - RB_ENTRY(ue_context_s) rb_entry; - - /* Basic identifier for ue. IMSI is encoded on maximum of 15 digits of 4 bits, - * so usage of an unsigned integer on 64 bits is necessary. - */ - mme_app_imsi_t imsi; // set by nas_auth_param_req_t -#define IMSI_UNAUTHENTICATED (0x0) -#define IMSI_AUTHENTICATED (0x1) - /* Indicator to show the IMSI authentication state */ - unsigned imsi_auth:1; // set by nas_auth_resp_t - - unsigned eNB_ue_s1ap_id:24; - uint32_t mme_ue_s1ap_id; - - /* ue_id is equal to mme_ue_s1ap_id */ - uint32_t ue_id; // set by nas_auth_param_req_t - - uint8_t nb_of_vectors; // updated by S6A AUTHENTICATION ANSWER - /* List of authentication vectors for E-UTRAN */ - eutran_vector_t *vector_list; // updated by S6A AUTHENTICATION ANSWER - // pointer in vector_list - eutran_vector_t *vector_in_use; // updated by S6A AUTHENTICATION ANSWER - -#define SUBSCRIPTION_UNKNOWN 0x0 -#define SUBSCRIPTION_KNOWN 0x1 - unsigned subscription_known:1; // set by S6A UPDATE LOCATION ANSWER - uint8_t msisdn[MSISDN_LENGTH+1]; // set by S6A UPDATE LOCATION ANSWER - uint8_t msisdn_length; // set by S6A UPDATE LOCATION ANSWER - - mm_state_t mm_state; // not set/read - /* Globally Unique Temporary Identity */ - GUTI_t guti; // guti.gummei.plmn set by nas_auth_param_req_t - // read by S6A UPDATE LOCATION REQUEST - me_identity_t me_identity; // not set/read except read by display utility - - /* TODO: Add TAI list */ - - /* Last known cell identity */ - cgi_t e_utran_cgi; // set by nas_attach_req_t - // read for S11 CREATE_SESSION_REQUEST - /* Time when the cell identity was acquired */ - time_t cell_age; // set by nas_auth_param_req_t - - /* TODO: add csg_id */ - /* TODO: add csg_membership */ - - network_access_mode_t access_mode; // set by S6A UPDATE LOCATION ANSWER - - /* TODO: add ue radio cap, ms classmarks, supported codecs */ - - /* TODO: add ue network capability, ms network capability */ - /* TODO: add selected NAS algorithm */ - - /* TODO: add DRX parameter */ - - apn_config_profile_t apn_profile; // set by S6A UPDATE LOCATION ANSWER - ard_t access_restriction_data; // set by S6A UPDATE LOCATION ANSWER - subscriber_status_t sub_status; // set by S6A UPDATE LOCATION ANSWER - ambr_t subscribed_ambr; // set by S6A UPDATE LOCATION ANSWER - ambr_t used_ambr; - - rau_tau_timer_t rau_tau_timer; // set by S6A UPDATE LOCATION ANSWER - - /* Store the radio capabilities as received in S1AP UE capability indication - * message. - */ - char *ue_radio_capabilities; // not set/read - int ue_radio_cap_length; // not set/read - - Teid_t mme_s11_teid; // set by mme_app_send_s11_create_session_req - Teid_t sgw_s11_teid; // set by S11 CREATE_SESSION_RESPONSE - PAA_t paa; // set by S11 CREATE_SESSION_RESPONSE - - // temp - char pending_pdn_connectivity_req_imsi[16]; - uint8_t pending_pdn_connectivity_req_imsi_length; - OctetString pending_pdn_connectivity_req_apn; - OctetString pending_pdn_connectivity_req_pdn_addr; - int pending_pdn_connectivity_req_pti; - unsigned pending_pdn_connectivity_req_ue_id; - network_qos_t pending_pdn_connectivity_req_qos; - pco_flat_t pending_pdn_connectivity_req_pco; - void *pending_pdn_connectivity_req_proc_data; - int pending_pdn_connectivity_req_request_type; - - ebi_t default_bearer_id; - bearer_context_t eps_bearers[BEARERS_PER_UE]; -} ue_context_t; - -typedef struct { - uint32_t nb_ue_managed; - uint32_t nb_ue_idle; - - uint32_t nb_bearers_managed; - - uint32_t nb_ue_since_last_stat; - uint32_t nb_bearers_since_last_stat; - - /* Entry to the root */ - RB_HEAD(ue_context_map, ue_context_s) ue_context_tree; -} mme_ue_context_t; - -/** \brief Retrieve an UE context by selecting the provided IMSI - * \param imsi Imsi to find in UE map - * @returns an UE context matching the IMSI or NULL if the context doesn't exists - **/ -ue_context_t *mme_ue_context_exists_imsi(mme_ue_context_t *mme_ue_context, - mme_app_imsi_t imsi); - -/** \brief Retrieve an UE context by selecting the provided S11 teid - * \param teid The tunnel endpoint identifier used between MME and S-GW - * @returns an UE context matching the teid or NULL if the context doesn't exists - **/ -ue_context_t *mme_ue_context_exists_s11_teid(mme_ue_context_t *mme_ue_context, - uint32_t teid); - -/** \brief Retrieve an UE context by selecting the provided mme_ue_s1ap_id - * \param mme_ue_s1ap_id The UE id identifier used in S1AP MME (and NAS) - * @returns an UE context matching the mme_ue_s1ap_id or NULL if the context doesn't exists - **/ -ue_context_t *mme_ue_context_exists_mme_ue_s1ap_id(mme_ue_context_t *mme_ue_context, - uint32_t mme_ue_s1ap_id); - -/** \brief Retrieve an UE context by selecting the provided nas_ue_id - * \param nas_ue_id The UE id identifier used in S1AP MME and NAS - * @returns an UE context matching the nas_ue_id or NULL if the context doesn't exists - **/ -ue_context_t *mme_ue_context_exists_nas_ue_id(mme_ue_context_t *mme_ue_context, - uint32_t nas_ue_id); - -/** \brief Retrieve an UE context by selecting the provided guti - * \param guti The GUTI used by the UE - * @returns an UE context matching the guti or NULL if the context doesn't exists - **/ -ue_context_t *mme_ue_context_exists_guti(mme_ue_context_t *mme_ue_context, - GUTI_t guti); - -/** \brief Insert a new UE context in the tree of known UEs. - * At least the IMSI should be known to insert the context in the tree. - * \param ue_context_p The UE context to insert - * @returns 0 in case of success, -1 otherwise - **/ -int mme_insert_ue_context(mme_ue_context_t *mme_ue_context, - struct ue_context_s *ue_context_p); - -/** \brief Remove a UE context of the tree of known UEs. - * \param ue_context_p The UE context to remove - **/ -void mme_remove_ue_context(mme_ue_context_t *mme_ue_context, - struct ue_context_s *ue_context_p); - - -/** \brief Allocate memory for a new UE context - * @returns Pointer to the new structure, NULL if allocation failed - **/ -ue_context_t *mme_create_new_ue_context(void); - -/** \brief Dump the UE contexts present in the tree - **/ -void mme_app_dump_ue_contexts(mme_ue_context_t *mme_ue_context); - - -void mme_app_handle_s1ap_ue_context_release_req(const s1ap_ue_context_release_req_t const *s1ap_ue_context_release_req); - -#endif /* MME_APP_UE_CONTEXT_H_ */ - -/* @} */ diff --git a/openair-cn/MME_APP/s6a_2_nas_cause.c b/openair-cn/MME_APP/s6a_2_nas_cause.c deleted file mode 100644 index 979247b076..0000000000 --- a/openair-cn/MME_APP/s6a_2_nas_cause.c +++ /dev/null @@ -1,96 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - - -#include "as_message.h" -#include "common_types.h" -#include "s6a_defs.h" -#include "mme_app_defs.h" - -nas_cause_t s6a_error_2_nas_cause(uint32_t s6a_error, int experimental) -{ - if (experimental == 0) { - /* Base protocol errors */ - switch (s6a_error) { - /* 3002 */ - case ER_DIAMETER_UNABLE_TO_DELIVER: /* Fall through */ - - /* 3003 */ - case ER_DIAMETER_REALM_NOT_SERVED: /* Fall through */ - - /* 5003 */ - case ER_DIAMETER_AUTHORIZATION_REJECTED: - return NAS_CAUSE_NO_SUITABLE_CELLS_IN_TRACKING_AREA; - - /* 5012 */ - case ER_DIAMETER_UNABLE_TO_COMPLY: /* Fall through */ - - /* 5004 */ - case ER_DIAMETER_INVALID_AVP_VALUE: /* Fall through */ - - /* Any other permanent errors from the diameter base protocol */ - default: - break; - } - } else { - switch (s6a_error) { - /* 5001 */ - case DIAMETER_ERROR_USER_UNKNOWN: - return NAS_CAUSE_EPS_SERVICES_AND_NON_EPS_SERVICES_NOT_ALLOWED; - - /* TODO: distinguish GPRS_DATA_SUBSCRIPTION */ - /* 5420 */ - case DIAMETER_ERROR_UNKNOWN_EPS_SUBSCRIPTION: - return NAS_CAUSE_NO_SUITABLE_CELLS_IN_TRACKING_AREA; - - /* 5421 */ - case DIAMETER_ERROR_RAT_NOT_ALLOWED: - /* One of the following parameter can be sent depending on - * operator preference: - * ROAMING_NOT_ALLOWED_IN_THIS_TRACKING_AREA - * TRACKING_AREA_NOT_ALLOWED - * NO_SUITABLE_CELLS_IN_TRACKING_AREA - */ - return NAS_CAUSE_TRACKING_AREA_NOT_ALLOWED; - - /* 5004 without error diagnostic */ - case DIAMETER_ERROR_ROAMING_NOT_ALLOWED: - return NAS_CAUSE_PLMN_NOT_ALLOWED; - - /* TODO: 5004 with error diagnostic of ODB_HPLMN_APN or - * ODB_VPLMN_APN - */ - /* TODO: 5004 with error diagnostic of ODB_ALL_APN */ - default: - break; - } - } - - return NAS_CAUSE_NETWORK_FAILURE; -} diff --git a/openair-cn/Makefile.am b/openair-cn/Makefile.am deleted file mode 100644 index 9a829d7c74..0000000000 --- a/openair-cn/Makefile.am +++ /dev/null @@ -1,102 +0,0 @@ -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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 . -# -# Contact Information -# OpenAirInterface Admin: openair_admin@eurecom.fr -# OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr -# -# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. -# -################################################################################ -ACLOCAL_AMFLAGS = -I m4 - -AM_CFLAGS = @ADD_CFLAGS@ \ - -I$(top_srcdir)/COMMON \ - -I$(top_srcdir)/UTILS \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/api/network \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/include \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/ies \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/emm/msg \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/esm/msg \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/util \ - -I$(top_srcdir)/INTERTASK_INTERFACE - -if HAVE_GCCXML -BUILT_SOURCES = \ - messages.xml \ - messages_xml.h - -messages_hdr = \ - $(top_srcdir)/INTERTASK_INTERFACE/intertask_messages_def.h \ - $(top_srcdir)/INTERTASK_INTERFACE/timer_messages_def.h \ - $(top_srcdir)/INTERTASK_INTERFACE/timer_messages_types.h \ - $(top_srcdir)/COMMON/tasks_def.h \ - $(top_srcdir)/COMMON/messages_def.h \ - $(top_srcdir)/COMMON/messages_types.h \ - $(top_srcdir)/COMMON/gtpv1_u_messages_def.h \ - $(top_srcdir)/COMMON/gtpv1_u_messages_types.h \ - $(top_srcdir)/COMMON/nas_messages_def.h \ - $(top_srcdir)/COMMON/nas_messages_types.h \ - $(top_srcdir)/COMMON/s11_messages_def.h \ - $(top_srcdir)/COMMON/s11_messages_types.h \ - $(top_srcdir)/COMMON/s1ap_messages_def.h \ - $(top_srcdir)/COMMON/s1ap_messages_types.h \ - $(top_srcdir)/COMMON/s6a_messages_def.h \ - $(top_srcdir)/COMMON/s6a_messages_types.h \ - $(top_srcdir)/COMMON/sgw_lite_def.h \ - $(top_srcdir)/COMMON/sgw_lite_messages_types.h \ - $(top_srcdir)/COMMON/sctp_messages_def.h \ - $(top_srcdir)/COMMON/sctp_messages_types.h \ - $(top_srcdir)/COMMON/udp_messages_def.h \ - $(top_srcdir)/COMMON/udp_messages_types.h - -messages.xml: $(top_srcdir)/INTERTASK_INTERFACE/intertask_interface_types.h $(messages_hdr) - @echo "Generating $<" - @gccxml $(AM_CFLAGS) $< -fxml=$(top_builddir)/$@ - -messages_xml.h: messages.xml - @echo "Generating $<" - @sed -e 's/[ ]*//' -e 's/"/\\"/g' -e 's/^/"/' -e 's/$$/\\n"/' messages.xml > messages_xml.h - -clean-local: - @rm -rf -v messages.xml messages_xml.h -endif - -SUBDIRS = \ - . \ - GTPV1-U \ - GTPV2-C \ - INTERTASK_INTERFACE \ - SGI \ - NAS \ - SCTP \ - S11 \ - S1AP \ - S6A \ - SECU \ - SGW-LITE \ - UTILS \ - UDP \ - MME_APP \ - TEST \ - OAISIM_MME \ - OAI_EPC \ - OAI_SGW \ No newline at end of file diff --git a/openair-cn/NAS/COMMON/API/NETWORK/Makefile b/openair-cn/NAS/COMMON/API/NETWORK/Makefile deleted file mode 100644 index cce6a240ee..0000000000 --- a/openair-cn/NAS/COMMON/API/NETWORK/Makefile +++ /dev/null @@ -1,50 +0,0 @@ -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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 . -# -# Contact Information -# OpenAirInterface Admin: openair_admin@eurecom.fr -# OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr -# -# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. -# -################################################################################ -ifndef PROJDIR -PROJDIR = $(PWD)/../../.. -INCLUDES = -I. -I$(INCDIR) -I$(UTILDIR) -I$(IESDIR) -I$(EMMMSGDIR) -I$(ESMMSGDIR) -endif - -include $(PROJDIR)/Makerules -include $(PROJDIR)/Makefile.inc - -all: $(OBJS) - -%.o: %.c Makefile - @echo Compiling $< - @$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@ - -clean: - $(RM) $(OBJS) *.bak *~ - -depend: - makedepend -- ${CFLAGS} -- ${SRCS} - -# DO NOT DELETE THIS LINE -- make depend depends on it. - diff --git a/openair-cn/NAS/COMMON/EMM/MSG/AttachComplete.c b/openair-cn/NAS/COMMON/EMM/MSG/AttachComplete.c deleted file mode 100644 index 386694eadf..0000000000 --- a/openair-cn/NAS/COMMON/EMM/MSG/AttachComplete.c +++ /dev/null @@ -1,73 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include -#include - - -#include "TLVEncoder.h" -#include "TLVDecoder.h" -#include "AttachComplete.h" - -int decode_attach_complete(attach_complete_msg *attach_complete, uint8_t *buffer, uint32_t len) -{ - uint32_t decoded = 0; - int decoded_result = 0; - - // Check if we got a NULL pointer and if buffer length is >= minimum length expected for the message. - CHECK_PDU_POINTER_AND_LENGTH_DECODER(buffer, ATTACH_COMPLETE_MINIMUM_LENGTH, len); - - /* Decoding mandatory fields */ - if ((decoded_result = decode_esm_message_container(&attach_complete->esmmessagecontainer, 0, buffer + decoded, len - decoded)) < 0) - return decoded_result; - else - decoded += decoded_result; - - return decoded; -} - -int encode_attach_complete(attach_complete_msg *attach_complete, uint8_t *buffer, uint32_t len) -{ - int encoded = 0; - int encode_result = 0; - - /* Checking IEI and pointer */ - CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, ATTACH_COMPLETE_MINIMUM_LENGTH, len); - - if ((encode_result = - encode_esm_message_container(&attach_complete->esmmessagecontainer, 0, - buffer + encoded, len - encoded)) < 0) //Return in case of error - return encode_result; - else - encoded += encode_result; - - return encoded; -} - diff --git a/openair-cn/NAS/COMMON/EMM/MSG/AttachComplete.h b/openair-cn/NAS/COMMON/EMM/MSG/AttachComplete.h deleted file mode 100644 index 6856d9fd32..0000000000 --- a/openair-cn/NAS/COMMON/EMM/MSG/AttachComplete.h +++ /dev/null @@ -1,70 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "ProtocolDiscriminator.h" -#include "SecurityHeaderType.h" -#include "MessageType.h" -#include "EsmMessageContainer.h" - -#ifndef ATTACH_COMPLETE_H_ -#define ATTACH_COMPLETE_H_ - -/* Minimum length macro. Formed by minimum length of each mandatory field */ -#define ATTACH_COMPLETE_MINIMUM_LENGTH ( \ - ESM_MESSAGE_CONTAINER_MINIMUM_LENGTH ) - -/* Maximum length macro. Formed by maximum length of each field */ -#define ATTACH_COMPLETE_MAXIMUM_LENGTH ( \ - ESM_MESSAGE_CONTAINER_MAXIMUM_LENGTH ) - - -/* - * Message name: Attach complete - * Description: This message is sent by the UE to the network in response to an ATTACH ACCEPT message. See table 8.2.2.1. - * Significance: dual - * Direction: UE to network - */ - -typedef struct attach_complete_msg_tag { - /* Mandatory fields */ - ProtocolDiscriminator protocoldiscriminator:4; - SecurityHeaderType securityheadertype:4; - MessageType messagetype; - EsmMessageContainer esmmessagecontainer; -} attach_complete_msg; - -int decode_attach_complete(attach_complete_msg *attachcomplete, uint8_t *buffer, uint32_t len); - -int encode_attach_complete(attach_complete_msg *attachcomplete, uint8_t *buffer, uint32_t len); - -#endif /* ! defined(ATTACH_COMPLETE_H_) */ - diff --git a/openair-cn/NAS/COMMON/EMM/MSG/AuthenticationReject.c b/openair-cn/NAS/COMMON/EMM/MSG/AuthenticationReject.c deleted file mode 100644 index 1d486e070b..0000000000 --- a/openair-cn/NAS/COMMON/EMM/MSG/AuthenticationReject.c +++ /dev/null @@ -1,57 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include -#include - - -#include "TLVEncoder.h" -#include "TLVDecoder.h" -#include "AuthenticationReject.h" - -int decode_authentication_reject(authentication_reject_msg *authentication_reject, uint8_t *buffer, uint32_t len) -{ - uint32_t decoded = 0; - // Check if we got a NULL pointer and if buffer length is >= minimum length expected for the message. - CHECK_PDU_POINTER_AND_LENGTH_DECODER(buffer, AUTHENTICATION_REJECT_MINIMUM_LENGTH, len); - - /* Decoding mandatory fields */ - return decoded; -} - -int encode_authentication_reject(authentication_reject_msg *authentication_reject, uint8_t *buffer, uint32_t len) -{ - int encoded = 0; - /* Checking IEI and pointer */ - CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, AUTHENTICATION_REJECT_MINIMUM_LENGTH, len); - - return encoded; -} - diff --git a/openair-cn/NAS/COMMON/EMM/MSG/AuthenticationReject.h b/openair-cn/NAS/COMMON/EMM/MSG/AuthenticationReject.h deleted file mode 100644 index 85111297ee..0000000000 --- a/openair-cn/NAS/COMMON/EMM/MSG/AuthenticationReject.h +++ /dev/null @@ -1,65 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "ProtocolDiscriminator.h" -#include "SecurityHeaderType.h" -#include "MessageType.h" - -#ifndef AUTHENTICATION_REJECT_H_ -#define AUTHENTICATION_REJECT_H_ - -/* Minimum length macro. Formed by minimum length of each mandatory field */ -#define AUTHENTICATION_REJECT_MINIMUM_LENGTH (0) - -/* Maximum length macro. Formed by maximum length of each field */ -#define AUTHENTICATION_REJECT_MAXIMUM_LENGTH (0) - -/* - * Message name: Authentication reject - * Description: This message is sent by the network to the UE to indicate that the authentication procedure has failed and that the UE shall abort all activities. See table 8.2.6.1. - * Significance: dual - * Direction: network to UE - */ - -typedef struct authentication_reject_msg_tag { - /* Mandatory fields */ - ProtocolDiscriminator protocoldiscriminator:4; - SecurityHeaderType securityheadertype:4; - MessageType messagetype; -} authentication_reject_msg; - -int decode_authentication_reject(authentication_reject_msg *authenticationreject, uint8_t *buffer, uint32_t len); - -int encode_authentication_reject(authentication_reject_msg *authenticationreject, uint8_t *buffer, uint32_t len); - -#endif /* ! defined(AUTHENTICATION_REJECT_H_) */ - diff --git a/openair-cn/NAS/COMMON/EMM/MSG/AuthenticationResponse.c b/openair-cn/NAS/COMMON/EMM/MSG/AuthenticationResponse.c deleted file mode 100644 index 775932e18f..0000000000 --- a/openair-cn/NAS/COMMON/EMM/MSG/AuthenticationResponse.c +++ /dev/null @@ -1,73 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include -#include - - -#include "TLVEncoder.h" -#include "TLVDecoder.h" -#include "AuthenticationResponse.h" - -int decode_authentication_response(authentication_response_msg *authentication_response, uint8_t *buffer, uint32_t len) -{ - uint32_t decoded = 0; - int decoded_result = 0; - - // Check if we got a NULL pointer and if buffer length is >= minimum length expected for the message. - CHECK_PDU_POINTER_AND_LENGTH_DECODER(buffer, AUTHENTICATION_RESPONSE_MINIMUM_LENGTH, len); - - /* Decoding mandatory fields */ - if ((decoded_result = decode_authentication_response_parameter(&authentication_response->authenticationresponseparameter, 0, buffer + decoded, len - decoded)) < 0) - return decoded_result; - else - decoded += decoded_result; - - return decoded; -} - -int encode_authentication_response(authentication_response_msg *authentication_response, uint8_t *buffer, uint32_t len) -{ - int encoded = 0; - int encode_result = 0; - - /* Checking IEI and pointer */ - CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, AUTHENTICATION_RESPONSE_MINIMUM_LENGTH, len); - - if ((encode_result = - encode_authentication_response_parameter(&authentication_response->authenticationresponseparameter, - 0, buffer + encoded, len - encoded)) < 0) //Return in case of error - return encode_result; - else - encoded += encode_result; - - return encoded; -} - diff --git a/openair-cn/NAS/COMMON/EMM/MSG/AuthenticationResponse.h b/openair-cn/NAS/COMMON/EMM/MSG/AuthenticationResponse.h deleted file mode 100644 index 2e93301ee7..0000000000 --- a/openair-cn/NAS/COMMON/EMM/MSG/AuthenticationResponse.h +++ /dev/null @@ -1,70 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "ProtocolDiscriminator.h" -#include "SecurityHeaderType.h" -#include "MessageType.h" -#include "AuthenticationResponseParameter.h" - -#ifndef AUTHENTICATION_RESPONSE_H_ -#define AUTHENTICATION_RESPONSE_H_ - -/* Minimum length macro. Formed by minimum length of each mandatory field */ -#define AUTHENTICATION_RESPONSE_MINIMUM_LENGTH ( \ - AUTHENTICATION_RESPONSE_PARAMETER_MINIMUM_LENGTH ) - -/* Maximum length macro. Formed by maximum length of each field */ -#define AUTHENTICATION_RESPONSE_MAXIMUM_LENGTH ( \ - AUTHENTICATION_RESPONSE_PARAMETER_MAXIMUM_LENGTH ) - - -/* - * Message name: Authentication response - * Description: This message is sent by the UE to the network to deliver a calculated authentication response to the network. See table 8.2.8.1. - * Significance: dual - * Direction: UE to network - */ - -typedef struct authentication_response_msg_tag { - /* Mandatory fields */ - ProtocolDiscriminator protocoldiscriminator:4; - SecurityHeaderType securityheadertype:4; - MessageType messagetype; - AuthenticationResponseParameter authenticationresponseparameter; -} authentication_response_msg; - -int decode_authentication_response(authentication_response_msg *authenticationresponse, uint8_t *buffer, uint32_t len); - -int encode_authentication_response(authentication_response_msg *authenticationresponse, uint8_t *buffer, uint32_t len); - -#endif /* ! defined(AUTHENTICATION_RESPONSE_H_) */ - diff --git a/openair-cn/NAS/COMMON/EMM/MSG/DetachAccept.c b/openair-cn/NAS/COMMON/EMM/MSG/DetachAccept.c deleted file mode 100644 index 242020c4bf..0000000000 --- a/openair-cn/NAS/COMMON/EMM/MSG/DetachAccept.c +++ /dev/null @@ -1,57 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include -#include - - -#include "TLVEncoder.h" -#include "TLVDecoder.h" -#include "DetachAccept.h" - -int decode_detach_accept(detach_accept_msg *detach_accept, uint8_t *buffer, uint32_t len) -{ - uint32_t decoded = 0; - // Check if we got a NULL pointer and if buffer length is >= minimum length expected for the message. - CHECK_PDU_POINTER_AND_LENGTH_DECODER(buffer, DETACH_ACCEPT_MINIMUM_LENGTH, len); - - /* Decoding mandatory fields */ - return decoded; -} - -int encode_detach_accept(detach_accept_msg *detach_accept, uint8_t *buffer, uint32_t len) -{ - int encoded = 0; - /* Checking IEI and pointer */ - CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, DETACH_ACCEPT_MINIMUM_LENGTH, len); - - return encoded; -} - diff --git a/openair-cn/NAS/COMMON/EMM/MSG/DetachAccept.h b/openair-cn/NAS/COMMON/EMM/MSG/DetachAccept.h deleted file mode 100644 index 2966bbad79..0000000000 --- a/openair-cn/NAS/COMMON/EMM/MSG/DetachAccept.h +++ /dev/null @@ -1,65 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "ProtocolDiscriminator.h" -#include "SecurityHeaderType.h" -#include "MessageType.h" - -#ifndef DETACH_ACCEPT_H_ -#define DETACH_ACCEPT_H_ - -/* Minimum length macro. Formed by minimum length of each mandatory field */ -#define DETACH_ACCEPT_MINIMUM_LENGTH (0) - -/* Maximum length macro. Formed by maximum length of each field */ -#define DETACH_ACCEPT_MAXIMUM_LENGTH (0) - -/* - * Message name: Detach accept - * Description: This message is sent by the network to indicate that the detach procedure has been completed. See table 8.2.10.1.1. - * Significance: dual - * Direction: network to UE - */ - -typedef struct detach_accept_msg_tag { - /* Mandatory fields */ - ProtocolDiscriminator protocoldiscriminator:4; - SecurityHeaderType securityheadertype:4; - MessageType messagetype; -} detach_accept_msg; - -int decode_detach_accept(detach_accept_msg *detachaccept, uint8_t *buffer, uint32_t len); - -int encode_detach_accept(detach_accept_msg *detachaccept, uint8_t *buffer, uint32_t len); - -#endif /* ! defined(DETACH_ACCEPT_H_) */ - diff --git a/openair-cn/NAS/COMMON/EMM/MSG/DetachRequest.h b/openair-cn/NAS/COMMON/EMM/MSG/DetachRequest.h deleted file mode 100644 index 9577b9a9cd..0000000000 --- a/openair-cn/NAS/COMMON/EMM/MSG/DetachRequest.h +++ /dev/null @@ -1,78 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "ProtocolDiscriminator.h" -#include "SecurityHeaderType.h" -#include "MessageType.h" -#include "DetachType.h" -#include "NasKeySetIdentifier.h" -#include "EpsMobileIdentity.h" - -#ifndef DETACH_REQUEST_H_ -#define DETACH_REQUEST_H_ - -/* Minimum length macro. Formed by minimum length of each mandatory field */ -#define DETACH_REQUEST_MINIMUM_LENGTH ( \ - DETACH_TYPE_MINIMUM_LENGTH + \ - NAS_KEY_SET_IDENTIFIER_MINIMUM_LENGTH + \ - EPS_MOBILE_IDENTITY_MINIMUM_LENGTH ) - -/* Maximum length macro. Formed by maximum length of each field */ -#define DETACH_REQUEST_MAXIMUM_LENGTH ( \ - DETACH_TYPE_MAXIMUM_LENGTH + \ - NAS_KEY_SET_IDENTIFIER_MAXIMUM_LENGTH + \ - EPS_MOBILE_IDENTITY_MAXIMUM_LENGTH ) - - -/* - * Message name: Detach request - * Description: This message is sent by the UE to request the release of an EMM context. See table 8.2.11.1.1. - * Significance: dual - * Direction: UE to network - */ - -typedef struct detach_request_msg_tag { - /* Mandatory fields */ - ProtocolDiscriminator protocoldiscriminator:4; - SecurityHeaderType securityheadertype:4; - MessageType messagetype; - DetachType detachtype; - NasKeySetIdentifier naskeysetidentifier; - EpsMobileIdentity gutiorimsi; -} detach_request_msg; - -int decode_detach_request(detach_request_msg *detachrequest, uint8_t *buffer, uint32_t len); - -int encode_detach_request(detach_request_msg *detachrequest, uint8_t *buffer, uint32_t len); - -#endif /* ! defined(DETACH_REQUEST_H_) */ - diff --git a/openair-cn/NAS/COMMON/EMM/MSG/DownlinkNasTransport.c b/openair-cn/NAS/COMMON/EMM/MSG/DownlinkNasTransport.c deleted file mode 100644 index b4a1658c57..0000000000 --- a/openair-cn/NAS/COMMON/EMM/MSG/DownlinkNasTransport.c +++ /dev/null @@ -1,73 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include -#include - - -#include "TLVEncoder.h" -#include "TLVDecoder.h" -#include "DownlinkNasTransport.h" - -int decode_downlink_nas_transport(downlink_nas_transport_msg *downlink_nas_transport, uint8_t *buffer, uint32_t len) -{ - uint32_t decoded = 0; - int decoded_result = 0; - - // Check if we got a NULL pointer and if buffer length is >= minimum length expected for the message. - CHECK_PDU_POINTER_AND_LENGTH_DECODER(buffer, DOWNLINK_NAS_TRANSPORT_MINIMUM_LENGTH, len); - - /* Decoding mandatory fields */ - if ((decoded_result = decode_nas_message_container(&downlink_nas_transport->nasmessagecontainer, 0, buffer + decoded, len - decoded)) < 0) - return decoded_result; - else - decoded += decoded_result; - - return decoded; -} - -int encode_downlink_nas_transport(downlink_nas_transport_msg *downlink_nas_transport, uint8_t *buffer, uint32_t len) -{ - int encoded = 0; - int encode_result = 0; - - /* Checking IEI and pointer */ - CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, DOWNLINK_NAS_TRANSPORT_MINIMUM_LENGTH, len); - - if ((encode_result = - encode_nas_message_container(&downlink_nas_transport->nasmessagecontainer, - 0, buffer + encoded, len - encoded)) < 0) //Return in case of error - return encode_result; - else - encoded += encode_result; - - return encoded; -} - diff --git a/openair-cn/NAS/COMMON/EMM/MSG/DownlinkNasTransport.h b/openair-cn/NAS/COMMON/EMM/MSG/DownlinkNasTransport.h deleted file mode 100644 index 4aaf43449b..0000000000 --- a/openair-cn/NAS/COMMON/EMM/MSG/DownlinkNasTransport.h +++ /dev/null @@ -1,70 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "ProtocolDiscriminator.h" -#include "SecurityHeaderType.h" -#include "MessageType.h" -#include "NasMessageContainer.h" - -#ifndef DOWNLINK_NAS_TRANSPORT_H_ -#define DOWNLINK_NAS_TRANSPORT_H_ - -/* Minimum length macro. Formed by minimum length of each mandatory field */ -#define DOWNLINK_NAS_TRANSPORT_MINIMUM_LENGTH ( \ - NAS_MESSAGE_CONTAINER_MINIMUM_LENGTH ) - -/* Maximum length macro. Formed by maximum length of each field */ -#define DOWNLINK_NAS_TRANSPORT_MAXIMUM_LENGTH ( \ - NAS_MESSAGE_CONTAINER_MAXIMUM_LENGTH ) - - -/* - * Message name: Downlink NAS Transport - * Description: This message is sent by the network to the UE in order to carry an SMS message in encapsulated format. See table 8.2.12.1. - * Significance: dual - * Direction: network to UE - */ - -typedef struct downlink_nas_transport_msg_tag { - /* Mandatory fields */ - ProtocolDiscriminator protocoldiscriminator:4; - SecurityHeaderType securityheadertype:4; - MessageType messagetype; - NasMessageContainer nasmessagecontainer; -} downlink_nas_transport_msg; - -int decode_downlink_nas_transport(downlink_nas_transport_msg *downlinknastransport, uint8_t *buffer, uint32_t len); - -int encode_downlink_nas_transport(downlink_nas_transport_msg *downlinknastransport, uint8_t *buffer, uint32_t len); - -#endif /* ! defined(DOWNLINK_NAS_TRANSPORT_H_) */ - diff --git a/openair-cn/NAS/COMMON/EMM/MSG/EmmStatus.c b/openair-cn/NAS/COMMON/EMM/MSG/EmmStatus.c deleted file mode 100644 index ec3154728b..0000000000 --- a/openair-cn/NAS/COMMON/EMM/MSG/EmmStatus.c +++ /dev/null @@ -1,72 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include -#include - - -#include "TLVEncoder.h" -#include "TLVDecoder.h" -#include "EmmStatus.h" - -int decode_emm_status(emm_status_msg *emm_status, uint8_t *buffer, uint32_t len) -{ - uint32_t decoded = 0; - int decoded_result = 0; - - // Check if we got a NULL pointer and if buffer length is >= minimum length expected for the message. - CHECK_PDU_POINTER_AND_LENGTH_DECODER(buffer, EMM_STATUS_MINIMUM_LENGTH, len); - - /* Decoding mandatory fields */ - if ((decoded_result = decode_emm_cause(&emm_status->emmcause, 0, buffer + decoded, len - decoded)) < 0) - return decoded_result; - else - decoded += decoded_result; - - return decoded; -} - -int encode_emm_status(emm_status_msg *emm_status, uint8_t *buffer, uint32_t len) -{ - int encoded = 0; - int encode_result = 0; - - /* Checking IEI and pointer */ - CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, EMM_STATUS_MINIMUM_LENGTH, len); - - if ((encode_result = encode_emm_cause(&emm_status->emmcause, 0, buffer + - encoded, len - encoded)) < 0) //Return in case of error - return encode_result; - else - encoded += encode_result; - - return encoded; -} - diff --git a/openair-cn/NAS/COMMON/EMM/MSG/EmmStatus.h b/openair-cn/NAS/COMMON/EMM/MSG/EmmStatus.h deleted file mode 100644 index 6fe769dac6..0000000000 --- a/openair-cn/NAS/COMMON/EMM/MSG/EmmStatus.h +++ /dev/null @@ -1,70 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "ProtocolDiscriminator.h" -#include "SecurityHeaderType.h" -#include "MessageType.h" -#include "EmmCause.h" - -#ifndef EMM_STATUS_H_ -#define EMM_STATUS_H_ - -/* Minimum length macro. Formed by minimum length of each mandatory field */ -#define EMM_STATUS_MINIMUM_LENGTH ( \ - EMM_CAUSE_MINIMUM_LENGTH ) - -/* Maximum length macro. Formed by maximum length of each field */ -#define EMM_STATUS_MAXIMUM_LENGTH ( \ - EMM_CAUSE_MAXIMUM_LENGTH ) - - -/* - * Message name: EMM status - * Description: This message is sent by the UE or by the network at any time to report certain error conditions listed in clause 7. See table 8.2.14.1. - * Significance: local - * Direction: both - */ - -typedef struct emm_status_msg_tag { - /* Mandatory fields */ - ProtocolDiscriminator protocoldiscriminator:4; - SecurityHeaderType securityheadertype:4; - MessageType messagetype; - EmmCause emmcause; -} emm_status_msg; - -int decode_emm_status(emm_status_msg *emmstatus, uint8_t *buffer, uint32_t len); - -int encode_emm_status(emm_status_msg *emmstatus, uint8_t *buffer, uint32_t len); - -#endif /* ! defined(EMM_STATUS_H_) */ - diff --git a/openair-cn/NAS/COMMON/EMM/MSG/GutiReallocationComplete.c b/openair-cn/NAS/COMMON/EMM/MSG/GutiReallocationComplete.c deleted file mode 100644 index 8c3b0ed9ff..0000000000 --- a/openair-cn/NAS/COMMON/EMM/MSG/GutiReallocationComplete.c +++ /dev/null @@ -1,57 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include -#include - - -#include "TLVEncoder.h" -#include "TLVDecoder.h" -#include "GutiReallocationComplete.h" - -int decode_guti_reallocation_complete(guti_reallocation_complete_msg *guti_reallocation_complete, uint8_t *buffer, uint32_t len) -{ - uint32_t decoded = 0; - // Check if we got a NULL pointer and if buffer length is >= minimum length expected for the message. - CHECK_PDU_POINTER_AND_LENGTH_DECODER(buffer, GUTI_REALLOCATION_COMPLETE_MINIMUM_LENGTH, len); - - /* Decoding mandatory fields */ - return decoded; -} - -int encode_guti_reallocation_complete(guti_reallocation_complete_msg *guti_reallocation_complete, uint8_t *buffer, uint32_t len) -{ - int encoded = 0; - /* Checking IEI and pointer */ - CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, GUTI_REALLOCATION_COMPLETE_MINIMUM_LENGTH, len); - - return encoded; -} - diff --git a/openair-cn/NAS/COMMON/EMM/MSG/GutiReallocationComplete.h b/openair-cn/NAS/COMMON/EMM/MSG/GutiReallocationComplete.h deleted file mode 100644 index 977e51709a..0000000000 --- a/openair-cn/NAS/COMMON/EMM/MSG/GutiReallocationComplete.h +++ /dev/null @@ -1,65 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "ProtocolDiscriminator.h" -#include "SecurityHeaderType.h" -#include "MessageType.h" - -#ifndef GUTI_REALLOCATION_COMPLETE_H_ -#define GUTI_REALLOCATION_COMPLETE_H_ - -/* Minimum length macro. Formed by minimum length of each mandatory field */ -#define GUTI_REALLOCATION_COMPLETE_MINIMUM_LENGTH (0) - -/* Maximum length macro. Formed by maximum length of each field */ -#define GUTI_REALLOCATION_COMPLETE_MAXIMUM_LENGTH (0) - -/* - * Message name: GUTI reallocation complete - * Description: This message is sent by the UE to the network to indicate that reallocation of a GUTI has taken place. See table 8.2.17.1. - * Significance: dual - * Direction: UE to network - */ - -typedef struct guti_reallocation_complete_msg_tag { - /* Mandatory fields */ - ProtocolDiscriminator protocoldiscriminator:4; - SecurityHeaderType securityheadertype:4; - MessageType messagetype; -} guti_reallocation_complete_msg; - -int decode_guti_reallocation_complete(guti_reallocation_complete_msg *gutireallocationcomplete, uint8_t *buffer, uint32_t len); - -int encode_guti_reallocation_complete(guti_reallocation_complete_msg *gutireallocationcomplete, uint8_t *buffer, uint32_t len); - -#endif /* ! defined(GUTI_REALLOCATION_COMPLETE_H_) */ - diff --git a/openair-cn/NAS/COMMON/EMM/MSG/IdentityRequest.c b/openair-cn/NAS/COMMON/EMM/MSG/IdentityRequest.c deleted file mode 100644 index 3aafece930..0000000000 --- a/openair-cn/NAS/COMMON/EMM/MSG/IdentityRequest.c +++ /dev/null @@ -1,66 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include -#include - - -#include "TLVEncoder.h" -#include "TLVDecoder.h" -#include "IdentityRequest.h" - -int decode_identity_request(identity_request_msg *identity_request, uint8_t *buffer, uint32_t len) -{ - uint32_t decoded = 0; - int decoded_result = 0; - - // Check if we got a NULL pointer and if buffer length is >= minimum length expected for the message. - CHECK_PDU_POINTER_AND_LENGTH_DECODER(buffer, IDENTITY_REQUEST_MINIMUM_LENGTH, len); - - /* Decoding mandatory fields */ - if ((decoded_result = decode_u8_identity_type_2(&identity_request->identitytype, 0, *(buffer + decoded) >> 4, len - decoded)) < 0) - return decoded_result; - - decoded++; - return decoded; -} - -int encode_identity_request(identity_request_msg *identity_request, uint8_t *buffer, uint32_t len) -{ - int encoded = 0; - - /* Checking IEI and pointer */ - CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, IDENTITY_REQUEST_MINIMUM_LENGTH, len); - - *(buffer + encoded) = encode_u8_identity_type_2(&identity_request->identitytype) & 0x0f; - encoded++; - return encoded; -} - diff --git a/openair-cn/NAS/COMMON/EMM/MSG/IdentityRequest.h b/openair-cn/NAS/COMMON/EMM/MSG/IdentityRequest.h deleted file mode 100644 index 1846253389..0000000000 --- a/openair-cn/NAS/COMMON/EMM/MSG/IdentityRequest.h +++ /dev/null @@ -1,70 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "ProtocolDiscriminator.h" -#include "SecurityHeaderType.h" -#include "MessageType.h" -#include "IdentityType2.h" - -#ifndef IDENTITY_REQUEST_H_ -#define IDENTITY_REQUEST_H_ - -/* Minimum length macro. Formed by minimum length of each mandatory field */ -#define IDENTITY_REQUEST_MINIMUM_LENGTH ( \ - IDENTITY_TYPE_2_MINIMUM_LENGTH ) - -/* Maximum length macro. Formed by maximum length of each field */ -#define IDENTITY_REQUEST_MAXIMUM_LENGTH ( \ - IDENTITY_TYPE_2_MAXIMUM_LENGTH ) - - -/* - * Message name: Identity request - * Description: This message is sent by the network to the UE to request the UE to provide the specified identity. See table 8.2.18.1. - * Significance: dual - * Direction: network to UE - */ - -typedef struct identity_request_msg_tag { - /* Mandatory fields */ - ProtocolDiscriminator protocoldiscriminator:4; - SecurityHeaderType securityheadertype:4; - MessageType messagetype; - IdentityType2 identitytype; -} identity_request_msg; - -int decode_identity_request(identity_request_msg *identityrequest, uint8_t *buffer, uint32_t len); - -int encode_identity_request(identity_request_msg *identityrequest, uint8_t *buffer, uint32_t len); - -#endif /* ! defined(IDENTITY_REQUEST_H_) */ - diff --git a/openair-cn/NAS/COMMON/EMM/MSG/IdentityResponse.c b/openair-cn/NAS/COMMON/EMM/MSG/IdentityResponse.c deleted file mode 100644 index bbef1794f7..0000000000 --- a/openair-cn/NAS/COMMON/EMM/MSG/IdentityResponse.c +++ /dev/null @@ -1,73 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include -#include - - -#include "TLVEncoder.h" -#include "TLVDecoder.h" -#include "IdentityResponse.h" - -int decode_identity_response(identity_response_msg *identity_response, uint8_t *buffer, uint32_t len) -{ - uint32_t decoded = 0; - int decoded_result = 0; - - // Check if we got a NULL pointer and if buffer length is >= minimum length expected for the message. - CHECK_PDU_POINTER_AND_LENGTH_DECODER(buffer, IDENTITY_RESPONSE_MINIMUM_LENGTH, len); - - /* Decoding mandatory fields */ - if ((decoded_result = decode_mobile_identity(&identity_response->mobileidentity, 0, buffer + decoded, len - decoded)) < 0) - return decoded_result; - else - decoded += decoded_result; - - return decoded; -} - -int encode_identity_response(identity_response_msg *identity_response, uint8_t *buffer, uint32_t len) -{ - int encoded = 0; - int encode_result = 0; - - /* Checking IEI and pointer */ - CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, IDENTITY_RESPONSE_MINIMUM_LENGTH, len); - - if ((encode_result = - encode_mobile_identity(&identity_response->mobileidentity, 0, buffer + - encoded, len - encoded)) < 0) //Return in case of error - return encode_result; - else - encoded += encode_result; - - return encoded; -} - diff --git a/openair-cn/NAS/COMMON/EMM/MSG/IdentityResponse.h b/openair-cn/NAS/COMMON/EMM/MSG/IdentityResponse.h deleted file mode 100644 index cf58487f94..0000000000 --- a/openair-cn/NAS/COMMON/EMM/MSG/IdentityResponse.h +++ /dev/null @@ -1,70 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "ProtocolDiscriminator.h" -#include "SecurityHeaderType.h" -#include "MessageType.h" -#include "MobileIdentity.h" - -#ifndef IDENTITY_RESPONSE_H_ -#define IDENTITY_RESPONSE_H_ - -/* Minimum length macro. Formed by minimum length of each mandatory field */ -#define IDENTITY_RESPONSE_MINIMUM_LENGTH ( \ - MOBILE_IDENTITY_MINIMUM_LENGTH ) - -/* Maximum length macro. Formed by maximum length of each field */ -#define IDENTITY_RESPONSE_MAXIMUM_LENGTH ( \ - MOBILE_IDENTITY_MAXIMUM_LENGTH ) - - -/* - * Message name: Identity response - * Description: This message is sent by the UE to the network in response to an IDENTITY REQUEST message and provides the requested identity. See table 8.2.19.1. - * Significance: dual - * Direction: UE to network - */ - -typedef struct identity_response_msg_tag { - /* Mandatory fields */ - ProtocolDiscriminator protocoldiscriminator:4; - SecurityHeaderType securityheadertype:4; - MessageType messagetype; - MobileIdentity mobileidentity; -} identity_response_msg; - -int decode_identity_response(identity_response_msg *identityresponse, uint8_t *buffer, uint32_t len); - -int encode_identity_response(identity_response_msg *identityresponse, uint8_t *buffer, uint32_t len); - -#endif /* ! defined(IDENTITY_RESPONSE_H_) */ - diff --git a/openair-cn/NAS/COMMON/EMM/MSG/Makefile b/openair-cn/NAS/COMMON/EMM/MSG/Makefile deleted file mode 100644 index 0b434ba8ab..0000000000 --- a/openair-cn/NAS/COMMON/EMM/MSG/Makefile +++ /dev/null @@ -1,69 +0,0 @@ -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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 . -# -# Contact Information -# OpenAirInterface Admin: openair_admin@eurecom.fr -# OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr -# -# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. -# -################################################################################ -ifndef PROJDIR -PROJDIR = $(PWD)/../../.. -endif - -include $(PROJDIR)/Makerules -include $(PROJDIR)/Makefile.inc - -INCLUDES = -I. -I$(INCDIR) -I$(UTILDIR) -I$(IESDIR) - -TARGET = $(LIBEMMMSG) -TARGETS = $(TARGET).a $(TARGET).so - -all: $(TARGETS) - -%.o: %.c %.h Makefile $(LIBDIR)/$(LIBIES).a $(UTILDIR)/TLVEncoder.h $(UTILDIR)/TLVDecoder.h - @echo Compiling $< - @$(CC) $(CFLAGS) -c $< -o $@ - -$(TARGET).a: $(OBJS) - @$(RM) $@ - @$(AR) $(ARFLAGS) $@ $(OBJS) - @echo Replacing $@ to $(LIBDIR) - @$(RM) $(LIBDIR)/$@ - @$(CP) $@ $(LIBDIR) - -$(TARGET).so: $(OBJS) - @$(LD) -G -o $@ $(OBJS) - @echo Replacing $@ to $(LIBDIR) - @$(RM) $(LIBDIR)/$@ - @$(CP) $@ $(LIBDIR) - -clean: - $(RM) $(OBJS) .bak *~ - -veryclean: clean - $(RM) $(TARGETS) - -depend: - makedepend -- ${CFLAGS} -- ${SRCS} - -# DO NOT DELETE THIS LINE -- make depend depends on it. diff --git a/openair-cn/NAS/COMMON/EMM/MSG/SecurityModeReject.c b/openair-cn/NAS/COMMON/EMM/MSG/SecurityModeReject.c deleted file mode 100644 index 6347772667..0000000000 --- a/openair-cn/NAS/COMMON/EMM/MSG/SecurityModeReject.c +++ /dev/null @@ -1,72 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include -#include - - -#include "TLVEncoder.h" -#include "TLVDecoder.h" -#include "SecurityModeReject.h" - -int decode_security_mode_reject(security_mode_reject_msg *security_mode_reject, uint8_t *buffer, uint32_t len) -{ - uint32_t decoded = 0; - int decoded_result = 0; - - // Check if we got a NULL pointer and if buffer length is >= minimum length expected for the message. - CHECK_PDU_POINTER_AND_LENGTH_DECODER(buffer, SECURITY_MODE_REJECT_MINIMUM_LENGTH, len); - - /* Decoding mandatory fields */ - if ((decoded_result = decode_emm_cause(&security_mode_reject->emmcause, 0, buffer + decoded, len - decoded)) < 0) - return decoded_result; - else - decoded += decoded_result; - - return decoded; -} - -int encode_security_mode_reject(security_mode_reject_msg *security_mode_reject, uint8_t *buffer, uint32_t len) -{ - int encoded = 0; - int encode_result = 0; - - /* Checking IEI and pointer */ - CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, SECURITY_MODE_REJECT_MINIMUM_LENGTH, len); - - if ((encode_result = encode_emm_cause(&security_mode_reject->emmcause, 0, - buffer + encoded, len - encoded)) < 0) //Return in case of error - return encode_result; - else - encoded += encode_result; - - return encoded; -} - diff --git a/openair-cn/NAS/COMMON/EMM/MSG/SecurityModeReject.h b/openair-cn/NAS/COMMON/EMM/MSG/SecurityModeReject.h deleted file mode 100644 index 6dcbeea379..0000000000 --- a/openair-cn/NAS/COMMON/EMM/MSG/SecurityModeReject.h +++ /dev/null @@ -1,70 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "ProtocolDiscriminator.h" -#include "SecurityHeaderType.h" -#include "MessageType.h" -#include "EmmCause.h" - -#ifndef SECURITY_MODE_REJECT_H_ -#define SECURITY_MODE_REJECT_H_ - -/* Minimum length macro. Formed by minimum length of each mandatory field */ -#define SECURITY_MODE_REJECT_MINIMUM_LENGTH ( \ - EMM_CAUSE_MINIMUM_LENGTH ) - -/* Maximum length macro. Formed by maximum length of each field */ -#define SECURITY_MODE_REJECT_MAXIMUM_LENGTH ( \ - EMM_CAUSE_MAXIMUM_LENGTH ) - - -/* - * Message name: Security mode reject - * Description: This message is sent by the UE to the network to indicate that the corresponding security mode command has been rejected. See table 8.2.22.1. - * Significance: dual - * Direction: UE to network - */ - -typedef struct security_mode_reject_msg_tag { - /* Mandatory fields */ - ProtocolDiscriminator protocoldiscriminator:4; - SecurityHeaderType securityheadertype:4; - MessageType messagetype; - EmmCause emmcause; -} security_mode_reject_msg; - -int decode_security_mode_reject(security_mode_reject_msg *securitymodereject, uint8_t *buffer, uint32_t len); - -int encode_security_mode_reject(security_mode_reject_msg *securitymodereject, uint8_t *buffer, uint32_t len); - -#endif /* ! defined(SECURITY_MODE_REJECT_H_) */ - diff --git a/openair-cn/NAS/COMMON/EMM/MSG/ServiceReject.c b/openair-cn/NAS/COMMON/EMM/MSG/ServiceReject.c deleted file mode 100644 index 21a2d8a2ba..0000000000 --- a/openair-cn/NAS/COMMON/EMM/MSG/ServiceReject.c +++ /dev/null @@ -1,78 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include -#include - - -#include "TLVEncoder.h" -#include "TLVDecoder.h" -#include "ServiceReject.h" - -int decode_service_reject(service_reject_msg *service_reject, uint8_t *buffer, uint32_t len) -{ - uint32_t decoded = 0; - int decoded_result = 0; - - // Check if we got a NULL pointer and if buffer length is >= minimum length expected for the message. - CHECK_PDU_POINTER_AND_LENGTH_DECODER(buffer, SERVICE_REJECT_MINIMUM_LENGTH, len); - - /* Decoding mandatory fields */ - if ((decoded_result = decode_emm_cause(&service_reject->emmcause, 0, buffer + decoded, len - decoded)) < 0) - return decoded_result; - else - decoded += decoded_result; - - return decoded; -} - -int encode_service_reject(service_reject_msg *service_reject, uint8_t *buffer, uint32_t len) -{ - int encoded = 0; - int encode_result = 0; - - /* Checking IEI and pointer */ - CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, SERVICE_REJECT_MINIMUM_LENGTH, len); - - if ((encode_result = encode_emm_cause(&service_reject->emmcause, 0, buffer + - encoded, len - encoded)) < 0) //Return in case of error - return encode_result; - else - encoded += encode_result; - - if ((encode_result = encode_gprs_timer(&service_reject->t3442value, 0, - buffer + encoded, len - encoded)) < 0) //Return in case of error - return encode_result; - else - encoded += encode_result; - - return encoded; -} - diff --git a/openair-cn/NAS/COMMON/EMM/MSG/ServiceReject.h b/openair-cn/NAS/COMMON/EMM/MSG/ServiceReject.h deleted file mode 100644 index acafd9247b..0000000000 --- a/openair-cn/NAS/COMMON/EMM/MSG/ServiceReject.h +++ /dev/null @@ -1,75 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "ProtocolDiscriminator.h" -#include "SecurityHeaderType.h" -#include "MessageType.h" -#include "EmmCause.h" -#include "GprsTimer.h" - -#ifndef SERVICE_REJECT_H_ -#define SERVICE_REJECT_H_ - -/* Minimum length macro. Formed by minimum length of each mandatory field */ -#define SERVICE_REJECT_MINIMUM_LENGTH ( \ - EMM_CAUSE_MINIMUM_LENGTH ) - -/* Maximum length macro. Formed by maximum length of each field */ -#define SERVICE_REJECT_MAXIMUM_LENGTH ( \ - EMM_CAUSE_MAXIMUM_LENGTH + \ - GPRS_TIMER_MAXIMUM_LENGTH ) - - -/* - * Message name: Service reject - * Description: This message is sent by the network to the UE in order to reject the service request procedure. See table 8.2.24.1. - * Significance: dual - * Direction: network to UE - */ - -typedef struct service_reject_msg_tag { - /* Mandatory fields */ - ProtocolDiscriminator protocoldiscriminator:4; - SecurityHeaderType securityheadertype:4; - MessageType messagetype; - EmmCause emmcause; - /* Optional fields */ - uint32_t presencemask; - GprsTimer t3442value; -} service_reject_msg; - -int decode_service_reject(service_reject_msg *servicereject, uint8_t *buffer, uint32_t len); - -int encode_service_reject(service_reject_msg *servicereject, uint8_t *buffer, uint32_t len); - -#endif /* ! defined(SERVICE_REJECT_H_) */ - diff --git a/openair-cn/NAS/COMMON/EMM/MSG/ServiceRequest.h b/openair-cn/NAS/COMMON/EMM/MSG/ServiceRequest.h deleted file mode 100644 index 7f8f78f95d..0000000000 --- a/openair-cn/NAS/COMMON/EMM/MSG/ServiceRequest.h +++ /dev/null @@ -1,72 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "ProtocolDiscriminator.h" -#include "SecurityHeaderType.h" -#include "KsiAndSequenceNumber.h" -#include "ShortMac.h" - -#ifndef SERVICE_REQUEST_H_ -#define SERVICE_REQUEST_H_ - -/* Minimum length macro. Formed by minimum length of each mandatory field */ -#define SERVICE_REQUEST_MINIMUM_LENGTH ( \ - KSI_AND_SEQUENCE_NUMBER_MINIMUM_LENGTH + \ - SHORT_MAC_MINIMUM_LENGTH ) - -/* Maximum length macro. Formed by maximum length of each field */ -#define SERVICE_REQUEST_MAXIMUM_LENGTH ( \ - KSI_AND_SEQUENCE_NUMBER_MAXIMUM_LENGTH + \ - SHORT_MAC_MAXIMUM_LENGTH ) - - -/* - * Message name: Service request - * Description: This message is sent by the UE to the network to request the establishment of a NAS signalling connection and of the radio and S1 bearers. Its structure does not follow the structure of a standard layer 3 message. See table 8.2.25.1. - * Significance: dual - * Direction: UE to network - */ - -typedef struct service_request_msg_tag { - /* Mandatory fields */ - ProtocolDiscriminator protocoldiscriminator:4; - SecurityHeaderType securityheadertype:4; - KsiAndSequenceNumber ksiandsequencenumber; - ShortMac messageauthenticationcode; -} service_request_msg; - -int decode_service_request(service_request_msg *servicerequest, uint8_t *buffer, uint32_t len); - -int encode_service_request(service_request_msg *servicerequest, uint8_t *buffer, uint32_t len); - -#endif /* ! defined(SERVICE_REQUEST_H_) */ - diff --git a/openair-cn/NAS/COMMON/EMM/MSG/TrackingAreaUpdateComplete.c b/openair-cn/NAS/COMMON/EMM/MSG/TrackingAreaUpdateComplete.c deleted file mode 100644 index 6ef5b1adcb..0000000000 --- a/openair-cn/NAS/COMMON/EMM/MSG/TrackingAreaUpdateComplete.c +++ /dev/null @@ -1,57 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include -#include - - -#include "TLVEncoder.h" -#include "TLVDecoder.h" -#include "TrackingAreaUpdateComplete.h" - -int decode_tracking_area_update_complete(tracking_area_update_complete_msg *tracking_area_update_complete, uint8_t *buffer, uint32_t len) -{ - uint32_t decoded = 0; - // Check if we got a NULL pointer and if buffer length is >= minimum length expected for the message. - CHECK_PDU_POINTER_AND_LENGTH_DECODER(buffer, TRACKING_AREA_UPDATE_COMPLETE_MINIMUM_LENGTH, len); - - /* Decoding mandatory fields */ - return decoded; -} - -int encode_tracking_area_update_complete(tracking_area_update_complete_msg *tracking_area_update_complete, uint8_t *buffer, uint32_t len) -{ - int encoded = 0; - /* Checking IEI and pointer */ - CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, TRACKING_AREA_UPDATE_COMPLETE_MINIMUM_LENGTH, len); - - return encoded; -} - diff --git a/openair-cn/NAS/COMMON/EMM/MSG/TrackingAreaUpdateComplete.h b/openair-cn/NAS/COMMON/EMM/MSG/TrackingAreaUpdateComplete.h deleted file mode 100644 index 3ebb3fe6fb..0000000000 --- a/openair-cn/NAS/COMMON/EMM/MSG/TrackingAreaUpdateComplete.h +++ /dev/null @@ -1,65 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "ProtocolDiscriminator.h" -#include "SecurityHeaderType.h" -#include "MessageType.h" - -#ifndef TRACKING_AREA_UPDATE_COMPLETE_H_ -#define TRACKING_AREA_UPDATE_COMPLETE_H_ - -/* Minimum length macro. Formed by minimum length of each mandatory field */ -#define TRACKING_AREA_UPDATE_COMPLETE_MINIMUM_LENGTH (0) - -/* Maximum length macro. Formed by maximum length of each field */ -#define TRACKING_AREA_UPDATE_COMPLETE_MAXIMUM_LENGTH (0) - -/* - * Message name: Tracking area update complete - * Description: This message shall be sent by the UE to the network in response to a tracking area update accept message if a GUTI has been changed or a new TMSI has been assigned. See table 8.2.27.1. - * Significance: dual - * Direction: UE to network - */ - -typedef struct tracking_area_update_complete_msg_tag { - /* Mandatory fields */ - ProtocolDiscriminator protocoldiscriminator:4; - SecurityHeaderType securityheadertype:4; - MessageType messagetype; -} tracking_area_update_complete_msg; - -int decode_tracking_area_update_complete(tracking_area_update_complete_msg *trackingareaupdatecomplete, uint8_t *buffer, uint32_t len); - -int encode_tracking_area_update_complete(tracking_area_update_complete_msg *trackingareaupdatecomplete, uint8_t *buffer, uint32_t len); - -#endif /* ! defined(TRACKING_AREA_UPDATE_COMPLETE_H_) */ - diff --git a/openair-cn/NAS/COMMON/EMM/MSG/TrackingAreaUpdateReject.c b/openair-cn/NAS/COMMON/EMM/MSG/TrackingAreaUpdateReject.c deleted file mode 100644 index ebb6ffd376..0000000000 --- a/openair-cn/NAS/COMMON/EMM/MSG/TrackingAreaUpdateReject.c +++ /dev/null @@ -1,73 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include -#include - - -#include "TLVEncoder.h" -#include "TLVDecoder.h" -#include "TrackingAreaUpdateReject.h" - -int decode_tracking_area_update_reject(tracking_area_update_reject_msg *tracking_area_update_reject, uint8_t *buffer, uint32_t len) -{ - uint32_t decoded = 0; - int decoded_result = 0; - - // Check if we got a NULL pointer and if buffer length is >= minimum length expected for the message. - CHECK_PDU_POINTER_AND_LENGTH_DECODER(buffer, TRACKING_AREA_UPDATE_REJECT_MINIMUM_LENGTH, len); - - /* Decoding mandatory fields */ - if ((decoded_result = decode_emm_cause(&tracking_area_update_reject->emmcause, 0, buffer + decoded, len - decoded)) < 0) - return decoded_result; - else - decoded += decoded_result; - - return decoded; -} - -int encode_tracking_area_update_reject(tracking_area_update_reject_msg *tracking_area_update_reject, uint8_t *buffer, uint32_t len) -{ - int encoded = 0; - int encode_result = 0; - - /* Checking IEI and pointer */ - CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, TRACKING_AREA_UPDATE_REJECT_MINIMUM_LENGTH, len); - - if ((encode_result = - encode_emm_cause(&tracking_area_update_reject->emmcause, 0, buffer + - encoded, len - encoded)) < 0) //Return in case of error - return encode_result; - else - encoded += encode_result; - - return encoded; -} - diff --git a/openair-cn/NAS/COMMON/EMM/MSG/TrackingAreaUpdateReject.h b/openair-cn/NAS/COMMON/EMM/MSG/TrackingAreaUpdateReject.h deleted file mode 100644 index 56452a58d4..0000000000 --- a/openair-cn/NAS/COMMON/EMM/MSG/TrackingAreaUpdateReject.h +++ /dev/null @@ -1,70 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "ProtocolDiscriminator.h" -#include "SecurityHeaderType.h" -#include "MessageType.h" -#include "EmmCause.h" - -#ifndef TRACKING_AREA_UPDATE_REJECT_H_ -#define TRACKING_AREA_UPDATE_REJECT_H_ - -/* Minimum length macro. Formed by minimum length of each mandatory field */ -#define TRACKING_AREA_UPDATE_REJECT_MINIMUM_LENGTH ( \ - EMM_CAUSE_MINIMUM_LENGTH ) - -/* Maximum length macro. Formed by maximum length of each field */ -#define TRACKING_AREA_UPDATE_REJECT_MAXIMUM_LENGTH ( \ - EMM_CAUSE_MAXIMUM_LENGTH ) - - -/* - * Message name: Tracking area update reject - * Description: This message is sent by the network to the UE in order to reject the tracking area updating procedure. See table 8.2.28.1. - * Significance: dual - * Direction: network to UE - */ - -typedef struct tracking_area_update_reject_msg_tag { - /* Mandatory fields */ - ProtocolDiscriminator protocoldiscriminator:4; - SecurityHeaderType securityheadertype:4; - MessageType messagetype; - EmmCause emmcause; -} tracking_area_update_reject_msg; - -int decode_tracking_area_update_reject(tracking_area_update_reject_msg *trackingareaupdatereject, uint8_t *buffer, uint32_t len); - -int encode_tracking_area_update_reject(tracking_area_update_reject_msg *trackingareaupdatereject, uint8_t *buffer, uint32_t len); - -#endif /* ! defined(TRACKING_AREA_UPDATE_REJECT_H_) */ - diff --git a/openair-cn/NAS/COMMON/EMM/MSG/UplinkNasTransport.c b/openair-cn/NAS/COMMON/EMM/MSG/UplinkNasTransport.c deleted file mode 100644 index ad1fe82b30..0000000000 --- a/openair-cn/NAS/COMMON/EMM/MSG/UplinkNasTransport.c +++ /dev/null @@ -1,73 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include -#include - - -#include "TLVEncoder.h" -#include "TLVDecoder.h" -#include "UplinkNasTransport.h" - -int decode_uplink_nas_transport(uplink_nas_transport_msg *uplink_nas_transport, uint8_t *buffer, uint32_t len) -{ - uint32_t decoded = 0; - int decoded_result = 0; - - // Check if we got a NULL pointer and if buffer length is >= minimum length expected for the message. - CHECK_PDU_POINTER_AND_LENGTH_DECODER(buffer, UPLINK_NAS_TRANSPORT_MINIMUM_LENGTH, len); - - /* Decoding mandatory fields */ - if ((decoded_result = decode_nas_message_container(&uplink_nas_transport->nasmessagecontainer, 0, buffer + decoded, len - decoded)) < 0) - return decoded_result; - else - decoded += decoded_result; - - return decoded; -} - -int encode_uplink_nas_transport(uplink_nas_transport_msg *uplink_nas_transport, uint8_t *buffer, uint32_t len) -{ - int encoded = 0; - int encode_result = 0; - - /* Checking IEI and pointer */ - CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, UPLINK_NAS_TRANSPORT_MINIMUM_LENGTH, len); - - if ((encode_result = - encode_nas_message_container(&uplink_nas_transport->nasmessagecontainer, - 0, buffer + encoded, len - encoded)) < 0) //Return in case of error - return encode_result; - else - encoded += encode_result; - - return encoded; -} - diff --git a/openair-cn/NAS/COMMON/EMM/MSG/UplinkNasTransport.h b/openair-cn/NAS/COMMON/EMM/MSG/UplinkNasTransport.h deleted file mode 100644 index 09f1bd2e00..0000000000 --- a/openair-cn/NAS/COMMON/EMM/MSG/UplinkNasTransport.h +++ /dev/null @@ -1,70 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "ProtocolDiscriminator.h" -#include "SecurityHeaderType.h" -#include "MessageType.h" -#include "NasMessageContainer.h" - -#ifndef UPLINK_NAS_TRANSPORT_H_ -#define UPLINK_NAS_TRANSPORT_H_ - -/* Minimum length macro. Formed by minimum length of each mandatory field */ -#define UPLINK_NAS_TRANSPORT_MINIMUM_LENGTH ( \ - NAS_MESSAGE_CONTAINER_MINIMUM_LENGTH ) - -/* Maximum length macro. Formed by maximum length of each field */ -#define UPLINK_NAS_TRANSPORT_MAXIMUM_LENGTH ( \ - NAS_MESSAGE_CONTAINER_MAXIMUM_LENGTH ) - - -/* - * Message name: Uplink NAS Transport - * Description: This message is sent by the UE to the network in order to carry an SMS message in encapsulated format. See table 8.2.30.1. - * Significance: dual - * Direction: UE to network - */ - -typedef struct uplink_nas_transport_msg_tag { - /* Mandatory fields */ - ProtocolDiscriminator protocoldiscriminator:4; - SecurityHeaderType securityheadertype:4; - MessageType messagetype; - NasMessageContainer nasmessagecontainer; -} uplink_nas_transport_msg; - -int decode_uplink_nas_transport(uplink_nas_transport_msg *uplinknastransport, uint8_t *buffer, uint32_t len); - -int encode_uplink_nas_transport(uplink_nas_transport_msg *uplinknastransport, uint8_t *buffer, uint32_t len); - -#endif /* ! defined(UPLINK_NAS_TRANSPORT_H_) */ - diff --git a/openair-cn/NAS/COMMON/ESM/MSG/EsmInformationRequest.c b/openair-cn/NAS/COMMON/ESM/MSG/EsmInformationRequest.c deleted file mode 100644 index 0f3d22f63f..0000000000 --- a/openair-cn/NAS/COMMON/ESM/MSG/EsmInformationRequest.c +++ /dev/null @@ -1,59 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include -#include - - -#include "TLVEncoder.h" -#include "TLVDecoder.h" -#include "EsmInformationRequest.h" - -int decode_esm_information_request(esm_information_request_msg *esm_information_request, uint8_t *buffer, uint32_t len) -{ - uint32_t decoded = 0; - - // Check if we got a NULL pointer and if buffer length is >= minimum length expected for the message. - CHECK_PDU_POINTER_AND_LENGTH_DECODER(buffer, ESM_INFORMATION_REQUEST_MINIMUM_LENGTH, len); - - /* Decoding mandatory fields */ - return decoded; -} - -int encode_esm_information_request(esm_information_request_msg *esm_information_request, uint8_t *buffer, uint32_t len) -{ - int encoded = 0; - - /* Checking IEI and pointer */ - CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, ESM_INFORMATION_REQUEST_MINIMUM_LENGTH, len); - - return encoded; -} - diff --git a/openair-cn/NAS/COMMON/ESM/MSG/EsmInformationRequest.h b/openair-cn/NAS/COMMON/ESM/MSG/EsmInformationRequest.h deleted file mode 100644 index 21bf9bc0ca..0000000000 --- a/openair-cn/NAS/COMMON/ESM/MSG/EsmInformationRequest.h +++ /dev/null @@ -1,67 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "ProtocolDiscriminator.h" -#include "EpsBearerIdentity.h" -#include "ProcedureTransactionIdentity.h" -#include "MessageType.h" - -#ifndef ESM_INFORMATION_REQUEST_H_ -#define ESM_INFORMATION_REQUEST_H_ - -/* Minimum length macro. Formed by minimum length of each mandatory field */ -#define ESM_INFORMATION_REQUEST_MINIMUM_LENGTH (0) - -/* Maximum length macro. Formed by maximum length of each field */ -#define ESM_INFORMATION_REQUEST_MAXIMUM_LENGTH (0) - -/* - * Message name: ESM information request - * Description: This message is sent by the network to the UE to request the UE to provide ESM information, i.e. protocol configuration options or APN or both. See table 8.3.13.1. - * Significance: dual - * Direction: network to UE - */ - -typedef struct esm_information_request_msg_tag { - /* Mandatory fields */ - ProtocolDiscriminator protocoldiscriminator:4; - EpsBearerIdentity epsbeareridentity:4; - ProcedureTransactionIdentity proceduretransactionidentity; - MessageType messagetype; -} esm_information_request_msg; - -int decode_esm_information_request(esm_information_request_msg *esminformationrequest, uint8_t *buffer, uint32_t len); - -int encode_esm_information_request(esm_information_request_msg *esminformationrequest, uint8_t *buffer, uint32_t len); - -#endif /* ! defined(ESM_INFORMATION_REQUEST_H_) */ - diff --git a/openair-cn/NAS/COMMON/ESM/MSG/EsmStatus.c b/openair-cn/NAS/COMMON/ESM/MSG/EsmStatus.c deleted file mode 100644 index 0297b0eecd..0000000000 --- a/openair-cn/NAS/COMMON/ESM/MSG/EsmStatus.c +++ /dev/null @@ -1,72 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include -#include - - -#include "TLVEncoder.h" -#include "TLVDecoder.h" -#include "EsmStatus.h" - -int decode_esm_status(esm_status_msg *esm_status, uint8_t *buffer, uint32_t len) -{ - uint32_t decoded = 0; - int decoded_result = 0; - - // Check if we got a NULL pointer and if buffer length is >= minimum length expected for the message. - CHECK_PDU_POINTER_AND_LENGTH_DECODER(buffer, ESM_STATUS_MINIMUM_LENGTH, len); - - /* Decoding mandatory fields */ - if ((decoded_result = decode_esm_cause(&esm_status->esmcause, 0, buffer + decoded, len - decoded)) < 0) - return decoded_result; - else - decoded += decoded_result; - - return decoded; -} - -int encode_esm_status(esm_status_msg *esm_status, uint8_t *buffer, uint32_t len) -{ - int encoded = 0; - int encode_result = 0; - - /* Checking IEI and pointer */ - CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, ESM_STATUS_MINIMUM_LENGTH, len); - - if ((encode_result = encode_esm_cause(&esm_status->esmcause, 0, buffer + - encoded, len - encoded)) < 0) //Return in case of error - return encode_result; - else - encoded += encode_result; - - return encoded; -} - diff --git a/openair-cn/NAS/COMMON/ESM/MSG/EsmStatus.h b/openair-cn/NAS/COMMON/ESM/MSG/EsmStatus.h deleted file mode 100644 index 5bbce9e06d..0000000000 --- a/openair-cn/NAS/COMMON/ESM/MSG/EsmStatus.h +++ /dev/null @@ -1,72 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "ProtocolDiscriminator.h" -#include "EpsBearerIdentity.h" -#include "ProcedureTransactionIdentity.h" -#include "MessageType.h" -#include "EsmCause.h" - -#ifndef ESM_STATUS_H_ -#define ESM_STATUS_H_ - -/* Minimum length macro. Formed by minimum length of each mandatory field */ -#define ESM_STATUS_MINIMUM_LENGTH ( \ - ESM_CAUSE_MINIMUM_LENGTH ) - -/* Maximum length macro. Formed by maximum length of each field */ -#define ESM_STATUS_MAXIMUM_LENGTH ( \ - ESM_CAUSE_MAXIMUM_LENGTH ) - - -/* - * Message name: ESM status - * Description: This message is sent by the network or the UE to pass information on the status of the indicated EPS bearer context and report certain error conditions (e.g. as listed in clause 7). See table 8.3.15.1. - * Significance: dual - * Direction: both - */ - -typedef struct esm_status_msg_tag { - /* Mandatory fields */ - ProtocolDiscriminator protocoldiscriminator:4; - EpsBearerIdentity epsbeareridentity:4; - ProcedureTransactionIdentity proceduretransactionidentity; - MessageType messagetype; - EsmCause esmcause; -} esm_status_msg; - -int decode_esm_status(esm_status_msg *esmstatus, uint8_t *buffer, uint32_t len); - -int encode_esm_status(esm_status_msg *esmstatus, uint8_t *buffer, uint32_t len); - -#endif /* ! defined(ESM_STATUS_H_) */ - diff --git a/openair-cn/NAS/COMMON/ESM/MSG/Makefile b/openair-cn/NAS/COMMON/ESM/MSG/Makefile deleted file mode 100644 index 8786e88c13..0000000000 --- a/openair-cn/NAS/COMMON/ESM/MSG/Makefile +++ /dev/null @@ -1,69 +0,0 @@ -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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 . -# -# Contact Information -# OpenAirInterface Admin: openair_admin@eurecom.fr -# OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr -# -# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. -# -################################################################################ -ifndef PROJDIR -PROJDIR = $(PWD)/../../.. -endif - -include $(PROJDIR)/Makerules -include $(PROJDIR)/Makefile.inc - -INCLUDES = -I. -I$(INCDIR) -I$(UTILDIR) -I$(IESDIR) - -TARGET = $(LIBESMMSG) -TARGETS = $(TARGET).a $(TARGET).so - -all: $(TARGETS) - -%.o: %.c %.h Makefile $(LIBDIR)/$(LIBIES).a $(UTILDIR)/TLVEncoder.h $(UTILDIR)/TLVDecoder.h - @echo Compiling $< - @$(CC) $(CFLAGS) -c $< -o $@ - -$(TARGET).a: $(OBJS) - @$(RM) $@ - @$(AR) $(ARFLAGS) $@ $(OBJS) - @echo Replacing $@ to $(LIBDIR) - @$(RM) $(LIBDIR)/$@ - @$(CP) $@ $(LIBDIR) - -$(TARGET).so: $(OBJS) - @$(LD) -G -o $@ $(OBJS) - @echo Replacing $@ to $(LIBDIR) - @$(RM) $(LIBDIR)/$@ - @$(CP) $@ $(LIBDIR) - -clean: - $(RM) $(OBJS) *.bak *~ - -veryclean: clean - $(RM) $(TARGETS) - -depend: - makedepend -- ${CFLAGS} -- ${SRCS} - -# DO NOT DELETE THIS LINE -- make depend depends on it. diff --git a/openair-cn/NAS/COMMON/IES/AccessPointName.h b/openair-cn/NAS/COMMON/IES/AccessPointName.h deleted file mode 100644 index f121d8833d..0000000000 --- a/openair-cn/NAS/COMMON/IES/AccessPointName.h +++ /dev/null @@ -1,52 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef ACCESS_POINT_NAME_H_ -#define ACCESS_POINT_NAME_H_ - -#define ACCESS_POINT_NAME_MINIMUM_LENGTH 3 -#define ACCESS_POINT_NAME_MAXIMUM_LENGTH 102 - -typedef struct AccessPointName_tag { - OctetString accesspointnamevalue; -} AccessPointName; - -int encode_access_point_name(AccessPointName *accesspointname, uint8_t iei, uint8_t *buffer, uint32_t len); - -int decode_access_point_name(AccessPointName *accesspointname, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_access_point_name_xml(AccessPointName *accesspointname, uint8_t iei); - -#endif /* ACCESS POINT NAME_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/AdditionalUpdateResult.h b/openair-cn/NAS/COMMON/IES/AdditionalUpdateResult.h deleted file mode 100644 index 70edbc2634..0000000000 --- a/openair-cn/NAS/COMMON/IES/AdditionalUpdateResult.h +++ /dev/null @@ -1,54 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef ADDITIONAL_UPDATE_RESULT_H_ -#define ADDITIONAL_UPDATE_RESULT_H_ - -#define ADDITIONAL_UPDATE_RESULT_MINIMUM_LENGTH 1 -#define ADDITIONAL_UPDATE_RESULT_MAXIMUM_LENGTH 1 - -typedef uint8_t AdditionalUpdateResult; - -int encode_additional_update_result(AdditionalUpdateResult *additionalupdateresult, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_additional_update_result_xml(AdditionalUpdateResult *additionalupdateresult, uint8_t iei); - -uint8_t encode_u8_additional_update_result(AdditionalUpdateResult *additionalupdateresult); - -int decode_additional_update_result(AdditionalUpdateResult *additionalupdateresult, uint8_t iei, uint8_t *buffer, uint32_t len); - -int decode_u8_additional_update_result(AdditionalUpdateResult *additionalupdateresult, uint8_t iei, uint8_t value, uint32_t len); - -#endif /* ADDITIONAL UPDATE RESULT_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/AdditionalUpdateType.c b/openair-cn/NAS/COMMON/IES/AdditionalUpdateType.c deleted file mode 100644 index f253c43a82..0000000000 --- a/openair-cn/NAS/COMMON/IES/AdditionalUpdateType.c +++ /dev/null @@ -1,64 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - - -#include "TLVEncoder.h" -#include "TLVDecoder.h" -#include "AdditionalUpdateType.h" - -int decode_additional_update_type(AdditionalUpdateType *additionalupdatetype, uint8_t iei, uint8_t *buffer, uint32_t len) -{ - int decoded = 0; - *additionalupdatetype = *buffer & 0x1; - decoded++; -#if defined (NAS_DEBUG) - dump_additional_update_type_xml(additionalupdatetype, iei); -#endif - return decoded; -} - -int encode_additional_update_type(AdditionalUpdateType *additionalupdatetype, uint8_t iei, uint8_t *buffer, uint32_t len) -{ - return 0; -} -void dump_additional_update_type_xml(AdditionalUpdateType *additionalupdatetype, uint8_t iei) -{ - printf("\n"); - - if (iei > 0) - /* Don't display IEI if = 0 */ - printf(" 0x%X\n", iei); - - printf(" %u\n", *additionalupdatetype); - printf("\n"); -} - diff --git a/openair-cn/NAS/COMMON/IES/AdditionalUpdateType.h b/openair-cn/NAS/COMMON/IES/AdditionalUpdateType.h deleted file mode 100644 index dd7bc36643..0000000000 --- a/openair-cn/NAS/COMMON/IES/AdditionalUpdateType.h +++ /dev/null @@ -1,50 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef ADDITIONAL_UPDATE_TYPE_H_ -#define ADDITIONAL_UPDATE_TYPE_H_ - -#define ADDITIONAL_UPDATE_TYPE_MINIMUM_LENGTH 1 -#define ADDITIONAL_UPDATE_TYPE_MAXIMUM_LENGTH 1 - -typedef uint8_t AdditionalUpdateType; - -int encode_additional_update_type(AdditionalUpdateType *additionalupdatetype, uint8_t iei, uint8_t *buffer, uint32_t len); - -int decode_additional_update_type(AdditionalUpdateType *additionalupdatetype, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_additional_update_type_xml(AdditionalUpdateType *additionalupdatetype, uint8_t iei); - -#endif /* ADDITIONAL UPDATE TYPE_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/ApnAggregateMaximumBitRate.h b/openair-cn/NAS/COMMON/IES/ApnAggregateMaximumBitRate.h deleted file mode 100644 index b7666084d2..0000000000 --- a/openair-cn/NAS/COMMON/IES/ApnAggregateMaximumBitRate.h +++ /dev/null @@ -1,61 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef APN_AGGREGATE_MAXIMUM_BIT_RATE_H_ -#define APN_AGGREGATE_MAXIMUM_BIT_RATE_H_ - -#define APN_AGGREGATE_MAXIMUM_BIT_RATE_MINIMUM_LENGTH 4 -#define APN_AGGREGATE_MAXIMUM_BIT_RATE_MAXIMUM_LENGTH 8 - -#define APN_AGGREGATE_MAXIMUM_BIT_RATE_MAXIMUM_EXTENSION_PRESENT (1<<0) -#define APN_AGGREGATE_MAXIMUM_BIT_RATE_MAXIMUM_EXTENSION2_PRESENT (1<<1) - -typedef struct ApnAggregateMaximumBitRate_tag { - uint8_t apnambrfordownlink; - uint8_t apnambrforuplink; - uint8_t apnambrfordownlink_extended; - uint8_t apnambrforuplink_extended; - uint8_t apnambrfordownlink_extended2; - uint8_t apnambrforuplink_extended2; - uint8_t extensions; -} ApnAggregateMaximumBitRate; - -int encode_apn_aggregate_maximum_bit_rate(ApnAggregateMaximumBitRate *apnaggregatemaximumbitrate, uint8_t iei, uint8_t *buffer, uint32_t len); - -int decode_apn_aggregate_maximum_bit_rate(ApnAggregateMaximumBitRate *apnaggregatemaximumbitrate, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_apn_aggregate_maximum_bit_rate_xml(ApnAggregateMaximumBitRate *apnaggregatemaximumbitrate, uint8_t iei); - -#endif /* APN AGGREGATE MAXIMUM BIT RATE_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/AuthenticationFailureParameter.h b/openair-cn/NAS/COMMON/IES/AuthenticationFailureParameter.h deleted file mode 100644 index c8384685f1..0000000000 --- a/openair-cn/NAS/COMMON/IES/AuthenticationFailureParameter.h +++ /dev/null @@ -1,52 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef AUTHENTICATION_FAILURE_PARAMETER_H_ -#define AUTHENTICATION_FAILURE_PARAMETER_H_ - -#define AUTHENTICATION_FAILURE_PARAMETER_MINIMUM_LENGTH 16 -#define AUTHENTICATION_FAILURE_PARAMETER_MAXIMUM_LENGTH 16 - -typedef struct AuthenticationFailureParameter_tag { - OctetString auts; -} AuthenticationFailureParameter; - -int encode_authentication_failure_parameter(AuthenticationFailureParameter *authenticationfailureparameter, uint8_t iei, uint8_t *buffer, uint32_t len); - -int decode_authentication_failure_parameter(AuthenticationFailureParameter *authenticationfailureparameter, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_authentication_failure_parameter_xml(AuthenticationFailureParameter *authenticationfailureparameter, uint8_t iei); - -#endif /* AUTHENTICATION FAILURE PARAMETER_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/AuthenticationParameterAutn.h b/openair-cn/NAS/COMMON/IES/AuthenticationParameterAutn.h deleted file mode 100644 index f4246ca5da..0000000000 --- a/openair-cn/NAS/COMMON/IES/AuthenticationParameterAutn.h +++ /dev/null @@ -1,52 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef AUTHENTICATION_PARAMETER_AUTN_H_ -#define AUTHENTICATION_PARAMETER_AUTN_H_ - -#define AUTHENTICATION_PARAMETER_AUTN_MINIMUM_LENGTH 17 -#define AUTHENTICATION_PARAMETER_AUTN_MAXIMUM_LENGTH 17 - -typedef struct AuthenticationParameterAutn_tag { - OctetString autn; -} AuthenticationParameterAutn; - -int encode_authentication_parameter_autn(AuthenticationParameterAutn *authenticationparameterautn, uint8_t iei, uint8_t *buffer, uint32_t len); - -int decode_authentication_parameter_autn(AuthenticationParameterAutn *authenticationparameterautn, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_authentication_parameter_autn_xml(AuthenticationParameterAutn *authenticationparameterautn, uint8_t iei); - -#endif /* AUTHENTICATION PARAMETER AUTN_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/AuthenticationParameterRand.h b/openair-cn/NAS/COMMON/IES/AuthenticationParameterRand.h deleted file mode 100644 index 6690aceb5f..0000000000 --- a/openair-cn/NAS/COMMON/IES/AuthenticationParameterRand.h +++ /dev/null @@ -1,52 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef AUTHENTICATION_PARAMETER_RAND_H_ -#define AUTHENTICATION_PARAMETER_RAND_H_ - -#define AUTHENTICATION_PARAMETER_RAND_MINIMUM_LENGTH 16 -#define AUTHENTICATION_PARAMETER_RAND_MAXIMUM_LENGTH 16 - -typedef struct AuthenticationParameterRand_tag { - OctetString rand; -} AuthenticationParameterRand; - -int encode_authentication_parameter_rand(AuthenticationParameterRand *authenticationparameterrand, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_authentication_parameter_rand_xml(AuthenticationParameterRand *authenticationparameterrand, uint8_t iei); - -int decode_authentication_parameter_rand(AuthenticationParameterRand *authenticationparameterrand, uint8_t iei, uint8_t *buffer, uint32_t len); - -#endif /* AUTHENTICATION PARAMETER RAND_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/AuthenticationResponseParameter.h b/openair-cn/NAS/COMMON/IES/AuthenticationResponseParameter.h deleted file mode 100644 index 9b4c72bfad..0000000000 --- a/openair-cn/NAS/COMMON/IES/AuthenticationResponseParameter.h +++ /dev/null @@ -1,52 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef AUTHENTICATION_RESPONSE_PARAMETER_H_ -#define AUTHENTICATION_RESPONSE_PARAMETER_H_ - -#define AUTHENTICATION_RESPONSE_PARAMETER_MINIMUM_LENGTH 6 -#define AUTHENTICATION_RESPONSE_PARAMETER_MAXIMUM_LENGTH 18 - -typedef struct AuthenticationResponseParameter_tag { - OctetString res; -} AuthenticationResponseParameter; - -int encode_authentication_response_parameter(AuthenticationResponseParameter *authenticationresponseparameter, uint8_t iei, uint8_t *buffer, uint32_t len); - -int decode_authentication_response_parameter(AuthenticationResponseParameter *authenticationresponseparameter, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_authentication_response_parameter_xml(AuthenticationResponseParameter *authenticationresponseparameter, uint8_t iei); - -#endif /* AUTHENTICATION RESPONSE PARAMETER_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/CipheringKeySequenceNumber.h b/openair-cn/NAS/COMMON/IES/CipheringKeySequenceNumber.h deleted file mode 100644 index d75b686ab4..0000000000 --- a/openair-cn/NAS/COMMON/IES/CipheringKeySequenceNumber.h +++ /dev/null @@ -1,54 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef CIPHERING_KEY_SEQUENCE_NUMBER_H_ -#define CIPHERING_KEY_SEQUENCE_NUMBER_H_ - -#define CIPHERING_KEY_SEQUENCE_NUMBER_MINIMUM_LENGTH 1 -#define CIPHERING_KEY_SEQUENCE_NUMBER_MAXIMUM_LENGTH 1 - -typedef uint8_t CipheringKeySequenceNumber; - -int encode_ciphering_key_sequence_number(CipheringKeySequenceNumber *cipheringkeysequencenumber, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_ciphering_key_sequence_number_xml(CipheringKeySequenceNumber *cipheringkeysequencenumber, uint8_t iei); - -uint8_t encode_u8_ciphering_key_sequence_number(CipheringKeySequenceNumber *cipheringkeysequencenumber); - -int decode_ciphering_key_sequence_number(CipheringKeySequenceNumber *cipheringkeysequencenumber, uint8_t iei, uint8_t *buffer, uint32_t len); - -int decode_u8_ciphering_key_sequence_number(CipheringKeySequenceNumber *cipheringkeysequencenumber, uint8_t iei, uint8_t value, uint32_t len); - -#endif /* CIPHERING KEY SEQUENCE NUMBER_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/Cli.c b/openair-cn/NAS/COMMON/IES/Cli.c deleted file mode 100644 index 7a534dee11..0000000000 --- a/openair-cn/NAS/COMMON/IES/Cli.c +++ /dev/null @@ -1,102 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - - -#include "TLVEncoder.h" -#include "TLVDecoder.h" -#include "Cli.h" - -int decode_cli(Cli *cli, uint8_t iei, uint8_t *buffer, uint32_t len) -{ - int decoded = 0; - uint8_t ielen = 0; - int decode_result; - - if (iei > 0) { - CHECK_IEI_DECODER(iei, *buffer); - decoded++; - } - - ielen = *(buffer + decoded); - decoded++; - CHECK_LENGTH_DECODER(len - decoded, ielen); - - if ((decode_result = decode_octet_string(&cli->clivalue, ielen, buffer + decoded, len - decoded)) < 0) - return decode_result; - else - decoded += decode_result; - -#if defined (NAS_DEBUG) - dump_cli_xml(cli, iei); -#endif - return decoded; -} -int encode_cli(Cli *cli, uint8_t iei, uint8_t *buffer, uint32_t len) -{ - uint8_t *lenPtr; - uint32_t encoded = 0; - int encode_result; - /* Checking IEI and pointer */ - CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, CLI_MINIMUM_LENGTH, len); -#if defined (NAS_DEBUG) - dump_cli_xml(cli, iei); -#endif - - if (iei > 0) { - *buffer = iei; - encoded++; - } - - lenPtr = (buffer + encoded); - encoded ++; - - if ((encode_result = encode_octet_string(&cli->clivalue, buffer + encoded, len - encoded)) < 0) - return encode_result; - else - encoded += encode_result; - - *lenPtr = encoded - 1 - ((iei > 0) ? 1 : 0); - return encoded; -} - -void dump_cli_xml(Cli *cli, uint8_t iei) -{ - printf("\n"); - - if (iei > 0) - /* Don't display IEI if = 0 */ - printf(" 0x%X\n", iei); - - printf("%s", dump_octet_string_xml(&cli->clivalue)); - printf("\n"); -} - diff --git a/openair-cn/NAS/COMMON/IES/Cli.h b/openair-cn/NAS/COMMON/IES/Cli.h deleted file mode 100644 index 998289359b..0000000000 --- a/openair-cn/NAS/COMMON/IES/Cli.h +++ /dev/null @@ -1,52 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef CLI_H_ -#define CLI_H_ - -#define CLI_MINIMUM_LENGTH 3 -#define CLI_MAXIMUM_LENGTH 14 - -typedef struct Cli_tag { - OctetString clivalue; -} Cli; - -int encode_cli(Cli *cli, uint8_t iei, uint8_t *buffer, uint32_t len); - -int decode_cli(Cli *cli, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_cli_xml(Cli *cli, uint8_t iei); - -#endif /* CLI_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/CsfbResponse.h b/openair-cn/NAS/COMMON/IES/CsfbResponse.h deleted file mode 100644 index 20172a0be8..0000000000 --- a/openair-cn/NAS/COMMON/IES/CsfbResponse.h +++ /dev/null @@ -1,54 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef CSFB_RESPONSE_H_ -#define CSFB_RESPONSE_H_ - -#define CSFB_RESPONSE_MINIMUM_LENGTH 1 -#define CSFB_RESPONSE_MAXIMUM_LENGTH 1 - -typedef uint8_t CsfbResponse; - -int encode_csfb_response(CsfbResponse *csfbresponse, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_csfb_response_xml(CsfbResponse *csfbresponse, uint8_t iei); - -uint8_t encode_u8_csfb_response(CsfbResponse *csfbresponse); - -int decode_csfb_response(CsfbResponse *csfbresponse, uint8_t iei, uint8_t *buffer, uint32_t len); - -int decode_u8_csfb_response(CsfbResponse *csfbresponse, uint8_t iei, uint8_t value, uint32_t len); - -#endif /* CSFB RESPONSE_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/DaylightSavingTime.c b/openair-cn/NAS/COMMON/IES/DaylightSavingTime.c deleted file mode 100644 index 07791bfc4d..0000000000 --- a/openair-cn/NAS/COMMON/IES/DaylightSavingTime.c +++ /dev/null @@ -1,93 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - - -#include "TLVEncoder.h" -#include "TLVDecoder.h" -#include "DaylightSavingTime.h" - -int decode_daylight_saving_time(DaylightSavingTime *daylightsavingtime, uint8_t iei, uint8_t *buffer, uint32_t len) -{ - int decoded = 0; - uint8_t ielen = 0; - - if (iei > 0) { - CHECK_IEI_DECODER(iei, *buffer); - decoded++; - } - - ielen = *(buffer + decoded); - decoded++; - CHECK_LENGTH_DECODER(len - decoded, ielen); - *daylightsavingtime = *buffer & 0x3; - decoded++; -#if defined (NAS_DEBUG) - dump_daylight_saving_time_xml(daylightsavingtime, iei); -#endif - return decoded; -} -int encode_daylight_saving_time(DaylightSavingTime *daylightsavingtime, uint8_t iei, uint8_t *buffer, uint32_t len) -{ - uint8_t *lenPtr; - uint32_t encoded = 0; - /* Checking IEI and pointer */ - CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, DAYLIGHT_SAVING_TIME_MINIMUM_LENGTH, len); -#if defined (NAS_DEBUG) - dump_daylight_saving_time_xml(daylightsavingtime, iei); -#endif - - if (iei > 0) { - *buffer = iei; - encoded++; - } - - lenPtr = (buffer + encoded); - encoded ++; - *(buffer + encoded) = 0x00 | - (*daylightsavingtime & 0x3); - encoded++; - *lenPtr = encoded - 1 - ((iei > 0) ? 1 : 0); - return encoded; -} - -void dump_daylight_saving_time_xml(DaylightSavingTime *daylightsavingtime, uint8_t iei) -{ - printf("\n"); - - if (iei > 0) - /* Don't display IEI if = 0 */ - printf(" 0x%X\n", iei); - - printf(" %u\n", *daylightsavingtime); - printf("\n"); -} - diff --git a/openair-cn/NAS/COMMON/IES/DaylightSavingTime.h b/openair-cn/NAS/COMMON/IES/DaylightSavingTime.h deleted file mode 100644 index c8397132f4..0000000000 --- a/openair-cn/NAS/COMMON/IES/DaylightSavingTime.h +++ /dev/null @@ -1,50 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef DAYLIGHT_SAVING_TIME_H_ -#define DAYLIGHT_SAVING_TIME_H_ - -#define DAYLIGHT_SAVING_TIME_MINIMUM_LENGTH 3 -#define DAYLIGHT_SAVING_TIME_MAXIMUM_LENGTH 3 - -typedef uint8_t DaylightSavingTime; - -int encode_daylight_saving_time(DaylightSavingTime *daylightsavingtime, uint8_t iei, uint8_t *buffer, uint32_t len); - -int decode_daylight_saving_time(DaylightSavingTime *daylightsavingtime, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_daylight_saving_time_xml(DaylightSavingTime *daylightsavingtime, uint8_t iei); - -#endif /* DAYLIGHT SAVING TIME_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/DetachType.h b/openair-cn/NAS/COMMON/IES/DetachType.h deleted file mode 100644 index 52da84e474..0000000000 --- a/openair-cn/NAS/COMMON/IES/DetachType.h +++ /dev/null @@ -1,64 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef DETACH_TYPE_H_ -#define DETACH_TYPE_H_ - -#define DETACH_TYPE_MINIMUM_LENGTH 1 -#define DETACH_TYPE_MAXIMUM_LENGTH 1 - -typedef struct DetachType_tag { -#define DETACH_TYPE_NORMAL_DETACH 0 -#define DETACH_TYPE_SWITCH_OFF 1 - uint8_t switchoff:1; -#define DETACH_TYPE_EPS 0b001 -#define DETACH_TYPE_IMSI 0b010 -#define DETACH_TYPE_EPS_IMSI 0b011 -#define DETACH_TYPE_RESERVED_1 0b110 -#define DETACH_TYPE_RESERVED_2 0b111 - uint8_t typeofdetach:3; -} DetachType; - -int encode_detach_type(DetachType *detachtype, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_detach_type_xml(DetachType *detachtype, uint8_t iei); - -uint8_t encode_u8_detach_type(DetachType *detachtype); - -int decode_detach_type(DetachType *detachtype, uint8_t iei, uint8_t *buffer, uint32_t len); - -int decode_u8_detach_type(DetachType *detachtype, uint8_t iei, uint8_t value, uint32_t len); - -#endif /* DETACH TYPE_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/DrxParameter.h b/openair-cn/NAS/COMMON/IES/DrxParameter.h deleted file mode 100644 index 49452c1215..0000000000 --- a/openair-cn/NAS/COMMON/IES/DrxParameter.h +++ /dev/null @@ -1,55 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef DRX_PARAMETER_H_ -#define DRX_PARAMETER_H_ - -#define DRX_PARAMETER_MINIMUM_LENGTH 3 -#define DRX_PARAMETER_MAXIMUM_LENGTH 3 - -typedef struct DrxParameter_tag { - uint8_t splitpgcyclecode; - uint8_t cnspecificdrxcyclelengthcoefficientanddrxvaluefors1mode:4; - uint8_t splitonccch:1; - uint8_t nondrxtimer:3; -} DrxParameter; - -int encode_drx_parameter(DrxParameter *drxparameter, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_drx_parameter_xml(DrxParameter *drxparameter, uint8_t iei); - -int decode_drx_parameter(DrxParameter *drxparameter, uint8_t iei, uint8_t *buffer, uint32_t len); - -#endif /* DRX PARAMETER_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/EmergencyNumberList.h b/openair-cn/NAS/COMMON/IES/EmergencyNumberList.h deleted file mode 100644 index 0ac2d8cace..0000000000 --- a/openair-cn/NAS/COMMON/IES/EmergencyNumberList.h +++ /dev/null @@ -1,53 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef EMERGENCY_NUMBER_LIST_H_ -#define EMERGENCY_NUMBER_LIST_H_ - -#define EMERGENCY_NUMBER_LIST_MINIMUM_LENGTH 5 -#define EMERGENCY_NUMBER_LIST_MAXIMUM_LENGTH 50 - -typedef struct EmergencyNumberList_tag { - uint8_t lengthofemergency; - uint8_t emergencyservicecategoryvalue:5; -} EmergencyNumberList; - -int encode_emergency_number_list(EmergencyNumberList *emergencynumberlist, uint8_t iei, uint8_t *buffer, uint32_t len); - -int decode_emergency_number_list(EmergencyNumberList *emergencynumberlist, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_emergency_number_list_xml(EmergencyNumberList *emergencynumberlist, uint8_t iei); - -#endif /* EMERGENCY NUMBER LIST_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/EmmCause.c b/openair-cn/NAS/COMMON/IES/EmmCause.c deleted file mode 100644 index a6734b7122..0000000000 --- a/openair-cn/NAS/COMMON/IES/EmmCause.c +++ /dev/null @@ -1,85 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - - -#include "TLVEncoder.h" -#include "TLVDecoder.h" -#include "EmmCause.h" - -int decode_emm_cause(EmmCause *emmcause, uint8_t iei, uint8_t *buffer, uint32_t len) -{ - int decoded = 0; - - if (iei > 0) { - CHECK_IEI_DECODER(iei, *buffer); - decoded++; - } - - *emmcause = *(buffer + decoded); - decoded++; -#if defined (NAS_DEBUG) - dump_emm_cause_xml(emmcause, iei); -#endif - return decoded; -} - -int encode_emm_cause(EmmCause *emmcause, uint8_t iei, uint8_t *buffer, uint32_t len) -{ - uint32_t encoded = 0; - /* Checking IEI and pointer */ - CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, EMM_CAUSE_MINIMUM_LENGTH, len); -#if defined (NAS_DEBUG) - dump_emm_cause_xml(emmcause, iei); -#endif - - if (iei > 0) { - *buffer = iei; - encoded++; - } - - *(buffer + encoded) = *emmcause; - encoded++; - return encoded; -} - -void dump_emm_cause_xml(EmmCause *emmcause, uint8_t iei) -{ - printf("\n"); - - if (iei > 0) - /* Don't display IEI if = 0 */ - printf(" 0x%X\n", iei); - - printf(" %u\n", *emmcause); - printf("\n"); -} - diff --git a/openair-cn/NAS/COMMON/IES/EmmCause.h b/openair-cn/NAS/COMMON/IES/EmmCause.h deleted file mode 100644 index 1aa2e7b961..0000000000 --- a/openair-cn/NAS/COMMON/IES/EmmCause.h +++ /dev/null @@ -1,50 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef EMM_CAUSE_H_ -#define EMM_CAUSE_H_ - -#define EMM_CAUSE_MINIMUM_LENGTH 1 -#define EMM_CAUSE_MAXIMUM_LENGTH 1 - -typedef uint8_t EmmCause; - -int encode_emm_cause(EmmCause *emmcause, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_emm_cause_xml(EmmCause *emmcause, uint8_t iei); - -int decode_emm_cause(EmmCause *emmcause, uint8_t iei, uint8_t *buffer, uint32_t len); - -#endif /* EMM CAUSE_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/EpsAttachResult.h b/openair-cn/NAS/COMMON/IES/EpsAttachResult.h deleted file mode 100644 index 56192c7034..0000000000 --- a/openair-cn/NAS/COMMON/IES/EpsAttachResult.h +++ /dev/null @@ -1,56 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef EPS_ATTACH_RESULT_H_ -#define EPS_ATTACH_RESULT_H_ - -#define EPS_ATTACH_RESULT_MINIMUM_LENGTH 1 -#define EPS_ATTACH_RESULT_MAXIMUM_LENGTH 1 - -#define EPS_ATTACH_RESULT_EPS 0b001 -#define EPS_ATTACH_RESULT_EPS_IMSI 0b010 -typedef uint8_t EpsAttachResult; - -int encode_eps_attach_result(EpsAttachResult *epsattachresult, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_eps_attach_result_xml(EpsAttachResult *epsattachresult, uint8_t iei); - -uint8_t encode_u8_eps_attach_result(EpsAttachResult *epsattachresult); - -int decode_eps_attach_result(EpsAttachResult *epsattachresult, uint8_t iei, uint8_t *buffer, uint32_t len); - -int decode_u8_eps_attach_result(EpsAttachResult *epsattachresult, uint8_t iei, uint8_t value, uint32_t len); - -#endif /* EPS ATTACH RESULT_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/EpsAttachType.h b/openair-cn/NAS/COMMON/IES/EpsAttachType.h deleted file mode 100644 index fd2676b760..0000000000 --- a/openair-cn/NAS/COMMON/IES/EpsAttachType.h +++ /dev/null @@ -1,58 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef EPS_ATTACH_TYPE_H_ -#define EPS_ATTACH_TYPE_H_ - -#define EPS_ATTACH_TYPE_MINIMUM_LENGTH 1 -#define EPS_ATTACH_TYPE_MAXIMUM_LENGTH 1 - -#define EPS_ATTACH_TYPE_EPS 0b0001 -#define EPS_ATTACH_TYPE_IMSI 0b0010 -#define EPS_ATTACH_TYPE_EMERGENCY 0b0110 -#define EPS_ATTACH_TYPE_RESERVED 0b0111 -typedef uint8_t EpsAttachType; - -int encode_eps_attach_type(EpsAttachType *epsattachtype, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_eps_attach_type_xml(EpsAttachType *epsattachtype, uint8_t iei); - -uint8_t encode_u8_eps_attach_type(EpsAttachType *epsattachtype); - -int decode_eps_attach_type(EpsAttachType *epsattachtype, uint8_t iei, uint8_t *buffer, uint32_t len); - -int decode_u8_eps_attach_type(EpsAttachType *epsattachtype, uint8_t iei, uint8_t value, uint32_t len); - -#endif /* EPS ATTACH TYPE_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/EpsBearerContextStatus.h b/openair-cn/NAS/COMMON/IES/EpsBearerContextStatus.h deleted file mode 100644 index 7c2e1a0403..0000000000 --- a/openair-cn/NAS/COMMON/IES/EpsBearerContextStatus.h +++ /dev/null @@ -1,50 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef EPS_BEARER_CONTEXT_STATUS_H_ -#define EPS_BEARER_CONTEXT_STATUS_H_ - -#define EPS_BEARER_CONTEXT_STATUS_MINIMUM_LENGTH 4 -#define EPS_BEARER_CONTEXT_STATUS_MAXIMUM_LENGTH 4 - -typedef uint16_t EpsBearerContextStatus; - -int encode_eps_bearer_context_status(EpsBearerContextStatus *epsbearercontextstatus, uint8_t iei, uint8_t *buffer, uint32_t len); - -int decode_eps_bearer_context_status(EpsBearerContextStatus *epsbearercontextstatus, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_eps_bearer_context_status_xml(EpsBearerContextStatus *epsbearercontextstatus, uint8_t iei); - -#endif /* EPS BEARER CONTEXT STATUS_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/EpsBearerIdentity.c b/openair-cn/NAS/COMMON/IES/EpsBearerIdentity.c deleted file mode 100644 index 2a49a67d15..0000000000 --- a/openair-cn/NAS/COMMON/IES/EpsBearerIdentity.c +++ /dev/null @@ -1,47 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - - -#include "TLVEncoder.h" -#include "TLVDecoder.h" -#include "EpsBearerIdentity.h" - -int decode_eps_bearer_identity(EpsBearerIdentity *epsbeareridentity, uint8_t iei, uint8_t *buffer, uint32_t len) -{ - return 0; -} - -int encode_eps_bearer_identity(EpsBearerIdentity *epsbeareridentity, uint8_t iei, uint8_t *buffer, uint32_t len) -{ - return 0; -} - diff --git a/openair-cn/NAS/COMMON/IES/EpsBearerIdentity.h b/openair-cn/NAS/COMMON/IES/EpsBearerIdentity.h deleted file mode 100644 index e9c368ec69..0000000000 --- a/openair-cn/NAS/COMMON/IES/EpsBearerIdentity.h +++ /dev/null @@ -1,53 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef EPS_BEARER_IDENTITY_H_ -#define EPS_BEARER_IDENTITY_H_ - -#define EPS_BEARER_IDENTITY_MINIMUM_LENGTH 1 -#define EPS_BEARER_IDENTITY_MAXIMUM_LENGTH 1 - -#define EPS_BEARER_IDENTITY_UNASSIGNED 0 -#define EPS_BEARER_IDENTITY_FIRST 5 -#define EPS_BEARER_IDENTITY_LAST 15 -typedef uint8_t EpsBearerIdentity; - -int encode_eps_bearer_identity(EpsBearerIdentity *epsbeareridentity, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_eps_bearer_identity_xml(EpsBearerIdentity *epsbeareridentity, uint8_t iei); - -int decode_eps_bearer_identity(EpsBearerIdentity *epsbeareridentity, uint8_t iei, uint8_t *buffer, uint32_t len); - -#endif /* EPS BEARER IDENTITY_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/EpsNetworkFeatureSupport.h b/openair-cn/NAS/COMMON/IES/EpsNetworkFeatureSupport.h deleted file mode 100644 index d9e0423aec..0000000000 --- a/openair-cn/NAS/COMMON/IES/EpsNetworkFeatureSupport.h +++ /dev/null @@ -1,50 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef EPS_NETWORK_FEATURE_SUPPORT_H_ -#define EPS_NETWORK_FEATURE_SUPPORT_H_ - -#define EPS_NETWORK_FEATURE_SUPPORT_MINIMUM_LENGTH 3 -#define EPS_NETWORK_FEATURE_SUPPORT_MAXIMUM_LENGTH 3 - -typedef uint8_t EpsNetworkFeatureSupport; - -int encode_eps_network_feature_support(EpsNetworkFeatureSupport *epsnetworkfeaturesupport, uint8_t iei, uint8_t *buffer, uint32_t len); - -int decode_eps_network_feature_support(EpsNetworkFeatureSupport *epsnetworkfeaturesupport, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_eps_network_feature_support_xml(EpsNetworkFeatureSupport *epsnetworkfeaturesupport, uint8_t iei); - -#endif /* EPS NETWORK FEATURE SUPPORT_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/EpsQualityOfService.h b/openair-cn/NAS/COMMON/IES/EpsQualityOfService.h deleted file mode 100644 index e8af0fc4d6..0000000000 --- a/openair-cn/NAS/COMMON/IES/EpsQualityOfService.h +++ /dev/null @@ -1,66 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#ifndef EPS_QUALITY_OF_SERVICE_H_ -#define EPS_QUALITY_OF_SERVICE_H_ - -#define EPS_QUALITY_OF_SERVICE_MINIMUM_LENGTH 2 -#define EPS_QUALITY_OF_SERVICE_MAXIMUM_LENGTH 10 - -typedef struct { - uint8_t maxBitRateForUL; - uint8_t maxBitRateForDL; - uint8_t guarBitRateForUL; - uint8_t guarBitRateForDL; -} EpsQoSBitRates; - -typedef struct { - uint8_t bitRatesPresent:1; - uint8_t bitRatesExtPresent:1; - uint8_t qci; - EpsQoSBitRates bitRates; - EpsQoSBitRates bitRatesExt; -} EpsQualityOfService; - -//typedef uint8_t EpsQualityOfService; - -int encode_eps_quality_of_service(EpsQualityOfService *epsqualityofservice, uint8_t iei, uint8_t *buffer, uint32_t len); - -int decode_eps_quality_of_service(EpsQualityOfService *epsqualityofservice, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_eps_quality_of_service_xml(EpsQualityOfService *epsqualityofservice, uint8_t iei); - -int eps_qos_bit_rate_value(uint8_t br); -int eps_qos_bit_rate_ext_value(uint8_t br); - -#endif /* EPS QUALITY OF SERVICE_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/EpsUpdateResult.h b/openair-cn/NAS/COMMON/IES/EpsUpdateResult.h deleted file mode 100644 index 7d91f83dcb..0000000000 --- a/openair-cn/NAS/COMMON/IES/EpsUpdateResult.h +++ /dev/null @@ -1,54 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef EPS_UPDATE_RESULT_H_ -#define EPS_UPDATE_RESULT_H_ - -#define EPS_UPDATE_RESULT_MINIMUM_LENGTH 1 -#define EPS_UPDATE_RESULT_MAXIMUM_LENGTH 1 - -typedef uint8_t EpsUpdateResult; - -int encode_eps_update_result(EpsUpdateResult *epsupdateresult, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_eps_update_result_xml(EpsUpdateResult *epsupdateresult, uint8_t iei); - -uint8_t encode_u8_eps_update_result(EpsUpdateResult *epsupdateresult); - -int decode_eps_update_result(EpsUpdateResult *epsupdateresult, uint8_t iei, uint8_t *buffer, uint32_t len); - -int decode_u8_eps_update_result(EpsUpdateResult *epsupdateresult, uint8_t iei, uint8_t value, uint32_t len); - -#endif /* EPS UPDATE RESULT_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/EpsUpdateType.h b/openair-cn/NAS/COMMON/IES/EpsUpdateType.h deleted file mode 100644 index 80bfc2e76b..0000000000 --- a/openair-cn/NAS/COMMON/IES/EpsUpdateType.h +++ /dev/null @@ -1,57 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef EPS_UPDATE_TYPE_H_ -#define EPS_UPDATE_TYPE_H_ - -#define EPS_UPDATE_TYPE_MINIMUM_LENGTH 1 -#define EPS_UPDATE_TYPE_MAXIMUM_LENGTH 1 - -typedef struct EpsUpdateType_tag { - uint8_t activeflag:1; - uint8_t epsupdatetypevalue:3; -} EpsUpdateType; - -int encode_eps_update_type(EpsUpdateType *epsupdatetype, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_eps_update_type_xml(EpsUpdateType *epsupdatetype, uint8_t iei); - -uint8_t encode_u8_eps_update_type(EpsUpdateType *epsupdatetype); - -int decode_eps_update_type(EpsUpdateType *epsupdatetype, uint8_t iei, uint8_t *buffer, uint32_t len); - -int decode_u8_eps_update_type(EpsUpdateType *epsupdatetype, uint8_t iei, uint8_t value, uint32_t len); - -#endif /* EPS UPDATE TYPE_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/EsmCause.c b/openair-cn/NAS/COMMON/IES/EsmCause.c deleted file mode 100644 index e20ece8ee5..0000000000 --- a/openair-cn/NAS/COMMON/IES/EsmCause.c +++ /dev/null @@ -1,85 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - - -#include "TLVEncoder.h" -#include "TLVDecoder.h" -#include "EsmCause.h" - -int decode_esm_cause(EsmCause *esmcause, uint8_t iei, uint8_t *buffer, uint32_t len) -{ - int decoded = 0; - - if (iei > 0) { - CHECK_IEI_DECODER(iei, *buffer); - decoded++; - } - - *esmcause = *(buffer + decoded); - decoded++; -#if defined (NAS_DEBUG) - dump_esm_cause_xml(esmcause, iei); -#endif - return decoded; -} - -int encode_esm_cause(EsmCause *esmcause, uint8_t iei, uint8_t *buffer, uint32_t len) -{ - uint32_t encoded = 0; - /* Checking IEI and pointer */ - CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, ESM_CAUSE_MINIMUM_LENGTH, len); -#if defined (NAS_DEBUG) - dump_esm_cause_xml(esmcause, iei); -#endif - - if (iei > 0) { - *buffer = iei; - encoded++; - } - - *(buffer + encoded) = *esmcause; - encoded++; - return encoded; -} - -void dump_esm_cause_xml(EsmCause *esmcause, uint8_t iei) -{ - printf("\n"); - - if (iei > 0) - /* Don't display IEI if = 0 */ - printf(" 0x%X\n", iei); - - printf(" %u\n", *esmcause); - printf("\n"); -} - diff --git a/openair-cn/NAS/COMMON/IES/EsmCause.h b/openair-cn/NAS/COMMON/IES/EsmCause.h deleted file mode 100644 index 7be75c4a7f..0000000000 --- a/openair-cn/NAS/COMMON/IES/EsmCause.h +++ /dev/null @@ -1,50 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef ESM_CAUSE_H_ -#define ESM_CAUSE_H_ - -#define ESM_CAUSE_MINIMUM_LENGTH 1 -#define ESM_CAUSE_MAXIMUM_LENGTH 1 - -typedef uint8_t EsmCause; - -int encode_esm_cause(EsmCause *esmcause, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_esm_cause_xml(EsmCause *esmcause, uint8_t iei); - -int decode_esm_cause(EsmCause *esmcause, uint8_t iei, uint8_t *buffer, uint32_t len); - -#endif /* ESM CAUSE_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/EsmInformationTransferFlag.h b/openair-cn/NAS/COMMON/IES/EsmInformationTransferFlag.h deleted file mode 100644 index 3a201d7baf..0000000000 --- a/openair-cn/NAS/COMMON/IES/EsmInformationTransferFlag.h +++ /dev/null @@ -1,54 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef ESM_INFORMATION_TRANSFER_FLAG_H_ -#define ESM_INFORMATION_TRANSFER_FLAG_H_ - -#define ESM_INFORMATION_TRANSFER_FLAG_MINIMUM_LENGTH 1 -#define ESM_INFORMATION_TRANSFER_FLAG_MAXIMUM_LENGTH 1 - -typedef uint8_t EsmInformationTransferFlag; - -int encode_esm_information_transfer_flag(EsmInformationTransferFlag *esminformationtransferflag, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_esm_information_transfer_flag_xml(EsmInformationTransferFlag *esminformationtransferflag, uint8_t iei); - -uint8_t encode_u8_esm_information_transfer_flag(EsmInformationTransferFlag *esminformationtransferflag); - -int decode_esm_information_transfer_flag(EsmInformationTransferFlag *esminformationtransferflag, uint8_t iei, uint8_t *buffer, uint32_t len); - -int decode_u8_esm_information_transfer_flag(EsmInformationTransferFlag *esminformationtransferflag, uint8_t iei, uint8_t value, uint32_t len); - -#endif /* ESM INFORMATION TRANSFER FLAG_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/EsmMessageContainer.h b/openair-cn/NAS/COMMON/IES/EsmMessageContainer.h deleted file mode 100644 index 4d8664ecaf..0000000000 --- a/openair-cn/NAS/COMMON/IES/EsmMessageContainer.h +++ /dev/null @@ -1,52 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef ESM_MESSAGE_CONTAINER_H_ -#define ESM_MESSAGE_CONTAINER_H_ - -#define ESM_MESSAGE_CONTAINER_MINIMUM_LENGTH 2 // [length]+[length] -#define ESM_MESSAGE_CONTAINER_MAXIMUM_LENGTH 65538 // [IEI]+[length]+[length]+[ESM msg] - -typedef struct EsmMessageContainer_tag { - OctetString esmmessagecontainercontents; -} EsmMessageContainer; - -int encode_esm_message_container(EsmMessageContainer *esmmessagecontainer, uint8_t iei, uint8_t *buffer, uint32_t len); - -int decode_esm_message_container(EsmMessageContainer *esmmessagecontainer, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_esm_message_container_xml(EsmMessageContainer *esmmessagecontainer, uint8_t iei); - -#endif /* ESM MESSAGE CONTAINER_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/GprsTimer.c b/openair-cn/NAS/COMMON/IES/GprsTimer.c deleted file mode 100644 index 056355d34f..0000000000 --- a/openair-cn/NAS/COMMON/IES/GprsTimer.c +++ /dev/null @@ -1,95 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - - -#include "TLVEncoder.h" -#include "TLVDecoder.h" -#include "GprsTimer.h" - -static const long _gprs_timer_unit[] = {2, 60, 360, 60, 60, 60, 60, 0}; - -int decode_gprs_timer(GprsTimer *gprstimer, uint8_t iei, uint8_t *buffer, uint32_t len) -{ - int decoded = 0; - - if (iei > 0) { - CHECK_IEI_DECODER(iei, *buffer); - decoded++; - } - - gprstimer->unit = (*(buffer + decoded) >> 5) & 0x7; - gprstimer->timervalue = *(buffer + decoded) & 0x1f; - decoded++; -#if defined (NAS_DEBUG) - dump_gprs_timer_xml(gprstimer, iei); -#endif - return decoded; -} - -int encode_gprs_timer(GprsTimer *gprstimer, uint8_t iei, uint8_t *buffer, uint32_t len) -{ - uint32_t encoded = 0; - /* Checking IEI and pointer */ - CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, GPRS_TIMER_MINIMUM_LENGTH, len); -#if defined (NAS_DEBUG) - dump_gprs_timer_xml(gprstimer, iei); -#endif - - if (iei > 0) { - *buffer = iei; - encoded++; - } - - *(buffer + encoded) = 0x00 | ((gprstimer->unit & 0x7) << 5) | - (gprstimer->timervalue & 0x1f); - encoded++; - return encoded; -} - -void dump_gprs_timer_xml(GprsTimer *gprstimer, uint8_t iei) -{ - printf("\n"); - - if (iei > 0) - /* Don't display IEI if = 0 */ - printf(" 0x%X\n", iei); - - printf(" %u\n", gprstimer->unit); - printf(" %u\n", gprstimer->timervalue); - printf("\n"); -} - -long gprs_timer_value(GprsTimer *gprstimer) -{ - return (gprstimer->timervalue * _gprs_timer_unit[gprstimer->unit]); -} - diff --git a/openair-cn/NAS/COMMON/IES/GprsTimer.h b/openair-cn/NAS/COMMON/IES/GprsTimer.h deleted file mode 100644 index 57547842f2..0000000000 --- a/openair-cn/NAS/COMMON/IES/GprsTimer.h +++ /dev/null @@ -1,59 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef GPRS_TIMER_H_ -#define GPRS_TIMER_H_ - -#define GPRS_TIMER_MINIMUM_LENGTH 2 -#define GPRS_TIMER_MAXIMUM_LENGTH 2 - -typedef struct GprsTimer_tag { -#define GPRS_TIMER_UNIT_2S 0b000 /* 2 seconds */ -#define GPRS_TIMER_UNIT_60S 0b001 /* 1 minute */ -#define GPRS_TIMER_UNIT_360S 0b010 /* decihours */ -#define GPRS_TIMER_UNIT_0S 0b111 /* deactivated */ - uint8_t unit:3; - uint8_t timervalue:5; -} GprsTimer; - -int encode_gprs_timer(GprsTimer *gprstimer, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_gprs_timer_xml(GprsTimer *gprstimer, uint8_t iei); - -int decode_gprs_timer(GprsTimer *gprstimer, uint8_t iei, uint8_t *buffer, uint32_t len); - -long gprs_timer_value(GprsTimer *gprstimer); - -#endif /* GPRS TIMER_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/GutiType.h b/openair-cn/NAS/COMMON/IES/GutiType.h deleted file mode 100644 index 8f96fc75ee..0000000000 --- a/openair-cn/NAS/COMMON/IES/GutiType.h +++ /dev/null @@ -1,56 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef GUTI_TYPE_H_ -#define GUTI_TYPE_H_ - -#define GUTI_TYPE_MINIMUM_LENGTH 1 -#define GUTI_TYPE_MAXIMUM_LENGTH 1 - -#define GUTI_NATIVE 0 -#define GUTI_MAPPED 1 -typedef uint8_t GutiType; - -int encode_guti_type(GutiType *gutitype, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_guti_type_xml(GutiType *gutitype, uint8_t iei); - -uint8_t encode_u8_guti_type(GutiType *gutitype); - -int decode_guti_type(GutiType *gutitype, uint8_t iei, uint8_t *buffer, uint32_t len); - -int decode_u8_guti_type(GutiType *gutitype, uint8_t iei, uint8_t value, uint32_t len); - -#endif /* GUTI_TYPE_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/IdentityType2.h b/openair-cn/NAS/COMMON/IES/IdentityType2.h deleted file mode 100644 index be342ffe04..0000000000 --- a/openair-cn/NAS/COMMON/IES/IdentityType2.h +++ /dev/null @@ -1,58 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef IDENTITY_TYPE_2_H_ -#define IDENTITY_TYPE_2_H_ - -#define IDENTITY_TYPE_2_MINIMUM_LENGTH 1 -#define IDENTITY_TYPE_2_MAXIMUM_LENGTH 1 - -#define IDENTITY_TYPE_2_IMSI 0b001 -#define IDENTITY_TYPE_2_IMEI 0b010 -#define IDENTITY_TYPE_2_IMEISV 0b011 -#define IDENTITY_TYPE_2_TMSI 0b100 -typedef uint8_t IdentityType2; - -int encode_identity_type_2(IdentityType2 *identitytype2, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_identity_type_2_xml(IdentityType2 *identitytype2, uint8_t iei); - -uint8_t encode_u8_identity_type_2(IdentityType2 *identitytype2); - -int decode_identity_type_2(IdentityType2 *identitytype2, uint8_t iei, uint8_t *buffer, uint32_t len); - -int decode_u8_identity_type_2(IdentityType2 *identitytype2, uint8_t iei, uint8_t value, uint32_t len); - -#endif /* IDENTITY TYPE 2_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/ImeisvRequest.h b/openair-cn/NAS/COMMON/IES/ImeisvRequest.h deleted file mode 100644 index 6f8e9f87bf..0000000000 --- a/openair-cn/NAS/COMMON/IES/ImeisvRequest.h +++ /dev/null @@ -1,54 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef IMEISV_REQUEST_H_ -#define IMEISV_REQUEST_H_ - -#define IMEISV_REQUEST_MINIMUM_LENGTH 1 -#define IMEISV_REQUEST_MAXIMUM_LENGTH 1 - -typedef uint8_t ImeisvRequest; - -int encode_imeisv_request(ImeisvRequest *imeisvrequest, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_imeisv_request_xml(ImeisvRequest *imeisvrequest, uint8_t iei); - -uint8_t encode_u8_imeisv_request(ImeisvRequest *imeisvrequest); - -int decode_imeisv_request(ImeisvRequest *imeisvrequest, uint8_t iei, uint8_t *buffer, uint32_t len); - -int decode_u8_imeisv_request(ImeisvRequest *imeisvrequest, uint8_t iei, uint8_t value, uint32_t len); - -#endif /* IMEISV REQUEST_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/KsiAndSequenceNumber.h b/openair-cn/NAS/COMMON/IES/KsiAndSequenceNumber.h deleted file mode 100644 index 524309bf89..0000000000 --- a/openair-cn/NAS/COMMON/IES/KsiAndSequenceNumber.h +++ /dev/null @@ -1,53 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef KSI_AND_SEQUENCE_NUMBER_H_ -#define KSI_AND_SEQUENCE_NUMBER_H_ - -#define KSI_AND_SEQUENCE_NUMBER_MINIMUM_LENGTH 2 -#define KSI_AND_SEQUENCE_NUMBER_MAXIMUM_LENGTH 2 - -typedef struct KsiAndSequenceNumber_tag { - uint8_t ksi:3; - uint8_t sequencenumber:5; -} KsiAndSequenceNumber; - -int encode_ksi_and_sequence_number(KsiAndSequenceNumber *ksiandsequencenumber, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_ksi_and_sequence_number_xml(KsiAndSequenceNumber *ksiandsequencenumber, uint8_t iei); - -int decode_ksi_and_sequence_number(KsiAndSequenceNumber *ksiandsequencenumber, uint8_t iei, uint8_t *buffer, uint32_t len); - -#endif /* KSI AND SEQUENCE NUMBER_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/LcsClientIdentity.h b/openair-cn/NAS/COMMON/IES/LcsClientIdentity.h deleted file mode 100644 index 690914741e..0000000000 --- a/openair-cn/NAS/COMMON/IES/LcsClientIdentity.h +++ /dev/null @@ -1,52 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef LCS_CLIENT_IDENTITY_H_ -#define LCS_CLIENT_IDENTITY_H_ - -#define LCS_CLIENT_IDENTITY_MINIMUM_LENGTH 3 -#define LCS_CLIENT_IDENTITY_MAXIMUM_LENGTH 257 - -typedef struct LcsClientIdentity_tag { - OctetString lcsclientidentityvalue; -} LcsClientIdentity; - -int encode_lcs_client_identity(LcsClientIdentity *lcsclientidentity, uint8_t iei, uint8_t *buffer, uint32_t len); - -int decode_lcs_client_identity(LcsClientIdentity *lcsclientidentity, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_lcs_client_identity_xml(LcsClientIdentity *lcsclientidentity, uint8_t iei); - -#endif /* LCS CLIENT IDENTITY_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/LcsIndicator.c b/openair-cn/NAS/COMMON/IES/LcsIndicator.c deleted file mode 100644 index 371e195da1..0000000000 --- a/openair-cn/NAS/COMMON/IES/LcsIndicator.c +++ /dev/null @@ -1,85 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - - -#include "TLVEncoder.h" -#include "TLVDecoder.h" -#include "LcsIndicator.h" - -int decode_lcs_indicator(LcsIndicator *lcsindicator, uint8_t iei, uint8_t *buffer, uint32_t len) -{ - int decoded = 0; - - if (iei > 0) { - CHECK_IEI_DECODER(iei, *buffer); - decoded++; - } - - *lcsindicator = *(buffer + decoded); - decoded++; -#if defined (NAS_DEBUG) - dump_lcs_indicator_xml(lcsindicator, iei); -#endif - return decoded; -} - -int encode_lcs_indicator(LcsIndicator *lcsindicator, uint8_t iei, uint8_t *buffer, uint32_t len) -{ - uint32_t encoded = 0; - /* Checking IEI and pointer */ - CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, LCS_INDICATOR_MINIMUM_LENGTH, len); -#if defined (NAS_DEBUG) - dump_lcs_indicator_xml(lcsindicator, iei); -#endif - - if (iei > 0) { - *buffer = iei; - encoded++; - } - - *(buffer + encoded) = *lcsindicator; - encoded++; - return encoded; -} - -void dump_lcs_indicator_xml(LcsIndicator *lcsindicator, uint8_t iei) -{ - printf("\n"); - - if (iei > 0) - /* Don't display IEI if = 0 */ - printf(" 0x%X\n", iei); - - printf(" %u\n", *lcsindicator); - printf("\n"); -} - diff --git a/openair-cn/NAS/COMMON/IES/LcsIndicator.h b/openair-cn/NAS/COMMON/IES/LcsIndicator.h deleted file mode 100644 index d4ad52e11d..0000000000 --- a/openair-cn/NAS/COMMON/IES/LcsIndicator.h +++ /dev/null @@ -1,50 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef LCS_INDICATOR_H_ -#define LCS_INDICATOR_H_ - -#define LCS_INDICATOR_MINIMUM_LENGTH 2 -#define LCS_INDICATOR_MAXIMUM_LENGTH 2 - -typedef uint8_t LcsIndicator; - -int encode_lcs_indicator(LcsIndicator *lcsindicator, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_lcs_indicator_xml(LcsIndicator *lcsindicator, uint8_t iei); - -int decode_lcs_indicator(LcsIndicator *lcsindicator, uint8_t iei, uint8_t *buffer, uint32_t len); - -#endif /* LCS INDICATOR_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/LinkedEpsBearerIdentity.h b/openair-cn/NAS/COMMON/IES/LinkedEpsBearerIdentity.h deleted file mode 100644 index 5fa07834f4..0000000000 --- a/openair-cn/NAS/COMMON/IES/LinkedEpsBearerIdentity.h +++ /dev/null @@ -1,54 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef LINKED_EPS_BEARER_IDENTITY_H_ -#define LINKED_EPS_BEARER_IDENTITY_H_ - -#define LINKED_EPS_BEARER_IDENTITY_MINIMUM_LENGTH 1 -#define LINKED_EPS_BEARER_IDENTITY_MAXIMUM_LENGTH 1 - -typedef uint8_t LinkedEpsBearerIdentity; - -int encode_linked_eps_bearer_identity(LinkedEpsBearerIdentity *linkedepsbeareridentity, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_linked_eps_bearer_identity_xml(LinkedEpsBearerIdentity *linkedepsbeareridentity, uint8_t iei); - -uint8_t encode_u8_linked_eps_bearer_identity(LinkedEpsBearerIdentity *linkedepsbeareridentity); - -int decode_linked_eps_bearer_identity(LinkedEpsBearerIdentity *linkedepsbeareridentity, uint8_t iei, uint8_t *buffer, uint32_t len); - -int decode_u8_linked_eps_bearer_identity(LinkedEpsBearerIdentity *linkedepsbeareridentity, uint8_t iei, uint8_t value, uint32_t len); - -#endif /* LINKED EPS BEARER IDENTITY_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/LlcServiceAccessPointIdentifier.h b/openair-cn/NAS/COMMON/IES/LlcServiceAccessPointIdentifier.h deleted file mode 100644 index b699ded1b4..0000000000 --- a/openair-cn/NAS/COMMON/IES/LlcServiceAccessPointIdentifier.h +++ /dev/null @@ -1,50 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef LLC_SERVICE_ACCESS_POINT_IDENTIFIER_H_ -#define LLC_SERVICE_ACCESS_POINT_IDENTIFIER_H_ - -#define LLC_SERVICE_ACCESS_POINT_IDENTIFIER_MINIMUM_LENGTH 2 -#define LLC_SERVICE_ACCESS_POINT_IDENTIFIER_MAXIMUM_LENGTH 2 - -typedef uint8_t LlcServiceAccessPointIdentifier; - -int encode_llc_service_access_point_identifier(LlcServiceAccessPointIdentifier *llcserviceaccesspointidentifier, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_llc_service_access_point_identifier_xml(LlcServiceAccessPointIdentifier *llcserviceaccesspointidentifier, uint8_t iei); - -int decode_llc_service_access_point_identifier(LlcServiceAccessPointIdentifier *llcserviceaccesspointidentifier, uint8_t iei, uint8_t *buffer, uint32_t len); - -#endif /* LLC SERVICE ACCESS POINT IDENTIFIER_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/LocationAreaIdentification.h b/openair-cn/NAS/COMMON/IES/LocationAreaIdentification.h deleted file mode 100644 index d2b6880779..0000000000 --- a/openair-cn/NAS/COMMON/IES/LocationAreaIdentification.h +++ /dev/null @@ -1,58 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef LOCATION_AREA_IDENTIFICATION_H_ -#define LOCATION_AREA_IDENTIFICATION_H_ - -#define LOCATION_AREA_IDENTIFICATION_MINIMUM_LENGTH 6 -#define LOCATION_AREA_IDENTIFICATION_MAXIMUM_LENGTH 6 - -typedef struct LocationAreaIdentification_tag { - uint8_t mccdigit2:4; - uint8_t mccdigit1:4; - uint8_t mncdigit3:4; - uint8_t mccdigit3:4; - uint8_t mncdigit2:4; - uint8_t mncdigit1:4; - uint16_t lac; -} LocationAreaIdentification; - -int encode_location_area_identification(LocationAreaIdentification *locationareaidentification, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_location_area_identification_xml(LocationAreaIdentification *locationareaidentification, uint8_t iei); - -int decode_location_area_identification(LocationAreaIdentification *locationareaidentification, uint8_t iei, uint8_t *buffer, uint32_t len); - -#endif /* LOCATION AREA IDENTIFICATION_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/Makefile b/openair-cn/NAS/COMMON/IES/Makefile deleted file mode 100644 index 8cc286e671..0000000000 --- a/openair-cn/NAS/COMMON/IES/Makefile +++ /dev/null @@ -1,72 +0,0 @@ -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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 . -# -# Contact Information -# OpenAirInterface Admin: openair_admin@eurecom.fr -# OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr -# -# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. -# -################################################################################ -ifndef PROJDIR -PROJDIR = $(PWD)/../.. -endif - -include $(PROJDIR)/Makerules -include $(PROJDIR)/Makefile.inc - -INCLUDES = -I. -I$(UTILDIR) - -#DEFINES += -DNAS_DEBUG - -TARGET = $(LIBIES) -TARGETS = $(TARGET).a $(TARGET).so - -all: $(TARGETS) - -%.o: %.c %.h Makefile - @echo Compiling $< - @$(CC) $(CFLAGS) -c $< -o $@ - -$(TARGET).a: $(OBJS) - @$(RM) $@ - @$(AR) $(ARFLAGS) $@ $(OBJS) - @echo Replacing $@ to $(LIBDIR) - @$(RM) $(LIBDIR)/$@ - @$(CP) $@ $(LIBDIR) - -$(TARGET).so: $(OBJS) - @$(LD) -G -o $@ $(OBJS) - @echo Replacing $@ to $(LIBDIR) - @$(RM) $(LIBDIR)/$@ - @$(CP) $@ $(LIBDIR) - -clean: - $(RM) $(OBJS) *.bak *~ - -veryclean: clean - $(RM) $(TARGETS) - -depend: - makedepend -- ${CFLAGS} -- ${SRCS} - -# DO NOT DELETE THIS LINE -- make depend depends on it. - diff --git a/openair-cn/NAS/COMMON/IES/MessageType.c b/openair-cn/NAS/COMMON/IES/MessageType.c deleted file mode 100644 index d66bd9b662..0000000000 --- a/openair-cn/NAS/COMMON/IES/MessageType.c +++ /dev/null @@ -1,47 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - - -#include "TLVEncoder.h" -#include "TLVDecoder.h" -#include "MessageType.h" - -int decode_message_type(MessageType *messagetype, uint8_t iei, uint8_t *buffer, uint32_t len) -{ - return 0; -} - -int encode_message_type(MessageType *messagetype, uint8_t iei, uint8_t *buffer, uint32_t len) -{ - return 0; -} - diff --git a/openair-cn/NAS/COMMON/IES/MessageType.h b/openair-cn/NAS/COMMON/IES/MessageType.h deleted file mode 100644 index 810efb60ca..0000000000 --- a/openair-cn/NAS/COMMON/IES/MessageType.h +++ /dev/null @@ -1,50 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef MESSAGE_TYPE_H_ -#define MESSAGE_TYPE_H_ - -#define MESSAGE_TYPE_MINIMUM_LENGTH 1 -#define MESSAGE_TYPE_MAXIMUM_LENGTH 1 - -typedef uint8_t MessageType; - -int encode_message_type(MessageType *messagetype, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_message_type_xml(MessageType *messagetype, uint8_t iei); - -int decode_message_type(MessageType *messagetype, uint8_t iei, uint8_t *buffer, uint32_t len); - -#endif /* MESSAGE TYPE_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/MobileStationClassmark2.h b/openair-cn/NAS/COMMON/IES/MobileStationClassmark2.h deleted file mode 100644 index d8a9c596a4..0000000000 --- a/openair-cn/NAS/COMMON/IES/MobileStationClassmark2.h +++ /dev/null @@ -1,68 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef MOBILE_STATION_CLASSMARK_2_H_ -#define MOBILE_STATION_CLASSMARK_2_H_ - -#define MOBILE_STATION_CLASSMARK_2_MINIMUM_LENGTH 5 -#define MOBILE_STATION_CLASSMARK_2_MAXIMUM_LENGTH 5 - -typedef struct MobileStationClassmark2_tag { - uint8_t revisionlevel:2; - uint8_t esind:1; - uint8_t a51:1; - uint8_t rfpowercapability:3; - uint8_t pscapability:1; - uint8_t ssscreenindicator:2; - uint8_t smcapability:1; - uint8_t vbs:1; - uint8_t vgcs:1; - uint8_t fc:1; - uint8_t cm3:1; - uint8_t lcsvacap:1; - uint8_t ucs2:1; - uint8_t solsa:1; - uint8_t cmsp:1; - uint8_t a53:1; - uint8_t a52:1; -} MobileStationClassmark2; - -int encode_mobile_station_classmark_2(MobileStationClassmark2 *mobilestationclassmark2, uint8_t iei, uint8_t *buffer, uint32_t len); - -int decode_mobile_station_classmark_2(MobileStationClassmark2 *mobilestationclassmark2, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_mobile_station_classmark_2_xml(MobileStationClassmark2 *mobilestationclassmark2, uint8_t iei); - -#endif /* MOBILE STATION CLASSMARK 2_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/MobileStationClassmark3.c b/openair-cn/NAS/COMMON/IES/MobileStationClassmark3.c deleted file mode 100644 index 84bf06c3c1..0000000000 --- a/openair-cn/NAS/COMMON/IES/MobileStationClassmark3.c +++ /dev/null @@ -1,47 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - - -#include "TLVEncoder.h" -#include "TLVDecoder.h" -#include "MobileStationClassmark3.h" - -int decode_mobile_station_classmark_3(MobileStationClassmark3 *mobilestationclassmark3, uint8_t iei, uint8_t *buffer, uint32_t len) -{ - return 0; -} - -int encode_mobile_station_classmark_3(MobileStationClassmark3 *mobilestationclassmark3, uint8_t iei, uint8_t *buffer, uint32_t len) -{ - return 0; -} - diff --git a/openair-cn/NAS/COMMON/IES/MobileStationClassmark3.h b/openair-cn/NAS/COMMON/IES/MobileStationClassmark3.h deleted file mode 100644 index 504678bbdf..0000000000 --- a/openair-cn/NAS/COMMON/IES/MobileStationClassmark3.h +++ /dev/null @@ -1,52 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef MOBILE_STATION_CLASSMARK_3_H_ -#define MOBILE_STATION_CLASSMARK_3_H_ - -#define MOBILE_STATION_CLASSMARK_3_MINIMUM_LENGTH 1 -#define MOBILE_STATION_CLASSMARK_3_MAXIMUM_LENGTH 1 - -typedef struct { - uint8_t field; -} MobileStationClassmark3; - -int encode_mobile_station_classmark_3(MobileStationClassmark3 *mobilestationclassmark3, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_mobile_station_classmark_3_xml(MobileStationClassmark3 *mobilestationclassmark3, uint8_t iei); - -int decode_mobile_station_classmark_3(MobileStationClassmark3 *mobilestationclassmark3, uint8_t iei, uint8_t *buffer, uint32_t len); - -#endif /* MOBILE STATION CLASSMARK 3_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/MsNetworkCapability.h b/openair-cn/NAS/COMMON/IES/MsNetworkCapability.h deleted file mode 100644 index 7f6d1699da..0000000000 --- a/openair-cn/NAS/COMMON/IES/MsNetworkCapability.h +++ /dev/null @@ -1,52 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef MS_NETWORK_CAPABILITY_H_ -#define MS_NETWORK_CAPABILITY_H_ - -#define MS_NETWORK_CAPABILITY_MINIMUM_LENGTH 3 -#define MS_NETWORK_CAPABILITY_MAXIMUM_LENGTH 10 - -typedef struct MsNetworkCapability_tag { - OctetString msnetworkcapabilityvalue; -} MsNetworkCapability; - -int encode_ms_network_capability(MsNetworkCapability *msnetworkcapability, uint8_t iei, uint8_t *buffer, uint32_t len); - -int decode_ms_network_capability(MsNetworkCapability *msnetworkcapability, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_ms_network_capability_xml(MsNetworkCapability *msnetworkcapability, uint8_t iei); - -#endif /* MS NETWORK CAPABILITY_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/MsNetworkFeatureSupport.h b/openair-cn/NAS/COMMON/IES/MsNetworkFeatureSupport.h deleted file mode 100644 index 334430de1a..0000000000 --- a/openair-cn/NAS/COMMON/IES/MsNetworkFeatureSupport.h +++ /dev/null @@ -1,53 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef MS_NETWORK_FEATURE_SUPPORT_H_ -#define MS_NETWORK_FEATURE_SUPPORT_H_ - -#define MS_NETWORK_FEATURE_SUPPORT_MINIMUM_LENGTH 3 -#define MS_NETWORK_FEATURE_SUPPORT_MAXIMUM_LENGTH 10 - -typedef struct MsNetworkFeatureSupport_tag { - uint8_t spare_bits:3; - uint8_t extended_periodic_timers:1; -} MsNetworkFeatureSupport; - -int encode_ms_network_feature_support(MsNetworkFeatureSupport *msnetworkfeaturesupport, uint8_t iei, uint8_t *buffer, uint32_t len); - -int decode_ms_network_feature_support(MsNetworkFeatureSupport *msnetworkfeaturesupport, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_ms_network_feature_support_xml(MsNetworkFeatureSupport *msnetworkfeaturesupport, uint8_t iei); - -#endif /* MS NETWORK CAPABILITY_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/NasKeySetIdentifier.h b/openair-cn/NAS/COMMON/IES/NasKeySetIdentifier.h deleted file mode 100644 index f2a09c6864..0000000000 --- a/openair-cn/NAS/COMMON/IES/NasKeySetIdentifier.h +++ /dev/null @@ -1,60 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef NAS_KEY_SET_IDENTIFIER_H_ -#define NAS_KEY_SET_IDENTIFIER_H_ - -#define NAS_KEY_SET_IDENTIFIER_MINIMUM_LENGTH 1 -#define NAS_KEY_SET_IDENTIFIER_MAXIMUM_LENGTH 1 - -typedef struct NasKeySetIdentifier_tag { -#define NAS_KEY_SET_IDENTIFIER_NATIVE 0 -#define NAS_KEY_SET_IDENTIFIER_MAPPED 1 - uint8_t tsc:1; -#define NAS_KEY_SET_IDENTIFIER_NOT_AVAILABLE 0b111 - uint8_t naskeysetidentifier:3; -} NasKeySetIdentifier; - -int encode_nas_key_set_identifier(NasKeySetIdentifier *naskeysetidentifier, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_nas_key_set_identifier_xml(NasKeySetIdentifier *naskeysetidentifier, uint8_t iei); - -uint8_t encode_u8_nas_key_set_identifier(NasKeySetIdentifier *naskeysetidentifier); - -int decode_nas_key_set_identifier(NasKeySetIdentifier *naskeysetidentifier, uint8_t iei, uint8_t *buffer, uint32_t len); - -int decode_u8_nas_key_set_identifier(NasKeySetIdentifier *naskeysetidentifier, uint8_t iei, uint8_t value, uint32_t len); - -#endif /* NAS KEY SET IDENTIFIER_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/NasMessageContainer.h b/openair-cn/NAS/COMMON/IES/NasMessageContainer.h deleted file mode 100644 index 35d3d4d58d..0000000000 --- a/openair-cn/NAS/COMMON/IES/NasMessageContainer.h +++ /dev/null @@ -1,52 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef NAS_MESSAGE_CONTAINER_H_ -#define NAS_MESSAGE_CONTAINER_H_ - -#define NAS_MESSAGE_CONTAINER_MINIMUM_LENGTH 4 -#define NAS_MESSAGE_CONTAINER_MAXIMUM_LENGTH 253 - -typedef struct NasMessageContainer_tag { - OctetString nasmessagecontainercontents; -} NasMessageContainer; - -int encode_nas_message_container(NasMessageContainer *nasmessagecontainer, uint8_t iei, uint8_t *buffer, uint32_t len); - -int decode_nas_message_container(NasMessageContainer *nasmessagecontainer, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_nas_message_container_xml(NasMessageContainer *nasmessagecontainer, uint8_t iei); - -#endif /* NAS MESSAGE CONTAINER_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/NasRequestType.h b/openair-cn/NAS/COMMON/IES/NasRequestType.h deleted file mode 100644 index 42d2627799..0000000000 --- a/openair-cn/NAS/COMMON/IES/NasRequestType.h +++ /dev/null @@ -1,58 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef NAS_REQUEST_TYPE_H_ -#define NAS_REQUEST_TYPE_H_ - -#define REQUEST_TYPE_MINIMUM_LENGTH 1 -#define REQUEST_TYPE_MAXIMUM_LENGTH 1 - -#define REQUEST_TYPE_INITIAL_REQUEST 0b001 -#define REQUEST_TYPE_HANDOVER 0b010 -#define REQUEST_TYPE_UNUSED 0b011 -#define REQUEST_TYPE_EMERGENCY 0b100 -typedef uint8_t RequestType; - -int encode_request_type(RequestType *requesttype, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_request_type_xml(RequestType *requesttype, uint8_t iei); - -uint8_t encode_u8_request_type(RequestType *requesttype); - -int decode_request_type(RequestType *requesttype, uint8_t iei, uint8_t *buffer, uint32_t len); - -int decode_u8_request_type(RequestType *requesttype, uint8_t iei, uint8_t value, uint32_t len); - -#endif /* NAS_REQUEST_TYPE_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/NasSecurityAlgorithms.h b/openair-cn/NAS/COMMON/IES/NasSecurityAlgorithms.h deleted file mode 100644 index 8125e0adf8..0000000000 --- a/openair-cn/NAS/COMMON/IES/NasSecurityAlgorithms.h +++ /dev/null @@ -1,69 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef NAS_SECURITY_ALGORITHMS_H_ -#define NAS_SECURITY_ALGORITHMS_H_ - -#define NAS_SECURITY_ALGORITHMS_MINIMUM_LENGTH 1 -#define NAS_SECURITY_ALGORITHMS_MAXIMUM_LENGTH 2 - -typedef struct NasSecurityAlgorithms_tag { -#define NAS_SECURITY_ALGORITHMS_EEA0 0b000 -#define NAS_SECURITY_ALGORITHMS_EEA1 0b001 -#define NAS_SECURITY_ALGORITHMS_EEA2 0b010 -#define NAS_SECURITY_ALGORITHMS_EEA3 0b011 -#define NAS_SECURITY_ALGORITHMS_EEA4 0b100 -#define NAS_SECURITY_ALGORITHMS_EEA5 0b101 -#define NAS_SECURITY_ALGORITHMS_EEA6 0b110 -#define NAS_SECURITY_ALGORITHMS_EEA7 0b111 - uint8_t typeofcipheringalgorithm:3; -#define NAS_SECURITY_ALGORITHMS_EIA0 0b000 -#define NAS_SECURITY_ALGORITHMS_EIA1 0b001 -#define NAS_SECURITY_ALGORITHMS_EIA2 0b010 -#define NAS_SECURITY_ALGORITHMS_EIA3 0b011 -#define NAS_SECURITY_ALGORITHMS_EIA4 0b100 -#define NAS_SECURITY_ALGORITHMS_EIA5 0b101 -#define NAS_SECURITY_ALGORITHMS_EIA6 0b110 -#define NAS_SECURITY_ALGORITHMS_EIA7 0b111 - uint8_t typeofintegrityalgorithm:3; -} NasSecurityAlgorithms; - -int encode_nas_security_algorithms(NasSecurityAlgorithms *nassecurityalgorithms, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_nas_security_algorithms_xml(NasSecurityAlgorithms *nassecurityalgorithms, uint8_t iei); - -int decode_nas_security_algorithms(NasSecurityAlgorithms *nassecurityalgorithms, uint8_t iei, uint8_t *buffer, uint32_t len); - -#endif /* NAS SECURITY ALGORITHMS_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/NetworkName.h b/openair-cn/NAS/COMMON/IES/NetworkName.h deleted file mode 100644 index d627605f61..0000000000 --- a/openair-cn/NAS/COMMON/IES/NetworkName.h +++ /dev/null @@ -1,55 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef NETWORK_NAME_H_ -#define NETWORK_NAME_H_ - -#define NETWORK_NAME_MINIMUM_LENGTH 3 -#define NETWORK_NAME_MAXIMUM_LENGTH 255 - -typedef struct NetworkName_tag { - uint8_t codingscheme:3; - uint8_t addci:1; - uint8_t numberofsparebitsinlastoctet:3; - OctetString textstring; -} NetworkName; - -int encode_network_name(NetworkName *networkname, uint8_t iei, uint8_t *buffer, uint32_t len); - -int decode_network_name(NetworkName *networkname, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_network_name_xml(NetworkName *networkname, uint8_t iei); - -#endif /* NETWORK NAME_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/Nonce.c b/openair-cn/NAS/COMMON/IES/Nonce.c deleted file mode 100644 index a274c2b8d9..0000000000 --- a/openair-cn/NAS/COMMON/IES/Nonce.c +++ /dev/null @@ -1,84 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - - -#include "TLVEncoder.h" -#include "TLVDecoder.h" -#include "Nonce.h" - -int decode_nonce(Nonce *nonce, uint8_t iei, uint8_t *buffer, uint32_t len) -{ - int decoded = 0; - - if (iei > 0) { - CHECK_IEI_DECODER(iei, *buffer); - decoded++; - } - - //IES_DECODE_U32(*nonce, *(buffer + decoded)); - IES_DECODE_U32(buffer, decoded, *nonce); -#if defined (NAS_DEBUG) - dump_nonce_xml(nonce, iei); -#endif - return decoded; -} - -int encode_nonce(Nonce *nonce, uint8_t iei, uint8_t *buffer, uint32_t len) -{ - uint32_t encoded = 0; - /* Checking IEI and pointer */ - CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, NONCE_MINIMUM_LENGTH, len); -#if defined (NAS_DEBUG) - dump_nonce_xml(nonce, iei); -#endif - - if (iei > 0) { - *buffer = iei; - encoded++; - } - - IES_ENCODE_U32(buffer, encoded, *nonce); - return encoded; -} - -void dump_nonce_xml(Nonce *nonce, uint8_t iei) -{ - printf("\n"); - - if (iei > 0) - /* Don't display IEI if = 0 */ - printf(" 0x%X\n", iei); - - printf(" %u\n", *nonce); - printf("\n"); -} - diff --git a/openair-cn/NAS/COMMON/IES/Nonce.h b/openair-cn/NAS/COMMON/IES/Nonce.h deleted file mode 100644 index b37b35a7f3..0000000000 --- a/openair-cn/NAS/COMMON/IES/Nonce.h +++ /dev/null @@ -1,50 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef NONCE_H_ -#define NONCE_H_ - -#define NONCE_MINIMUM_LENGTH 5 -#define NONCE_MAXIMUM_LENGTH 5 - -typedef uint32_t Nonce; - -int encode_nonce(Nonce *nonce, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_nonce_xml(Nonce *nonce, uint8_t iei); - -int decode_nonce(Nonce *nonce, uint8_t iei, uint8_t *buffer, uint32_t len); - -#endif /* NONCE_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/PTmsiSignature.h b/openair-cn/NAS/COMMON/IES/PTmsiSignature.h deleted file mode 100644 index 9f063dd461..0000000000 --- a/openair-cn/NAS/COMMON/IES/PTmsiSignature.h +++ /dev/null @@ -1,52 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef P_TMSI_SIGNATURE_H_ -#define P_TMSI_SIGNATURE_H_ - -#define P_TMSI_SIGNATURE_MINIMUM_LENGTH 4 -#define P_TMSI_SIGNATURE_MAXIMUM_LENGTH 4 - -typedef struct PTmsiSignature_tag { - OctetString ptmsisignaturevalue; -} PTmsiSignature; - -int encode_p_tmsi_signature(PTmsiSignature *ptmsisignature, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_p_tmsi_signature_xml(PTmsiSignature *ptmsisignature, uint8_t iei); - -int decode_p_tmsi_signature(PTmsiSignature *ptmsisignature, uint8_t iei, uint8_t *buffer, uint32_t len); - -#endif /* P TMSI SIGNATURE_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/PacketFlowIdentifier.h b/openair-cn/NAS/COMMON/IES/PacketFlowIdentifier.h deleted file mode 100644 index 26c0e6467c..0000000000 --- a/openair-cn/NAS/COMMON/IES/PacketFlowIdentifier.h +++ /dev/null @@ -1,50 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef PACKET_FLOW_IDENTIFIER_H_ -#define PACKET_FLOW_IDENTIFIER_H_ - -#define PACKET_FLOW_IDENTIFIER_MINIMUM_LENGTH 3 -#define PACKET_FLOW_IDENTIFIER_MAXIMUM_LENGTH 3 - -typedef uint8_t PacketFlowIdentifier; - -int encode_packet_flow_identifier(PacketFlowIdentifier *packetflowidentifier, uint8_t iei, uint8_t *buffer, uint32_t len); - -int decode_packet_flow_identifier(PacketFlowIdentifier *packetflowidentifier, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_packet_flow_identifier_xml(PacketFlowIdentifier *packetflowidentifier, uint8_t iei); - -#endif /* PACKET FLOW IDENTIFIER_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/PagingIdentity.c b/openair-cn/NAS/COMMON/IES/PagingIdentity.c deleted file mode 100644 index 2c5a05a45a..0000000000 --- a/openair-cn/NAS/COMMON/IES/PagingIdentity.c +++ /dev/null @@ -1,86 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - - -#include "TLVEncoder.h" -#include "TLVDecoder.h" -#include "PagingIdentity.h" - -int decode_paging_identity(PagingIdentity *pagingidentity, uint8_t iei, uint8_t *buffer, uint32_t len) -{ - int decoded = 0; - - if (iei > 0) { - CHECK_IEI_DECODER(iei, *buffer); - decoded++; - } - - *pagingidentity = *buffer & 0x1; - decoded++; -#if defined (NAS_DEBUG) - dump_paging_identity_xml(pagingidentity, iei); -#endif - return decoded; -} - -int encode_paging_identity(PagingIdentity *pagingidentity, uint8_t iei, uint8_t *buffer, uint32_t len) -{ - uint32_t encoded = 0; - /* Checking IEI and pointer */ - CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, PAGING_IDENTITY_MINIMUM_LENGTH, len); -#if defined (NAS_DEBUG) - dump_paging_identity_xml(pagingidentity, iei); -#endif - - if (iei > 0) { - *buffer = iei; - encoded++; - } - - *(buffer + encoded) = 0x00 | - (*pagingidentity & 0x1); - encoded++; - return encoded; -} - -void dump_paging_identity_xml(PagingIdentity *pagingidentity, uint8_t iei) -{ - printf("\n"); - - if (iei > 0) - /* Don't display IEI if = 0 */ - printf(" 0x%X\n", iei); - - printf(" %u\n", *pagingidentity); - printf("\n"); -} - diff --git a/openair-cn/NAS/COMMON/IES/PagingIdentity.h b/openair-cn/NAS/COMMON/IES/PagingIdentity.h deleted file mode 100644 index a817ae116f..0000000000 --- a/openair-cn/NAS/COMMON/IES/PagingIdentity.h +++ /dev/null @@ -1,50 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef PAGING_IDENTITY_H_ -#define PAGING_IDENTITY_H_ - -#define PAGING_IDENTITY_MINIMUM_LENGTH 2 -#define PAGING_IDENTITY_MAXIMUM_LENGTH 2 - -typedef uint8_t PagingIdentity; - -int encode_paging_identity(PagingIdentity *pagingidentity, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_paging_identity_xml(PagingIdentity *pagingidentity, uint8_t iei); - -int decode_paging_identity(PagingIdentity *pagingidentity, uint8_t iei, uint8_t *buffer, uint32_t len); - -#endif /* PAGING IDENTITY_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/PdnAddress.h b/openair-cn/NAS/COMMON/IES/PdnAddress.h deleted file mode 100644 index 5b923b2310..0000000000 --- a/openair-cn/NAS/COMMON/IES/PdnAddress.h +++ /dev/null @@ -1,56 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef PDN_ADDRESS_H_ -#define PDN_ADDRESS_H_ - -#define PDN_ADDRESS_MINIMUM_LENGTH 7 -#define PDN_ADDRESS_MAXIMUM_LENGTH 15 - -typedef struct PdnAddress_tag { -#define PDN_VALUE_TYPE_IPV4 0b001 -#define PDN_VALUE_TYPE_IPV6 0b010 -#define PDN_VALUE_TYPE_IPV4V6 0b011 - uint8_t pdntypevalue:3; - OctetString pdnaddressinformation; -} PdnAddress; - -int encode_pdn_address(PdnAddress *pdnaddress, uint8_t iei, uint8_t *buffer, uint32_t len); - -int decode_pdn_address(PdnAddress *pdnaddress, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_pdn_address_xml(PdnAddress *pdnaddress, uint8_t iei); - -#endif /* PDN ADDRESS_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/PdnType.h b/openair-cn/NAS/COMMON/IES/PdnType.h deleted file mode 100644 index c3a3ac9133..0000000000 --- a/openair-cn/NAS/COMMON/IES/PdnType.h +++ /dev/null @@ -1,58 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef PDN_TYPE_H_ -#define PDN_TYPE_H_ - -#define PDN_TYPE_MINIMUM_LENGTH 1 -#define PDN_TYPE_MAXIMUM_LENGTH 1 - -#define PDN_TYPE_IPV4 0b001 -#define PDN_TYPE_IPV6 0b010 -#define PDN_TYPE_IPV4V6 0b011 -#define PDN_TYPE_UNUSED 0b100 -typedef uint8_t PdnType; - -int encode_pdn_type(PdnType *pdntype, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_pdn_type_xml(PdnType *pdntype, uint8_t iei); - -uint8_t encode_u8_pdn_type(PdnType *pdntype); - -int decode_pdn_type(PdnType *pdntype, uint8_t iei, uint8_t *buffer, uint32_t len); - -int decode_u8_pdn_type(PdnType *pdntype, uint8_t iei, uint8_t value, uint32_t len); - -#endif /* PDN TYPE_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/PlmnList.h b/openair-cn/NAS/COMMON/IES/PlmnList.h deleted file mode 100644 index 7c2247381f..0000000000 --- a/openair-cn/NAS/COMMON/IES/PlmnList.h +++ /dev/null @@ -1,57 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef PLMN_LIST_H_ -#define PLMN_LIST_H_ - -#define PLMN_LIST_MINIMUM_LENGTH 5 -#define PLMN_LIST_MAXIMUM_LENGTH 47 - -typedef struct PlmnList_tag { - uint8_t mccdigit2:4; - uint8_t mccdigit1:4; - uint8_t mncdigit3:4; - uint8_t mccdigit3:4; - uint8_t mncdigit2:4; - uint8_t mncdigit1:4; -} PlmnList; - -int encode_plmn_list(PlmnList *plmnlist, uint8_t iei, uint8_t *buffer, uint32_t len); - -int decode_plmn_list(PlmnList *plmnlist, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_plmn_list_xml(PlmnList *plmnlist, uint8_t iei); - -#endif /* PLMN LIST_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/ProcedureTransactionIdentity.c b/openair-cn/NAS/COMMON/IES/ProcedureTransactionIdentity.c deleted file mode 100644 index 92a0f3e502..0000000000 --- a/openair-cn/NAS/COMMON/IES/ProcedureTransactionIdentity.c +++ /dev/null @@ -1,47 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - - -#include "TLVEncoder.h" -#include "TLVDecoder.h" -#include "ProcedureTransactionIdentity.h" - -int decode_procedure_transaction_identity(ProcedureTransactionIdentity *proceduretransactionidentity, uint8_t iei, uint8_t *buffer, uint32_t len) -{ - return 0; -} - -int encode_procedure_transaction_identity(ProcedureTransactionIdentity *proceduretransactionidentity, uint8_t iei, uint8_t *buffer, uint32_t len) -{ - return 0; -} - diff --git a/openair-cn/NAS/COMMON/IES/ProcedureTransactionIdentity.h b/openair-cn/NAS/COMMON/IES/ProcedureTransactionIdentity.h deleted file mode 100644 index 28eabb6a15..0000000000 --- a/openair-cn/NAS/COMMON/IES/ProcedureTransactionIdentity.h +++ /dev/null @@ -1,53 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef PROCEDURE_TRANSACTION_IDENTITY_H_ -#define PROCEDURE_TRANSACTION_IDENTITY_H_ - -#define PROCEDURE_TRANSACTION_IDENTITY_MINIMUM_LENGTH 1 -#define PROCEDURE_TRANSACTION_IDENTITY_MAXIMUM_LENGTH 1 - -#define PROCEDURE_TRANSACTION_IDENTITY_UNASSIGNED 0 -#define PROCEDURE_TRANSACTION_IDENTITY_FIRST 1 -#define PROCEDURE_TRANSACTION_IDENTITY_LAST 254 -typedef uint8_t ProcedureTransactionIdentity; - -int encode_procedure_transaction_identity(ProcedureTransactionIdentity *proceduretransactionidentity, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_procedure_transaction_identity_xml(ProcedureTransactionIdentity *proceduretransactionidentity, uint8_t iei); - -int decode_procedure_transaction_identity(ProcedureTransactionIdentity *proceduretransactionidentity, uint8_t iei, uint8_t *buffer, uint32_t len); - -#endif /* PROCEDURE TRANSACTION IDENTITY_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/ProtocolDiscriminator.c b/openair-cn/NAS/COMMON/IES/ProtocolDiscriminator.c deleted file mode 100644 index b87ddb490a..0000000000 --- a/openair-cn/NAS/COMMON/IES/ProtocolDiscriminator.c +++ /dev/null @@ -1,47 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - - -#include "TLVEncoder.h" -#include "TLVDecoder.h" -#include "ProtocolDiscriminator.h" - -int decode_protocol_discriminator(ProtocolDiscriminator *protocoldiscriminator, uint8_t iei, uint8_t *buffer, uint32_t len) -{ - return 0; -} - -int encode_protocol_discriminator(ProtocolDiscriminator *protocoldiscriminator, uint8_t iei, uint8_t *buffer, uint32_t len) -{ - return 0; -} - diff --git a/openair-cn/NAS/COMMON/IES/ProtocolDiscriminator.h b/openair-cn/NAS/COMMON/IES/ProtocolDiscriminator.h deleted file mode 100644 index 3945556a74..0000000000 --- a/openair-cn/NAS/COMMON/IES/ProtocolDiscriminator.h +++ /dev/null @@ -1,50 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef PROTOCOL_DISCRIMINATOR_H_ -#define PROTOCOL_DISCRIMINATOR_H_ - -#define PROTOCOL_DISCRIMINATOR_MINIMUM_LENGTH 1 -#define PROTOCOL_DISCRIMINATOR_MAXIMUM_LENGTH 1 - -typedef uint8_t ProtocolDiscriminator; - -int encode_protocol_discriminator(ProtocolDiscriminator *protocoldiscriminator, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_protocol_discriminator_xml(ProtocolDiscriminator *protocoldiscriminator, uint8_t iei); - -int decode_protocol_discriminator(ProtocolDiscriminator *protocoldiscriminator, uint8_t iei, uint8_t *buffer, uint32_t len); - -#endif /* PROTOCOL DISCRIMINATOR_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/QualityOfService.h b/openair-cn/NAS/COMMON/IES/QualityOfService.h deleted file mode 100644 index 193eb6c4e2..0000000000 --- a/openair-cn/NAS/COMMON/IES/QualityOfService.h +++ /dev/null @@ -1,70 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef QUALITY_OF_SERVICE_H_ -#define QUALITY_OF_SERVICE_H_ - -#define QUALITY_OF_SERVICE_MINIMUM_LENGTH 14 -#define QUALITY_OF_SERVICE_MAXIMUM_LENGTH 14 - -typedef struct QualityOfService_tag { - uint8_t delayclass:3; - uint8_t reliabilityclass:3; - uint8_t peakthroughput:4; - uint8_t precedenceclass:3; - uint8_t meanthroughput:5; - uint8_t trafficclass:3; - uint8_t deliveryorder:2; - uint8_t deliveryoferroneoussdu:3; - uint8_t maximumsdusize; - uint8_t maximumbitrateuplink; - uint8_t maximumbitratedownlink; - uint8_t residualber:4; - uint8_t sduratioerror:4; - uint8_t transferdelay:6; - uint8_t traffichandlingpriority:2; - uint8_t guaranteedbitrateuplink; - uint8_t guaranteedbitratedownlink; - uint8_t signalingindication:1; - uint8_t sourcestatisticsdescriptor:4; -} QualityOfService; - -int encode_quality_of_service(QualityOfService *qualityofservice, uint8_t iei, uint8_t *buffer, uint32_t len); - -int decode_quality_of_service(QualityOfService *qualityofservice, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_quality_of_service_xml(QualityOfService *qualityofservice, uint8_t iei); - -#endif /* QUALITY OF SERVICE_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/RadioPriority.h b/openair-cn/NAS/COMMON/IES/RadioPriority.h deleted file mode 100644 index e079247598..0000000000 --- a/openair-cn/NAS/COMMON/IES/RadioPriority.h +++ /dev/null @@ -1,54 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef RADIO_PRIORITY_H_ -#define RADIO_PRIORITY_H_ - -#define RADIO_PRIORITY_MINIMUM_LENGTH 1 -#define RADIO_PRIORITY_MAXIMUM_LENGTH 1 - -typedef uint8_t RadioPriority; - -int encode_radio_priority(RadioPriority *radiopriority, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_radio_priority_xml(RadioPriority *radiopriority, uint8_t iei); - -uint8_t encode_u8_radio_priority(RadioPriority *radiopriority); - -int decode_radio_priority(RadioPriority *radiopriority, uint8_t iei, uint8_t *buffer, uint32_t len); - -int decode_u8_radio_priority(RadioPriority *radiopriority, uint8_t iei, uint8_t value, uint32_t len); - -#endif /* RADIO PRIORITY_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/SecurityHeaderType.c b/openair-cn/NAS/COMMON/IES/SecurityHeaderType.c deleted file mode 100644 index 5d80c562f3..0000000000 --- a/openair-cn/NAS/COMMON/IES/SecurityHeaderType.c +++ /dev/null @@ -1,47 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - - -#include "TLVEncoder.h" -#include "TLVDecoder.h" -#include "SecurityHeaderType.h" - -int decode_security_header_type(SecurityHeaderType *securityheadertype, uint8_t iei, uint8_t *buffer, uint32_t len) -{ - return 0; -} - -int encode_security_header_type(SecurityHeaderType *securityheadertype, uint8_t iei, uint8_t *buffer, uint32_t len) -{ - return 0; -} - diff --git a/openair-cn/NAS/COMMON/IES/SecurityHeaderType.h b/openair-cn/NAS/COMMON/IES/SecurityHeaderType.h deleted file mode 100644 index 0447e857db..0000000000 --- a/openair-cn/NAS/COMMON/IES/SecurityHeaderType.h +++ /dev/null @@ -1,50 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef SECURITY_HEADER_TYPE_H_ -#define SECURITY_HEADER_TYPE_H_ - -#define SECURITY_HEADER_TYPE_MINIMUM_LENGTH 1 -#define SECURITY_HEADER_TYPE_MAXIMUM_LENGTH 1 - -typedef uint8_t SecurityHeaderType; - -int encode_security_header_type(SecurityHeaderType *securityheadertype, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_security_header_type_xml(SecurityHeaderType *securityheadertype, uint8_t iei); - -int decode_security_header_type(SecurityHeaderType *securityheadertype, uint8_t iei, uint8_t *buffer, uint32_t len); - -#endif /* SECURITY HEADER TYPE_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/ServiceType.h b/openair-cn/NAS/COMMON/IES/ServiceType.h deleted file mode 100644 index 44e9084140..0000000000 --- a/openair-cn/NAS/COMMON/IES/ServiceType.h +++ /dev/null @@ -1,54 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef SERVICE_TYPE_H_ -#define SERVICE_TYPE_H_ - -#define SERVICE_TYPE_MINIMUM_LENGTH 1 -#define SERVICE_TYPE_MAXIMUM_LENGTH 1 - -typedef uint8_t ServiceType; - -int encode_service_type(ServiceType *servicetype, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_service_type_xml(ServiceType *servicetype, uint8_t iei); - -uint8_t encode_u8_service_type(ServiceType *servicetype); - -int decode_service_type(ServiceType *servicetype, uint8_t iei, uint8_t *buffer, uint32_t len); - -int decode_u8_service_type(ServiceType *servicetype, uint8_t iei, uint8_t value, uint32_t len); - -#endif /* SERVICE TYPE_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/ShortMac.c b/openair-cn/NAS/COMMON/IES/ShortMac.c deleted file mode 100644 index 9cebc07ca8..0000000000 --- a/openair-cn/NAS/COMMON/IES/ShortMac.c +++ /dev/null @@ -1,84 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - - -#include "TLVEncoder.h" -#include "TLVDecoder.h" -#include "ShortMac.h" - -int decode_short_mac(ShortMac *shortmac, uint8_t iei, uint8_t *buffer, uint32_t len) -{ - int decoded = 0; - - if (iei > 0) { - CHECK_IEI_DECODER(iei, *buffer); - decoded++; - } - - //IES_DECODE_U16(*shortmac, *(buffer + decoded)); - IES_DECODE_U16(buffer, decoded, *shortmac); -#if defined (NAS_DEBUG) - dump_short_mac_xml(shortmac, iei); -#endif - return decoded; -} - -int encode_short_mac(ShortMac *shortmac, uint8_t iei, uint8_t *buffer, uint32_t len) -{ - uint32_t encoded = 0; - /* Checking IEI and pointer */ - CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, SHORT_MAC_MINIMUM_LENGTH, len); -#if defined (NAS_DEBUG) - dump_short_mac_xml(shortmac, iei); -#endif - - if (iei > 0) { - *buffer = iei; - encoded++; - } - - IES_ENCODE_U16(buffer, encoded, *shortmac); - return encoded; -} - -void dump_short_mac_xml(ShortMac *shortmac, uint8_t iei) -{ - printf("\n"); - - if (iei > 0) - /* Don't display IEI if = 0 */ - printf(" 0x%X\n", iei); - - printf(" %u\n", *shortmac); - printf("\n"); -} - diff --git a/openair-cn/NAS/COMMON/IES/ShortMac.h b/openair-cn/NAS/COMMON/IES/ShortMac.h deleted file mode 100644 index b6152bd027..0000000000 --- a/openair-cn/NAS/COMMON/IES/ShortMac.h +++ /dev/null @@ -1,50 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef SHORT_MAC_H_ -#define SHORT_MAC_H_ - -#define SHORT_MAC_MINIMUM_LENGTH 3 -#define SHORT_MAC_MAXIMUM_LENGTH 3 - -typedef uint16_t ShortMac; - -int encode_short_mac(ShortMac *shortmac, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_short_mac_xml(ShortMac *shortmac, uint8_t iei); - -int decode_short_mac(ShortMac *shortmac, uint8_t iei, uint8_t *buffer, uint32_t len); - -#endif /* SHORT MAC_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/SsCode.c b/openair-cn/NAS/COMMON/IES/SsCode.c deleted file mode 100644 index 256a67e0fc..0000000000 --- a/openair-cn/NAS/COMMON/IES/SsCode.c +++ /dev/null @@ -1,85 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - - -#include "TLVEncoder.h" -#include "TLVDecoder.h" -#include "SsCode.h" - -int decode_ss_code(SsCode *sscode, uint8_t iei, uint8_t *buffer, uint32_t len) -{ - int decoded = 0; - - if (iei > 0) { - CHECK_IEI_DECODER(iei, *buffer); - decoded++; - } - - *sscode = *(buffer + decoded); - decoded++; -#if defined (NAS_DEBUG) - dump_ss_code_xml(sscode, iei); -#endif - return decoded; -} - -int encode_ss_code(SsCode *sscode, uint8_t iei, uint8_t *buffer, uint32_t len) -{ - uint32_t encoded = 0; - /* Checking IEI and pointer */ - CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, SS_CODE_MINIMUM_LENGTH, len); -#if defined (NAS_DEBUG) - dump_ss_code_xml(sscode, iei); -#endif - - if (iei > 0) { - *buffer = iei; - encoded++; - } - - *(buffer + encoded) = *sscode; - encoded++; - return encoded; -} - -void dump_ss_code_xml(SsCode *sscode, uint8_t iei) -{ - printf("\n"); - - if (iei > 0) - /* Don't display IEI if = 0 */ - printf(" 0x%X\n", iei); - - printf(" %u\n", *sscode); - printf("\n"); -} - diff --git a/openair-cn/NAS/COMMON/IES/SsCode.h b/openair-cn/NAS/COMMON/IES/SsCode.h deleted file mode 100644 index f53e5e2dc0..0000000000 --- a/openair-cn/NAS/COMMON/IES/SsCode.h +++ /dev/null @@ -1,50 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef SS_CODE_H_ -#define SS_CODE_H_ - -#define SS_CODE_MINIMUM_LENGTH 2 -#define SS_CODE_MAXIMUM_LENGTH 2 - -typedef uint8_t SsCode; - -int encode_ss_code(SsCode *sscode, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_ss_code_xml(SsCode *sscode, uint8_t iei); - -int decode_ss_code(SsCode *sscode, uint8_t iei, uint8_t *buffer, uint32_t len); - -#endif /* SS CODE_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/SupportedCodecList.h b/openair-cn/NAS/COMMON/IES/SupportedCodecList.h deleted file mode 100644 index a9be6640ff..0000000000 --- a/openair-cn/NAS/COMMON/IES/SupportedCodecList.h +++ /dev/null @@ -1,54 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef SUPPORTED_CODEC_LIST_H_ -#define SUPPORTED_CODEC_LIST_H_ - -#define SUPPORTED_CODEC_LIST_MINIMUM_LENGTH 5 -#define SUPPORTED_CODEC_LIST_MAXIMUM_LENGTH 5 - -typedef struct SupportedCodecList_tag { - uint8_t systemidentification; - uint8_t lengthofbitmap; - uint16_t codecbitmap; -} SupportedCodecList; - -int encode_supported_codec_list(SupportedCodecList *supportedcodeclist, uint8_t iei, uint8_t *buffer, uint32_t len); - -int decode_supported_codec_list(SupportedCodecList *supportedcodeclist, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_supported_codec_list_xml(SupportedCodecList *supportedcodeclist, uint8_t iei); - -#endif /* SUPPORTED CODEC LIST_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/TimeZone.c b/openair-cn/NAS/COMMON/IES/TimeZone.c deleted file mode 100644 index 332abb54bc..0000000000 --- a/openair-cn/NAS/COMMON/IES/TimeZone.c +++ /dev/null @@ -1,85 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - - -#include "TLVEncoder.h" -#include "TLVDecoder.h" -#include "TimeZone.h" - -int decode_time_zone(TimeZone *timezone, uint8_t iei, uint8_t *buffer, uint32_t len) -{ - int decoded = 0; - - if (iei > 0) { - CHECK_IEI_DECODER(iei, *buffer); - decoded++; - } - - *timezone = *(buffer + decoded); - decoded++; -#if defined (NAS_DEBUG) - dump_time_zone_xml(timezone, iei); -#endif - return decoded; -} - -int encode_time_zone(TimeZone *timezone, uint8_t iei, uint8_t *buffer, uint32_t len) -{ - uint32_t encoded = 0; - /* Checking IEI and pointer */ - CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, TIME_ZONE_MINIMUM_LENGTH, len); -#if defined (NAS_DEBUG) - dump_time_zone_xml(timezone, iei); -#endif - - if (iei > 0) { - *buffer = iei; - encoded++; - } - - *(buffer + encoded) = *timezone; - encoded++; - return encoded; -} - -void dump_time_zone_xml(TimeZone *timezone, uint8_t iei) -{ - printf("\n"); -} - diff --git a/openair-cn/NAS/COMMON/IES/TimeZone.h b/openair-cn/NAS/COMMON/IES/TimeZone.h deleted file mode 100644 index 812477be4d..0000000000 --- a/openair-cn/NAS/COMMON/IES/TimeZone.h +++ /dev/null @@ -1,50 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef TIME_ZONE_H_ -#define TIME_ZONE_H_ - -#define TIME_ZONE_MINIMUM_LENGTH 2 -#define TIME_ZONE_MAXIMUM_LENGTH 2 - -typedef uint8_t TimeZone; - -int encode_time_zone(TimeZone *timezone, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_time_zone_xml(TimeZone *timezone, uint8_t iei); - -int decode_time_zone(TimeZone *timezone, uint8_t iei, uint8_t *buffer, uint32_t len); - -#endif /* TIME ZONE_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/TimeZoneAndTime.h b/openair-cn/NAS/COMMON/IES/TimeZoneAndTime.h deleted file mode 100644 index 4665b84316..0000000000 --- a/openair-cn/NAS/COMMON/IES/TimeZoneAndTime.h +++ /dev/null @@ -1,58 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef TIME_ZONE_AND_TIME_H_ -#define TIME_ZONE_AND_TIME_H_ - -#define TIME_ZONE_AND_TIME_MINIMUM_LENGTH 8 -#define TIME_ZONE_AND_TIME_MAXIMUM_LENGTH 8 - -typedef struct TimeZoneAndTime_tag { - uint8_t year; - uint8_t month; - uint8_t day; - uint8_t hour; - uint8_t minute; - uint8_t second; - uint8_t timezone; -} TimeZoneAndTime; - -int encode_time_zone_and_time(TimeZoneAndTime *timezoneandtime, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_time_zone_and_time_xml(TimeZoneAndTime *timezoneandtime, uint8_t iei); - -int decode_time_zone_and_time(TimeZoneAndTime *timezoneandtime, uint8_t iei, uint8_t *buffer, uint32_t len); - -#endif /* TIME ZONE AND TIME_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/TmsiStatus.h b/openair-cn/NAS/COMMON/IES/TmsiStatus.h deleted file mode 100644 index c6c7e87a7d..0000000000 --- a/openair-cn/NAS/COMMON/IES/TmsiStatus.h +++ /dev/null @@ -1,54 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef TMSI_STATUS_H_ -#define TMSI_STATUS_H_ - -#define TMSI_STATUS_MINIMUM_LENGTH 1 -#define TMSI_STATUS_MAXIMUM_LENGTH 1 - -typedef uint8_t TmsiStatus; - -int encode_tmsi_status(TmsiStatus *tmsistatus, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_tmsi_status_xml(TmsiStatus *tmsistatus, uint8_t iei); - -uint8_t encode_u8_tmsi_status(TmsiStatus *tmsistatus); - -int decode_tmsi_status(TmsiStatus *tmsistatus, uint8_t iei, uint8_t *buffer, uint32_t len); - -int decode_u8_tmsi_status(TmsiStatus *tmsistatus, uint8_t iei, uint8_t value, uint32_t len); - -#endif /* TMSI STATUS_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/TrackingAreaIdentity.h b/openair-cn/NAS/COMMON/IES/TrackingAreaIdentity.h deleted file mode 100644 index eb3826cab1..0000000000 --- a/openair-cn/NAS/COMMON/IES/TrackingAreaIdentity.h +++ /dev/null @@ -1,58 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef TRACKING_AREA_IDENTITY_H_ -#define TRACKING_AREA_IDENTITY_H_ - -#define TRACKING_AREA_IDENTITY_MINIMUM_LENGTH 6 -#define TRACKING_AREA_IDENTITY_MAXIMUM_LENGTH 6 - -typedef struct TrackingAreaIdentity_tag { - uint8_t mccdigit2:4; - uint8_t mccdigit1:4; - uint8_t mncdigit3:4; - uint8_t mccdigit3:4; - uint8_t mncdigit2:4; - uint8_t mncdigit1:4; - uint16_t tac; -} TrackingAreaIdentity; - -int encode_tracking_area_identity(TrackingAreaIdentity *trackingareaidentity, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_tracking_area_identity_xml(TrackingAreaIdentity *trackingareaidentity, uint8_t iei); - -int decode_tracking_area_identity(TrackingAreaIdentity *trackingareaidentity, uint8_t iei, uint8_t *buffer, uint32_t len); - -#endif /* TRACKING AREA IDENTITY_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/TrackingAreaIdentityList.h b/openair-cn/NAS/COMMON/IES/TrackingAreaIdentityList.h deleted file mode 100644 index a849fd04b0..0000000000 --- a/openair-cn/NAS/COMMON/IES/TrackingAreaIdentityList.h +++ /dev/null @@ -1,65 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef TRACKING_AREA_IDENTITY_LIST_H_ -#define TRACKING_AREA_IDENTITY_LIST_H_ - -#define TRACKING_AREA_IDENTITY_LIST_MINIMUM_LENGTH 8 -#define TRACKING_AREA_IDENTITY_LIST_MAXIMUM_LENGTH 98 - -typedef struct TrackingAreaIdentityList_tag { - /* XXX - The only supported type of list is a list of TACs - * belonging to one PLMN, with consecutive TAC values */ - //#define TRACKING_AREA_IDENTITY_LIST_ONE_PLMN_NON_CONSECUTIVE_TACS 0b00 -#define TRACKING_AREA_IDENTITY_LIST_ONE_PLMN_CONSECUTIVE_TACS 0b01 - //#define TRACKING_AREA_IDENTITY_LIST_MANY_PLMNS 0b10 - uint8_t typeoflist:2; - uint8_t numberofelements:5; - uint8_t mccdigit2:4; - uint8_t mccdigit1:4; - uint8_t mncdigit3:4; - uint8_t mccdigit3:4; - uint8_t mncdigit2:4; - uint8_t mncdigit1:4; - uint16_t tac; -} TrackingAreaIdentityList; - -int encode_tracking_area_identity_list(TrackingAreaIdentityList *trackingareaidentitylist, uint8_t iei, uint8_t *buffer, uint32_t len); - -int decode_tracking_area_identity_list(TrackingAreaIdentityList *trackingareaidentitylist, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_tracking_area_identity_list_xml(TrackingAreaIdentityList *trackingareaidentitylist, uint8_t iei); - -#endif /* TRACKING AREA IDENTITY LIST_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/TrafficFlowAggregateDescription.c b/openair-cn/NAS/COMMON/IES/TrafficFlowAggregateDescription.c deleted file mode 100644 index cb6aaff14f..0000000000 --- a/openair-cn/NAS/COMMON/IES/TrafficFlowAggregateDescription.c +++ /dev/null @@ -1,47 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - - -#include "TLVEncoder.h" -#include "TLVDecoder.h" -#include "TrafficFlowAggregateDescription.h" - -int decode_traffic_flow_aggregate_description(TrafficFlowAggregateDescription *trafficflowaggregatedescription, uint8_t iei, uint8_t *buffer, uint32_t len) -{ - return 0; -} - -int encode_traffic_flow_aggregate_description(TrafficFlowAggregateDescription *trafficflowaggregatedescription, uint8_t iei, uint8_t *buffer, uint32_t len) -{ - return 0; -} - diff --git a/openair-cn/NAS/COMMON/IES/TrafficFlowAggregateDescription.h b/openair-cn/NAS/COMMON/IES/TrafficFlowAggregateDescription.h deleted file mode 100644 index cda9369666..0000000000 --- a/openair-cn/NAS/COMMON/IES/TrafficFlowAggregateDescription.h +++ /dev/null @@ -1,52 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef TRAFFIC_FLOW_AGGREGATE_DESCRIPTION_H_ -#define TRAFFIC_FLOW_AGGREGATE_DESCRIPTION_H_ - -#define TRAFFIC_FLOW_AGGREGATE_DESCRIPTION_MINIMUM_LENGTH 1 -#define TRAFFIC_FLOW_AGGREGATE_DESCRIPTION_MAXIMUM_LENGTH 1 - -typedef struct { - uint8_t field; -} TrafficFlowAggregateDescription; - -int encode_traffic_flow_aggregate_description(TrafficFlowAggregateDescription *trafficflowaggregatedescription, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_traffic_flow_aggregate_description_xml(TrafficFlowAggregateDescription *trafficflowaggregatedescription, uint8_t iei); - -int decode_traffic_flow_aggregate_description(TrafficFlowAggregateDescription *trafficflowaggregatedescription, uint8_t iei, uint8_t *buffer, uint32_t len); - -#endif /* TRAFFIC FLOW AGGREGATE DESCRIPTION_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/TransactionIdentifier.c b/openair-cn/NAS/COMMON/IES/TransactionIdentifier.c deleted file mode 100644 index c3afd42950..0000000000 --- a/openair-cn/NAS/COMMON/IES/TransactionIdentifier.c +++ /dev/null @@ -1,47 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - - -#include "TLVEncoder.h" -#include "TLVDecoder.h" -#include "TransactionIdentifier.h" - -int decode_transaction_identifier(TransactionIdentifier *transactionidentifier, uint8_t iei, uint8_t *buffer, uint32_t len) -{ - return 0; -} - -int encode_transaction_identifier(TransactionIdentifier *transactionidentifier, uint8_t iei, uint8_t *buffer, uint32_t len) -{ - return 0; -} - diff --git a/openair-cn/NAS/COMMON/IES/TransactionIdentifier.h b/openair-cn/NAS/COMMON/IES/TransactionIdentifier.h deleted file mode 100644 index 153432e3b7..0000000000 --- a/openair-cn/NAS/COMMON/IES/TransactionIdentifier.h +++ /dev/null @@ -1,52 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef TRANSACTION_IDENTIFIER_H_ -#define TRANSACTION_IDENTIFIER_H_ - -#define TRANSACTION_IDENTIFIER_MINIMUM_LENGTH 1 -#define TRANSACTION_IDENTIFIER_MAXIMUM_LENGTH 1 - -typedef struct { - uint8_t field; -} TransactionIdentifier; - -int encode_transaction_identifier(TransactionIdentifier *transactionidentifier, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_transaction_identifier_xml(TransactionIdentifier *transactionidentifier, uint8_t iei); - -int decode_transaction_identifier(TransactionIdentifier *transactionidentifier, uint8_t iei, uint8_t *buffer, uint32_t len); - -#endif /* TRANSACTION IDENTIFIER_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/UeRadioCapabilityInformationUpdateNeeded.h b/openair-cn/NAS/COMMON/IES/UeRadioCapabilityInformationUpdateNeeded.h deleted file mode 100644 index 0876f663da..0000000000 --- a/openair-cn/NAS/COMMON/IES/UeRadioCapabilityInformationUpdateNeeded.h +++ /dev/null @@ -1,54 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef UE_RADIO_CAPABILITY_INFORMATION_UPDATE_NEEDED_H_ -#define UE_RADIO_CAPABILITY_INFORMATION_UPDATE_NEEDED_H_ - -#define UE_RADIO_CAPABILITY_INFORMATION_UPDATE_NEEDED_MINIMUM_LENGTH 1 -#define UE_RADIO_CAPABILITY_INFORMATION_UPDATE_NEEDED_MAXIMUM_LENGTH 1 - -typedef uint8_t UeRadioCapabilityInformationUpdateNeeded; - -int encode_ue_radio_capability_information_update_needed(UeRadioCapabilityInformationUpdateNeeded *ueradiocapabilityinformationupdateneeded, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_ue_radio_capability_information_update_needed_xml(UeRadioCapabilityInformationUpdateNeeded *ueradiocapabilityinformationupdateneeded, uint8_t iei); - -uint8_t encode_u8_ue_radio_capability_information_update_needed(UeRadioCapabilityInformationUpdateNeeded *ueradiocapabilityinformationupdateneeded); - -int decode_ue_radio_capability_information_update_needed(UeRadioCapabilityInformationUpdateNeeded *ueradiocapabilityinformationupdateneeded, uint8_t iei, uint8_t *buffer, uint32_t len); - -int decode_u8_ue_radio_capability_information_update_needed(UeRadioCapabilityInformationUpdateNeeded *ueradiocapabilityinformationupdateneeded, uint8_t iei, uint8_t value, uint32_t len); - -#endif /* UE RADIO CAPABILITY INFORMATION UPDATE NEEDED_H_ */ - diff --git a/openair-cn/NAS/COMMON/IES/VoiceDomainPreferenceAndUeUsageSetting.h b/openair-cn/NAS/COMMON/IES/VoiceDomainPreferenceAndUeUsageSetting.h deleted file mode 100644 index 221620fa6a..0000000000 --- a/openair-cn/NAS/COMMON/IES/VoiceDomainPreferenceAndUeUsageSetting.h +++ /dev/null @@ -1,60 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "OctetString.h" - -#ifndef VOICE_DOMAIN_PREFERENCE_AND_UE_USAGE_SETTING_H_ -#define VOICE_DOMAIN_PREFERENCE_AND_UE_USAGE_SETTING_H_ - -#define VOICE_DOMAIN_PREFERENCE_AND_UE_USAGE_SETTING_MINIMUM_LENGTH 1 -#define VOICE_DOMAIN_PREFERENCE_AND_UE_USAGE_SETTING_MAXIMUM_LENGTH 1 - -typedef struct VoiceDomainPreferenceAndUeUsageSetting_tag { - uint8_t spare:5; -#define UE_USAGE_SETTING_VOICE_CENTRIC 0b0 -#define UE_USAGE_SETTING_DATA_CENTRIC 0b1 - uint8_t ue_usage_setting:1; -#define VOICE_DOMAIN_PREFERENCE_CS_VOICE_ONLY 0b00 -#define VOICE_DOMAIN_PREFERENCE_IMS_PS_VOICE_ONLY 0b01 -#define VOICE_DOMAIN_PREFERENCE_CS_VOICE_PREFERRED_IMS_PS_VOICE_AS_SECONDARY 0b10 -#define VOICE_DOMAIN_PREFERENCE_IMS_PS_VOICE_PREFERRED_CS_VOICE_AS_SECONDARY 0b11 - uint8_t voice_domain_for_eutran:2; -} VoiceDomainPreferenceAndUeUsageSetting; - -int encode_voice_domain_preference_and_ue_usage_setting(VoiceDomainPreferenceAndUeUsageSetting *voicedomainpreferenceandueusagesetting, uint8_t iei, uint8_t *buffer, uint32_t len); - -int decode_voice_domain_preference_and_ue_usage_setting(VoiceDomainPreferenceAndUeUsageSetting *voicedomainpreferenceandueusagesetting, uint8_t iei, uint8_t *buffer, uint32_t len); - -void dump_voice_domain_preference_and_ue_usage_setting_xml(VoiceDomainPreferenceAndUeUsageSetting *voicedomainpreferenceandueusagesetting, uint8_t iei); - -#endif /* VOICE DOMAIN PREFERENCE AND UE USAGE SETTING_H_ */ - diff --git a/openair-cn/NAS/COMMON/UTIL/Makefile b/openair-cn/NAS/COMMON/UTIL/Makefile deleted file mode 100644 index 799bb8599a..0000000000 --- a/openair-cn/NAS/COMMON/UTIL/Makefile +++ /dev/null @@ -1,70 +0,0 @@ -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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 . -# -# Contact Information -# OpenAirInterface Admin: openair_admin@eurecom.fr -# OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr -# -# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. -# -################################################################################ -ifndef PROJDIR -PROJDIR = $(PWD)/../.. -endif - -include $(PROJDIR)/Makerules -include $(PROJDIR)/Makefile.inc - -INCLUDES = -I. -I$(INCDIR) - -TARGET = $(LIBUTIL) -TARGETS = $(TARGET).a $(TARGET).so - -all: $(TARGETS) - -%.o: %.c Makefile - @echo Compiling $< - @$(CC) $(CFLAGS) -c $< -o $@ - -$(TARGET).a: $(OBJS) - @$(RM) $@ - @$(AR) $(ARFLAGS) $@ $(OBJS) - @echo Replacing $@ to $(LIBDIR) - @$(RM) $(LIBDIR)/$@ - @$(CP) $@ $(LIBDIR) - -$(TARGET).so: $(OBJS) - @$(LD) -G -o $@ $(OBJS) - @echo Replacing $@ to $(LIBDIR) - @$(RM) $(LIBDIR)/$@ - @$(CP) $@ $(LIBDIR) - -clean: - $(RM) $(OBJS) *.bak *~ - -veryclean: clean - $(RM) $(TARGETS) - -depend: - makedepend -- ${CFLAGS} -- ${SRCS} - -# DO NOT DELETE THIS LINE -- make depend depends on it. - diff --git a/openair-cn/NAS/COMMON/UTIL/TLVDecoder.c b/openair-cn/NAS/COMMON/UTIL/TLVDecoder.c deleted file mode 100644 index 744a00d99c..0000000000 --- a/openair-cn/NAS/COMMON/UTIL/TLVDecoder.c +++ /dev/null @@ -1,57 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "TLVDecoder.h" - -int errorCodeDecoder = 0; - -const char *errorCodeStringDecoder[] = { - "No error", - "Buffer NULL", - "Buffer too short", - "Unexpected IEI", - "Mandatory field not present", - "Wrong message type", - "EXT value doesn't match", - "Protocol not supported", -}; - -void tlv_decode_perror(void) -{ - if (errorCodeDecoder >= 0) - // No error or TLV_DECODE_ERR_OK - return; - - printf("TLV decoder error: (%d, %s)\n", errorCodeDecoder, errorCodeStringDecoder[errorCodeDecoder * -1]); -} - - diff --git a/openair-cn/NAS/COMMON/UTIL/TLVEncoder.c b/openair-cn/NAS/COMMON/UTIL/TLVEncoder.c deleted file mode 100644 index 39a5d94761..0000000000 --- a/openair-cn/NAS/COMMON/UTIL/TLVEncoder.c +++ /dev/null @@ -1,54 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "TLVEncoder.h" - -int errorCodeEncoder = 0; - -const char *errorCodeStringEncoder[] = { - "No error", - "Buffer NULL", - "Buffer too short", - "Octet string too long for IEI", - "Wrong message type", - "Protocol not supported", -}; - -void tlv_encode_perror(void) -{ - if (errorCodeEncoder >= 0) - // No error or TLV_DECODE_ERR_OK - return; - - printf("error: (%d, %s)\n", errorCodeEncoder, errorCodeStringEncoder[errorCodeEncoder * -1]); -} - diff --git a/openair-cn/NAS/COMMON/UTIL/memory.h b/openair-cn/NAS/COMMON/UTIL/memory.h deleted file mode 100644 index 5d7734fc47..0000000000 --- a/openair-cn/NAS/COMMON/UTIL/memory.h +++ /dev/null @@ -1,72 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** -Source memory.h - -Version 0.1 - -Date 2012/10/09 - -Product NAS stack - -Subsystem Utilities - -Author Frederic Maurel - -Description Memory access utilities - -*****************************************************************************/ -#ifndef __MEMORY_H__ -#define __MEMORY_H__ - -#include // size_t - -/****************************************************************************/ -/********************* G L O B A L C O N S T A N T S *******************/ -/****************************************************************************/ - -/****************************************************************************/ -/************************ G L O B A L T Y P E S ************************/ -/****************************************************************************/ - -/****************************************************************************/ -/******************** G L O B A L V A R I A B L E S ********************/ -/****************************************************************************/ - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -char* memory_get_path(const char* dirname, const char* filename); - -int memory_read(const char* datafile, void* data, size_t size); - -int memory_write(const char* datafile, const void* data, size_t size); - -#endif /* __MEMORY_H__*/ diff --git a/openair-cn/NAS/COMMON/UTIL/tst/Makefile b/openair-cn/NAS/COMMON/UTIL/tst/Makefile deleted file mode 100644 index ab0d17c982..0000000000 --- a/openair-cn/NAS/COMMON/UTIL/tst/Makefile +++ /dev/null @@ -1,63 +0,0 @@ -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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 . -# -# Contact Information -# OpenAirInterface Admin: openair_admin@eurecom.fr -# OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr -# -# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. -# -################################################################################ -ifndef PROJDIR -PROJDIR = $(PWD)/../../.. -endif - -include $(PROJDIR)/Makerules -include $(PROJDIR)/Makefile.inc - -LIBS = -lutil -INCLUDES = -I. -I$(INCDIR) -I$(UTILDIR) - -LIBSUTIL = $(LIBDIR)/$(LIBUTIL).a $(LIBDIR)/$(LIBUTIL).so - -TIMER_OBJ = timer.o - -TIMER_TARGET = timer - -TARGETS = $(TIMER_TARGET) - -all: $(TARGETS) - -%.o: %.c Makefile - $(CC) $(CFLAGS) -c $< -o $@ - -$(TIMER_TARGET): $(TIMER_OBJ) $(LIBSUTIL) - $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) - -clean: - $(RM) $(OBJS) $(TARGETS) *.bak *~ - -depend: - makedepend -- ${CFLAGS} -- ${SRCS} - -# DO NOT DELETE THIS LINE -- make depend depends on it. - -timer.o: $(UTILDIR)/timer.h $(INCDIR)/commonDef.h diff --git a/openair-cn/NAS/MME/API/MME/Makefile b/openair-cn/NAS/MME/API/MME/Makefile deleted file mode 100644 index 7c92861153..0000000000 --- a/openair-cn/NAS/MME/API/MME/Makefile +++ /dev/null @@ -1,49 +0,0 @@ -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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 . -# -# Contact Information -# OpenAirInterface Admin: openair_admin@eurecom.fr -# OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr -# -# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. -# -################################################################################ -ifndef PROJDIR -PROJDIR = $(PWD)/../../.. -INCLUDES = -I. -I$(INCDIR) -I$(UTILDIR) -endif - -include $(PROJDIR)/Makerules -include $(PROJDIR)/Makefile.inc - -all: $(OBJS) - -%.o: %.c Makefile - @echo Compiling $< - @$(CC) $(CFLAGS) -c $< -o $@ - -clean: - $(RM) $(OBJS) *.bak *~ - -depend: - makedepend -- ${CFLAGS} -- ${SRCS} - -# DO NOT DELETE THIS LINE -- make depend depends on it. diff --git a/openair-cn/NAS/MME/API/MME/mme_api.c b/openair-cn/NAS/MME/API/MME/mme_api.c deleted file mode 100644 index 91b688558c..0000000000 --- a/openair-cn/NAS/MME/API/MME/mme_api.c +++ /dev/null @@ -1,569 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** -Source mme_api.c - -Version 0.1 - -Date 2013/02/28 - -Product NAS stack - -Subsystem Application Programming Interface - -Author Frederic Maurel - -Description Implements the API used by the NAS layer running in the MME - to interact with a Mobility Management Entity - -*****************************************************************************/ - - -#include "mme_api.h" -#include "nas_log.h" -#include "assertions.h" - -#include // memcpy - -/****************************************************************************/ -/**************** E X T E R N A L D E F I N I T I O N S ****************/ -/****************************************************************************/ - -/****************************************************************************/ -/******************* L O C A L D E F I N I T I O N S *******************/ -/****************************************************************************/ - -/* Maximum number of PDN connections the MME may simultaneously support */ -#define MME_API_PDN_MAX 10 - -/* MME group identifier */ -#define MME_API_MME_GID 0x0102 - -/* MME code */ -#define MME_API_MME_CODE 0x12 - -/* Default APN */ -static const OctetString mme_api_default_apn = { - /* LW: apn seems to be coded using a one byte size field before each part of the name */ -#if 1 - 15, (uint8_t *)("\x0e" "www.eurecom.fr") -#else - 35, (uint8_t *)("\x08" "internet" - "\x02" "v4" - "\x03" "pft" - "\x06" "mnc092" - "\x06" "mcc208" - "\x04" "gprs") -#endif -}; - -/* APN configured for emergency bearer services */ -static const OctetString mme_api_emergency_apn = { - 19, (uint8_t *)("\x12" "www.eurecom_sos.fr") -}; - -/* Public Land Mobile Network identifier */ -static const plmn_t mme_api_plmn = {0, 2, 0xf, 8, 0, 1}; // 20810 - -/* Number of concecutive tracking areas */ -#define MME_API_NB_TACS 4 -/* Code of the first tracking area belonging to the PLMN */ -#define MME_API_FIRST_TAC 0x0001 - - -/* Authentication parameter RAND */ -static const uint8_t _mme_api_rand[AUTH_RAND_SIZE] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x01, 0x02, 0x03, 0x04 -}; - -/* Authentication parameter AUTN */ -static const uint8_t _mme_api_autn[AUTH_AUTN_SIZE] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x05, 0x04, 0x03, 0x02, 0x00, - 0x00, 0x00, 0x00, 0x00 -}; - -/* Authentication response parameter */ -static const uint8_t _mme_api_xres[AUTH_XRES_SIZE] = { - 0x67, 0x70, 0x3a, 0x31, 0xf2, 0x2a, 0x2d, 0x51, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00 -}; - -static mme_api_ip_version_t _mme_api_ip_capability = MME_API_IPV4V6_ADDR; - -/* Pool of IPv4 addresses */ -static uint8_t _mme_api_ipv4_addr[MME_API_PDN_MAX][4] = { - {0xC0, 0xA8, 0x02, 0x3C}, /* 192.168.02.60 */ - {0xC0, 0xA8, 0x0C, 0xBB}, /* 192.168.12.187 */ - {0xC0, 0xA8, 0x0C, 0xBC}, /* 192.168.12.188 */ - {0xC0, 0xA8, 0x0C, 0xBD}, /* 192.168.12.189 */ - {0xC0, 0xA8, 0x0C, 0xBE}, /* 192.168.12.190 */ - {0xC0, 0xA8, 0x0C, 0xBF}, /* 192.168.12.191 */ - {0xC0, 0xA8, 0x0C, 0xC0}, /* 192.168.12.192 */ - {0xC0, 0xA8, 0x0C, 0xC1}, /* 192.168.12.193 */ - {0xC0, 0xA8, 0x0C, 0xC2}, /* 192.168.12.194 */ - {0xC0, 0xA8, 0x0C, 0xC3}, /* 192.168.12.195 */ -}; -/* Pool of IPv6 addresses */ -static uint8_t _mme_api_ipv6_addr[MME_API_PDN_MAX][8] = { - /* FE80::221:70FF:C0A8:023C/64 */ - {0x02, 0x21, 0x70, 0xFF, 0xC0, 0xA8, 0x02, 0x3C}, - /* FE80::221:70FF:C0A8:0CBB/64 */ - {0x02, 0x21, 0x70, 0xFF, 0xC0, 0xA8, 0x0C, 0xBB}, - /* FE80::221:70FF:C0A8:0CBC/64 */ - {0x02, 0x21, 0x70, 0xFF, 0xC0, 0xA8, 0x0C, 0xBC}, - /* FE80::221:70FF:C0A8:0CBD/64 */ - {0x02, 0x21, 0x70, 0xFF, 0xC0, 0xA8, 0x0C, 0xBD}, - /* FE80::221:70FF:C0A8:0CBE/64 */ - {0x02, 0x21, 0x70, 0xFF, 0xC0, 0xA8, 0x0C, 0xBE}, - /* FE80::221:70FF:C0A8:0CBF/64 */ - {0x02, 0x21, 0x70, 0xFF, 0xC0, 0xA8, 0x0C, 0xBF}, - /* FE80::221:70FF:C0A8:0CC0/64 */ - {0x02, 0x21, 0x70, 0xFF, 0xC0, 0xA8, 0x0C, 0xC0}, - /* FE80::221:70FF:C0A8:0CC1/64 */ - {0x02, 0x21, 0x70, 0xFF, 0xC0, 0xA8, 0x0C, 0xC1}, - /* FE80::221:70FF:C0A8:0CC2/64 */ - {0x02, 0x21, 0x70, 0xFF, 0xC0, 0xA8, 0x0C, 0xC2}, - /* FE80::221:70FF:C0A8:0CC3/64 */ - {0x02, 0x21, 0x70, 0xFF, 0xC0, 0xA8, 0x0C, 0xC3}, -}; -/* Pool of IPv4v6 addresses */ -static uint8_t _mme_api_ipv4v6_addr[MME_API_PDN_MAX][12] = { - /* 192.168.02.60, FE80::221:70FF:C0A8:023C/64 */ - {0xC0, 0xA8, 0x02, 0x3C, 0x02, 0x21, 0x70, 0xFF, 0xC0, 0xA8, 0x02, 0x3C}, - /* 192.168.12.187, FE80::221:70FF:C0A8:0CBB/64 */ - {0xC0, 0xA8, 0x0C, 0xBB, 0x02, 0x21, 0x70, 0xFF, 0xC0, 0xA8, 0x0C, 0xBB}, - /* 192.168.12.188, FE80::221:70FF:C0A8:0CBC/64 */ - {0xC0, 0xA8, 0x0C, 0xBC, 0x02, 0x21, 0x70, 0xFF, 0xC0, 0xA8, 0x0C, 0xBC}, - /* 192.168.12.189, FE80::221:70FF:C0A8:0CBD/64 */ - {0xC0, 0xA8, 0x0C, 0xBD, 0x02, 0x21, 0x70, 0xFF, 0xC0, 0xA8, 0x0C, 0xBD}, - /* 192.168.12.189, FE80::221:70FF:C0A8:0CBE/64 */ - {0xC0, 0xA8, 0x0C, 0xBD, 0x02, 0x21, 0x70, 0xFF, 0xC0, 0xA8, 0x0C, 0xBE}, - /* 192.168.12.189, FE80::221:70FF:C0A8:0CBF/64 */ - {0xC0, 0xA8, 0x0C, 0xBD, 0x02, 0x21, 0x70, 0xFF, 0xC0, 0xA8, 0x0C, 0xBF}, - /* 192.168.12.189, FE80::221:70FF:C0A8:0CC0/64 */ - {0xC0, 0xA8, 0x0C, 0xBD, 0x02, 0x21, 0x70, 0xFF, 0xC0, 0xA8, 0x0C, 0xC0}, - /* 192.168.12.189, FE80::221:70FF:C0A8:0CC1/64 */ - {0xC0, 0xA8, 0x0C, 0xBD, 0x02, 0x21, 0x70, 0xFF, 0xC0, 0xA8, 0x0C, 0xC1}, - /* 192.168.12.189, FE80::221:70FF:C0A8:0CC2/64 */ - {0xC0, 0xA8, 0x0C, 0xBD, 0x02, 0x21, 0x70, 0xFF, 0xC0, 0xA8, 0x0C, 0xC2}, - /* 192.168.12.189, FE80::221:70FF:C0A8:0CC3/64 */ - {0xC0, 0xA8, 0x0C, 0xBD, 0x02, 0x21, 0x70, 0xFF, 0xC0, 0xA8, 0x0C, 0xC3}, -}; -static const OctetString _mme_api_pdn_addr[MME_API_ADDR_MAX][MME_API_PDN_MAX] = { - { /* IPv4 network capability */ - {4, _mme_api_ipv4_addr[0]}, - {4, _mme_api_ipv4_addr[1]}, - {4, _mme_api_ipv4_addr[2]}, - {4, _mme_api_ipv4_addr[3]}, - {4, _mme_api_ipv4_addr[4]}, - {4, _mme_api_ipv4_addr[5]}, - {4, _mme_api_ipv4_addr[6]}, - {4, _mme_api_ipv4_addr[7]}, - {4, _mme_api_ipv4_addr[8]}, - {4, _mme_api_ipv4_addr[9]}, - }, - { /* IPv6 network capability */ - {8, _mme_api_ipv6_addr[0]}, - {8, _mme_api_ipv6_addr[1]}, - {8, _mme_api_ipv6_addr[2]}, - {8, _mme_api_ipv6_addr[3]}, - {8, _mme_api_ipv6_addr[4]}, - {8, _mme_api_ipv6_addr[5]}, - {8, _mme_api_ipv6_addr[6]}, - {8, _mme_api_ipv6_addr[7]}, - {8, _mme_api_ipv6_addr[8]}, - {8, _mme_api_ipv6_addr[9]}, - }, - { /* IPv4v6 network capability */ - {12, _mme_api_ipv4v6_addr[0]}, - {12, _mme_api_ipv4v6_addr[1]}, - {12, _mme_api_ipv4v6_addr[2]}, - {12, _mme_api_ipv4v6_addr[3]}, - {12, _mme_api_ipv4v6_addr[4]}, - {12, _mme_api_ipv4v6_addr[5]}, - {12, _mme_api_ipv4v6_addr[6]}, - {12, _mme_api_ipv4v6_addr[7]}, - {12, _mme_api_ipv4v6_addr[8]}, - {12, _mme_api_ipv4v6_addr[9]}, - }, -}; - -/* Subscribed QCI */ -#define MME_API_QCI 3 - -/* Data bit rates */ -#define MME_API_BIT_RATE_64K 0x40 -#define MME_API_BIT_RATE_128K 0x48 -#define MME_API_BIT_RATE_512K 0x78 -#define MME_API_BIT_RATE_1024K 0x87 - -/* Total number of PDN connections (should not exceed MME_API_PDN_MAX) */ -static int _mme_api_pdn_id = 0; - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -/****************************************************************************/ -/********************* L O C A L F U N C T I O N S *********************/ -/****************************************************************************/ - -/**************************************************************************** - ** ** - ** Name: mme_api_get_emm_config() ** - ** ** - ** Description: Retreives MME configuration data related to EPS mobility ** - ** management ** - ** ** - ** Inputs: None ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -#if defined(NAS_BUILT_IN_EPC) -int mme_api_get_emm_config(mme_api_emm_config_t *config, - mme_config_t *mme_config_p) -#else -int mme_api_get_emm_config(mme_api_emm_config_t *config) -#endif -{ -#if defined(NAS_BUILT_IN_EPC) - int i; -#endif - LOG_FUNC_IN; - AssertFatal(mme_config_p->gummei.nb_plmns >= 1, "No PLMN configured"); - AssertFatal(mme_config_p->gummei.nb_mmec >= 1, "No MME Code configured"); - AssertFatal(mme_config_p->gummei.nb_mme_gid >= 1, "No MME Group ID configured"); - - config->gummei.plmn.MCCdigit1 = (mme_config_p->gummei.plmn_mcc[0]/100)%10; - config->gummei.plmn.MCCdigit2 = (mme_config_p->gummei.plmn_mcc[0]/10)%10; - config->gummei.plmn.MCCdigit3 = mme_config_p->gummei.plmn_mcc[0]%10; - - if (mme_config_p->gummei.plmn_mnc_len[0] == 2) { - config->gummei.plmn.MNCdigit1 = (mme_config_p->gummei.plmn_mnc[0]/10)%10; - config->gummei.plmn.MNCdigit2 = mme_config_p->gummei.plmn_mnc[0]%10; - config->gummei.plmn.MNCdigit3 = 0xf; - } else if (mme_config_p->gummei.plmn_mnc_len[0] == 3) { - config->gummei.plmn.MNCdigit1 = (mme_config_p->gummei.plmn_mnc[0]/100)%10; - config->gummei.plmn.MNCdigit2 = (mme_config_p->gummei.plmn_mnc[0]/10)%10; - config->gummei.plmn.MNCdigit3 = mme_config_p->gummei.plmn_mnc[0]%10; - } else { - AssertFatal((mme_config_p->gummei.plmn_mnc_len[0] >= 2) && - (mme_config_p->gummei.plmn_mnc_len[0] <= 3), "BAD MNC length for GUMMEI"); - } - - config->gummei.MMEgid = mme_config_p->gummei.mme_gid[0]; - config->gummei.MMEcode = mme_config_p->gummei.mmec[0]; -#if defined(NAS_BUILT_IN_EPC) - - /* SR: this config param comes from MME global config */ - if (mme_config_p->emergency_attach_supported != 0) { - config->features |= MME_API_EMERGENCY_ATTACH; - } - - if (mme_config_p->unauthenticated_imsi_supported != 0) { - config->features |= MME_API_UNAUTHENTICATED_IMSI; - } - - for (i = 0 ; i < 8; i++) { - config->prefered_integrity_algorithm[i] = mme_config_p->nas_config.prefered_integrity_algorithm[i]; - config->prefered_ciphering_algorithm[i] = mme_config_p->nas_config.prefered_ciphering_algorithm[i]; - } - -#else - config->features = MME_API_EMERGENCY_ATTACH | MME_API_UNAUTHENTICATED_IMSI; -#endif - - LOG_FUNC_RETURN (RETURNok); -} - -/**************************************************************************** - ** ** - ** Name: mme_api_get_config() ** - ** ** - ** Description: Retreives MME configuration data related to EPS session ** - ** management ** - ** ** - ** Inputs: None ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int mme_api_get_esm_config(mme_api_esm_config_t *config) -{ - LOG_FUNC_IN; - - if (_mme_api_ip_capability == MME_API_IPV4_ADDR) { - config->features = MME_API_IPV4; - } else if (_mme_api_ip_capability == MME_API_IPV6_ADDR) { - config->features = MME_API_IPV6; - } else if (_mme_api_ip_capability == MME_API_IPV4V6_ADDR) { - config->features = MME_API_IPV4 | MME_API_IPV6; - } else { - config->features = 0; - } - - LOG_FUNC_RETURN (RETURNok); -} - -/**************************************************************************** - ** ** - ** Name: mme_api_identify_guti() ** - ** ** - ** Description: Requests the MME to identify the UE using the specified ** - ** GUTI. If the UE is known by the MME (a Mobility Manage- ** - ** ment context exists for this UE in the MME), its se- ** - ** curity context is returned. ** - ** ** - ** Inputs: guti: EPS Globally Unique Temporary UE Identity ** - ** Others: None ** - ** ** - ** Outputs: vector: The EPS authentication vector of the UE if ** - ** known by the network; NULL otherwise. ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int mme_api_identify_guti(const GUTI_t *guti, auth_vector_t *vector) -{ - int rc = RETURNerror; - - LOG_FUNC_IN; - - LOG_FUNC_RETURN(rc); -} - -/**************************************************************************** - ** ** - ** Name: mme_api_identify_imsi() ** - ** ** - ** Description: Requests the MME to identify the UE using the specified ** - ** IMSI. If the UE is known by the MME (a Mobility Manage- ** - ** ment context exists for this UE in the MME), its se- ** - ** curity context is returned. ** - ** ** - ** Inputs: imsi: International Mobile Subscriber Identity ** - ** Others: None ** - ** ** - ** Outputs: vector: The EPS authentication vector of the UE if ** - ** known by the network; NULL otherwise. ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int mme_api_identify_imsi(const imsi_t *imsi, auth_vector_t *vector) -{ - int rc = RETURNok; - - LOG_FUNC_IN; - AssertFatal(0, "Hardcoded values"); - - memcpy(vector->rand, _mme_api_rand, AUTH_RAND_SIZE); - memcpy(vector->autn, _mme_api_autn, AUTH_AUTN_SIZE); - memcpy(vector->xres, _mme_api_xres, AUTH_XRES_SIZE); - - LOG_FUNC_RETURN(rc); -} - -/**************************************************************************** - ** ** - ** Name: mme_api_identify_imei() ** - ** ** - ** Description: Requests the MME to identify the UE using the specified ** - ** IMEI. If the UE is known by the MME (a Mobility Manage- ** - ** ment context exists for this UE in the MME), its se- ** - ** curity context is returned. ** - ** ** - ** Inputs: imei: International Mobile Equipment Identity ** - ** Others: None ** - ** ** - ** Outputs: vector: The EPS authentication vector of the UE if ** - ** known by the network; NULL otherwise. ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int mme_api_identify_imei(const imei_t *imei, auth_vector_t *vector) -{ - int rc = RETURNerror; - - LOG_FUNC_IN; - - LOG_FUNC_RETURN(rc); -} - -/**************************************************************************** - ** ** - ** Name: mme_api_new_guti() ** - ** ** - ** Description: Requests the MME to assign a new GUTI to the UE identi- ** - ** fied by the given IMSI. ** - ** ** - ** Description: Requests the MME to assign a new GUTI to the UE identi- ** - ** fied by the given IMSI and returns the list of consecu- ** - ** tive tracking areas the UE is registered to. ** - ** ** - ** Inputs: imsi: International Mobile Subscriber Identity ** - ** Others: None ** - ** ** - ** Outputs: guti: The new assigned GUTI ** - ** tac: Code of the first tracking area belonging ** - ** to the PLMN ** - ** n_tacs: Number of concecutive tracking areas ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int mme_api_new_guti(const imsi_t *imsi, GUTI_t *guti, tac_t *tac, int *n_tacs) -{ - int rc = RETURNok; - - static unsigned int tmsi = 1; - - LOG_FUNC_IN; - AssertFatal(0, "Hardcoded values"); - - guti->gummei.plmn = mme_api_plmn; - guti->gummei.MMEgid = MME_API_MME_GID; - guti->gummei.MMEcode = MME_API_MME_CODE; - guti->m_tmsi = tmsi++; - - *tac = MME_API_FIRST_TAC; - *n_tacs = MME_API_NB_TACS; - - LOG_FUNC_RETURN(rc); -} - -/**************************************************************************** - ** ** - ** Name: mme_api_subscribe() ** - ** ** - ** Description: Requests the MME to check whether connectivity with the ** - ** requested PDN can be established using the specified APN. ** - ** If accepted the MME returns PDN subscription context con- ** - ** taining EPS subscribed QoS profile, the default APN if ** - ** required and UE's IPv4 address and/or the IPv6 prefix. ** - ** ** - ** Inputs: apn: If not NULL, Access Point Name of the PDN ** - ** to connect to ** - ** is_emergency: TRUE if the PDN connectivity is requested ** - ** for emergency bearer services ** - ** Others: None ** - ** ** - ** Outputs: apn: If NULL, default APN or APN configured for ** - ** emergency bearer services ** - ** pdn_addr: PDN connection IPv4 address or IPv6 inter- ** - ** face identifier to be used to build the ** - ** IPv6 link local address ** - ** qos: EPS subscribed QoS profile ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int mme_api_subscribe(OctetString *apn, mme_api_ip_version_t mme_pdn_index, OctetString *pdn_addr, - int is_emergency, mme_api_qos_t *qos) -{ - int rc = RETURNok; - - LOG_FUNC_IN; - - if ( apn && (apn->length == 0) ) { - /* PDN connectivity to default APN */ - if (is_emergency) { - apn->length = mme_api_emergency_apn.length; - apn->value = mme_api_emergency_apn.value; - } else { - apn->length = mme_api_default_apn.length; - apn->value = mme_api_default_apn.value; - } - } - - /* Assign PDN address */ - if ( pdn_addr && (_mme_api_pdn_id < MME_API_PDN_MAX) ) { - pdn_addr->length = - _mme_api_pdn_addr[mme_pdn_index][_mme_api_pdn_id].length; - pdn_addr->value = - _mme_api_pdn_addr[mme_pdn_index][_mme_api_pdn_id].value; - /* Increment the total number of PDN connections */ - _mme_api_pdn_id += 1; - } else { - /* Maximum number of PDN connections exceeded */ - rc = RETURNerror; - } - - /* Setup EPS subscribed QoS profile */ - if (qos) { - qos->qci = MME_API_QCI; - /* Uplink bit rate */ - qos->gbr[MME_API_UPLINK] = MME_API_BIT_RATE_64K; - qos->mbr[MME_API_UPLINK] = MME_API_BIT_RATE_128K; - /* Downlink bit rate */ - qos->gbr[MME_API_DOWNLINK] = MME_API_BIT_RATE_512K; - qos->mbr[MME_API_DOWNLINK] = MME_API_BIT_RATE_1024K; - } else { - rc = RETURNerror; - } - - LOG_FUNC_RETURN(rc); -} - -/**************************************************************************** - ** ** - ** Name: mme_api_unsubscribe() ** - ** ** - ** Description: Requests the MME to release connectivity with the reques- ** - ** ted PDN using the specified APN. ** - ** ** - ** Inputs: apn: Access Point Name of the PDN to disconnect ** - ** from ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int mme_api_unsubscribe(OctetString *apn) -{ - LOG_FUNC_IN; - - int rc = RETURNok; - - /* Decrement the total number of PDN connections */ - _mme_api_pdn_id -= 1; - - LOG_FUNC_RETURN(rc); -} diff --git a/openair-cn/NAS/MME/API/MME/mme_api.h b/openair-cn/NAS/MME/API/MME/mme_api.h deleted file mode 100644 index a8f83e1237..0000000000 --- a/openair-cn/NAS/MME/API/MME/mme_api.h +++ /dev/null @@ -1,146 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** -Source mme_api.h - -Version 0.1 - -Date 2013/02/28 - -Product NAS stack - -Subsystem Application Programming Interface - -Author Frederic Maurel - -Description Implements the API used by the NAS layer running in the MME - to interact with a Mobility Management Entity - -*****************************************************************************/ -#ifndef __MME_API_H__ -#define __MME_API_H__ - -# if defined(NAS_BUILT_IN_EPC) -# include "mme_config.h" -# endif -#include "commonDef.h" -#include "securityDef.h" -#include "OctetString.h" - -/****************************************************************************/ -/********************* G L O B A L C O N S T A N T S *******************/ -/****************************************************************************/ - -/* Maximum number of UEs the MME may simultaneously support */ -#define MME_API_NB_UE_MAX 256 - - -/* Features supported by the MME */ -typedef enum mme_api_feature_s { - MME_API_NO_FEATURE_SUPPORTED = 0, - MME_API_EMERGENCY_ATTACH = (1<<0), - MME_API_UNAUTHENTICATED_IMSI = (1<<1), - MME_API_IPV4 = (1<<2), - MME_API_IPV6 = (1<<3), - MME_API_SINGLE_ADDR_BEARERS = (1<<4), -} mme_api_feature_t; - -/* Network IP version capability */ -typedef enum mme_api_ip_version_e { - MME_API_IPV4_ADDR, - MME_API_IPV6_ADDR, - MME_API_IPV4V6_ADDR, - MME_API_ADDR_MAX -} mme_api_ip_version_t; - -/* - * EPS Mobility Management configuration data - * ------------------------------------------ - */ -typedef struct mme_api_emm_config_s { - mme_api_feature_t features; /* Supported features */ - gummei_t gummei; /* EPS Globally Unique MME Identity */ - uint8_t prefered_integrity_algorithm[8];// choice in NAS_SECURITY_ALGORITHMS_EIA0, etc - uint8_t prefered_ciphering_algorithm[8];// choice in NAS_SECURITY_ALGORITHMS_EEA0, etc -} mme_api_emm_config_t; - -/* - * EPS Session Management configuration data - * ----------------------------------------- - */ -typedef struct mme_api_esm_config_s { - mme_api_feature_t features; /* Supported features */ - uint8_t dns_prim_ipv4[4]; /* Network byte order */ - uint8_t dns_sec_ipv4[4]; /* Network byte order */ -} mme_api_esm_config_t; - -/****************************************************************************/ -/************************ G L O B A L T Y P E S ************************/ -/****************************************************************************/ - -/* EPS subscribed QoS profile */ -typedef struct mme_api_qos_s { -#define MME_API_UPLINK 0 -#define MME_API_DOWNLINK 1 -#define MME_API_DIRECTION 2 - int gbr[MME_API_DIRECTION]; /* Guaranteed Bit Rate */ - int mbr[MME_API_DIRECTION]; /* Maximum Bit Rate */ - int qci; /* QoS Class Identifier */ -} mme_api_qos_t; - -/* Traffic Flow Template */ -typedef struct mme_api_tft_s { -} mme_api_tft_t; - -/****************************************************************************/ -/******************** G L O B A L V A R I A B L E S ********************/ -/****************************************************************************/ - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -#if defined(NAS_BUILT_IN_EPC) -int mme_api_get_emm_config(mme_api_emm_config_t *config, - mme_config_t *mme_config_p); -#else -int mme_api_get_emm_config(mme_api_emm_config_t *config); -#endif -int mme_api_get_esm_config(mme_api_esm_config_t *config); - -int mme_api_identify_guti(const GUTI_t *guti, auth_vector_t *vector); -int mme_api_identify_imsi(const imsi_t *imsi, auth_vector_t *vector); -int mme_api_identify_imei(const imei_t *imei, auth_vector_t *vector); -int mme_api_new_guti(const imsi_t *imsi, GUTI_t *guti, tac_t *tac, int *n_tacs); - -int mme_api_subscribe(OctetString *apn, mme_api_ip_version_t mme_pdn_index, OctetString *pdn_addr, - int is_emergency, mme_api_qos_t *qos); -int mme_api_unsubscribe(OctetString *apn); - -#endif /* __MME_API_H__*/ diff --git a/openair-cn/NAS/MME/EMM/Attach.c b/openair-cn/NAS/MME/EMM/Attach.c deleted file mode 100644 index ec7a873cd9..0000000000 --- a/openair-cn/NAS/MME/EMM/Attach.c +++ /dev/null @@ -1,1692 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** - -Source Attach.c - -Version 0.1 - -Date 2012/12/04 - -Product NAS stack - -Subsystem EPS Mobility Management - -Author Frederic Maurel - -Description Defines the attach related EMM procedure executed by the - Non-Access Stratum. - - To get internet connectivity from the network, the network - have to know about the UE. When the UE is switched on, it - has to initiate the attach procedure to get initial access - to the network and register its presence to the Evolved - Packet Core (EPC) network in order to receive EPS services. - - As a result of a successful attach procedure, a context is - created for the UE in the MME, and a default bearer is esta- - blished between the UE and the PDN-GW. The UE gets the home - agent IPv4 and IPv6 addresses and full connectivity to the - IP network. - - The network may also initiate the activation of additional - dedicated bearers for the support of a specific service. - -*****************************************************************************/ - -#include "emm_proc.h" -#include "networkDef.h" -#include "nas_log.h" -#include "nas_timer.h" - -#include "emmData.h" - -#include "emm_sap.h" -#include "esm_sap.h" -#include "emm_cause.h" - -#include "NasSecurityAlgorithms.h" - -#include "mme_api.h" -#include "mme_config.h" -# if defined(NAS_BUILT_IN_EPC) -# include "nas_itti_messaging.h" -# endif - -#include // memcmp, memcpy -#include // malloc, free - -/****************************************************************************/ -/**************** E X T E R N A L D E F I N I T I O N S ****************/ -/****************************************************************************/ - -/****************************************************************************/ -/******************* L O C A L D E F I N I T I O N S *******************/ -/****************************************************************************/ - -/* String representation of the EPS attach type */ -static const char *_emm_attach_type_str[] = { - "EPS", "IMSI", "EMERGENCY", "RESERVED" -}; - - -/* - * -------------------------------------------------------------------------- - * Internal data handled by the attach procedure in the MME - * -------------------------------------------------------------------------- - */ -/* - * Timer handlers - */ -static void *_emm_attach_t3450_handler(void *); - -/* - * Functions that may initiate EMM common procedures - */ -static int _emm_attach_identify(void *); -static int _emm_attach_security(void *); -static int _emm_attach(void *); - -/* - * Abnormal case attach procedures - */ -static int _emm_attach_release(void *); -static int _emm_attach_reject(void *); -static int _emm_attach_abort(void *); - -static int _emm_attach_have_changed(const emm_data_context_t *ctx, - emm_proc_attach_type_t type, int ksi, - GUTI_t *guti, imsi_t *imsi, imei_t *imei, - int eea, int eia, int ucs2, int uea, int uia, int gea, - int umts_present, int gprs_present); -static int _emm_attach_update(emm_data_context_t *ctx, unsigned int ueid, - emm_proc_attach_type_t type, int ksi, - GUTI_t *guti, imsi_t *imsi, imei_t *imei, - int eea, int eia, int ucs2, int uea, int uia, int gea, - int umts_present, int gprs_present, - const OctetString *esm_msg_pP); - -/* - * Internal data used for attach procedure - */ -typedef struct attach_data_s { - unsigned int ueid; /* UE identifier */ -#define ATTACH_COUNTER_MAX 5 - unsigned int retransmission_count; /* Retransmission counter */ - OctetString esm_msg; /* ESM message to be sent within - * the Attach Accept message */ -} attach_data_t; - -static int _emm_attach_accept(emm_data_context_t *emm_ctx, attach_data_t *data); - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - - -/* - * -------------------------------------------------------------------------- - * Attach procedure executed by the MME - * -------------------------------------------------------------------------- - */ -/**************************************************************************** - ** ** - ** Name: emm_proc_attach_request() ** - ** ** - ** Description: Performs the UE requested attach procedure ** - ** ** - ** 3GPP TS 24.301, section 5.5.1.2.3 ** - ** The network may initiate EMM common procedures, e.g. the ** - ** identification, authentication and security mode control ** - ** procedures during the attach procedure, depending on the ** - ** information received in the ATTACH REQUEST message (e.g. ** - ** IMSI, GUTI and KSI). ** - ** ** - ** Inputs: ueid: UE lower layer identifier ** - ** type: Type of the requested attach ** - ** native_ksi: TRUE if the security context is of type ** - ** native (for KSIASME) ** - ** ksi: The NAS ket sey identifier ** - ** native_guti: TRUE if the provided GUTI is native GUTI ** - ** guti: The GUTI if provided by the UE ** - ** imsi: The IMSI if provided by the UE ** - ** imei: The IMEI if provided by the UE ** - ** tai: Identifies the last visited tracking area ** - ** the UE is registered to ** - ** eea: Supported EPS encryption algorithms ** - ** eia: Supported EPS integrity algorithms ** - ** esm_msg_pP: PDN connectivity request ESM message ** - ** Others: _emm_data ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: _emm_data ** - ** ** - ***************************************************************************/ -int emm_proc_attach_request( - unsigned int ueid, - emm_proc_attach_type_t type, - int native_ksi, int ksi, - int native_guti, - GUTI_t *guti, - imsi_t *imsi, - imei_t *imei, - tai_t *tai, - int eea, int eia, int ucs2, int uea, int uia, int gea, - int umts_present, int gprs_present, - const OctetString *esm_msg_pP) -{ - LOG_FUNC_IN; - - int rc; - emm_data_context_t ue_ctx; - - LOG_TRACE(INFO, "EMM-PROC - EPS attach type = %s (%d) requested (ueid="NAS_UE_ID_FMT")", - _emm_attach_type_str[type], type, ueid); - LOG_TRACE(INFO, "EMM-PROC - umts_present = %u umts_present = %u", - umts_present, gprs_present); - - /* Initialize the temporary UE context */ - memset(&ue_ctx, 0 , sizeof(emm_data_context_t)); - ue_ctx.is_dynamic = FALSE; - ue_ctx.ueid = ueid; - -#if !defined(NAS_BUILT_IN_EPC) - - /* UE identifier sanity check */ - if (ueid >= EMM_DATA_NB_UE_MAX) { - ue_ctx.emm_cause = EMM_CAUSE_ILLEGAL_UE; - /* Do not accept UE with invalid identifier */ - rc = _emm_attach_reject(&ue_ctx); - LOG_FUNC_RETURN(rc); - } - -#endif - - /* 3GPP TS 24.301, section 5.5.1.1 - * MME not configured to support attach for emergency bearer services - * shall reject any request to attach with an attach type set to "EPS - * emergency attach". - */ - if ( !(_emm_data.conf.features & MME_API_EMERGENCY_ATTACH) && - (type == EMM_ATTACH_TYPE_EMERGENCY) ) { - ue_ctx.emm_cause = EMM_CAUSE_IMEI_NOT_ACCEPTED; - /* Do not accept the UE to attach for emergency services */ - rc = _emm_attach_reject(&ue_ctx); - LOG_FUNC_RETURN(rc); - } - - /* Get the UE's EMM context if it exists */ - emm_data_context_t **emm_ctx = NULL; - -#if defined(NAS_BUILT_IN_EPC) - emm_data_context_t *temp = NULL; - - temp = emm_data_context_get(&_emm_data, ueid); - emm_ctx = &temp; -#else - emm_ctx = &_emm_data.ctx[ueid]; -#endif - - if (*emm_ctx != NULL) { - /* An EMM context already exists for the UE in the network */ - if (_emm_attach_have_changed(*emm_ctx, type, ksi, guti, imsi, imei, - eea, eia, ucs2, uea, uia, gea, umts_present, gprs_present)) { - /* - * 3GPP TS 24.301, section 5.5.1.2.7, abnormal case e - * The attach parameters have changed from the one received within - * the previous Attach Request message; - * the previously initiated attach procedure shall be aborted and - * the new attach procedure shall be executed; - */ - LOG_TRACE(WARNING, "EMM-PROC - Attach parameters have changed"); - /* - * Notify EMM that the attach procedure is aborted - */ - emm_sap_t emm_sap; - emm_sap.primitive = EMMREG_PROC_ABORT; - emm_sap.u.emm_reg.ueid = ueid; - emm_sap.u.emm_reg.ctx = *emm_ctx; - - rc = emm_sap_send(&emm_sap); - - if (rc != RETURNerror) { - /* Process new attach procedure */ - LOG_TRACE(WARNING, "EMM-PROC - Initiate new attach procedure"); - rc = emm_proc_attach_request(ueid, type, native_ksi, ksi, - native_guti, guti, imsi, imei, - tai, eea, eia, ucs2, uea, uia, gea, - umts_present, gprs_present, esm_msg_pP); - } - - LOG_FUNC_RETURN(rc); - } else { - /* Continue with the previous attach procedure */ - LOG_TRACE(WARNING, "EMM-PROC - Received duplicated Attach Request"); - LOG_FUNC_RETURN(RETURNok); - } - } else { - /* Create UE's EMM context */ - *emm_ctx = (emm_data_context_t *)calloc(1, sizeof(emm_data_context_t)); - - if (emm_ctx == NULL) { - LOG_TRACE(WARNING, "EMM-PROC - Failed to create EMM context"); - ue_ctx.emm_cause = EMM_CAUSE_ILLEGAL_UE; - /* Do not accept the UE to attach to the network */ - rc = _emm_attach_reject(&ue_ctx); - LOG_FUNC_RETURN(rc); - } - - (*emm_ctx)->is_dynamic = TRUE; - (*emm_ctx)->guti = NULL; - (*emm_ctx)->old_guti = NULL; - (*emm_ctx)->imsi = NULL; - (*emm_ctx)->imei = NULL; - (*emm_ctx)->security = NULL; - (*emm_ctx)->esm_msg.length = 0; - (*emm_ctx)->esm_msg.value = NULL; - (*emm_ctx)->emm_cause = EMM_CAUSE_SUCCESS; - (*emm_ctx)->_emm_fsm_status = EMM_INVALID; - (*emm_ctx)->ueid = ueid; - /* - * Initialize EMM timers - */ - (*emm_ctx)->T3450.id = NAS_TIMER_INACTIVE_ID; - (*emm_ctx)->T3450.sec = T3450_DEFAULT_VALUE; - (*emm_ctx)->T3460.id = NAS_TIMER_INACTIVE_ID; - (*emm_ctx)->T3460.sec = T3460_DEFAULT_VALUE; - (*emm_ctx)->T3470.id = NAS_TIMER_INACTIVE_ID; - (*emm_ctx)->T3470.sec = T3470_DEFAULT_VALUE; - - emm_fsm_set_status(ueid, *emm_ctx, EMM_DEREGISTERED); -#if defined(NAS_BUILT_IN_EPC) - emm_data_context_add(&_emm_data, *(emm_ctx)); -#endif - -#warning "TRICK TO SET TAC, BUT LOOK AT SPEC" - - if (tai) { - LOG_TRACE(WARNING, - "EMM-PROC - Set tac %u in context", - tai->tac); - (*emm_ctx)->tac = tai->tac; - } else { - LOG_TRACE(WARNING, - "EMM-PROC - Could not set tac in context, cause tai is NULL "); - } - } - - /* Update the EMM context with the current attach procedure parameters */ - rc = _emm_attach_update(*emm_ctx, ueid, type, ksi, guti, imsi, imei, - eea, eia, ucs2, uea, uia, gea, umts_present, gprs_present, esm_msg_pP); - - if (rc != RETURNok) { - LOG_TRACE(WARNING, "EMM-PROC - Failed to update EMM context"); - /* Do not accept the UE to attach to the network */ - (*emm_ctx)->emm_cause = EMM_CAUSE_ILLEGAL_UE; - rc = _emm_attach_reject(*emm_ctx); - } else { - /* - * Performs UE identification - */ - rc = _emm_attach_identify(*emm_ctx); - } - - LOG_FUNC_RETURN(rc); -} - -/**************************************************************************** - ** ** - ** Name: emm_proc_attach_reject() ** - ** ** - ** Description: Performs the protocol error abnormal case ** - ** ** - ** 3GPP TS 24.301, section 5.5.1.2.7, case b ** - ** If the ATTACH REQUEST message is received with a protocol ** - ** error, the network shall return an ATTACH REJECT message. ** - ** ** - ** Inputs: ueid: UE lower layer identifier ** - ** emm_cause: EMM cause code to be reported ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: _emm_data ** - ** ** - ***************************************************************************/ -int emm_proc_attach_reject(unsigned int ueid, int emm_cause) -{ - LOG_FUNC_IN; - - int rc; - - /* Create temporary UE context */ - emm_data_context_t ue_ctx; - memset(&ue_ctx, 0 , sizeof(emm_data_context_t)); - ue_ctx.is_dynamic = FALSE; - ue_ctx.ueid = ueid; - - /* Update the EMM cause code */ -#if defined(NAS_BUILT_IN_EPC) - - if (ueid > 0) -#else - if (ueid < EMM_DATA_NB_UE_MAX) -#endif - { - ue_ctx.emm_cause = emm_cause; - } else { - ue_ctx.emm_cause = EMM_CAUSE_ILLEGAL_UE; - } - - /* Do not accept attach request with protocol error */ - rc = _emm_attach_reject(&ue_ctx); - - LOG_FUNC_RETURN(rc); -} - -/**************************************************************************** - ** ** - ** Name: emm_proc_attach_complete() ** - ** ** - ** Description: Terminates the attach procedure upon receiving Attach ** - ** Complete message from the UE. ** - ** ** - ** 3GPP TS 24.301, section 5.5.1.2.4 ** - ** Upon receiving an ATTACH COMPLETE message, the MME shall ** - ** stop timer T3450, enter state EMM-REGISTERED and consider ** - ** the GUTI sent in the ATTACH ACCEPT message as valid. ** - ** ** - ** Inputs: ueid: UE lower layer identifier ** - ** esm_msg_pP: Activate default EPS bearer context accept ** - ** ESM message ** - ** Others: _emm_data ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: _emm_data, T3450 ** - ** ** - ***************************************************************************/ -int emm_proc_attach_complete(unsigned int ueid, const OctetString *esm_msg_pP) -{ - emm_data_context_t *emm_ctx = NULL; - int rc = RETURNerror; - emm_sap_t emm_sap; - esm_sap_t esm_sap; - - LOG_FUNC_IN; - - LOG_TRACE(INFO, "EMM-PROC - EPS attach complete (ueid="NAS_UE_ID_FMT")", ueid); - - /* Release retransmission timer parameters */ - attach_data_t *data = (attach_data_t *)(emm_proc_common_get_args(ueid)); - - if (data) { - if (data->esm_msg.length > 0) { - free(data->esm_msg.value); - } - free(data); - } - - /* Get the UE context */ -#if defined(NAS_BUILT_IN_EPC) - if (ueid > 0) { - emm_ctx = emm_data_context_get(&_emm_data, ueid); - } -#else - if (ueid < EMM_DATA_NB_UE_MAX) { - emm_ctx = _emm_data.ctx[ueid]; - } -#endif - - if (emm_ctx) { - /* Stop timer T3450 */ - LOG_TRACE(INFO, "EMM-PROC - Stop timer T3450 (%d)", emm_ctx->T3450.id); - emm_ctx->T3450.id = nas_timer_stop(emm_ctx->T3450.id); - MSC_LOG_EVENT(MSC_NAS_EMM_MME, "0 T3450 stopped UE "NAS_UE_ID_FMT" ", ueid); - - /* Delete the old GUTI and consider the GUTI sent in the Attach - * Accept message as valid */ - emm_ctx->guti_is_new = FALSE; - emm_ctx->old_guti = NULL; - /* - * Forward the Activate Default EPS Bearer Context Accept message - * to the EPS session management sublayer - */ - esm_sap.primitive = ESM_DEFAULT_EPS_BEARER_CONTEXT_ACTIVATE_CNF; - esm_sap.is_standalone = FALSE; - esm_sap.ueid = ueid; - esm_sap.recv = esm_msg_pP; - esm_sap.ctx = emm_ctx; - rc = esm_sap_send(&esm_sap); - } else { - LOG_TRACE(ERROR, "EMM-PROC - No EMM context exists"); - } - - if ( (rc != RETURNerror) && (esm_sap.err == ESM_SAP_SUCCESS) ) { - /* Set the network attachment indicator */ - emm_ctx->is_attached = TRUE; - /* - * Notify EMM that attach procedure has successfully completed - */ - emm_sap.primitive = EMMREG_ATTACH_CNF; - emm_sap.u.emm_reg.ueid = ueid; - emm_sap.u.emm_reg.ctx = emm_ctx; - rc = emm_sap_send(&emm_sap); - } else if (esm_sap.err != ESM_SAP_DISCARDED) { - /* - * Notify EMM that attach procedure failed - */ - emm_sap.primitive = EMMREG_ATTACH_REJ; - emm_sap.u.emm_reg.ueid = ueid; - emm_sap.u.emm_reg.ctx = emm_ctx; - rc = emm_sap_send(&emm_sap); - } else { - /* - * ESM procedure failed and, received message has been discarded or - * Status message has been returned; ignore ESM procedure failure - */ - rc = RETURNok; - } - - LOG_FUNC_RETURN(rc); -} - - -/****************************************************************************/ -/********************* L O C A L F U N C T I O N S *********************/ -/****************************************************************************/ - - - -/* - * -------------------------------------------------------------------------- - * Timer handlers - * -------------------------------------------------------------------------- - */ - -/**************************************************************************** - ** ** - ** Name: _emm_attach_t3450_handler() ** - ** ** - ** Description: T3450 timeout handler ** - ** ** - ** 3GPP TS 24.301, section 5.5.1.2.7, case c ** - ** On the first expiry of the timer T3450, the network shall ** - ** retransmit the ATTACH ACCEPT message and shall reset and ** - ** restart timer T3450. This retransmission is repeated four ** - ** times, i.e. on the fifth expiry of timer T3450, the at- ** - ** tach procedure shall be aborted and the MME enters state ** - ** EMM-DEREGISTERED. ** - ** ** - ** Inputs: args: handler parameters ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: None ** - ** Others: None ** - ** ** - ***************************************************************************/ -static void *_emm_attach_t3450_handler(void *args) -{ - LOG_FUNC_IN; - - int rc; - - attach_data_t *data = (attach_data_t *)(args); - - /* Increment the retransmission counter */ - data->retransmission_count += 1; - - LOG_TRACE(WARNING, "EMM-PROC - T3450 timer expired, retransmission " - "counter = %d", data->retransmission_count); - - /* Get the UE's EMM context */ - emm_data_context_t *emm_ctx = NULL; - -#if defined(NAS_BUILT_IN_EPC) - emm_ctx = emm_data_context_get(&_emm_data, data->ueid); -#else - emm_ctx = _emm_data.ctx[data->ueid]; -#endif - - if (data->retransmission_count < ATTACH_COUNTER_MAX) { - /* Send attach accept message to the UE */ - rc = _emm_attach_accept(emm_ctx, data); - } else { - /* Abort the attach procedure */ - rc = _emm_attach_abort(data); - } - - LOG_FUNC_RETURN(NULL); -} - -/* - * -------------------------------------------------------------------------- - * Abnormal cases in the MME - * -------------------------------------------------------------------------- - */ - -/**************************************************************************** - ** ** - ** Name: _emm_attach_release() ** - ** ** - ** Description: Releases the UE context data. ** - ** ** - ** Inputs: args: Data to be released ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: None ** - ** Others: None ** - ** ** - ***************************************************************************/ -static int _emm_attach_release(void *args) -{ - LOG_FUNC_IN; - - int rc = RETURNerror; - - emm_data_context_t *emm_ctx = (emm_data_context_t *)(args); - - if (emm_ctx) { - LOG_TRACE(WARNING, "EMM-PROC - Release UE context data (ueid="NAS_UE_ID_FMT")", - emm_ctx->ueid); - - unsigned int ueid = emm_ctx->ueid; - - if (emm_ctx->guti) { - free(emm_ctx->guti); - emm_ctx->guti = NULL; - } - - if (emm_ctx->imsi) { - free(emm_ctx->imsi); - emm_ctx->imsi = NULL; - } - - if (emm_ctx->imei) { - free(emm_ctx->imei); - emm_ctx->imei = NULL; - } - - if (emm_ctx->esm_msg.length > 0) { - free(emm_ctx->esm_msg.value); - emm_ctx->esm_msg.value = NULL; - } - - /* Release NAS security context */ - if (emm_ctx->security) { - emm_security_context_t *security = emm_ctx->security; - - if (security->kasme.value) { - free(security->kasme.value); - security->kasme.value = NULL; - security->kasme.length = 0; - } - - if (security->knas_enc.value) { - free(security->knas_enc.value); - security->knas_enc.value = NULL; - security->knas_enc.length = 0; - } - - if (security->knas_int.value) { - free(security->knas_int.value); - security->knas_int.value = NULL; - security->knas_int.length = 0; - } - - free(emm_ctx->security); - emm_ctx->security = NULL; - } - - /* Stop timer T3450 */ - if (emm_ctx->T3450.id != NAS_TIMER_INACTIVE_ID) { - LOG_TRACE(INFO, "EMM-PROC - Stop timer T3450 (%d)", emm_ctx->T3450.id); - emm_ctx->T3450.id = nas_timer_stop(emm_ctx->T3450.id); - MSC_LOG_EVENT(MSC_NAS_EMM_MME, "0 T3450 stopped UE "NAS_UE_ID_FMT" ", emm_ctx->ueid); - } - /* Stop timer T3460 */ - if (emm_ctx->T3460.id != NAS_TIMER_INACTIVE_ID) { - LOG_TRACE(INFO, "EMM-PROC - Stop timer T3460 (%d)", emm_ctx->T3460.id); - emm_ctx->T3460.id = nas_timer_stop(emm_ctx->T3460.id); - MSC_LOG_EVENT(MSC_NAS_EMM_MME, "0 T3460 stopped UE "NAS_UE_ID_FMT" ", emm_ctx->ueid); - } - /* Stop timer T3470 */ - if (emm_ctx->T3470.id != NAS_TIMER_INACTIVE_ID) { - LOG_TRACE(INFO, "EMM-PROC - Stop timer T3470 (%d)", emm_ctx->T3460.id); - emm_ctx->T3470.id = nas_timer_stop(emm_ctx->T3470.id); - MSC_LOG_EVENT(MSC_NAS_EMM_MME, "0 T3470 stopped UE "NAS_UE_ID_FMT" ", emm_ctx->ueid); - } - - /* Release the EMM context */ -#if defined(NAS_BUILT_IN_EPC) - emm_data_context_remove(&_emm_data, emm_ctx); -#else - free(_emm_data.ctx[ueid]); - _emm_data.ctx[ueid] = NULL; -#endif - /* - * Notify EMM that the attach procedure is aborted - */ - emm_sap_t emm_sap; - emm_sap.primitive = EMMREG_PROC_ABORT; - emm_sap.u.emm_reg.ueid = ueid; - emm_sap.u.emm_reg.ctx = emm_ctx; - rc = emm_sap_send(&emm_sap); - } - - LOG_FUNC_RETURN(rc); -} - -/**************************************************************************** - ** ** - ** Name: _emm_attach_reject() ** - ** ** - ** Description: Performs the attach procedure not accepted by the network.** - ** ** - ** 3GPP TS 24.301, section 5.5.1.2.5 ** - ** If the attach request cannot be accepted by the network, ** - ** the MME shall send an ATTACH REJECT message to the UE in- ** - ** including an appropriate EMM cause value. ** - ** ** - ** Inputs: args: UE context data ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -static int _emm_attach_reject(void *args) -{ - LOG_FUNC_IN; - - int rc = RETURNerror; - - emm_data_context_t *emm_ctx = (emm_data_context_t *)(args); - - if (emm_ctx) { - emm_sap_t emm_sap; - LOG_TRACE(WARNING, "EMM-PROC - EMM attach procedure not accepted " - "by the network (ueid="NAS_UE_ID_FMT", cause=%d)", - emm_ctx->ueid, emm_ctx->emm_cause); - /* - * Notify EMM-AS SAP that Attach Reject message has to be sent - * onto the network - */ - emm_sap.primitive = EMMAS_ESTABLISH_REJ; - emm_sap.u.emm_as.u.establish.ueid = emm_ctx->ueid; - emm_sap.u.emm_as.u.establish.UEid.guti = NULL; - - if (emm_ctx->emm_cause == EMM_CAUSE_SUCCESS) { - emm_ctx->emm_cause = EMM_CAUSE_ILLEGAL_UE; - } - - emm_sap.u.emm_as.u.establish.emm_cause = emm_ctx->emm_cause; - emm_sap.u.emm_as.u.establish.NASinfo = EMM_AS_NAS_INFO_ATTACH; - - if (emm_ctx->emm_cause != EMM_CAUSE_ESM_FAILURE) { - emm_sap.u.emm_as.u.establish.NASmsg.length = 0; - emm_sap.u.emm_as.u.establish.NASmsg.value = NULL; - } else if (emm_ctx->esm_msg.length > 0) { - emm_sap.u.emm_as.u.establish.NASmsg = emm_ctx->esm_msg; - } else { - LOG_TRACE(ERROR, "EMM-PROC - ESM message is missing"); - LOG_FUNC_RETURN(RETURNerror); - } - - /* Setup EPS NAS security data */ - emm_as_set_security_data(&emm_sap.u.emm_as.u.establish.sctx, - emm_ctx->security, FALSE, TRUE); - rc = emm_sap_send(&emm_sap); - - /* Release the UE context, even if the network failed to send the - * ATTACH REJECT message */ - if (emm_ctx->is_dynamic) { - rc = _emm_attach_release(emm_ctx); - } - } - - LOG_FUNC_RETURN(rc); -} - -/**************************************************************************** - ** ** - ** Name: _emm_attach_abort() ** - ** ** - ** Description: Aborts the attach procedure ** - ** ** - ** Inputs: args: Attach procedure data to be released ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: T3450 ** - ** ** - ***************************************************************************/ -static int _emm_attach_abort(void *args) -{ - int rc = RETURNerror; - emm_data_context_t *ctx = NULL; - attach_data_t *data; - - LOG_FUNC_IN; - - data = (attach_data_t *)(args); - - if (data) { - unsigned int ueid = data->ueid; - esm_sap_t esm_sap; - - LOG_TRACE(WARNING, "EMM-PROC - Abort the attach procedure (ueid="NAS_UE_ID_FMT")", - ueid); -#if defined(NAS_BUILT_IN_EPC) - ctx = emm_data_context_get(&_emm_data, ueid); -#else - ctx = _emm_data.ctx[ueid]; -#endif - if (ctx) { - /* Stop timer T3450 */ - if (ctx->T3450.id != NAS_TIMER_INACTIVE_ID) { - LOG_TRACE(INFO, "EMM-PROC - Stop timer T3450 (%d)", ctx->T3450.id); - ctx->T3450.id = nas_timer_stop(ctx->T3450.id); - MSC_LOG_EVENT(MSC_NAS_EMM_MME, "0 T3450 stopped UE "NAS_UE_ID_FMT" ", data->ueid); - } - } - - /* Release retransmission timer parameters */ - if (data->esm_msg.length > 0) { - free(data->esm_msg.value); - } - - free(data); - - - - /* - * Notify ESM that the network locally refused PDN connectivity - * to the UE - */ - esm_sap.primitive = ESM_PDN_CONNECTIVITY_REJ; - esm_sap.ueid = ueid; - esm_sap.ctx = ctx; - esm_sap.recv = NULL; - rc = esm_sap_send(&esm_sap); - - if (rc != RETURNerror) { - /* - * Notify EMM that EPS attach procedure failed - */ - emm_sap_t emm_sap; - emm_sap.primitive = EMMREG_ATTACH_REJ; - emm_sap.u.emm_reg.ueid = ueid; - emm_sap.u.emm_reg.ctx = ctx; - rc = emm_sap_send(&emm_sap); - - if (rc != RETURNerror) { - /* Release the UE context */ - rc = _emm_attach_release(ctx); - } - } - } - - LOG_FUNC_RETURN (rc); -} - -/* - * -------------------------------------------------------------------------- - * Functions that may initiate EMM common procedures - * -------------------------------------------------------------------------- - */ - -/**************************************************************************** - ** ** - ** Name: _emm_attach_identify() ** - ** ** - ** Description: Performs UE's identification. May initiates identifica- ** - ** tion, authentication and security mode control EMM common ** - ** procedures. ** - ** ** - ** Inputs: args: Identification argument parameters ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: _emm_data ** - ** ** - ***************************************************************************/ -static int _emm_attach_identify(void *args) -{ - int rc = RETURNerror; - emm_data_context_t *emm_ctx = (emm_data_context_t *)(args); - int guti_reallocation = FALSE; - - LOG_FUNC_IN; - - LOG_TRACE(INFO, "EMM-PROC - Identify incoming UE (ueid="NAS_UE_ID_FMT") using %s", - emm_ctx->ueid, (emm_ctx->imsi)? "IMSI" : (emm_ctx->guti)? "GUTI" : - (emm_ctx->imei)? "IMEI" : "none"); - - /* - * UE's identification - * ------------------- - */ - if (emm_ctx->imsi) { - /* The UE identifies itself using an IMSI */ -#if defined(NAS_BUILT_IN_EPC) - if (!emm_ctx->security) { - /* Ask upper layer to fetch new security context */ - nas_itti_auth_info_req(emm_ctx->ueid, emm_ctx->imsi, 1, NULL); - - rc = RETURNok; - } else -#endif - { - rc = mme_api_identify_imsi(emm_ctx->imsi, &emm_ctx->vector); - - if (rc != RETURNok) { - LOG_TRACE(WARNING, "EMM-PROC - " - "Failed to identify the UE using provided IMSI"); - emm_ctx->emm_cause = EMM_CAUSE_ILLEGAL_UE; - } - - guti_reallocation = TRUE; - } - } else if (emm_ctx->guti) { - /* The UE identifies itself using a GUTI */ - rc = mme_api_identify_guti(emm_ctx->guti, &emm_ctx->vector); - - if (rc != RETURNok) { - LOG_TRACE(WARNING, "EMM-PROC - Failed to identify the UE using " - "provided GUTI (tmsi=%u)", emm_ctx->guti->m_tmsi); - /* 3GPP TS 24.401, Figure 5.3.2.1-1, point 4 - * The UE was attempting to attach to the network using a GUTI - * that is not known by the network; the MME shall initiate an - * identification procedure to retrieve the IMSI from the UE. - */ - rc = emm_proc_identification(emm_ctx->ueid, - emm_ctx, - EMM_IDENT_TYPE_IMSI, - _emm_attach_identify, - _emm_attach_release, - _emm_attach_release); - - if (rc != RETURNok) { - /* Failed to initiate the identification procedure */ - LOG_TRACE(WARNING, "EMM-PROC - " - "Failed to initiate identification procedure"); - emm_ctx->emm_cause = EMM_CAUSE_ILLEGAL_UE; - /* Do not accept the UE to attach to the network */ - rc = _emm_attach_reject(emm_ctx); - } - - /* Relevant callback will be executed when identification - * procedure completes */ - LOG_FUNC_RETURN(rc); - } - } else if ( (emm_ctx->imei) && (emm_ctx->is_emergency) ) { - /* The UE is attempting to attach to the network for emergency - * services using an IMEI */ - rc = mme_api_identify_imei(emm_ctx->imei, &emm_ctx->vector); - - if (rc != RETURNok) { - LOG_TRACE(WARNING, "EMM-PROC - " - "Failed to identify the UE using provided IMEI"); - emm_ctx->emm_cause = EMM_CAUSE_IMEI_NOT_ACCEPTED; - } - } else { - LOG_TRACE(WARNING, "EMM-PROC - UE's identity is not available"); - emm_ctx->emm_cause = EMM_CAUSE_ILLEGAL_UE; - } - - /* - * GUTI reallocation - * ----------------- - */ - if ( (rc != RETURNerror) && guti_reallocation ) { - /* Release the old GUTI */ - if (emm_ctx->old_guti) { - free(emm_ctx->old_guti); - } - - /* Save the GUTI previously used by the UE to identify itself */ - emm_ctx->old_guti = emm_ctx->guti; - /* Allocate a new GUTI */ - emm_ctx->guti = (GUTI_t *)malloc(sizeof(GUTI_t)); - /* Request the MME to assign a GUTI to the UE */ - rc = mme_api_new_guti(emm_ctx->imsi, emm_ctx->guti, - &emm_ctx->tac, &emm_ctx->n_tacs); - - if (rc != RETURNok) { - LOG_TRACE(WARNING, "EMM-PROC - Failed to assign new GUTI"); - emm_ctx->emm_cause = EMM_CAUSE_ILLEGAL_UE; - } else { - LOG_TRACE(WARNING, "EMM-PROC - New GUTI assigned to the UE " - "(tmsi=%u)", emm_ctx->guti->m_tmsi); - /* Update the GUTI indicator as new */ - emm_ctx->guti_is_new = TRUE; - } - } - - /* - * UE's authentication - * ------------------- - */ - if (rc != RETURNerror) { - if (emm_ctx->security) { - /* A security context exists for the UE in the network; - * proceed with the attach procedure. - */ - rc = _emm_attach(emm_ctx); - } else if ( (emm_ctx->is_emergency) && - (_emm_data.conf.features & MME_API_UNAUTHENTICATED_IMSI) ) { - /* 3GPP TS 24.301, section 5.5.1.2.3 - * 3GPP TS 24.401, Figure 5.3.2.1-1, point 5a - * MME configured to support Emergency Attach for unauthenticated - * IMSIs may choose to skip the authentication procedure even if - * no EPS security context is available and proceed directly to the - * execution of the security mode control procedure. - */ - rc = _emm_attach_security(emm_ctx); - } - -#if !defined(NAS_BUILT_IN_EPC) - else { - /* 3GPP TS 24.401, Figure 5.3.2.1-1, point 5a - * No EMM context exists for the UE in the network; authentication - * and NAS security setup to activate integrity protection and NAS - * ciphering are mandatory. - */ - auth_vector_t *auth = &emm_ctx->vector; - const OctetString loc_rand = {AUTH_RAND_SIZE, (uint8_t *)auth->rand}; - const OctetString autn = {AUTH_AUTN_SIZE, (uint8_t *)auth->autn}; - rc = emm_proc_authentication(emm_ctx, emm_ctx->ueid, 0, // TODO: eksi != 0 - &loc_rand, &autn, - _emm_attach_security, - _emm_attach_release, - _emm_attach_release); - - if (rc != RETURNok) { - /* Failed to initiate the authentication procedure */ - LOG_TRACE(WARNING, "EMM-PROC - " - "Failed to initiate authentication procedure"); - emm_ctx->emm_cause = EMM_CAUSE_ILLEGAL_UE; - } - } - -#endif - } - - if (rc != RETURNok) { - /* Do not accept the UE to attach to the network */ - rc = _emm_attach_reject(emm_ctx); - } - - LOG_FUNC_RETURN (rc); -} - -/**************************************************************************** - ** ** - ** Name: _emm_attach_security() ** - ** ** - ** Description: Initiates security mode control EMM common procedure. ** - ** ** - ** Inputs: args: security argument parameters ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: _emm_data ** - ** ** - ***************************************************************************/ -#if defined(NAS_BUILT_IN_EPC) -int emm_attach_security(void *args) -{ - return _emm_attach_security(args); -} -#endif - -static int _emm_attach_security(void *args) -{ - LOG_FUNC_IN; - - int rc; - emm_data_context_t *emm_ctx = (emm_data_context_t *)(args); - - LOG_TRACE(INFO, "EMM-PROC - Setup NAS security (ueid="NAS_UE_ID_FMT")", emm_ctx->ueid); - - /* Create new NAS security context */ - if (emm_ctx->security == NULL) { - emm_ctx->security = - (emm_security_context_t *)malloc(sizeof(emm_security_context_t)); - } - - if (emm_ctx->security) { - memset(emm_ctx->security, 0, sizeof(emm_security_context_t)); - emm_ctx->security->type = EMM_KSI_NOT_AVAILABLE; - emm_ctx->security->selected_algorithms.encryption = NAS_SECURITY_ALGORITHMS_EEA0; - emm_ctx->security->selected_algorithms.integrity = NAS_SECURITY_ALGORITHMS_EIA0; - } else { - LOG_TRACE(WARNING, "EMM-PROC - Failed to create security context"); - emm_ctx->emm_cause = EMM_CAUSE_ILLEGAL_UE; - /* Do not accept the UE to attach to the network */ - rc = _emm_attach_reject(emm_ctx); - LOG_FUNC_RETURN(rc); - } - - /* Initialize the security mode control procedure */ - rc = emm_proc_security_mode_control(emm_ctx->ueid, 0, // TODO: eksi != 0 - emm_ctx->eea, emm_ctx->eia,emm_ctx->ucs2, - emm_ctx->uea, emm_ctx->uia, emm_ctx->gea, - emm_ctx->umts_present, emm_ctx->gprs_present, - _emm_attach, _emm_attach_release, - _emm_attach_release); - - if (rc != RETURNok) { - /* Failed to initiate the security mode control procedure */ - LOG_TRACE(WARNING, "EMM-PROC - " - "Failed to initiate security mode control procedure"); - emm_ctx->emm_cause = EMM_CAUSE_ILLEGAL_UE; - /* Do not accept the UE to attach to the network */ - rc = _emm_attach_reject(emm_ctx); - } - - LOG_FUNC_RETURN (rc); -} - -/* - * -------------------------------------------------------------------------- - * MME specific local functions - * -------------------------------------------------------------------------- - */ - -/**************************************************************************** - ** ** - ** Name: _emm_attach() ** - ** ** - ** Description: Performs the attach signalling procedure while a context ** - ** exists for the incoming UE in the network. ** - ** ** - ** 3GPP TS 24.301, section 5.5.1.2.4 ** - ** Upon receiving the ATTACH REQUEST message, the MME shall ** - ** send an ATTACH ACCEPT message to the UE and start timer ** - ** T3450. ** - ** ** - ** Inputs: args: attach argument parameters ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: _emm_data ** - ** ** - ***************************************************************************/ -static int _emm_attach(void *args) -{ - LOG_FUNC_IN; - - esm_sap_t esm_sap; - int rc; - - emm_data_context_t *emm_ctx = (emm_data_context_t *)(args); - - LOG_TRACE(INFO, "EMM-PROC - Attach UE (ueid="NAS_UE_ID_FMT")", emm_ctx->ueid); - - /* 3GPP TS 24.401, Figure 5.3.2.1-1, point 5a - * At this point, all NAS messages shall be protected by the NAS security - * functions (integrity and ciphering) indicated by the MME unless the UE - * is emergency attached and not successfully authenticated. - */ - - /* - * Notify ESM that PDN connectivity is requested - */ - esm_sap.primitive = ESM_PDN_CONNECTIVITY_REQ; - esm_sap.is_standalone = FALSE; - esm_sap.ueid = emm_ctx->ueid; - esm_sap.ctx = emm_ctx; - esm_sap.recv = &emm_ctx->esm_msg; - rc = esm_sap_send(&esm_sap); - - if ( (rc != RETURNerror) && (esm_sap.err == ESM_SAP_SUCCESS) ) { - /* - * The attach request is accepted by the network - */ - - /* Delete the stored UE radio capability information, if any */ - /* Store the UE network capability */ - /* Assign the TAI list the UE is registered to */ - - /* Allocate parameters of the retransmission timer callback */ - attach_data_t *data = (attach_data_t *)calloc(1,sizeof(attach_data_t)); - - if (data != NULL) { - /* Setup ongoing EMM procedure callback functions */ - rc = emm_proc_common_initialize(emm_ctx->ueid, NULL, NULL, NULL, - _emm_attach_abort, data); - - if (rc != RETURNok) { - LOG_TRACE(WARNING, - "Failed to initialize EMM callback functions"); - free(data); - LOG_FUNC_RETURN (RETURNerror); - } - - /* Set the UE identifier */ - data->ueid = emm_ctx->ueid; - /* Reset the retransmission counter */ - data->retransmission_count = 0; -#if defined(ORIGINAL_CODE) - /* Setup the ESM message container */ - data->esm_msg.value = (uint8_t *)malloc(esm_sap.send.length); - - if (data->esm_msg.value) { - data->esm_msg.length = esm_sap.send.length; - memcpy(data->esm_msg.value, esm_sap.send.value, - esm_sap.send.length); - } else { - data->esm_msg.length = 0; - } - - /* Send attach accept message to the UE */ - rc = _emm_attach_accept(emm_ctx, data); - - if (rc != RETURNerror) { - if (emm_ctx->guti_is_new && emm_ctx->old_guti) { - /* Implicit GUTI reallocation; - * Notify EMM that common procedure has been initiated - */ - emm_sap_t emm_sap; - emm_sap.primitive = EMMREG_COMMON_PROC_REQ; - emm_sap.u.emm_reg.ueid = data->ueid; - rc = emm_sap_send(&emm_sap); - } - } - -#else - rc = RETURNok; -#endif - } - } else if (esm_sap.err != ESM_SAP_DISCARDED) { - /* - * The attach procedure failed due to an ESM procedure failure - */ - emm_ctx->emm_cause = EMM_CAUSE_ESM_FAILURE; - - /* Setup the ESM message container to include PDN Connectivity Reject - * message within the Attach Reject message */ - if (emm_ctx->esm_msg.length > 0) { - free(emm_ctx->esm_msg.value); - } - - emm_ctx->esm_msg.value = (uint8_t *)malloc(esm_sap.send.length); - - if (emm_ctx->esm_msg.value) { - emm_ctx->esm_msg.length = esm_sap.send.length; - memcpy(emm_ctx->esm_msg.value, esm_sap.send.value, - esm_sap.send.length); - /* Send Attach Reject message */ - rc = _emm_attach_reject(emm_ctx); - } else { - emm_ctx->esm_msg.length = 0; - } - } else { - /* - * ESM procedure failed and, received message has been discarded or - * Status message has been returned; ignore ESM procedure failure - */ - rc = RETURNok; - } - - if (rc != RETURNok) { - /* The attach procedure failed */ - LOG_TRACE(WARNING, "EMM-PROC - Failed to respond to Attach Request"); - emm_ctx->emm_cause = EMM_CAUSE_PROTOCOL_ERROR; - /* Do not accept the UE to attach to the network */ - rc = _emm_attach_reject(emm_ctx); - } - - LOG_FUNC_RETURN (rc); -} - -int emm_cn_wrapper_attach_accept(emm_data_context_t *emm_ctx, void *data) -{ - return _emm_attach_accept(emm_ctx,(attach_data_t *)data); -} -/**************************************************************************** - ** ** - ** Name: _emm_attach_accept() ** - ** ** - ** Description: Sends ATTACH ACCEPT message and start timer T3450 ** - ** ** - ** Inputs: data: Attach accept retransmission data ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: T3450 ** - ** ** - ***************************************************************************/ -static int _emm_attach_accept(emm_data_context_t *emm_ctx, attach_data_t *data) -{ - LOG_FUNC_IN; - - emm_sap_t emm_sap; - int rc; - - // may be caused by timer not stopped when deleted context - if (emm_ctx) { - /* - * Notify EMM-AS SAP that Attach Accept message together with an Activate - * Default EPS Bearer Context Request message has to be sent to the UE - */ - - emm_sap.primitive = EMMAS_ESTABLISH_CNF; - emm_sap.u.emm_as.u.establish.ueid = emm_ctx->ueid; - - if (emm_ctx->guti_is_new && emm_ctx->old_guti) { - /* Implicit GUTI reallocation; - * include the new assigned GUTI in the Attach Accept message */ - LOG_TRACE(INFO,"EMM-PROC - Implicit GUTI reallocation, include the new assigned GUTI in the Attach Accept message"); - emm_sap.u.emm_as.u.establish.UEid.guti = emm_ctx->old_guti; - emm_sap.u.emm_as.u.establish.new_guti = emm_ctx->guti; - } else if (emm_ctx->guti_is_new && emm_ctx->guti) { - /* include the new assigned GUTI in the Attach Accept message */ - LOG_TRACE(INFO,"EMM-PROC - Include the new assigned GUTI in the Attach Accept message"); - emm_sap.u.emm_as.u.establish.UEid.guti = emm_ctx->guti; - emm_sap.u.emm_as.u.establish.new_guti = emm_ctx->guti; - } else { - emm_sap.u.emm_as.u.establish.UEid.guti = emm_ctx->guti; -#warning "TEST LG FORCE GUTI IE IN ATTACH ACCEPT" - emm_sap.u.emm_as.u.establish.new_guti = emm_ctx->guti; - //emm_sap.u.emm_as.u.establish.new_guti = NULL; - } - - emm_sap.u.emm_as.u.establish.n_tacs = emm_ctx->n_tacs; - emm_sap.u.emm_as.u.establish.tac = emm_ctx->tac; - emm_sap.u.emm_as.u.establish.NASinfo = EMM_AS_NAS_INFO_ATTACH; - /* Setup EPS NAS security data */ - emm_as_set_security_data(&emm_sap.u.emm_as.u.establish.sctx, - emm_ctx->security, FALSE, TRUE); - - LOG_TRACE(INFO,"EMM-PROC - encryption = 0x%X ", emm_sap.u.emm_as.u.establish.encryption); - LOG_TRACE(INFO,"EMM-PROC - integrity = 0x%X ", emm_sap.u.emm_as.u.establish.integrity); - emm_sap.u.emm_as.u.establish.encryption = emm_ctx->security->selected_algorithms.encryption; - emm_sap.u.emm_as.u.establish.integrity = emm_ctx->security->selected_algorithms.integrity; - LOG_TRACE(INFO,"EMM-PROC - encryption = 0x%X (0x%X)", - emm_sap.u.emm_as.u.establish.encryption, - emm_ctx->security->selected_algorithms.encryption); - LOG_TRACE(INFO,"EMM-PROC - integrity = 0x%X (0x%X)", - emm_sap.u.emm_as.u.establish.integrity, - emm_ctx->security->selected_algorithms.integrity); - - /* Get the activate default EPS bearer context request message to - * transfer within the ESM container of the attach accept message */ - emm_sap.u.emm_as.u.establish.NASmsg = data->esm_msg; - LOG_TRACE(INFO,"EMM-PROC - NASmsg src size = %d NASmsg dst size = %d ", - data->esm_msg.length, emm_sap.u.emm_as.u.establish.NASmsg.length); - - rc = emm_sap_send(&emm_sap); - - if (rc != RETURNerror) { - if (emm_ctx->T3450.id != NAS_TIMER_INACTIVE_ID) { - /* Re-start T3450 timer */ - emm_ctx->T3450.id = nas_timer_restart(emm_ctx->T3450.id); - MSC_LOG_EVENT(MSC_NAS_EMM_MME, "0 T3450 restarted UE "NAS_UE_ID_FMT"", data->ueid); - } else { - /* Start T3450 timer */ - emm_ctx->T3450.id = nas_timer_start(emm_ctx->T3450.sec, _emm_attach_t3450_handler, data); - MSC_LOG_EVENT(MSC_NAS_EMM_MME, "0 T3450 started UE "NAS_UE_ID_FMT" ", data->ueid); - } - - LOG_TRACE(INFO,"EMM-PROC - Timer T3450 (%d) expires in %ld seconds", - emm_ctx->T3450.id, emm_ctx->T3450.sec); - } - } else { - LOG_TRACE(WARNING,"EMM-PROC - emm_ctx NULL"); - } - LOG_FUNC_RETURN (rc); -} - -/**************************************************************************** - ** ** - ** Name: _emm_attach_have_changed() ** - ** ** - ** Description: Check whether the given attach parameters differs from ** - ** those previously stored when the attach procedure has ** - ** been initiated. ** - ** ** - ** Inputs: ctx: EMM context of the UE in the network ** - ** type: Type of the requested attach ** - ** ksi: Security ket sey identifier ** - ** guti: The GUTI provided by the UE ** - ** imsi: The IMSI provided by the UE ** - ** imei: The IMEI provided by the UE ** - ** eea: Supported EPS encryption algorithms ** - ** eia: Supported EPS integrity algorithms ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: TRUE if at least one of the parameters ** - ** differs; FALSE otherwise. ** - ** Others: None ** - ** ** - ***************************************************************************/ -static int _emm_attach_have_changed(const emm_data_context_t *ctx, - emm_proc_attach_type_t type, int ksi, - GUTI_t *guti, imsi_t *imsi, imei_t *imei, - int eea, int eia, int ucs2, int uea, int uia, int gea, - int umts_present, int gprs_present) -{ - LOG_FUNC_IN; - - /* Emergency bearer services indicator */ - if ( (type == EMM_ATTACH_TYPE_EMERGENCY) != ctx->is_emergency) { - LOG_FUNC_RETURN (TRUE); - } - - /* Security key set identifier */ - if (ksi != ctx->ksi) { - LOG_FUNC_RETURN (TRUE); - } - - /* Supported EPS encryption algorithms */ - if (eea != ctx->eea) { - LOG_FUNC_RETURN (TRUE); - } - - /* Supported EPS integrity algorithms */ - if (eia != ctx->eia) { - LOG_FUNC_RETURN (TRUE); - } - - if (umts_present != ctx->umts_present) { - LOG_FUNC_RETURN (TRUE); - } - - if (ctx->umts_present) { - if (ucs2 != ctx->ucs2) { - LOG_FUNC_RETURN (TRUE); - } - - /* Supported UMTS encryption algorithms */ - if (uea != ctx->uea) { - LOG_FUNC_RETURN (TRUE); - } - - /* Supported UMTS integrity algorithms */ - if (uia != ctx->uia) { - LOG_FUNC_RETURN (TRUE); - } - } - - if (gprs_present != ctx->gprs_present) { - LOG_FUNC_RETURN (TRUE); - } - - if (ctx->gprs_present) { - if (gea != ctx->gea) { - LOG_FUNC_RETURN (TRUE); - } - } - - /* The GUTI if provided by the UE */ - if ( (guti) && (ctx->guti == NULL) ) { - LOG_FUNC_RETURN (TRUE); - } - - if ( (guti == NULL) && (ctx->guti) ) { - LOG_FUNC_RETURN (TRUE); - } - - if ( (guti) && (ctx->guti) ) { - if (guti->m_tmsi != ctx->guti->m_tmsi) { - LOG_FUNC_RETURN (TRUE); - } - - if ( memcmp(&guti->gummei, &ctx->guti->gummei, sizeof(gummei_t)) != 0 ) { - LOG_FUNC_RETURN (TRUE); - } - } - - /* The IMSI if provided by the UE */ - if ( (imsi) && (ctx->imsi == NULL) ) { - LOG_FUNC_RETURN (TRUE); - } - - if ( (imsi == NULL) && (ctx->imsi) ) { - LOG_FUNC_RETURN (TRUE); - } - - if ( (imsi) && (ctx->imsi) ) { - if ( memcmp(imsi, ctx->imsi, sizeof(imsi_t)) != 0 ) { - LOG_FUNC_RETURN (TRUE); - } - } - - /* The IMEI if provided by the UE */ - if ( (imei) && (ctx->imei == NULL) ) { - LOG_FUNC_RETURN (TRUE); - } - - if ( (imei == NULL) && (ctx->imei) ) { - LOG_FUNC_RETURN (TRUE); - } - - if ( (imei) && (ctx->imei) ) { - if ( memcmp(imei, ctx->imei, sizeof(imei_t)) != 0 ) { - LOG_FUNC_RETURN (TRUE); - } - } - - LOG_FUNC_RETURN (FALSE); -} - -/**************************************************************************** - ** ** - ** Name: _emm_attach_update() ** - ** ** - ** Description: Update the EMM context with the given attach procedure ** - ** parameters. ** - ** ** - ** Inputs: ueid: UE lower layer identifier ** - ** type: Type of the requested attach ** - ** ksi: Security ket sey identifier ** - ** guti: The GUTI provided by the UE ** - ** imsi: The IMSI provided by the UE ** - ** imei: The IMEI provided by the UE ** - ** eea: Supported EPS encryption algorithms ** - ** eia: Supported EPS integrity algorithms ** - ** esm_msg_pP: ESM message contained with the attach re- ** - ** quest ** - ** Others: None ** - ** ** - ** Outputs: ctx: EMM context of the UE in the network ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -static int _emm_attach_update(emm_data_context_t *ctx, unsigned int ueid, - emm_proc_attach_type_t type, int ksi, - GUTI_t *guti, imsi_t *imsi, imei_t *imei, - int eea, int eia, int ucs2, int uea, int uia, int gea, - int umts_present, int gprs_present, - const OctetString *esm_msg_pP) -{ - int mnc_length; - LOG_FUNC_IN; - /* UE identifier */ - ctx->ueid = ueid; - /* Emergency bearer services indicator */ - ctx->is_emergency = (type == EMM_ATTACH_TYPE_EMERGENCY); - /* Security key set identifier */ - ctx->ksi = ksi; - /* Supported EPS encryption algorithms */ - ctx->eea = eea; - /* Supported EPS integrity algorithms */ - ctx->eia = eia; - ctx->ucs2 = ucs2; - ctx->uea = uea; - ctx->uia = uia; - ctx->gea = gea; - ctx->umts_present = umts_present; - ctx->gprs_present = gprs_present; - - /* The GUTI if provided by the UE */ - if (guti) { - LOG_TRACE(INFO, "EMM-PROC - GUTI NOT NULL"); - - if (ctx->guti == NULL) { - ctx->guti = (GUTI_t *)malloc(sizeof(GUTI_t)); - } - - if (ctx->guti != NULL) { - memcpy(ctx->guti, guti, sizeof(GUTI_t)); - } else { - LOG_FUNC_RETURN (RETURNerror); - } - } else { - if (ctx->guti == NULL) { - ctx->guti = (GUTI_t *)calloc(1, sizeof(GUTI_t)); - } - -#warning "LG: We should assign the GUTI accordingly to the visited plmn id" - - if ((ctx->guti != NULL) && (imsi)) { - ctx->tac = mme_config.gummei.plmn_tac[0]; - ctx->guti->gummei.MMEcode = mme_config.gummei.mmec[0]; - ctx->guti->gummei.MMEgid = mme_config.gummei.mme_gid[0]; - ctx->guti->m_tmsi = (uint32_t) ctx; - - mnc_length = mme_config_find_mnc_length( - imsi->u.num.digit1, - imsi->u.num.digit2, - imsi->u.num.digit3, - imsi->u.num.digit4, - imsi->u.num.digit5, - imsi->u.num.digit6); - - if ((mnc_length == 2) || (mnc_length == 3)) { - ctx->guti->gummei.plmn.MCCdigit1 = imsi->u.num.digit1; - ctx->guti->gummei.plmn.MCCdigit2 = imsi->u.num.digit2; - ctx->guti->gummei.plmn.MCCdigit3 = imsi->u.num.digit3; - - if (mnc_length == 2) { - ctx->guti->gummei.plmn.MNCdigit1 = imsi->u.num.digit4; - ctx->guti->gummei.plmn.MNCdigit2 = imsi->u.num.digit5; - ctx->guti->gummei.plmn.MNCdigit3 = 15; - LOG_TRACE(WARNING, "EMM-PROC - Assign GUTI from IMSI %01X%01X%01X.%01X%01X.%04X.%02X.%08X to emm_data_context", - ctx->guti->gummei.plmn.MCCdigit1, - ctx->guti->gummei.plmn.MCCdigit2, - ctx->guti->gummei.plmn.MCCdigit3, - ctx->guti->gummei.plmn.MNCdigit1, - ctx->guti->gummei.plmn.MNCdigit2, - ctx->guti->gummei.MMEgid, - ctx->guti->gummei.MMEcode, - ctx->guti->m_tmsi - ); - } else { - ctx->guti->gummei.plmn.MNCdigit1 = imsi->u.num.digit5; - ctx->guti->gummei.plmn.MNCdigit2 = imsi->u.num.digit6; - ctx->guti->gummei.plmn.MNCdigit3 = imsi->u.num.digit4; - LOG_TRACE(WARNING, "EMM-PROC - Assign GUTI from IMSI %01X%01X%01X.%01X%01X%01X.%04X.%02X.%08X to emm_data_context", - ctx->guti->gummei.plmn.MCCdigit1, - ctx->guti->gummei.plmn.MCCdigit2, - ctx->guti->gummei.plmn.MCCdigit3, - ctx->guti->gummei.plmn.MNCdigit1, - ctx->guti->gummei.plmn.MNCdigit2, - ctx->guti->gummei.plmn.MNCdigit3, - ctx->guti->gummei.MMEgid, - ctx->guti->gummei.MMEcode, - ctx->guti->m_tmsi - ); - } - - LOG_TRACE(WARNING, "EMM-PROC - Set ctx->guti_is_new to emm_data_context"); - ctx->guti_is_new = TRUE; - } else { - LOG_FUNC_RETURN (RETURNerror); - } - } else { - LOG_FUNC_RETURN (RETURNerror); - } - } - - /* The IMSI if provided by the UE */ - if (imsi) { - if (ctx->imsi == NULL) { - ctx->imsi = (imsi_t *)malloc(sizeof(imsi_t)); - } - - if (ctx->imsi != NULL) { - memcpy(ctx->imsi, imsi, sizeof(imsi_t)); - } else { - LOG_FUNC_RETURN (RETURNerror); - } - } - - /* The IMEI if provided by the UE */ - if (imei) { - if (ctx->imei == NULL) { - ctx->imei = (imei_t *)malloc(sizeof(imei_t)); - } - - if (ctx->imei != NULL) { - memcpy(ctx->imei, imei, sizeof(imei_t)); - } else { - LOG_FUNC_RETURN (RETURNerror); - } - } - - /* The ESM message contained within the attach request */ - if (esm_msg_pP->length > 0) { - if (ctx->esm_msg.value != NULL) { - free(ctx->esm_msg.value); - ctx->esm_msg.value = NULL; - ctx->esm_msg.length = 0; - } - - ctx->esm_msg.value = (uint8_t *)malloc(esm_msg_pP->length); - - if (ctx->esm_msg.value != NULL) { - memcpy((char *)ctx->esm_msg.value, - (char *)esm_msg_pP->value, esm_msg_pP->length); - - } else { - LOG_FUNC_RETURN (RETURNerror); - } - } - - ctx->esm_msg.length = esm_msg_pP->length; - /* Attachment indicator */ - ctx->is_attached = FALSE; - - LOG_FUNC_RETURN (RETURNok); -} diff --git a/openair-cn/NAS/MME/EMM/Authentication.c b/openair-cn/NAS/MME/EMM/Authentication.c deleted file mode 100644 index 19eb5c13a8..0000000000 --- a/openair-cn/NAS/MME/EMM/Authentication.c +++ /dev/null @@ -1,660 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** -Source Authentication.c - -Version 0.1 - -Date 2013/03/04 - -Product NAS stack - -Subsystem EPS Mobility Management - -Author Frederic Maurel - -Description Defines the authentication EMM procedure executed by the - Non-Access Stratum. - - The purpose of the EPS authentication and key agreement (AKA) - procedure is to provide mutual authentication between the user - and the network and to agree on a key KASME. The procedure is - always initiated and controlled by the network. However, the - UE can reject the EPS authentication challenge sent by the - network. - - A partial native EPS security context is established in the - UE and the network when an EPS authentication is successfully - performed. The computed key material KASME is used as the - root for the EPS integrity protection and ciphering key - hierarchy. - -*****************************************************************************/ - -#include // malloc, free -#include // memcpy, memcmp, memset -#include // htons - -#include "emm_proc.h" -#include "nas_log.h" -#include "nas_timer.h" -#include "emmData.h" -#include "emm_sap.h" -#include "emm_cause.h" - -# if defined(NAS_BUILT_IN_EPC) -# include "nas_itti_messaging.h" -# endif -#include "msc.h" - -/****************************************************************************/ -/**************** E X T E R N A L D E F I N I T I O N S ****************/ -/****************************************************************************/ - -/****************************************************************************/ -/******************* L O C A L D E F I N I T I O N S *******************/ -/****************************************************************************/ - -/* - * -------------------------------------------------------------------------- - * Internal data handled by the authentication procedure in the UE - * -------------------------------------------------------------------------- - */ - -/* - * -------------------------------------------------------------------------- - * Internal data handled by the authentication procedure in the MME - * -------------------------------------------------------------------------- - */ -/* - * Timer handlers - */ -static void *_authentication_t3460_handler(void *); - -/* - * Function executed whenever the ongoing EMM procedure that initiated - * the authentication procedure is aborted or the maximum value of the - * retransmission timer counter is exceed - */ -static int _authentication_abort(void *); - -/* - * Internal data used for authentication procedure - */ -typedef struct { - unsigned int ueid; /* UE identifier */ -#define AUTHENTICATION_COUNTER_MAX 5 - unsigned int retransmission_count; /* Retransmission counter */ - int ksi; /* NAS key set identifier */ - OctetString rand; /* Random challenge number */ - OctetString autn; /* Authentication token */ - int notify_failure; /* Indicates whether the authentication - * procedure failure shall be notified - * to the ongoing EMM procedure */ -} authentication_data_t; - -static int _authentication_request(authentication_data_t *data); -static int _authentication_reject(unsigned int ueid); - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - - -/* - * -------------------------------------------------------------------------- - * Authentication procedure executed by the MME - * -------------------------------------------------------------------------- - */ -/**************************************************************************** - ** ** - ** Name: emm_proc_authentication() ** - ** ** - ** Description: Initiates authentication procedure to establish partial ** - ** native EPS security context in the UE and the MME. ** - ** ** - ** 3GPP TS 24.301, section 5.4.2.2 ** - ** The network initiates the authentication procedure by ** - ** sending an AUTHENTICATION REQUEST message to the UE and ** - ** starting the timer T3460. The AUTHENTICATION REQUEST mes- ** - ** sage contains the parameters necessary to calculate the ** - ** authentication response. ** - ** ** - ** Inputs: ueid: UE lower layer identifier ** - ** ksi: NAS key set identifier ** - ** rand: Random challenge number ** - ** autn: Authentication token ** - ** success: Callback function executed when the authen-** - ** tication procedure successfully completes ** - ** reject: Callback function executed when the authen-** - ** tication procedure fails or is rejected ** - ** failure: Callback function executed whener a lower ** - ** layer failure occured before the authenti- ** - ** cation procedure comnpletes ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int emm_proc_authentication(void *ctx, unsigned int ueid, int ksi, - const OctetString *_rand, const OctetString *autn, - emm_common_success_callback_t success, - emm_common_reject_callback_t reject, - emm_common_failure_callback_t failure) - -{ - int rc = RETURNerror; - authentication_data_t *data; - - LOG_FUNC_IN; - - LOG_TRACE(INFO, "EMM-PROC - Initiate authentication KSI = %d, ctx = %p", ksi, ctx); - - /* Allocate parameters of the retransmission timer callback */ - data = (authentication_data_t *)malloc(sizeof(authentication_data_t)); - - if (data != NULL) { - /* Setup ongoing EMM procedure callback functions */ - rc = emm_proc_common_initialize(ueid, success, reject, failure, - _authentication_abort, data); - - if (rc != RETURNok) { - LOG_TRACE(WARNING, "Failed to initialize EMM callback functions"); - LOG_FUNC_RETURN (RETURNerror); - } - - /* Set the UE identifier */ - data->ueid = ueid; - /* Reset the retransmission counter */ - data->retransmission_count = 0; - /* Set the key set identifier */ - data->ksi = ksi; - - /* Set the authentication random challenge number */ - if (_rand->length > 0) { - data->rand.value = (uint8_t *)malloc(_rand->length); - data->rand.length = 0; - - if (data->rand.value) { - memcpy(data->rand.value, _rand->value, _rand->length); - data->rand.length = _rand->length; - } - } - - /* Set the authentication token */ - if (autn->length > 0) { - data->autn.value = (uint8_t *)malloc(autn->length); - data->autn.length = 0; - - if (data->autn.value) { - memcpy(data->autn.value, autn->value, autn->length); - data->autn.length = autn->length; - } - } - - /* Set the failure notification indicator */ - data->notify_failure = FALSE; - /* Send authentication request message to the UE */ - rc = _authentication_request(data); - - if (rc != RETURNerror) { - /* - * Notify EMM that common procedure has been initiated - */ - - - MSC_LOG_TX_MESSAGE( - MSC_NAS_EMM_MME, - MSC_NAS_EMM_MME, - NULL,0, - "0 EMMREG_COMMON_PROC_REQ ue id "NAS_UE_ID_FMT" (authentication)", ueid); - - emm_sap_t emm_sap; - emm_sap.primitive = EMMREG_COMMON_PROC_REQ; - emm_sap.u.emm_reg.ueid = ueid; - emm_sap.u.emm_reg.ctx = ctx; - rc = emm_sap_send(&emm_sap); - } - } - - LOG_FUNC_RETURN (rc); -} - -/**************************************************************************** - ** ** - ** Name: emm_proc_authentication_complete() ** - ** ** - ** Description: Performs the authentication completion procedure executed ** - ** by the network. ** - ** ** - ** 3GPP TS 24.301, section 5.4.2.4 ** - ** Upon receiving the AUTHENTICATION RESPONSE message, the ** - ** MME shall stop timer T3460 and check the correctness of ** - ** the RES parameter. ** - ** ** - ** Inputs: ueid: UE lower layer identifier ** - ** emm_cause: Authentication failure EMM cause code ** - ** res: Authentication response parameter. or auts ** - ** in case of sync failure ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: _emm_data, T3460 ** - ** ** - ***************************************************************************/ -int emm_proc_authentication_complete(unsigned int ueid, int emm_cause, - const OctetString *res) -{ - int rc; - emm_sap_t emm_sap; - - LOG_FUNC_IN; - - LOG_TRACE(INFO, "EMM-PROC - Authentication complete (ueid="NAS_UE_ID_FMT", cause=%d)", - ueid, emm_cause); - - - /* Release retransmission timer paramaters */ - authentication_data_t *data = - (authentication_data_t *)(emm_proc_common_get_args(ueid)); - - if (data) { - if (data->rand.length > 0) { - free(data->rand.value); - } - - if (data->autn.length > 0) { - free(data->autn.value); - } - - free(data); - } - - /* Get the UE context */ - emm_data_context_t *emm_ctx = NULL; -#if defined(NAS_BUILT_IN_EPC) - if (ueid > 0) { - emm_ctx = emm_data_context_get(&_emm_data, ueid); - } -#else - if (ueid < EMM_DATA_NB_UE_MAX) { - emm_ctx = _emm_data.ctx[ueid]; - } -#endif - - if (emm_ctx) { - /* Stop timer T3460 */ - LOG_TRACE(INFO, "EMM-PROC - Stop timer T3460 (%d)", emm_ctx->T3460.id); - emm_ctx->T3460.id = nas_timer_stop(emm_ctx->T3460.id); - MSC_LOG_EVENT(MSC_NAS_EMM_MME, "0 T3460 stopped UE "NAS_UE_ID_FMT" ", data->ueid); - } - if (emm_cause == EMM_CAUSE_SUCCESS) { - /* Check the received RES parameter */ - if ( (emm_ctx == NULL) || - (memcmp(res->value, &emm_ctx->vector.xres, res->length) != 0) ) { - /* RES does not match the XRES parameter */ - LOG_TRACE(WARNING, "EMM-PROC - Failed to authentify the UE"); - emm_cause = EMM_CAUSE_ILLEGAL_UE; - } else { - LOG_TRACE(DEBUG, "EMM-PROC - Success to authentify the UE RESP XRES == XRES UE CONTEXT"); - } - } - - if (emm_cause != EMM_CAUSE_SUCCESS) { - switch (emm_cause) { - -#if defined(NAS_BUILT_IN_EPC) - - case EMM_CAUSE_SYNCH_FAILURE: - /* USIM has detected a mismatch in SQN. - * Ask for a new vector. - */ - MSC_LOG_EVENT( - MSC_NAS_EMM_MME, - "0 SQN SYNCH_FAILURE ue id "NAS_UE_ID_FMT" ", ueid); - - LOG_TRACE(DEBUG, "EMM-PROC - USIM has detected a mismatch in SQN Ask for a new vector"); - nas_itti_auth_info_req(ueid, emm_ctx->imsi, 0, res->value); - - rc = RETURNok; - LOG_FUNC_RETURN (rc); - break; -#endif - - default: - LOG_TRACE(DEBUG, "EMM-PROC - The MME received an authentication failure message or the RES does not match the XRES parameter computed by the network"); - /* The MME received an authentication failure message or the RES - * contained in the Authentication Response message received from - * the UE does not match the XRES parameter computed by the network */ - (void) _authentication_reject(ueid); - /* - * Notify EMM that the authentication procedure failed - */ - MSC_LOG_TX_MESSAGE( - MSC_NAS_EMM_MME, - MSC_NAS_EMM_MME, - NULL,0, - "0 EMMREG_COMMON_PROC_REJ ue id "NAS_UE_ID_FMT" ", ueid); - - - emm_sap.primitive = EMMREG_COMMON_PROC_REJ; - emm_sap.u.emm_reg.ueid = ueid; - emm_sap.u.emm_reg.ctx = emm_ctx; - break; - } - } else { - /* - * Notify EMM that the authentication procedure successfully completed - */ - MSC_LOG_TX_MESSAGE( - MSC_NAS_EMM_MME, - MSC_NAS_EMM_MME, - NULL,0, - "0 EMMREG_COMMON_PROC_CNF ue id "NAS_UE_ID_FMT" ", ueid); - - LOG_TRACE(DEBUG, "EMM-PROC - Notify EMM that the authentication procedure successfully completed"); - emm_sap.primitive = EMMREG_COMMON_PROC_CNF; - emm_sap.u.emm_reg.ueid = ueid; - emm_sap.u.emm_reg.ctx = emm_ctx; - emm_sap.u.emm_reg.u.common.is_attached = emm_ctx->is_attached; - } - - rc = emm_sap_send(&emm_sap); - - LOG_FUNC_RETURN (rc); -} - -/****************************************************************************/ -/********************* L O C A L F U N C T I O N S *********************/ -/****************************************************************************/ - - -/* - * -------------------------------------------------------------------------- - * Timer handlers - * -------------------------------------------------------------------------- - */ - -/**************************************************************************** - ** ** - ** Name: _authentication_t3460_handler() ** - ** ** - ** Description: T3460 timeout handler ** - ** Upon T3460 timer expiration, the authentication request ** - ** message is retransmitted and the timer restarted. When ** - ** retransmission counter is exceed, the MME shall abort the ** - ** authentication procedure and any ongoing EMM specific ** - ** procedure and release the NAS signalling connection. ** - ** ** - ** 3GPP TS 24.301, section 5.4.2.7, case b ** - ** ** - ** Inputs: args: handler parameters ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: None ** - ** Others: None ** - ** ** - ***************************************************************************/ -static void *_authentication_t3460_handler(void *args) -{ - LOG_FUNC_IN; - - int rc; - - authentication_data_t *data = (authentication_data_t *)(args); - - /* Increment the retransmission counter */ - data->retransmission_count += 1; - - LOG_TRACE(WARNING, "EMM-PROC - T3460 timer expired, retransmission " - "counter = %d", data->retransmission_count); - - if (data->retransmission_count < AUTHENTICATION_COUNTER_MAX) { - /* Send authentication request message to the UE */ - rc = _authentication_request(data); - } else { - unsigned int ueid = data->ueid; - /* Set the failure notification indicator */ - data->notify_failure = TRUE; - /* Abort the authentication procedure */ - rc = _authentication_abort(data); - - /* Release the NAS signalling connection */ - if (rc != RETURNerror) { - emm_sap_t emm_sap; - emm_sap.primitive = EMMAS_RELEASE_REQ; - emm_sap.u.emm_as.u.release.guti = NULL; - emm_sap.u.emm_as.u.release.ueid = ueid; - emm_sap.u.emm_as.u.release.cause = EMM_AS_CAUSE_AUTHENTICATION; - rc = emm_sap_send(&emm_sap); - } - } - - LOG_FUNC_RETURN (NULL); -} - -/* - * -------------------------------------------------------------------------- - * MME specific local functions - * -------------------------------------------------------------------------- - */ - -/**************************************************************************** - ** ** - ** Name: _authentication_request() ** - ** ** - ** Description: Sends AUTHENTICATION REQUEST message and start timer T3460** - ** ** - ** Inputs: args: handler parameters ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: T3460 ** - ** ** - ***************************************************************************/ -int _authentication_request(authentication_data_t *data) -{ - LOG_FUNC_IN; - - emm_sap_t emm_sap; - int rc; - struct emm_data_context_s *emm_ctx; - - /* - * Notify EMM-AS SAP that Authentication Request message has to be sent - * to the UE - */ - emm_sap.primitive = EMMAS_SECURITY_REQ; - emm_sap.u.emm_as.u.security.guti = NULL; - emm_sap.u.emm_as.u.security.ueid = data->ueid; - emm_sap.u.emm_as.u.security.msgType = EMM_AS_MSG_TYPE_AUTH; - emm_sap.u.emm_as.u.security.ksi = data->ksi; - emm_sap.u.emm_as.u.security.rand = &data->rand; - emm_sap.u.emm_as.u.security.autn = &data->autn; - - /* TODO: check for pointer validity */ -#if defined(NAS_BUILT_IN_EPC) - emm_ctx = emm_data_context_get(&_emm_data, data->ueid); -#else - emm_ctx = _emm_data.ctx[data->ueid]; -#endif - - /* Setup EPS NAS security data */ - emm_as_set_security_data(&emm_sap.u.emm_as.u.security.sctx, - emm_ctx->security, FALSE, TRUE); - - MSC_LOG_TX_MESSAGE( - MSC_NAS_EMM_MME, - MSC_NAS_EMM_MME, - NULL,0, - "0 EMMAS_SECURITY_REQ ue id "NAS_UE_ID_FMT" ", data->ueid); - - rc = emm_sap_send(&emm_sap); - - if (rc != RETURNerror) { - if (emm_ctx) { - if (emm_ctx->T3460.id != NAS_TIMER_INACTIVE_ID) { - /* Re-start T3460 timer */ - emm_ctx->T3460.id = nas_timer_restart(emm_ctx->T3460.id); - MSC_LOG_EVENT(MSC_NAS_EMM_MME, "0 T3460 restarted UE "NAS_UE_ID_FMT" ", data->ueid); - } else { - /* Start T3460 timer */ - emm_ctx->T3460.id = nas_timer_start(emm_ctx->T3460.sec, _authentication_t3460_handler, - data); - MSC_LOG_EVENT(MSC_NAS_EMM_MME, "0 T3460 started UE "NAS_UE_ID_FMT" ", data->ueid); - } - } - - LOG_TRACE(INFO,"EMM-PROC - Timer T3460 (%d) expires in %ld seconds", - emm_ctx->T3460.id, emm_ctx->T3460.sec); - } - - LOG_FUNC_RETURN (rc); -} - -/**************************************************************************** - ** ** - ** Name: _authentication_reject() ** - ** ** - ** Description: Sends AUTHENTICATION REJECT message ** - ** ** - ** Inputs: ueid: UE lower layer identifier ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -static int _authentication_reject(unsigned int ueid) -{ - LOG_FUNC_IN; - - emm_sap_t emm_sap; - int rc; - struct emm_data_context_s *emm_ctx; - - /* - * Notify EMM-AS SAP that Authentication Reject message has to be sent - * to the UE - */ - emm_sap.primitive = EMMAS_SECURITY_REJ; - emm_sap.u.emm_as.u.security.guti = NULL; - emm_sap.u.emm_as.u.security.ueid = ueid; - emm_sap.u.emm_as.u.security.msgType = EMM_AS_MSG_TYPE_AUTH; - -#if defined(NAS_BUILT_IN_EPC) - emm_ctx = emm_data_context_get(&_emm_data, ueid); -#else - emm_ctx = _emm_data.ctx[ueid]; -#endif - /* Setup EPS NAS security data */ - emm_as_set_security_data(&emm_sap.u.emm_as.u.security.sctx, - emm_ctx->security, FALSE, TRUE); - rc = emm_sap_send(&emm_sap); - - LOG_FUNC_RETURN (rc); -} - -/**************************************************************************** - ** ** - ** Name: _authentication_abort() ** - ** ** - ** Description: Aborts the authentication procedure currently in progress ** - ** ** - ** Inputs: args: Authentication data to be released ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: T3460 ** - ** ** - ***************************************************************************/ -static int _authentication_abort(void *args) -{ - LOG_FUNC_IN; - - int rc = RETURNerror; - struct emm_data_context_s *emm_ctx; - - authentication_data_t *data = (authentication_data_t *)(args); - - if (data) { - unsigned int ueid = data->ueid; - int notify_failure = data->notify_failure; - - LOG_TRACE(WARNING, "EMM-PROC - Abort authentication procedure " - "(ueid="NAS_UE_ID_FMT")", ueid); -#if defined(NAS_BUILT_IN_EPC) - emm_ctx = emm_data_context_get(&_emm_data, ueid); -#else - emm_ctx = _emm_data.ctx[ueid]; -#endif - if (emm_ctx) { - /* Stop timer T3460 */ - if (emm_ctx->T3460.id != NAS_TIMER_INACTIVE_ID) { - LOG_TRACE(INFO, "EMM-PROC - Stop timer T3460 (%d)", emm_ctx->T3460.id); - emm_ctx->T3460.id = nas_timer_stop(emm_ctx->T3460.id); - MSC_LOG_EVENT(MSC_NAS_EMM_MME, "0 T3460 stopped UE "NAS_UE_ID_FMT" ", data->ueid); - } - } - - /* Release retransmission timer paramaters */ - if (data->rand.length > 0) { - free(data->rand.value); - } - - if (data->autn.length > 0) { - free(data->autn.value); - } - - free(data); - - /* - * Notify EMM that the authentication procedure failed - */ - if (notify_failure) { - emm_sap_t emm_sap; - emm_sap.primitive = EMMREG_COMMON_PROC_REJ; - emm_sap.u.emm_reg.ueid = ueid; - rc = emm_sap_send(&emm_sap); - } else { - rc = RETURNok; - } - } - - LOG_FUNC_RETURN (rc); -} - - diff --git a/openair-cn/NAS/MME/EMM/Detach.c b/openair-cn/NAS/MME/EMM/Detach.c deleted file mode 100644 index 1ba60e5b6d..0000000000 --- a/openair-cn/NAS/MME/EMM/Detach.c +++ /dev/null @@ -1,346 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** -Source Detach.c - -Version 0.1 - -Date 2013/05/07 - -Product NAS stack - -Subsystem EPS Mobility Management - -Author Frederic Maurel - -Description Defines the detach related EMM procedure executed by the - Non-Access Stratum. - - The detach procedure is used by the UE to detach for EPS servi- - ces, to disconnect from the last PDN it is connected to; by the - network to inform the UE that it is detached for EPS services - or non-EPS services or both, to disconnect the UE from the last - PDN to which it is connected and to inform the UE to re-attach - to the network and re-establish all PDN connections. - -*****************************************************************************/ - -#include "emm_proc.h" -#include "nas_log.h" -#include "nas_timer.h" - -#include "emmData.h" - -#include "emm_sap.h" -#include "esm_sap.h" -#include "msc.h" - -#include // free - -/****************************************************************************/ -/**************** E X T E R N A L D E F I N I T I O N S ****************/ -/****************************************************************************/ - -/****************************************************************************/ -/******************* L O C A L D E F I N I T I O N S *******************/ -/****************************************************************************/ - -/* String representation of the detach type */ -static const char *_emm_detach_type_str[] = { - "EPS", "IMSI", "EPS/IMSI", - "RE-ATTACH REQUIRED", "RE-ATTACH NOT REQUIRED", "RESERVED" -}; - -/* - * -------------------------------------------------------------------------- - * Internal data handled by the detach procedure in the UE - * -------------------------------------------------------------------------- - */ - - -/* - * -------------------------------------------------------------------------- - * Internal data handled by the detach procedure in the MME - * -------------------------------------------------------------------------- - */ - - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -/* - * -------------------------------------------------------------------------- - * Detach procedure executed by the UE - * -------------------------------------------------------------------------- - */ - -/* - * -------------------------------------------------------------------------- - * Detach procedure executed by the MME - * -------------------------------------------------------------------------- - */ -/**************************************************************************** - ** ** - ** Name: emm_proc_detach() ** - ** ** - ** Description: Initiate the detach procedure to inform the UE that it is ** - ** detached for EPS services, or to re-attach to the network ** - ** and re-establish all PDN connections. ** - ** ** - ** 3GPP TS 24.301, section 5.5.2.3.1 ** - ** In state EMM-REGISTERED the network initiates the detach ** - ** procedure by sending a DETACH REQUEST message to the UE, ** - ** starting timer T3422 and entering state EMM-DEREGISTERED- ** - ** INITIATED. ** - ** ** - ** Inputs: ueid: UE lower layer identifier ** - ** type: Type of the requested detach ** - ** Others: _emm_detach_type_str ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: T3422 ** - ** ** - ***************************************************************************/ -int emm_proc_detach(unsigned int ueid, emm_proc_detach_type_t type) -{ - LOG_FUNC_IN; - - int rc = RETURNerror; - - LOG_TRACE(INFO, "EMM-PROC - Initiate detach type = %s (%d)", - _emm_detach_type_str[type], type); - - /* TODO */ - - LOG_FUNC_RETURN(rc); -} - -/**************************************************************************** - ** ** - ** Name: emm_proc_detach_request() ** - ** ** - ** Description: Performs the UE initiated detach procedure for EPS servi- ** - ** ces only When the DETACH REQUEST message is received by ** - ** the network. ** - ** ** - ** 3GPP TS 24.301, section 5.5.2.2.2 ** - ** Upon receiving the DETACH REQUEST message the network ** - ** shall send a DETACH ACCEPT message to the UE and store ** - ** the current EPS security context, if the detach type IE ** - ** does not indicate "switch off". Otherwise, the procedure ** - ** is completed when the network receives the DETACH REQUEST ** - ** message. ** - ** The network shall deactivate the EPS bearer context(s) ** - ** for this UE locally without peer-to-peer signalling and ** - ** shall enter state EMM-DEREGISTERED. ** - ** ** - ** Inputs: ueid: UE lower layer identifier ** - ** type: Type of the requested detach ** - ** switch_off: Indicates whether the detach is required ** - ** because the UE is switched off or not ** - ** native_ksi: TRUE if the security context is of type ** - ** native ** - ** ksi: The NAS ket sey identifier ** - ** guti: The GUTI if provided by the UE ** - ** imsi: The IMSI if provided by the UE ** - ** imei: The IMEI if provided by the UE ** - ** Others: _emm_data ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int emm_proc_detach_request(unsigned int ueid, emm_proc_detach_type_t type, - int switch_off, int native_ksi, int ksi, - GUTI_t *guti, imsi_t *imsi, imei_t *imei) -{ - LOG_FUNC_IN; - - int rc; - emm_data_context_t *emm_ctx = NULL; - - LOG_TRACE(INFO, "EMM-PROC - Detach type = %s (%d) requested (ueid="NAS_UE_ID_FMT")", - _emm_detach_type_str[type], type, ueid); - - /* Get the UE context */ -#if defined(NAS_BUILT_IN_EPC) - - if (ueid > 0) { - emm_ctx = emm_data_context_get(&_emm_data, ueid); - } - -#else - - if (ueid < EMM_DATA_NB_UE_MAX) { - emm_ctx = _emm_data.ctx[ueid]; - } - -#endif - - if (emm_ctx == NULL) { - LOG_TRACE(WARNING, "No EMM context exists for the UE (ueid="NAS_UE_ID_FMT")", ueid); - LOG_FUNC_RETURN(RETURNok); - } - - if (switch_off) { - MSC_LOG_EVENT(MSC_NAS_EMM_MME, - "0 Removing UE context ue id "NAS_UE_ID_FMT" ", ueid); - /* The UE is switched off */ - if (emm_ctx->guti) { - free(emm_ctx->guti); - } - - if (emm_ctx->imsi) { - free(emm_ctx->imsi); - } - - if (emm_ctx->imei) { - free(emm_ctx->imei); - } - - if (emm_ctx->esm_msg.length > 0) { - free(emm_ctx->esm_msg.value); - } - - /* Release NAS security context */ - if (emm_ctx->security) { - emm_security_context_t *security = emm_ctx->security; - - if (security->kasme.value) { - free(security->kasme.value); - } - - if (security->knas_enc.value) { - free(security->knas_enc.value); - } - - if (security->knas_int.value) { - free(security->knas_int.value); - } - - free(emm_ctx->security); - } - /* Stop timer T3450 */ - if (emm_ctx->T3450.id != NAS_TIMER_INACTIVE_ID) { - LOG_TRACE(INFO, "EMM-PROC - Stop timer T3450 (%d)", emm_ctx->T3450.id); - emm_ctx->T3450.id = nas_timer_stop(emm_ctx->T3450.id); - MSC_LOG_EVENT(MSC_NAS_EMM_MME, "0 T3450 stopped UE "NAS_UE_ID_FMT" ", emm_ctx->ueid); - } - /* Stop timer T3460 */ - if (emm_ctx->T3460.id != NAS_TIMER_INACTIVE_ID) { - LOG_TRACE(INFO, "EMM-PROC - Stop timer T3460 (%d)", emm_ctx->T3460.id); - emm_ctx->T3460.id = nas_timer_stop(emm_ctx->T3460.id); - MSC_LOG_EVENT(MSC_NAS_EMM_MME, "0 T3460 stopped UE "NAS_UE_ID_FMT" ", emm_ctx->ueid); - } - /* Stop timer T3470 */ - if (emm_ctx->T3470.id != NAS_TIMER_INACTIVE_ID) { - LOG_TRACE(INFO, "EMM-PROC - Stop timer T3470 (%d)", emm_ctx->T3460.id); - emm_ctx->T3470.id = nas_timer_stop(emm_ctx->T3470.id); - MSC_LOG_EVENT(MSC_NAS_EMM_MME, "0 T3470 stopped UE "NAS_UE_ID_FMT" ", emm_ctx->ueid); - } - /* Release the EMM context */ -#if defined(NAS_BUILT_IN_EPC) - emm_data_context_remove(&_emm_data, emm_ctx); - free(emm_ctx); -#else - free(_emm_data.ctx[ueid]); - _emm_data.ctx[ueid] = NULL; -#endif - rc = RETURNok; - } else { - /* Normal detach without UE switch-off */ - emm_sap_t emm_sap; - emm_as_data_t *emm_as = &emm_sap.u.emm_as.u.data; - MSC_LOG_TX_MESSAGE( - MSC_NAS_EMM_MME, - MSC_NAS_EMM_MME, - NULL,0, - "0 EMM_AS_NAS_INFO_DETACH ue id "NAS_UE_ID_FMT" ", ueid); - - /* Setup NAS information message to transfer */ - emm_as->NASinfo = EMM_AS_NAS_INFO_DETACH; - emm_as->NASmsg.length = 0; - emm_as->NASmsg.value = NULL; - /* Set the UE identifier */ - emm_as->guti = NULL; - emm_as->ueid = ueid; - /* Setup EPS NAS security data */ - emm_as_set_security_data(&emm_as->sctx, emm_ctx->security, FALSE, TRUE); - /* - * Notify EMM-AS SAP that Detach Accept message has to - * be sent to the network - */ - emm_sap.primitive = EMMAS_DATA_REQ; - rc = emm_sap_send(&emm_sap); - } - - if (rc != RETURNerror) { - /* - * Notify ESM that all EPS bearer contexts allocated for this UE have - * to be locally deactivated - */ - MSC_LOG_TX_MESSAGE( - MSC_NAS_EMM_MME, - MSC_NAS_ESM_MME, - NULL,0, - "0 ESM_EPS_BEARER_CONTEXT_DEACTIVATE_REQ ue id "NAS_UE_ID_FMT" ", ueid); - esm_sap_t esm_sap; - esm_sap.primitive = ESM_EPS_BEARER_CONTEXT_DEACTIVATE_REQ; - esm_sap.ueid = ueid; - esm_sap.ctx = emm_ctx; - esm_sap.data.eps_bearer_context_deactivate.ebi = ESM_SAP_ALL_EBI; - rc = esm_sap_send(&esm_sap); - - if (rc != RETURNerror) { - emm_sap_t emm_sap; - /* - * Notify EMM that the UE has been implicitly detached - */ - MSC_LOG_TX_MESSAGE( - MSC_NAS_EMM_MME, - MSC_NAS_EMM_MME, - NULL,0, - "0 EMMREG_DETACH_REQ ue id "NAS_UE_ID_FMT" ", ueid); - emm_sap.primitive = EMMREG_DETACH_REQ; - emm_sap.u.emm_reg.ueid = ueid; - emm_sap.u.emm_reg.ctx = emm_ctx; - rc = emm_sap_send(&emm_sap); - } - } - - LOG_FUNC_RETURN(rc); -} - -/****************************************************************************/ -/********************* L O C A L F U N C T I O N S *********************/ -/****************************************************************************/ - diff --git a/openair-cn/NAS/MME/EMM/EmmCommon.c b/openair-cn/NAS/MME/EMM/EmmCommon.c deleted file mode 100644 index a30c7675d8..0000000000 --- a/openair-cn/NAS/MME/EMM/EmmCommon.c +++ /dev/null @@ -1,514 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** -Source EmmCommon.h - -Version 0.1 - -Date 2013/04/19 - -Product NAS stack - -Subsystem EPS Mobility Management - -Author Frederic Maurel - -Description Defines callback functions executed within EMM common procedures - by the Non-Access Stratum running at the network side. - - Following EMM common procedures can always be initiated by the - network whilst a NAS signalling connection exists: - - GUTI reallocation - authentication - security mode control - identification - EMM information - -*****************************************************************************/ - - -#include "EmmCommon.h" - -#include "commonDef.h" -#include "nas_log.h" -#include "emmData.h" - -#include // malloc, free -#include -#include - -#if defined(NAS_BUILT_IN_EPC) -# include "assertions.h" -#endif - -/****************************************************************************/ -/**************** E X T E R N A L D E F I N I T I O N S ****************/ -/****************************************************************************/ - -/****************************************************************************/ -/******************* L O C A L D E F I N I T I O N S *******************/ -/****************************************************************************/ - -/* EMM procedure callback cleanup function */ -static void _emm_common_cleanup(unsigned int ueid); - -/* Ongoing EMM procedure callback functions */ -typedef struct emm_common_data_s { - unsigned int ueid; - int ref_count; - emm_common_success_callback_t success; - emm_common_reject_callback_t reject; - emm_common_failure_callback_t failure; - emm_common_abort_callback_t abort; - void *args; - -#if defined(NAS_BUILT_IN_EPC) - RB_ENTRY(emm_common_data_s) entries; -#endif -} emm_common_data_t; - -#if defined(NAS_BUILT_IN_EPC) -typedef struct emm_common_data_head_s { - RB_HEAD(emm_common_data_map, emm_common_data_s) emm_common_data_root; -} emm_common_data_head_t; - -emm_common_data_head_t emm_common_data_head = { RB_INITIALIZER() }; - -static inline -int emm_common_data_compare_ueid(struct emm_common_data_s *p1, - struct emm_common_data_s *p2); -struct emm_common_data_s *emm_common_data_context_get( - struct emm_common_data_head_s *root, unsigned int _ueid); - -RB_PROTOTYPE(emm_common_data_map, emm_common_data_s, entries, - emm_common_data_compare_ueid); - -/* Generate functions used for the MAP */ -RB_GENERATE(emm_common_data_map, emm_common_data_s, entries, - emm_common_data_compare_ueid); - -static inline -int emm_common_data_compare_ueid(struct emm_common_data_s *p1, - struct emm_common_data_s *p2) -{ - if (p1->ueid > p2->ueid) { - return 1; - } - - if (p1->ueid < p2->ueid) { - return -1; - } - - /* Matching reference -> return 0 */ - return 0; -} - -struct emm_common_data_s *emm_common_data_context_get( - struct emm_common_data_head_s *root, unsigned int _ueid) -{ - struct emm_common_data_s reference; - - DevAssert(root != NULL); - DevCheck(_ueid > 0, _ueid, 0, 0); - - memset(&reference, 0, sizeof(struct emm_common_data_s)); - reference.ueid = _ueid; - return RB_FIND(emm_common_data_map, &root->emm_common_data_root, &reference); -} -#else -static emm_common_data_t *_emm_common_data[EMM_DATA_NB_UE_MAX]; -#endif - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -/**************************************************************************** - ** ** - ** Name: emm_proc_common_initialize() ** - ** ** - ** Description: Initialize EMM procedure callback functions executed for ** - ** the UE with the given identifier ** - ** ** - ** Inputs: ueid: UE lower layer identifier ** - ** success: EMM procedure executed upon successful EMM ** - ** common procedure completion ** - ** reject: EMM procedure executed if the EMM common ** - ** procedure failed or is rejected ** - ** failure: EMM procedure executed upon transmission ** - ** failure reported by lower layer ** - ** abort: EMM common procedure executed when the on- ** - ** going EMM procedure is aborted ** - ** args: EMM common procedure argument parameters ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: _emm_common_data ** - ** ** - ***************************************************************************/ -int emm_proc_common_initialize(unsigned int ueid, - emm_common_success_callback_t _success, - emm_common_reject_callback_t _reject, - emm_common_failure_callback_t _failure, - emm_common_abort_callback_t _abort, - void *args) -{ - struct emm_common_data_s *emm_common_data_ctx = NULL; - LOG_FUNC_IN; - -#if defined(NAS_BUILT_IN_EPC) - assert(ueid > 0); - emm_common_data_ctx = emm_common_data_context_get(&emm_common_data_head, ueid); -#else - assert(ueid < EMM_DATA_NB_UE_MAX); -#endif - - if (emm_common_data_ctx == NULL) { - emm_common_data_ctx = (emm_common_data_t *)malloc(sizeof(emm_common_data_t)); - emm_common_data_ctx->ueid = ueid; -#if defined(NAS_BUILT_IN_EPC) - RB_INSERT(emm_common_data_map, &emm_common_data_head.emm_common_data_root, - emm_common_data_ctx); -#endif - - if (emm_common_data_ctx) { - emm_common_data_ctx->ref_count = 0; - } - } - - if (emm_common_data_ctx) { - emm_common_data_ctx->ref_count += 1; - emm_common_data_ctx->success = _success; - emm_common_data_ctx->reject = _reject; - emm_common_data_ctx->failure = _failure; - emm_common_data_ctx->abort = _abort; - emm_common_data_ctx->args = args; - LOG_FUNC_RETURN(RETURNok); - } - - LOG_FUNC_RETURN(RETURNerror); -} - -/**************************************************************************** - ** ** - ** Name: emm_proc_common_success() ** - ** ** - ** Description: The EMM common procedure initiated between the UE with ** - ** the specified identifier and the MME completed success- ** - ** fully. The network performs required actions related to ** - ** the ongoing EMM procedure. ** - ** ** - ** Inputs: ueid: UE lower layer identifier ** - ** Others: _emm_common_data, _emm_data ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int emm_proc_common_success(unsigned int ueid) -{ - emm_common_data_t *emm_common_data_ctx = NULL; - emm_common_success_callback_t emm_callback; - - int rc = RETURNerror; - - LOG_FUNC_IN; - -#if defined(NAS_BUILT_IN_EPC) - DevCheck(ueid > 0, ueid, 0, 0); - emm_common_data_ctx = emm_common_data_context_get(&emm_common_data_head, ueid); -#else - assert(ueid < EMM_DATA_NB_UE_MAX); - emm_common_data_ctx = _emm_common_data[ueid]; -#endif - - assert(emm_common_data_ctx != NULL); - - emm_callback = emm_common_data_ctx->success; - - if (emm_callback) { - struct emm_data_context_s *ctx = NULL; - -#if defined(NAS_BUILT_IN_EPC) - ctx = emm_data_context_get(&_emm_data, ueid); -#else - ctx = _emm_data.ctx[ueid]; -#endif - rc = (*emm_callback)(ctx); - } - - _emm_common_cleanup(ueid); - - LOG_FUNC_RETURN(rc); -} - -/**************************************************************************** - ** ** - ** Name: emm_proc_common_reject() ** - ** ** - ** Description: The EMM common procedure initiated between the UE with ** - ** the specified identifier and the MME failed or has been ** - ** rejected. The network performs required actions related ** - ** to the ongoing EMM procedure. ** - ** ** - ** Inputs: ueid: UE lower layer identifier ** - ** Others: _emm_common_data, _emm_data ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int emm_proc_common_reject(unsigned int ueid) -{ - emm_common_data_t *emm_common_data_ctx = NULL; - int rc = RETURNerror; - emm_common_reject_callback_t emm_callback; - - LOG_FUNC_IN; - -#if defined(NAS_BUILT_IN_EPC) - DevCheck(ueid > 0, ueid, 0, 0); - emm_common_data_ctx = emm_common_data_context_get(&emm_common_data_head, ueid); -#else - assert(ueid < EMM_DATA_NB_UE_MAX); - emm_common_data_ctx = _emm_common_data[ueid]; -#endif - - assert(emm_common_data_ctx != NULL); - - emm_callback = emm_common_data_ctx->reject; - - if (emm_callback) { - struct emm_data_context_s *ctx = NULL; - -#if defined(NAS_BUILT_IN_EPC) - ctx = emm_data_context_get(&_emm_data, ueid); -#else - ctx = _emm_data.ctx[ueid]; -#endif - rc = (*emm_callback)(ctx); - } - - _emm_common_cleanup(ueid); - - LOG_FUNC_RETURN(rc); -} - -/**************************************************************************** - ** ** - ** Name: emm_proc_common_failure() ** - ** ** - ** Description: The EMM common procedure has been initiated between the ** - ** UE with the specified identifier and the MME, and a lower ** - ** layer failure occurred before the EMM common procedure ** - ** being completed. The network performs required actions ** - ** related to the ongoing EMM procedure. ** - ** ** - ** Inputs: ueid: UE lower layer identifier ** - ** Others: _emm_common_data, _emm_data ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int emm_proc_common_failure(unsigned int ueid) -{ - emm_common_data_t *emm_common_data_ctx = NULL; - emm_common_failure_callback_t emm_callback; - - int rc = RETURNerror; - - LOG_FUNC_IN; - -#if defined(NAS_BUILT_IN_EPC) - DevCheck(ueid > 0, ueid, 0, 0); - emm_common_data_ctx = emm_common_data_context_get(&emm_common_data_head, ueid); -#else - assert(ueid < EMM_DATA_NB_UE_MAX); - emm_common_data_ctx = _emm_common_data[ueid]; -#endif - assert(emm_common_data_ctx != NULL); - - emm_callback = emm_common_data_ctx->failure; - - if (emm_callback) { - struct emm_data_context_s *ctx = NULL; - -#if defined(NAS_BUILT_IN_EPC) - ctx = emm_data_context_get(&_emm_data, ueid); -#else - ctx = _emm_data.ctx[ueid]; -#endif - rc = (*emm_callback)(ctx); - } - - _emm_common_cleanup(ueid); - - LOG_FUNC_RETURN(rc); -} - -/**************************************************************************** - ** ** - ** Name: emm_proc_common_abort() ** - ** ** - ** Description: The ongoing EMM procedure has been aborted. The network ** - ** performs required actions related to the EMM common pro- ** - ** cedure previously initiated between the UE with the spe- ** - ** cified identifier and the MME. ** - ** ** - ** Inputs: ueid: UE lower layer identifier ** - ** Others: _emm_common_data ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int emm_proc_common_abort(unsigned int ueid) -{ - emm_common_data_t *emm_common_data_ctx = NULL; - emm_common_failure_callback_t emm_callback; - - int rc = RETURNerror; - - LOG_FUNC_IN; - -#if defined(NAS_BUILT_IN_EPC) - DevCheck(ueid > 0, ueid, 0, 0); - emm_common_data_ctx = emm_common_data_context_get(&emm_common_data_head, ueid); -#else - assert(ueid < EMM_DATA_NB_UE_MAX); - emm_common_data_ctx = _emm_common_data[ueid]; -#endif - assert(emm_common_data_ctx != NULL); - - emm_callback = emm_common_data_ctx->abort; - - if (emm_callback) { - struct emm_data_context_s *ctx = NULL; - -#if defined(NAS_BUILT_IN_EPC) - ctx = emm_data_context_get(&_emm_data, ueid); -#else - ctx = _emm_data.ctx[ueid]; -#endif - rc = (*emm_callback)(ctx); - } - - _emm_common_cleanup(ueid); - - LOG_FUNC_RETURN(rc); -} - -/**************************************************************************** - ** ** - ** Name: emm_proc_common_get_args() ** - ** ** - ** Description: Returns pointer to the EMM common procedure argument pa- ** - ** rameters allocated for the UE with the given identifier. ** - ** ** - ** Inputs: ueid: UE lower layer identifier ** - ** Others: _emm_common_data ** - ** ** - ** Outputs: None ** - ** Return: pointer to the EMM common procedure argu- ** - ** ment parameters ** - ** Others: None ** - ** ** - ***************************************************************************/ -void *emm_proc_common_get_args(unsigned int ueid) -{ - emm_common_data_t *emm_common_data_ctx = NULL; - LOG_FUNC_IN; - -#if defined(NAS_BUILT_IN_EPC) - DevCheck(ueid > 0, ueid, 0, 0); - emm_common_data_ctx = emm_common_data_context_get(&emm_common_data_head, ueid); -#else - assert(ueid < EMM_DATA_NB_UE_MAX); - emm_common_data_ctx = _emm_common_data[ueid]; -#endif - assert(emm_common_data_ctx != NULL); - - LOG_FUNC_RETURN(emm_common_data_ctx->args); -} - -/****************************************************************************/ -/********************* L O C A L F U N C T I O N S *********************/ -/****************************************************************************/ - -/**************************************************************************** - ** ** - ** Name: emm_proc_common_cleanup() ** - ** ** - ** Description: Cleans EMM procedure callback functions upon completion ** - ** of an EMM common procedure previously initiated within an ** - ** EMM procedure currently in progress between the network ** - ** and the UE with the specified identifier. ** - ** ** - ** Inputs: ueid: UE lower layer identifier ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: None ** - ** Others: _emm_common_data ** - ** ** - ***************************************************************************/ -static void _emm_common_cleanup(unsigned int ueid) -{ - emm_common_data_t *emm_common_data_ctx = NULL; - -#if defined(NAS_BUILT_IN_EPC) - DevCheck(ueid > 0, ueid, 0, 0); - emm_common_data_ctx = emm_common_data_context_get(&emm_common_data_head, ueid); -#else - assert(ueid < EMM_DATA_NB_UE_MAX); - emm_common_data_ctx = _emm_common_data[ueid]; -#endif - - if (emm_common_data_ctx) { - emm_common_data_ctx->ref_count -= 1; - - if (emm_common_data_ctx->ref_count == 0) { - /* Release the callback functions */ -#if defined(NAS_BUILT_IN_EPC) - RB_REMOVE(emm_common_data_map, - &emm_common_data_head.emm_common_data_root, - emm_common_data_ctx); -#endif - free(emm_common_data_ctx); - emm_common_data_ctx = NULL; - } - } -} diff --git a/openair-cn/NAS/MME/EMM/EmmCommon.h b/openair-cn/NAS/MME/EMM/EmmCommon.h deleted file mode 100644 index f09e4954ea..0000000000 --- a/openair-cn/NAS/MME/EMM/EmmCommon.h +++ /dev/null @@ -1,109 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** -Source EmmCommon.h - -Version 0.1 - -Date 2013/04/19 - -Product NAS stack - -Subsystem EPS Mobility Management - -Author Frederic Maurel - -Description Defines callback functions executed within EMM common procedures - by the Non-Access Stratum running at the network side. - - Following EMM common procedures can always be initiated by the - network whilst a NAS signalling connection exists: - - GUTI reallocation - authentication - security mode control - identification - EMM information - -*****************************************************************************/ -#ifndef __EMM_COMMON_H__ -#define __EMM_COMMON_H__ - -/****************************************************************************/ -/********************* G L O B A L C O N S T A N T S *******************/ -/****************************************************************************/ - -/****************************************************************************/ -/************************ G L O B A L T Y P E S ************************/ -/****************************************************************************/ - -/* - * Type of EMM procedure callback functions - * ---------------------------------------- - * EMM procedure to be executed under certain conditions, when an EMM common - * procedure has been initiated by the ongoing EMM procedure. - * - The EMM common procedure successfully completed - * - The EMM common procedure failed or is rejected - * - Lower layer failure occured before the EMM common procedure completion - */ -typedef int (*emm_common_success_callback_t)(void *); -typedef int (*emm_common_reject_callback_t) (void *); -typedef int (*emm_common_failure_callback_t)(void *); - -/* - * Type of EMM common procedure callback function - * ---------------------------------------------- - * EMM common procedure to be executed when the ongoing EMM procedure is - * aborted. - */ -typedef int (*emm_common_abort_callback_t)(void *); - -/****************************************************************************/ -/******************** G L O B A L V A R I A B L E S ********************/ -/****************************************************************************/ - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -int emm_proc_common_initialize(unsigned int ueid, - emm_common_success_callback_t success, - emm_common_reject_callback_t reject, - emm_common_failure_callback_t failure, - emm_common_abort_callback_t abort, - void *args); - -int emm_proc_common_success(unsigned int ueid); -int emm_proc_common_reject(unsigned int ueid); -int emm_proc_common_failure(unsigned int ueid); -int emm_proc_common_abort(unsigned int ueid); - -void *emm_proc_common_get_args(unsigned int ueid); - -#endif /* __EMM_COMMON_H__*/ diff --git a/openair-cn/NAS/MME/EMM/EmmStatusHdl.c b/openair-cn/NAS/MME/EMM/EmmStatusHdl.c deleted file mode 100644 index fec9f2314f..0000000000 --- a/openair-cn/NAS/MME/EMM/EmmStatusHdl.c +++ /dev/null @@ -1,165 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** -Source Emmstatus.c - -Version 0.1 - -Date 2013/06/26 - -Product NAS stack - -Subsystem EPS Mobility Management - -Author Frederic Maurel - -Description Defines the EMM status procedure executed by the Non-Access - Stratum. - - The purpose of the sending of the EMM STATUS message is to - report at any time certain error conditions detected upon - receipt of EMM protocol data. The EMM STATUS message can be - sent by both the MME and the UE. - -*****************************************************************************/ - -#include "emm_proc.h" -#include "commonDef.h" -#include "nas_log.h" - -#include "emm_cause.h" -#include "emmData.h" - -#include "emm_sap.h" - -/****************************************************************************/ -/**************** E X T E R N A L D E F I N I T I O N S ****************/ -/****************************************************************************/ - -/****************************************************************************/ -/******************* L O C A L D E F I N I T I O N S *******************/ -/****************************************************************************/ - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -/**************************************************************************** - ** ** - ** Name: emm_proc_status_ind() ** - ** ** - ** Description: Processes received EMM status message. ** - ** ** - ** 3GPP TS 24.301, section 5.7 ** - ** On receipt of an EMM STATUS message no state transition ** - ** and no specific action shall be taken. Local actions are ** - ** possible and are implementation dependent. ** - ** ** - ** Inputs: ueid: UE lower layer identifier ** - ** emm_cause: Received EMM cause code ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int emm_proc_status_ind(unsigned int ueid, int emm_cause) -{ - LOG_FUNC_IN; - - int rc; - - LOG_TRACE(INFO,"EMM-PROC - EMM status procedure requested (cause=%d)", - emm_cause); - - LOG_TRACE(DEBUG, "EMM-PROC - To be implemented"); - - /* TODO */ - rc = RETURNok; - - LOG_FUNC_RETURN (rc); -} - -/**************************************************************************** - ** ** - ** Name: emm_proc_status() ** - ** ** - ** Description: Initiates EMM status procedure. ** - ** ** - ** Inputs: ueid: UE lower layer identifier ** - ** emm_cause: EMM cause code to be reported ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int emm_proc_status(unsigned int ueid, int emm_cause) -{ - LOG_FUNC_IN; - - int rc; - emm_sap_t emm_sap; - - emm_security_context_t *sctx = NULL; - struct emm_data_context_s *ctx = NULL; - - LOG_TRACE(INFO,"EMM-PROC - EMM status procedure requested"); - - /* - * Notity EMM that EMM status indication has to be sent to lower layers - */ - emm_sap.primitive = EMMAS_STATUS_IND; - emm_sap.u.emm_as.u.status.emm_cause = emm_cause; - emm_sap.u.emm_as.u.status.ueid = ueid; - emm_sap.u.emm_as.u.status.guti = NULL; -# if defined(NAS_BUILT_IN_EPC) - ctx = emm_data_context_get(&_emm_data, ueid); -# else - ctx = _emm_data.ctx[ueid]; -# endif - - if (ctx) { - sctx = ctx->security; - } - - /* Setup EPS NAS security data */ - emm_as_set_security_data(&emm_sap.u.emm_as.u.status.sctx, sctx, - FALSE, TRUE); - - rc = emm_sap_send(&emm_sap); - - LOG_FUNC_RETURN (rc); -} - -/****************************************************************************/ -/********************* L O C A L F U N C T I O N S *********************/ -/****************************************************************************/ diff --git a/openair-cn/NAS/MME/EMM/Identification.c b/openair-cn/NAS/MME/EMM/Identification.c deleted file mode 100644 index a4e34f5be3..0000000000 --- a/openair-cn/NAS/MME/EMM/Identification.c +++ /dev/null @@ -1,538 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** -Source Identification.c - -Version 0.1 - -Date 2013/04/09 - -Product NAS stack - -Subsystem EPS Mobility Management - -Author Frederic Maurel - -Description Defines the identification EMM procedure executed by the - Non-Access Stratum. - - The identification procedure is used by the network to request - a particular UE to provide specific identification parameters - (IMSI, IMEI). - -*****************************************************************************/ - -#include "emm_proc.h" -#include "nas_log.h" -#include "nas_timer.h" - -#include "emmData.h" - -#include "emm_sap.h" -#include "msc.h" - -#include // malloc, free -#include // memcpy - -/****************************************************************************/ -/**************** E X T E R N A L D E F I N I T I O N S ****************/ -/****************************************************************************/ - -/****************************************************************************/ -/******************* L O C A L D E F I N I T I O N S *******************/ -/****************************************************************************/ - -/* String representation of the requested identity type */ -static const char *_emm_identity_type_str[] = { - "NOT AVAILABLE", "IMSI", "IMEI", "IMEISV", "TMSI" -}; - - -/* - * -------------------------------------------------------------------------- - * Internal data handled by the identification procedure in the MME - * -------------------------------------------------------------------------- - */ -/* - * Timer handlers - */ -static void *_identification_t3470_handler(void *); - -/* - * Function executed whenever the ongoing EMM procedure that initiated - * the identification procedure is aborted or the maximum value of the - * retransmission timer counter is exceed - */ -static int _identification_abort(void *); - -/* - * Internal data used for identification procedure - */ -typedef struct { - unsigned int ueid; /* UE identifier */ -#define IDENTIFICATION_COUNTER_MAX 5 - unsigned int retransmission_count; /* Retransmission counter */ - emm_proc_identity_type_t type; /* Type of UE identity */ - int notify_failure; /* Indicates whether the identification - * procedure failure shall be notified - * to the ongoing EMM procedure */ -} identification_data_t; - -static int _identification_request(identification_data_t *data); - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - - -/* - * -------------------------------------------------------------------------- - * Identification procedure executed by the MME - * -------------------------------------------------------------------------- - */ -/******************************************************************** - ** ** - ** Name: emm_proc_identification() ** - ** ** - ** Description: Initiates an identification procedure. ** - ** ** - ** 3GPP TS 24.301, section 5.4.4.2 ** - ** The network initiates the identification procedure by ** - ** sending an IDENTITY REQUEST message to the UE and star- ** - ** ting the timer T3470. The IDENTITY REQUEST message speci- ** - ** fies the requested identification parameters in the Iden- ** - ** tity type information element. ** - ** ** - ** Inputs: ueid: UE lower layer identifier ** - ** type: Type of the requested identity ** - ** success: Callback function executed when the identi- ** - ** fication procedure successfully completes ** - ** reject: Callback function executed when the identi- ** - ** fication procedure fails or is rejected ** - ** failure: Callback function executed whener a lower ** - ** layer failure occured before the identifi- ** - ** cation procedure completes ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: _emm_data ** - ** ** - ********************************************************************/ -int emm_proc_identification(unsigned int ueid, - emm_data_context_t *emm_ctx, - emm_proc_identity_type_t type, - emm_common_success_callback_t success, - emm_common_reject_callback_t reject, - emm_common_failure_callback_t failure) -{ - LOG_FUNC_IN; - - int rc = RETURNerror; - - LOG_TRACE(INFO, "EMM-PROC - Initiate identification type = %s (%d), ctx = %p", - _emm_identity_type_str[type], type, emm_ctx); - - /* Allocate parameters of the retransmission timer callback */ - identification_data_t *data = - (identification_data_t *)malloc(sizeof(identification_data_t)); - - if (data != NULL) { - /* Setup ongoing EMM procedure callback functions */ - rc = emm_proc_common_initialize(ueid, success, reject, failure, - _identification_abort, data); - - if (rc != RETURNok) { - LOG_TRACE(WARNING, "Failed to initialize EMM callback functions"); - free(data); - LOG_FUNC_RETURN (RETURNerror); - } - - /* Set the UE identifier */ - data->ueid = ueid; - /* Reset the retransmission counter */ - data->retransmission_count = 0; - /* Set the type of the requested identity */ - data->type = type; - /* Set the failure notification indicator */ - data->notify_failure = FALSE; - /* Send identity request message to the UE */ - rc = _identification_request(data); - - if (rc != RETURNerror) { - /* - * Notify EMM that common procedure has been initiated - */ - MSC_LOG_TX_MESSAGE( - MSC_NAS_EMM_MME, - MSC_NAS_EMM_MME, - NULL,0, - "0 EMMREG_COMMON_PROC_REQ ue id "NAS_UE_ID_FMT" (identification)", ueid); - - emm_sap_t emm_sap; - emm_sap.primitive = EMMREG_COMMON_PROC_REQ; - emm_sap.u.emm_reg.ueid = ueid; - emm_sap.u.emm_reg.ctx = emm_ctx; - rc = emm_sap_send(&emm_sap); - } - } - - LOG_FUNC_RETURN (rc); -} - -/**************************************************************************** - ** ** - ** Name: emm_proc_identification_complete() ** - ** ** - ** Description: Performs the identification completion procedure executed ** - ** by the network. ** - ** ** - ** 3GPP TS 24.301, section 5.4.4.4 ** - ** Upon receiving the IDENTITY RESPONSE message, the MME ** - ** shall stop timer T3470. ** - ** ** - ** Inputs: ueid: UE lower layer identifier ** - ** imsi: The IMSI received from the UE ** - ** imei: The IMEI received from the UE ** - ** tmsi: The TMSI received from the UE ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: _emm_data, T3470 ** - ** ** - ***************************************************************************/ -int emm_proc_identification_complete(unsigned int ueid, const imsi_t *imsi, - const imei_t *imei, uint32_t *tmsi) -{ - int rc = RETURNerror; - emm_sap_t emm_sap; - - emm_data_context_t *emm_ctx = NULL; - - LOG_FUNC_IN; - - LOG_TRACE(INFO, "EMM-PROC - Identification complete (ueid="NAS_UE_ID_FMT")", ueid); - - /* Release retransmission timer paramaters */ - identification_data_t *data = - (identification_data_t *)(emm_proc_common_get_args(ueid)); - if (data) { - free(data); - } - - /* Get the UE context */ -#if defined(NAS_BUILT_IN_EPC) - if (ueid > 0) { - emm_ctx = emm_data_context_get(&_emm_data, ueid); - } -#else - if (ueid < EMM_DATA_NB_UE_MAX) { - emm_ctx = _emm_data.ctx[ueid]; - } -#endif - - if (emm_ctx) { - /* Stop timer T3470 */ - LOG_TRACE(INFO, "EMM-PROC - Stop timer T3470 (%d)", emm_ctx->T3470.id); - emm_ctx->T3470.id = nas_timer_stop(emm_ctx->T3470.id); - MSC_LOG_EVENT(MSC_NAS_EMM_MME, "0 T3470 stopped UE "NAS_UE_ID_FMT" ", ueid); - - if (imsi) { - /* Update the IMSI */ - if (emm_ctx->imsi == NULL) { - emm_ctx->imsi = (imsi_t *)malloc(sizeof(imsi_t)); - } - - if (emm_ctx->imsi) { - memcpy(emm_ctx->imsi, imsi, sizeof(imsi_t)); - } - } else if (imei) { - /* Update the IMEI */ - if (emm_ctx->imei == NULL) { - emm_ctx->imei = (imei_t *)malloc(sizeof(imei_t)); - } - - if (emm_ctx->imei) { - memcpy(emm_ctx->imei, imei, sizeof(imei_t)); - } - } else if (tmsi) { - /* Update the GUTI */ - if (emm_ctx->guti == NULL) { - emm_ctx->guti = (GUTI_t *)malloc(sizeof(GUTI_t)); - } - - if (emm_ctx->guti) { - memcpy(&emm_ctx->guti->gummei, - &_emm_data.conf.gummei, sizeof(gummei_t)); - emm_ctx->guti->m_tmsi = *tmsi; - } - } - - /* - * Notify EMM that the identification procedure successfully completed - */ - MSC_LOG_TX_MESSAGE( - MSC_NAS_EMM_MME, - MSC_NAS_EMM_MME, - NULL,0, - "0 EMMREG_COMMON_PROC_CNF ue id "NAS_UE_ID_FMT" ", ueid); - - emm_sap.primitive = EMMREG_COMMON_PROC_CNF; - emm_sap.u.emm_reg.ueid = ueid; - emm_sap.u.emm_reg.ctx = emm_ctx; - emm_sap.u.emm_reg.u.common.is_attached = emm_ctx->is_attached; - } else { - LOG_TRACE(ERROR, "EMM-PROC - No EMM context exists"); - /* - * Notify EMM that the identification procedure failed - */ - MSC_LOG_TX_MESSAGE( - MSC_NAS_EMM_MME, - MSC_NAS_EMM_MME, - NULL,0, - "0 EMMREG_COMMON_PROC_REJ ue id "NAS_UE_ID_FMT" ", ueid); - - emm_sap.primitive = EMMREG_COMMON_PROC_REJ; - emm_sap.u.emm_reg.ueid = ueid; - emm_sap.u.emm_reg.ctx = emm_ctx; - } - - rc = emm_sap_send(&emm_sap); - - LOG_FUNC_RETURN (rc); -} - - -/****************************************************************************/ -/********************* L O C A L F U N C T I O N S *********************/ -/****************************************************************************/ - -/* - * -------------------------------------------------------------------------- - * Timer handlers - * -------------------------------------------------------------------------- - */ - -/**************************************************************************** - ** ** - ** Name: _identification_t3470_handler() ** - ** ** - ** Description: T3470 timeout handler ** - ** Upon T3470 timer expiration, the identification request ** - ** message is retransmitted and the timer restarted. When ** - ** retransmission counter is exceed, the MME shall abort the ** - ** identification procedure and any ongoing EMM procedure. ** - ** ** - ** 3GPP TS 24.301, section 5.4.4.6, case b ** - ** ** - ** Inputs: args: handler parameters ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: None ** - ** Others: None ** - ** ** - ***************************************************************************/ -static void *_identification_t3470_handler(void *args) -{ - LOG_FUNC_IN; - - int rc; - - identification_data_t *data = (identification_data_t *)(args); - - /* Increment the retransmission counter */ - data->retransmission_count += 1; - - LOG_TRACE(WARNING, "EMM-PROC - T3470 timer expired, retransmission " - "counter = %d", data->retransmission_count); - - if (data->retransmission_count < IDENTIFICATION_COUNTER_MAX) { - /* Send identity request message to the UE */ - rc = _identification_request(data); - } else { - /* Set the failure notification indicator */ - data->notify_failure = TRUE; - /* Abort the identification procedure */ - rc = _identification_abort(data); - } - - LOG_FUNC_RETURN (NULL); -} - -/* - * -------------------------------------------------------------------------- - * MME specific local functions - * -------------------------------------------------------------------------- - */ - -/**************************************************************************** - ** ** - ** Name: _identification_request() ** - ** ** - ** Description: Sends IDENTITY REQUEST message and start timer T3470. ** - ** ** - ** Inputs: args: handler parameters ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: None ** - ** Others: T3470 ** - ** ** - ***************************************************************************/ -int _identification_request(identification_data_t *data) -{ - emm_sap_t emm_sap; - int rc; - - struct emm_data_context_s *emm_ctx = NULL; - - LOG_FUNC_IN; - - /* - * Notify EMM-AS SAP that Identity Request message has to be sent - * to the UE - */ - MSC_LOG_TX_MESSAGE( - MSC_NAS_EMM_MME, - MSC_NAS_EMM_MME, - NULL,0, - "0 EMMAS_SECURITY_REQ ue id "NAS_UE_ID_FMT" ", data->ueid); - - emm_sap.primitive = EMMAS_SECURITY_REQ; - emm_sap.u.emm_as.u.security.guti = NULL; - emm_sap.u.emm_as.u.security.ueid = data->ueid; - emm_sap.u.emm_as.u.security.msgType = EMM_AS_MSG_TYPE_IDENT; - emm_sap.u.emm_as.u.security.identType = data->type; - -#if defined(NAS_BUILT_IN_EPC) - if (data->ueid > 0) { - emm_ctx = emm_data_context_get(&_emm_data, data->ueid); - } -#else - if (data->ueid < EMM_DATA_NB_UE_MAX) { - emm_ctx = _emm_data.ctx[data->ueid]; - } -#endif - /* Setup EPS NAS security data */ - emm_as_set_security_data(&emm_sap.u.emm_as.u.security.sctx, - emm_ctx->security, FALSE, TRUE); - rc = emm_sap_send(&emm_sap); - - if (rc != RETURNerror) { - if (emm_ctx->T3470.id != NAS_TIMER_INACTIVE_ID) { - /* Re-start T3470 timer */ - emm_ctx->T3470.id = nas_timer_restart(emm_ctx->T3470.id); - MSC_LOG_EVENT(MSC_NAS_EMM_MME, "0 T3470 restarted UE "NAS_UE_ID_FMT" ", data->ueid); - } else { - /* Start T3470 timer */ - emm_ctx->T3470.id = nas_timer_start(emm_ctx->T3470.sec, _identification_t3470_handler, - data); - MSC_LOG_EVENT(MSC_NAS_EMM_MME, "0 T3470 started UE "NAS_UE_ID_FMT" ", data->ueid); - } - - LOG_TRACE(INFO,"EMM-PROC - Timer T3470 (%d) expires in %ld seconds", - emm_ctx->T3470.id, emm_ctx->T3470.sec); - } - - LOG_FUNC_RETURN (rc); -} - -/**************************************************************************** - ** ** - ** Name: _identification_abort() ** - ** ** - ** Description: Aborts the identification procedure currently in progress ** - ** ** - ** Inputs: args: Identification data to be released ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: None ** - ** Others: T3470 ** - ** ** - ***************************************************************************/ -static int _identification_abort(void *args) -{ - LOG_FUNC_IN; - - int rc = RETURNerror; - - identification_data_t *data = (identification_data_t *)(args); - - if (data) { - unsigned int ueid = data->ueid; - int notify_failure = data->notify_failure; - struct emm_data_context_s *emm_ctx = NULL; - /* Get the UE context */ - #if defined(NAS_BUILT_IN_EPC) - if (ueid > 0) { - emm_ctx = emm_data_context_get(&_emm_data, ueid); - } - #else - if (ueid < EMM_DATA_NB_UE_MAX) { - emm_ctx = _emm_data.ctx[ueid]; - } - #endif - LOG_TRACE(WARNING, "EMM-PROC - Abort identification procedure " - "(ueid="NAS_UE_ID_FMT")", ueid); - - /* Stop timer T3470 */ - if (emm_ctx->T3470.id != NAS_TIMER_INACTIVE_ID) { - LOG_TRACE(INFO, "EMM-PROC - Stop timer T3470 (%d)", emm_ctx->T3470.id); - emm_ctx->T3470.id = nas_timer_stop(emm_ctx->T3470.id); - MSC_LOG_EVENT(MSC_NAS_EMM_MME, "0 T3470 stopped UE "NAS_UE_ID_FMT" ", data->ueid); - } - - /* Release retransmission timer paramaters */ - free(data); - - /* - * Notify EMM that the identification procedure failed - */ - if (notify_failure) { - MSC_LOG_TX_MESSAGE( - MSC_NAS_EMM_MME, - MSC_NAS_EMM_MME, - NULL,0, - "0 EMMREG_COMMON_PROC_REJ ue id "NAS_UE_ID_FMT" ", ueid); - emm_sap_t emm_sap; - emm_sap.primitive = EMMREG_COMMON_PROC_REJ; - emm_sap.u.emm_reg.ueid = ueid; - rc = emm_sap_send(&emm_sap); - } else { - rc = RETURNok; - } - } - - LOG_FUNC_RETURN(rc); -} - - diff --git a/openair-cn/NAS/MME/EMM/IdleMode.c b/openair-cn/NAS/MME/EMM/IdleMode.c deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/openair-cn/NAS/MME/EMM/IdleMode.h b/openair-cn/NAS/MME/EMM/IdleMode.h deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/openair-cn/NAS/MME/EMM/LowerLayer.c b/openair-cn/NAS/MME/EMM/LowerLayer.c deleted file mode 100644 index 2012164975..0000000000 --- a/openair-cn/NAS/MME/EMM/LowerLayer.c +++ /dev/null @@ -1,384 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** -Source LowerLayer.c - -Version 0.1 - -Date 2012/03/14 - -Product NAS stack - -Subsystem EPS Mobility Management - -Author Frederic Maurel - -Description Defines EMM procedures executed by the Non-Access Stratum - upon receiving notifications from lower layers so that data - transfer succeed or failed, or NAS signalling connection is - released, or ESM unit data has been received from under layer, - and to request ESM unit data transfer to under layer. - -*****************************************************************************/ - -#include "LowerLayer.h" -#include "commonDef.h" -#include "nas_log.h" - -#include "emmData.h" - -#include "emm_sap.h" -#include "esm_sap.h" -#include "nas_log.h" - -#include // memset - -/****************************************************************************/ -/**************** E X T E R N A L D E F I N I T I O N S ****************/ -/****************************************************************************/ - -/****************************************************************************/ -/******************* L O C A L D E F I N I T I O N S *******************/ -/****************************************************************************/ - - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -/* - * -------------------------------------------------------------------------- - * Lower layer notification handlers - * -------------------------------------------------------------------------- - */ - -/**************************************************************************** - ** ** - ** Name: lowerlayer_success() ** - ** ** - ** Description: Notify the EPS Mobility Management entity that data have ** - ** been successfully delivered to the network ** - ** ** - ** Inputs: ueid: UE lower layer identifier ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int lowerlayer_success(unsigned int ueid) -{ - LOG_FUNC_IN; - - emm_sap_t emm_sap; - int rc; - - emm_sap.primitive = EMMREG_LOWERLAYER_SUCCESS; - emm_sap.u.emm_reg.ueid = ueid; - emm_sap.u.emm_reg.ctx = NULL; - rc = emm_sap_send(&emm_sap); - - LOG_FUNC_RETURN (rc); -} - -/**************************************************************************** - ** ** - ** Name: lowerlayer_failure() ** - ** ** - ** Description: Notify the EPS Mobility Management entity that lower la- ** - ** yers failed to deliver data to the network ** - ** ** - ** Inputs: ueid: UE lower layer identifier ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int lowerlayer_failure(unsigned int ueid) -{ - LOG_FUNC_IN; - - emm_sap_t emm_sap; - int rc; - - emm_sap.primitive = EMMREG_LOWERLAYER_FAILURE; - emm_sap.u.emm_reg.ueid = ueid; -#if defined(NAS_BUILT_IN_EPC) - emm_data_context_t *emm_ctx = NULL; - if (ueid > 0) { - emm_ctx = emm_data_context_get(&_emm_data, ueid); - } - emm_sap.u.emm_reg.ctx = emm_ctx; -#else - emm_sap.u.emm_reg.ctx = NULL; -#endif - rc = emm_sap_send(&emm_sap); - - LOG_FUNC_RETURN (rc); -} - -/**************************************************************************** - ** ** - ** Name: lowerlayer_establish() ** - ** ** - ** Description: Update the EPS connection management status upon recei- ** - ** ving indication so that the NAS signalling connection is ** - ** established ** - ** ** - ** Inputs: None ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int lowerlayer_establish(void) -{ - LOG_FUNC_IN; - LOG_FUNC_RETURN (RETURNok); -} - -/**************************************************************************** - ** ** - ** Name: lowerlayer_release() ** - ** ** - ** Description: Notify the EPS Mobility Management entity that NAS signal-** - ** ling connection has been released ** - ** ** - ** Inputs: cause: Release cause ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int lowerlayer_release(int cause) -{ - LOG_FUNC_IN; - - emm_sap_t emm_sap; - int rc; - - emm_sap.primitive = EMMREG_LOWERLAYER_RELEASE; - emm_sap.u.emm_reg.ueid = 0; - emm_sap.u.emm_reg.ctx = NULL; - rc = emm_sap_send(&emm_sap); - - LOG_FUNC_RETURN (rc); -} - -/**************************************************************************** - ** ** - ** Name: lowerlayer_data_ind() ** - ** ** - ** Description: Notify the EPS Session Management entity that data have ** - ** been received from lower layers ** - ** ** - ** Inputs: ueid: UE lower layer identifier ** - ** data: Data transfered from lower layers ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int lowerlayer_data_ind(unsigned int ueid, const OctetString *data) -{ - esm_sap_t esm_sap; - int rc; - emm_data_context_t *emm_ctx = NULL; - - LOG_FUNC_IN; - -#if defined(NAS_BUILT_IN_EPC) - if (ueid > 0) { - emm_ctx = emm_data_context_get(&_emm_data, ueid); - } - -#endif - - esm_sap.primitive = ESM_UNITDATA_IND; - esm_sap.is_standalone = TRUE; - esm_sap.ueid = ueid; - esm_sap.ctx = emm_ctx; - esm_sap.recv = data; - rc = esm_sap_send(&esm_sap); - - LOG_FUNC_RETURN (rc); -} - -/**************************************************************************** - ** ** - ** Name: lowerlayer_data_req() ** - ** ** - ** Description: Notify the EPS Mobility Management entity that data have ** - ** to be transfered to lower layers ** - ** ** - ** Inputs: ueid: UE lower layer identifier ** - ** data: Data to be transfered to lower layers ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int lowerlayer_data_req(unsigned int ueid, const OctetString *data) -{ - LOG_FUNC_IN; - - int rc; - emm_sap_t emm_sap; - emm_security_context_t *sctx = NULL; - struct emm_data_context_s *ctx = NULL; - - emm_sap.primitive = EMMAS_DATA_REQ; - emm_sap.u.emm_as.u.data.guti = NULL; - emm_sap.u.emm_as.u.data.ueid = ueid; -# if defined(NAS_BUILT_IN_EPC) - - if (ueid > 0) { - ctx = emm_data_context_get(&_emm_data, ueid); - } - -# else - - if (ueid < EMM_DATA_NB_UE_MAX) { - ctx = _emm_data.ctx[ueid]; - } - -# endif - - if (ctx) { - sctx = ctx->security; - } - emm_sap.u.emm_as.u.data.NASinfo = 0; - emm_sap.u.emm_as.u.data.NASmsg.length = data->length; - emm_sap.u.emm_as.u.data.NASmsg.value = data->value; - /* Setup EPS NAS security data */ - emm_as_set_security_data(&emm_sap.u.emm_as.u.data.sctx, sctx, FALSE, TRUE); - rc = emm_sap_send(&emm_sap); - - LOG_FUNC_RETURN (rc); -} - -/* - * -------------------------------------------------------------------------- - * EMM procedure handlers - * -------------------------------------------------------------------------- - */ - -/**************************************************************************** - ** ** - ** Name: emm_as_set_security_data() ** - ** ** - ** Description: Setup security data according to the given EPS security ** - ** context when data transfer to lower layers is requested ** - ** ** - ** Inputs: args: EPS security context currently in use ** - ** is_new: Indicates whether a new security context ** - ** has just been taken into use ** - ** is_ciphered: Indicates whether the NAS message has to ** - ** be sent ciphered ** - ** Others: None ** - ** ** - ** Outputs: data: EPS NAS security data to be setup ** - ** Return: None ** - ** Others: None ** - ** ** - ***************************************************************************/ -void emm_as_set_security_data(emm_as_security_data_t *data, const void *args, - int is_new, int is_ciphered) -{ - LOG_FUNC_IN; - - const emm_security_context_t *context = (emm_security_context_t *)(args); - - memset(data, 0, sizeof(emm_as_security_data_t)); - - if ( context && (context->type != EMM_KSI_NOT_AVAILABLE) ) { - /* 3GPP TS 24.301, sections 5.4.3.3 and 5.4.3.4 - * Once a valid EPS security context exists and has been taken - * into use, UE and MME shall cipher and integrity protect all - * NAS signalling messages with the selected NAS ciphering and - * NAS integrity algorithms */ - LOG_TRACE(INFO, - "EPS security context exists is new %u KSI %u SQN %u count %u", - is_new, - context->eksi, - context->ul_count.seq_num, - *(uint32_t *)(&context->ul_count)); - LOG_TRACE(INFO, - "knas_int %s",dump_octet_string(&context->knas_int)); - LOG_TRACE(INFO, - "knas_enc %s",dump_octet_string(&context->knas_enc)); - LOG_TRACE(INFO, - "kasme %s",dump_octet_string(&context->kasme)); - - data->is_new = is_new; - data->ksi = context->eksi; - data->sqn = context->dl_count.seq_num; - // LG data->count = *(uint32_t *)(&context->ul_count); - data->count = 0x00000000 | (context->dl_count.overflow << 8 ) | context->dl_count.seq_num; - /* NAS integrity and cyphering keys may not be available if the - * current security context is a partial EPS security context - * and not a full native EPS security context */ - data->k_int = &context->knas_int; - - if (is_ciphered) { - /* 3GPP TS 24.301, sections 4.4.5 - * When the UE establishes a new NAS signalling connection, - * it shall send initial NAS messages integrity protected - * and unciphered */ - /* 3GPP TS 24.301, section 5.4.3.2 - * The MME shall send the SECURITY MODE COMMAND message integrity - * protected and unciphered */ - LOG_TRACE(WARNING, - "EPS security context exists knas_enc"); - data->k_enc = &context->knas_enc; - } - } else { - LOG_TRACE(WARNING, "EMM_AS_NO_KEY_AVAILABLE"); - /* No valid EPS security context exists */ - data->ksi = EMM_AS_NO_KEY_AVAILABLE; - } - - LOG_FUNC_OUT; -} - -/****************************************************************************/ -/********************* L O C A L F U N C T I O N S *********************/ -/****************************************************************************/ - diff --git a/openair-cn/NAS/MME/EMM/LowerLayer.h b/openair-cn/NAS/MME/EMM/LowerLayer.h deleted file mode 100644 index a0cef2582b..0000000000 --- a/openair-cn/NAS/MME/EMM/LowerLayer.h +++ /dev/null @@ -1,79 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** -Source lowerlayer.h - -Version 0.1 - -Date 2013/06/19 - -Product NAS stack - -Subsystem EPS Mobility Management - -Author Frederic Maurel - -Description Defines EMM procedures executed by the Non-Access Stratum - upon receiving notifications from lower layers so that data - transfer succeed or failed, or NAS signalling connection is - released, or ESM unit data has been received from under layer, - and to request ESM unit data transfer to under layer. - -*****************************************************************************/ -#ifndef __LOWERLAYER_H__ -#define __LOWERLAYER_H__ - -#include "OctetString.h" - -/****************************************************************************/ -/********************* G L O B A L C O N S T A N T S *******************/ -/****************************************************************************/ - - -/****************************************************************************/ -/************************ G L O B A L T Y P E S ************************/ -/****************************************************************************/ - -/****************************************************************************/ -/******************** G L O B A L V A R I A B L E S ********************/ -/****************************************************************************/ - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -int lowerlayer_success(unsigned int ueid); -int lowerlayer_failure(unsigned int ueid); -int lowerlayer_establish(void); -int lowerlayer_release(int cause); - -int lowerlayer_data_ind(unsigned int ueid, const OctetString *data); -int lowerlayer_data_req(unsigned int ueid, const OctetString *data); - -#endif /* __LOWERLAYER_H__*/ diff --git a/openair-cn/NAS/MME/EMM/Makefile b/openair-cn/NAS/MME/EMM/Makefile deleted file mode 100644 index ef85807e8f..0000000000 --- a/openair-cn/NAS/MME/EMM/Makefile +++ /dev/null @@ -1,72 +0,0 @@ -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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 . -# -# Contact Information -# OpenAirInterface Admin: openair_admin@eurecom.fr -# OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr -# -# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. -# -################################################################################ -ifndef PROJDIR -PROJDIR = $(PWD)/../.. -endif - -include $(PROJDIR)/Makerules -include $(PROJDIR)/Makefile.inc - -INCLUDES = -I. \ - -I$(INCDIR) \ - -I$(UTILDIR) \ - -I$(USIMAPIDIR) \ - -I$(MMEAPIDIR) \ - -I$(ESMDIR) \ - -I$(EMMSAPDIR) \ - -I$(ESMDIR) \ - -I$(ESMSAPDIR) \ - -I$(EMMMSGDIR) \ - -I$(IESDIR) \ - -I$(OPENAIRCN_DIR)/COMMON \ - -I$(OPENAIRCN_DIR)/SECU - - -all: $(OBJS) - @$(CD) $(EMMMSGDIR) && $(MAKE) - @$(CD) $(EMMSAPDIR) && $(MAKE) - -clean: - $(RM) $(OBJS) *.bak *~ - @$(CD) $(EMMSAPDIR) && $(MAKE) $@ - -veryclean: clean - @$(CD) $(EMMSAPDIR) && $(MAKE) $@ - @$(CD) $(EMMMSGDIR) && $(MAKE) $@ - $(RM) $(TARGET) - -%.o: %.c Makefile $(PROJDIR)/Makerules $(PROJDIR)/Makefile.inc - @echo Compiling $< - @$(CC) $(CFLAGS) -c $< -o $@ - -depend: - makedepend -- ${CFLAGS} -- ${SRCS} - -# DO NOT DELETE THIS LINE -- make depend depends on it. - diff --git a/openair-cn/NAS/MME/EMM/SAP/EmmCommonProcedureInitiated.c b/openair-cn/NAS/MME/EMM/SAP/EmmCommonProcedureInitiated.c deleted file mode 100644 index 91fad0d62f..0000000000 --- a/openair-cn/NAS/MME/EMM/SAP/EmmCommonProcedureInitiated.c +++ /dev/null @@ -1,186 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** - -Source EmmCommonProcedureInitiated.c - -Version 0.1 - -Date 2012/10/03 - -Product NAS stack - -Subsystem EPS Mobility Management - -Author Frederic Maurel - -Description Implements the EPS Mobility Management procedures executed - when the EMM-SAP is in EMM-COMMON-PROCEDURE-INITIATED state. - - In EMM-COMMON-PROCEDURE-INITIATED state, the MME has started - a common EMM procedure and is waiting for a response from the - UE. - -*****************************************************************************/ - - -#include "emm_fsm.h" -#include "commonDef.h" -#include "nas_log.h" - -#include "EmmCommon.h" - -#include - -/****************************************************************************/ -/**************** E X T E R N A L D E F I N I T I O N S ****************/ -/****************************************************************************/ - -/****************************************************************************/ -/******************* L O C A L D E F I N I T I O N S *******************/ -/****************************************************************************/ - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -/**************************************************************************** - ** ** - ** Name: EmmCommonProcedureInitiated() ** - ** ** - ** Description: Handles the behaviour of the MME while the EMM-SAP is in ** - ** EMM_COMMON_PROCEDURE_INITIATED state. ** - ** ** - ** 3GPP TS 24.301, section 5.1.3.4.2 ** - ** ** - ** Inputs: evt: The received EMM-SAP event ** - ** Others: emm_fsm_status ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: emm_fsm_status ** - ** ** - ***************************************************************************/ -int EmmCommonProcedureInitiated(const emm_reg_t *evt) -{ - int rc = RETURNerror; - - LOG_FUNC_IN; - - assert(emm_fsm_get_status(evt->ueid, - evt->ctx) == EMM_COMMON_PROCEDURE_INITIATED); - - switch (evt->primitive) { - case _EMMREG_PROC_ABORT: - /* - * The EMM procedure that initiated EMM common procedure aborted - */ - rc = emm_proc_common_abort(evt->ueid); - break; - - case _EMMREG_COMMON_PROC_CNF: - - /* - * An EMM common procedure successfully completed; - */ - if (evt->u.common.is_attached) { - rc = emm_fsm_set_status(evt->ueid, evt->ctx, EMM_REGISTERED); - } else { - rc = emm_fsm_set_status(evt->ueid, evt->ctx, EMM_DEREGISTERED); - } - - if (rc != RETURNerror) { - rc = emm_proc_common_success(evt->ueid); - } - - break; - - case _EMMREG_COMMON_PROC_REJ: - /* - * An EMM common procedure failed; - * enter state EMM-DEREGISTERED. - */ - rc = emm_fsm_set_status(evt->ueid, evt->ctx, EMM_DEREGISTERED); - - if (rc != RETURNerror) { - rc = emm_proc_common_reject(evt->ueid); - } - - break; - - case _EMMREG_ATTACH_CNF: - /* - * Attach procedure successful and default EPS bearer - * context activated; - * enter state EMM-REGISTERED. - */ - rc = emm_fsm_set_status(evt->ueid, evt->ctx, EMM_REGISTERED); - break; - - case _EMMREG_ATTACH_REJ: - /* - * Attach procedure failed; - * enter state EMM-DEREGISTERED. - */ - rc = emm_fsm_set_status(evt->ueid, evt->ctx, EMM_DEREGISTERED); - break; - - case _EMMREG_LOWERLAYER_SUCCESS: - /* - * Data successfully delivered to the network - */ - rc = RETURNok; - break; - - case _EMMREG_LOWERLAYER_FAILURE: - /* - * Transmission failure occurred before the EMM common - * procedure being completed - */ - rc = emm_proc_common_failure(evt->ueid); - - if (rc != RETURNerror) { - rc = emm_fsm_set_status(evt->ueid, evt->ctx, EMM_DEREGISTERED); - } - - break; - - default: - LOG_TRACE(ERROR, "EMM-FSM - Primitive is not valid (%d)", - evt->primitive); - break; - } - - LOG_FUNC_RETURN (rc); -} - -/****************************************************************************/ -/********************* L O C A L F U N C T I O N S *********************/ -/****************************************************************************/ - diff --git a/openair-cn/NAS/MME/EMM/SAP/EmmDeregistered.c b/openair-cn/NAS/MME/EMM/SAP/EmmDeregistered.c deleted file mode 100644 index 627986ba14..0000000000 --- a/openair-cn/NAS/MME/EMM/SAP/EmmDeregistered.c +++ /dev/null @@ -1,157 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** - -Source EmmDeregistered.c - -Version 0.1 - -Date 2012/10/03 - -Product NAS stack - -Subsystem EPS Mobility Management - -Author Frederic Maurel - -Description Implements the EPS Mobility Management procedures executed - when the EMM-SAP is in EMM-DEREGISTERED state. - - In EMM-DEREGISTERED state, no EMM context has been established - or the EMM context is marked as detached. - The UE shall start the attach or combined attach procedure to - establish an EMM context. - - The MME may answer to an attach or a combined attach procedure - initiated by the UE. It may also answer to a tracking area - updating procedure or combined tracking area updating procedure - initiated by a UE if the EMM context is marked as detached. - -*****************************************************************************/ - -#include "emm_fsm.h" -#include "commonDef.h" -#include "networkDef.h" -#include "nas_log.h" - -#include "emm_proc.h" - -#include - -/****************************************************************************/ -/**************** E X T E R N A L D E F I N I T I O N S ****************/ -/****************************************************************************/ - -/****************************************************************************/ -/******************* L O C A L D E F I N I T I O N S *******************/ -/****************************************************************************/ - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -/**************************************************************************** - ** ** - ** Name: EmmDeregistered() ** - ** ** - ** Description: Handles the behaviour of the UE and the MME while the ** - ** EMM-SAP is in EMM-DEREGISTERED state. ** - ** ** - ** 3GPP TS 24.301, section 5.2.2.2 ** - ** ** - ** Inputs: evt: The received EMM-SAP event ** - ** Others: emm_fsm_status ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: emm_fsm_status ** - ** ** - ***************************************************************************/ -int EmmDeregistered(const emm_reg_t *evt) -{ - LOG_FUNC_IN; - - int rc = RETURNerror; - - assert(emm_fsm_get_status(evt->ueid, evt->ctx) == EMM_DEREGISTERED); - - switch (evt->primitive) { - - case _EMMREG_PROC_ABORT: - /* - * Ongoing EMM procedure aborted - */ - rc = RETURNok; - break; - - case _EMMREG_COMMON_PROC_REQ: - /* - * An EMM common procedure has been initiated; - * enter state EMM-COMMON-PROCEDURE-INITIATED. - */ - rc = emm_fsm_set_status(evt->ueid, evt->ctx, EMM_COMMON_PROCEDURE_INITIATED); - break; - - case _EMMREG_ATTACH_CNF: - /* - * Attach procedure successful and default EPS bearer - * context activated; - * enter state EMM-REGISTERED. - */ - rc = emm_fsm_set_status(evt->ueid, evt->ctx, EMM_REGISTERED); - break; - - case _EMMREG_LOWERLAYER_SUCCESS: - /* - * Data successfully delivered to the network - */ - rc = RETURNok; - break; - - case _EMMREG_LOWERLAYER_FAILURE: - /* - * Data failed to be delivered to the network - */ - rc = RETURNok; - break; - - default: - LOG_TRACE(ERROR, "EMM-FSM - Primitive is not valid (%d)", - evt->primitive); - break; - } - - - LOG_FUNC_RETURN (rc); -} - -/****************************************************************************/ -/********************* L O C A L F U N C T I O N S *********************/ -/****************************************************************************/ - diff --git a/openair-cn/NAS/MME/EMM/SAP/EmmDeregisteredAttachNeeded.c b/openair-cn/NAS/MME/EMM/SAP/EmmDeregisteredAttachNeeded.c deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/openair-cn/NAS/MME/EMM/SAP/EmmDeregisteredAttemptingToAttach.c b/openair-cn/NAS/MME/EMM/SAP/EmmDeregisteredAttemptingToAttach.c deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/openair-cn/NAS/MME/EMM/SAP/EmmDeregisteredInitiated.c b/openair-cn/NAS/MME/EMM/SAP/EmmDeregisteredInitiated.c deleted file mode 100644 index 74cb43fbb5..0000000000 --- a/openair-cn/NAS/MME/EMM/SAP/EmmDeregisteredInitiated.c +++ /dev/null @@ -1,110 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** -Source EmmDeregisteredInitiated.c - -Version 0.1 - -Date 2012/10/03 - -Product NAS stack - -Subsystem EPS Mobility Management - -Author Frederic Maurel - -Description Implements the EPS Mobility Management procedures executed - when the EMM-SAP is in EMM-DEREGISTERED-INITIATED state. - - In EMM-DEREGISTERED-INITIATED state, the UE has requested - release of the EMM context by starting the detach or combined - detach procedure and is waiting for a response from the MME. - The MME has started a detach procedure and is waiting for a - response from the UE. - -*****************************************************************************/ - -#include "emm_fsm.h" -#include "commonDef.h" -#include "nas_log.h" - -#include "emm_proc.h" - -#include - -/****************************************************************************/ -/**************** E X T E R N A L D E F I N I T I O N S ****************/ -/****************************************************************************/ - -/****************************************************************************/ -/******************* L O C A L D E F I N I T I O N S *******************/ -/****************************************************************************/ - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -/**************************************************************************** - ** ** - ** Name: EmmDeregisteredInitiated() ** - ** ** - ** Description: Handles the behaviour of the UE and the MME while the ** - ** EMM-SAP is in EMM-DEREGISTERED-INITIATED state. ** - ** ** - ** Inputs: evt: The received EMM-SAP event ** - ** Others: emm_fsm_status ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: emm_fsm_status ** - ** ** - ***************************************************************************/ -int EmmDeregisteredInitiated(const emm_reg_t *evt) -{ - LOG_FUNC_IN; - - int rc = RETURNerror; - - assert(emm_fsm_get_status(evt->ueid, evt->ctx) == EMM_DEREGISTERED_INITIATED); - - switch (evt->primitive) { - - default: - LOG_TRACE(ERROR, "EMM-FSM - Primitive is not valid (%d)", - evt->primitive); - break; - } - - LOG_FUNC_RETURN (rc); -} - -/****************************************************************************/ -/********************* L O C A L F U N C T I O N S *********************/ -/****************************************************************************/ - diff --git a/openair-cn/NAS/MME/EMM/SAP/EmmDeregisteredLimitedService.c b/openair-cn/NAS/MME/EMM/SAP/EmmDeregisteredLimitedService.c deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/openair-cn/NAS/MME/EMM/SAP/EmmDeregisteredNoCellAvailable.c b/openair-cn/NAS/MME/EMM/SAP/EmmDeregisteredNoCellAvailable.c deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/openair-cn/NAS/MME/EMM/SAP/EmmDeregisteredNoImsi.c b/openair-cn/NAS/MME/EMM/SAP/EmmDeregisteredNoImsi.c deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/openair-cn/NAS/MME/EMM/SAP/EmmDeregisteredNormalService.c b/openair-cn/NAS/MME/EMM/SAP/EmmDeregisteredNormalService.c deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/openair-cn/NAS/MME/EMM/SAP/EmmDeregisteredPlmnSearch.c b/openair-cn/NAS/MME/EMM/SAP/EmmDeregisteredPlmnSearch.c deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/openair-cn/NAS/MME/EMM/SAP/EmmNull.c b/openair-cn/NAS/MME/EMM/SAP/EmmNull.c deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/openair-cn/NAS/MME/EMM/SAP/EmmRegistered.c b/openair-cn/NAS/MME/EMM/SAP/EmmRegistered.c deleted file mode 100644 index 5c311dc8ee..0000000000 --- a/openair-cn/NAS/MME/EMM/SAP/EmmRegistered.c +++ /dev/null @@ -1,153 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** -Source EmmRegistered.c - -Version 0.1 - -Date 2012/10/03 - -Product NAS stack - -Subsystem EPS Mobility Management - -Author Frederic Maurel - -Description Implements the EPS Mobility Management procedures executed - when the EMM-SAP is in EMM-REGISTERED state. - - In EMM-REGISTERED state, an EMM context has been established - and a default EPS bearer context has been activated in the UE - and the MME. - The UE may initiate sending and receiving user data and signal- - ling information and reply to paging. Additionally, tracking - area updating or combined tracking area updating procedure is - performed. - -*****************************************************************************/ - -#include "emm_fsm.h" -#include "commonDef.h" -#include "networkDef.h" -#include "nas_log.h" - -#include "emm_proc.h" - -#include - -/****************************************************************************/ -/**************** E X T E R N A L D E F I N I T I O N S ****************/ -/****************************************************************************/ - -/****************************************************************************/ -/******************* L O C A L D E F I N I T I O N S *******************/ -/****************************************************************************/ - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -/**************************************************************************** - ** ** - ** Name: EmmRegistered() ** - ** ** - ** Description: Handles the behaviour of the UE and the MME while the ** - ** EMM-SAP is in EMM-REGISTERED state. ** - ** ** - ** Inputs: evt: The received EMM-SAP event ** - ** Others: emm_fsm_status ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: emm_fsm_status ** - ** ** - ***************************************************************************/ -int EmmRegistered(const emm_reg_t *evt) -{ - LOG_FUNC_IN; - - int rc = RETURNerror; - - assert(emm_fsm_get_status(evt->ueid, evt->ctx) == EMM_REGISTERED); - - switch (evt->primitive) { - - - - case _EMMREG_DETACH_REQ: - /* - * Network detach has been requested (implicit detach); - * enter state EMM-DEREGISTERED - */ - rc = emm_fsm_set_status(evt->ueid, evt->ctx, EMM_DEREGISTERED); - break; - - case _EMMREG_COMMON_PROC_REQ: - /* - * An EMM common procedure has been initiated; - * enter state EMM-COMMON-PROCEDURE-INITIATED. - */ - rc = emm_fsm_set_status(evt->ueid, evt->ctx, EMM_COMMON_PROCEDURE_INITIATED); - break; - - case _EMMREG_TAU_REJ: - /* - * TODO: Tracking Area Update has been rejected - */ - LOG_TRACE(ERROR, "EMM-FSM - Tracking Area Update procedure " - "is not implemented"); - break; - - case _EMMREG_LOWERLAYER_SUCCESS: - /* - * Data successfully delivered to the network - */ - rc = RETURNok; - break; - - case _EMMREG_LOWERLAYER_FAILURE: - /* - * Data failed to be delivered to the network - */ - rc = RETURNok; - break; - - default: - LOG_TRACE(ERROR, "EMM-FSM - Primitive is not valid (%d)", - evt->primitive); - break; - } - - LOG_FUNC_RETURN (rc); -} - -/****************************************************************************/ -/********************* L O C A L F U N C T I O N S *********************/ -/****************************************************************************/ - diff --git a/openair-cn/NAS/MME/EMM/SAP/EmmRegisteredAttemptingToUpdate.c b/openair-cn/NAS/MME/EMM/SAP/EmmRegisteredAttemptingToUpdate.c deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/openair-cn/NAS/MME/EMM/SAP/EmmRegisteredImsiDetachInitiated.c b/openair-cn/NAS/MME/EMM/SAP/EmmRegisteredImsiDetachInitiated.c deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/openair-cn/NAS/MME/EMM/SAP/EmmRegisteredInitiated.c b/openair-cn/NAS/MME/EMM/SAP/EmmRegisteredInitiated.c deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/openair-cn/NAS/MME/EMM/SAP/EmmRegisteredLimitedService.c b/openair-cn/NAS/MME/EMM/SAP/EmmRegisteredLimitedService.c deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/openair-cn/NAS/MME/EMM/SAP/EmmRegisteredNoCellAvailable.c b/openair-cn/NAS/MME/EMM/SAP/EmmRegisteredNoCellAvailable.c deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/openair-cn/NAS/MME/EMM/SAP/EmmRegisteredNormalService.c b/openair-cn/NAS/MME/EMM/SAP/EmmRegisteredNormalService.c deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/openair-cn/NAS/MME/EMM/SAP/EmmRegisteredPlmnSearch.c b/openair-cn/NAS/MME/EMM/SAP/EmmRegisteredPlmnSearch.c deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/openair-cn/NAS/MME/EMM/SAP/EmmRegisteredUpdateNeeded.c b/openair-cn/NAS/MME/EMM/SAP/EmmRegisteredUpdateNeeded.c deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/openair-cn/NAS/MME/EMM/SAP/EmmServiceRequestInitiated.c b/openair-cn/NAS/MME/EMM/SAP/EmmServiceRequestInitiated.c deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/openair-cn/NAS/MME/EMM/SAP/EmmTrackingAreaUpdatingInitiated.c b/openair-cn/NAS/MME/EMM/SAP/EmmTrackingAreaUpdatingInitiated.c deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/openair-cn/NAS/MME/EMM/SAP/Makefile b/openair-cn/NAS/MME/EMM/SAP/Makefile deleted file mode 100644 index 735d35bf8e..0000000000 --- a/openair-cn/NAS/MME/EMM/SAP/Makefile +++ /dev/null @@ -1,70 +0,0 @@ -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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 . -# -# Contact Information -# OpenAirInterface Admin: openair_admin@eurecom.fr -# OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr -# -# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. -# -################################################################################ -ifndef PROJDIR -PROJDIR = $(PWD)/../../.. -endif - -include $(PROJDIR)/Makerules -include $(PROJDIR)/Makefile.inc - -INCLUDES = -I. -I$(INCDIR) -I$(UTILDIR) -I$(IESDIR) -I$(MMEAPIDIR) \ - -I$(EMMDIR) -I$(EMMMSGDIR) -I$(ESMDIR) -I$(ESMMSGDIR) -I$(NETAPIDIR) - -TARGET = $(LIBEMMSAP) -TARGETS = $(TARGET).a $(TARGET).so - -all: $(TARGETS) - -%.o: %.c Makefile $(PROJDIR)/Makerules $(PROJDIR)/Makefile.inc - @echo Compiling $< - @$(CC) $(CFLAGS) -c $< -o $@ - -$(TARGET).a: $(OBJS) - @$(RM) $@ - @$(AR) $(ARFLAGS) $@ $(OBJS) - @echo Replacing $@ to $(LIBPROCESS) - @$(RM) $(LIBPROCESS)/$@ - @$(CP) $@ $(LIBPROCESS) - -$(TARGET).so: $(OBJS) - @$(LD) -G -o $@ $(OBJS) - @echo Replacing $@ to $(LIBPROCESS) - @$(RM) $(LIBPROCESS)/$@ - @$(CP) $@ $(LIBPROCESS) - -clean: - $(RM) $(OBJS) *.bak *~ - -veryclean: clean - $(RM) $(TARGETS) - -depend: - makedepend -- ${CFLAGS} -- ${SRCS} - -# DO NOT DELETE THIS LINE -- make depend depends on it. diff --git a/openair-cn/NAS/MME/EMM/SAP/emm_as.c b/openair-cn/NAS/MME/EMM/SAP/emm_as.c deleted file mode 100644 index 882c9e800e..0000000000 --- a/openair-cn/NAS/MME/EMM/SAP/emm_as.c +++ /dev/null @@ -1,1763 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** - -Source emm_as.c - -Version 0.1 - -Date 2012/10/16 - -Product NAS stack - -Subsystem EPS Mobility Management - -Author Frederic Maurel - -Description Defines the EMMAS Service Access Point that provides - services to the EPS Mobility Management for NAS message - transfer to/from the Access Stratum sublayer. - -*****************************************************************************/ - -#include "emm_as.h" -#include "emm_recv.h" -#include "emm_send.h" -#include "emmData.h" -#include "commonDef.h" -#include "nas_log.h" - -#include "TLVDecoder.h" -#include "as_message.h" -#include "nas_message.h" - -#include "emm_cause.h" -#include "LowerLayer.h" - -#include // memset -#include // malloc, free - -#if defined(NAS_BUILT_IN_EPC) -# include "nas_itti_messaging.h" -#endif -#include "msc.h" - -/****************************************************************************/ -/**************** E X T E R N A L D E F I N I T I O N S ****************/ -/****************************************************************************/ - - -extern int emm_proc_status(unsigned int ueid, int emm_cause); - -/****************************************************************************/ -/******************* L O C A L D E F I N I T I O N S *******************/ -/****************************************************************************/ - -/* - * String representation of EMMAS-SAP primitives - */ -static const char *_emm_as_primitive_str[] = { - "EMMAS_SECURITY_REQ", - "EMMAS_SECURITY_IND", - "EMMAS_SECURITY_RES", - "EMMAS_SECURITY_REJ", - "EMMAS_ESTABLISH_REQ", - "EMMAS_ESTABLISH_CNF", - "EMMAS_ESTABLISH_REJ", - "EMMAS_RELEASE_REQ", - "EMMAS_RELEASE_IND", - "EMMAS_DATA_REQ", - "EMMAS_DATA_IND", - "EMMAS_PAGE_IND", - "EMMAS_STATUS_IND", - "EMMAS_CELL_INFO_REQ", - "EMMAS_CELL_INFO_RES", - "EMMAS_CELL_INFO_IND", -}; - -/* - * Functions executed to process EMM procedures upon receiving - * data from the network - */ -static int _emm_as_recv(unsigned int ueid, const char *msg, int len, - int *emm_cause); - - -static int _emm_as_establish_req(const emm_as_establish_t *msg, int *emm_cause); -static int _emm_as_cell_info_res(const emm_as_cell_info_t *msg); -static int _emm_as_cell_info_ind(const emm_as_cell_info_t *msg); -static int _emm_as_data_ind(const emm_as_data_t *msg, int *emm_cause); - -/* - * Functions executed to send data to the network when requested - * within EMM procedure processing - */ -static EMM_msg *_emm_as_set_header(nas_message_t *msg, - const emm_as_security_data_t *security); -static int -_emm_as_encode( - as_nas_info_t *info, - nas_message_t *msg, - int length, - emm_security_context_t *emm_security_context); - -static int _emm_as_encrypt( - as_nas_info_t *info, - const nas_message_security_header_t *header, - const char *buffer, - int length, - emm_security_context_t *emm_security_context); - -static int _emm_as_send(const emm_as_t *msg); - -static int _emm_as_security_req(const emm_as_security_t *, - dl_info_transfer_req_t *); -static int _emm_as_security_rej(const emm_as_security_t *, - dl_info_transfer_req_t *); -static int _emm_as_establish_cnf(const emm_as_establish_t *, - nas_establish_rsp_t *); -static int _emm_as_establish_rej(const emm_as_establish_t *, - nas_establish_rsp_t *); -static int _emm_as_page_ind(const emm_as_page_t *, paging_req_t *); - -static int _emm_as_cell_info_req(const emm_as_cell_info_t *, cell_info_req_t *); - -static int _emm_as_data_req(const emm_as_data_t *, ul_info_transfer_req_t *); -static int _emm_as_status_ind(const emm_as_status_t *, ul_info_transfer_req_t *); -static int _emm_as_release_req(const emm_as_release_t *, nas_release_req_t *); - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -/**************************************************************************** - ** ** - ** Name: emm_as_initialize() ** - ** ** - ** Description: Initializes the EMMAS Service Access Point ** - ** ** - ** Inputs: None ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: None ** - ** Others: NONE ** - ** ** - ***************************************************************************/ -void emm_as_initialize(void) -{ - LOG_FUNC_IN; - - /* TODO: Initialize the EMMAS-SAP */ - - LOG_FUNC_OUT; -} - -/**************************************************************************** - ** ** - ** Name: emm_as_send() ** - ** ** - ** Description: Processes the EMMAS Service Access Point primitive. ** - ** ** - ** Inputs: msg: The EMMAS-SAP primitive to process ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int emm_as_send(const emm_as_t *msg) -{ - LOG_FUNC_IN; - - int rc; - int emm_cause = EMM_CAUSE_SUCCESS; - emm_as_primitive_t primitive = msg->primitive; - - uint32_t ueid = 0; - - LOG_TRACE(INFO, "EMMAS-SAP - Received primitive %s (%d)", - _emm_as_primitive_str[primitive - _EMMAS_START - 1], primitive); - - switch (primitive) { - case _EMMAS_DATA_IND: - rc = _emm_as_data_ind(&msg->u.data, &emm_cause); - ueid = msg->u.data.ueid; - break; - - case _EMMAS_ESTABLISH_REQ: - rc = _emm_as_establish_req(&msg->u.establish, &emm_cause); - ueid = msg->u.establish.ueid; - break; - - case _EMMAS_CELL_INFO_RES: - rc = _emm_as_cell_info_res(&msg->u.cell_info); - break; - - case _EMMAS_CELL_INFO_IND: - rc = _emm_as_cell_info_ind(&msg->u.cell_info); - break; - - default: - /* Other primitives are forwarded to the Access Stratum */ - rc = _emm_as_send(msg); - - if (rc != RETURNok) { - LOG_TRACE(ERROR, "EMMAS-SAP - " - "Failed to process primitive %s (%d)", - _emm_as_primitive_str[primitive - _EMMAS_START - 1], - primitive); - LOG_FUNC_RETURN (RETURNerror); - } - - break; - } - - /* Handle decoding errors */ - if (emm_cause != EMM_CAUSE_SUCCESS) { - /* Ignore received message that is too short to contain a complete - * message type information element */ - if (rc == TLV_DECODE_BUFFER_TOO_SHORT) { - LOG_FUNC_RETURN (RETURNok); - } - /* Ignore received message that contains not supported protocol - * discriminator */ - else if (rc == TLV_DECODE_PROTOCOL_NOT_SUPPORTED) { - LOG_FUNC_RETURN (RETURNok); - } else if (rc == TLV_DECODE_WRONG_MESSAGE_TYPE) { - emm_cause = EMM_CAUSE_MESSAGE_TYPE_NOT_IMPLEMENTED; - } - - /* EMM message processing failed */ - LOG_TRACE(WARNING, "EMMAS-SAP - Received EMM message is not valid " - "(cause=%d)", emm_cause); - /* Return an EMM status message */ - rc = emm_proc_status(ueid, emm_cause); - } - - if (rc != RETURNok) { - LOG_TRACE(ERROR, "EMMAS-SAP - Failed to process primitive %s (%d)", - _emm_as_primitive_str[primitive - _EMMAS_START - 1], - primitive); - } - - LOG_FUNC_RETURN (rc); -} - -/****************************************************************************/ -/********************* L O C A L F U N C T I O N S *********************/ -/****************************************************************************/ - -/* - * -------------------------------------------------------------------------- - * Functions executed to process EMM procedures upon receiving data from the - * network - * -------------------------------------------------------------------------- - */ - -/**************************************************************************** - ** ** - ** Name: _emm_as_recv() ** - ** ** - ** Description: Decodes and processes the EPS Mobility Management message ** - ** received from the Access Stratum ** - ** ** - ** Inputs: ueid: UE lower layer identifier ** - ** msg: The EMM message to process ** - ** len: The length of the EMM message ** - ** Others: None ** - ** ** - ** Outputs: emm_cause: EMM cause code ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -static int _emm_as_recv(unsigned int ueid, const char *msg, int len, - int *emm_cause) -{ - LOG_FUNC_IN; - - int decoder_rc; - int rc = RETURNerror; - - LOG_TRACE(INFO, "EMMAS-SAP - Received EMM message (length=%d)", len); - - nas_message_t nas_msg; - memset(&nas_msg, 0 , sizeof(nas_message_t)); - - emm_security_context_t *security = NULL; /* Current EPS NAS security context */ -#if defined(NAS_BUILT_IN_EPC) - emm_data_context_t *emm_ctx = NULL; -#endif - -#if defined(NAS_BUILT_IN_EPC) - emm_ctx = emm_data_context_get(&_emm_data, ueid); - - if (emm_ctx) { - security = emm_ctx->security; - } - -#else - - if (ueid < EMM_DATA_NB_UE_MAX) { - emm_ctx = _emm_data.ctx[ueid]; - - if (emm_ctx) { - security = emm_ctx->security; - } - } - -#endif - - /* Decode the received message */ - decoder_rc = nas_message_decode(msg, &nas_msg, len, security); - - if (decoder_rc < 0) { - LOG_TRACE(WARNING, "EMMAS-SAP - Failed to decode NAS message " - "(err=%d)", decoder_rc); - *emm_cause = EMM_CAUSE_PROTOCOL_ERROR; - LOG_FUNC_RETURN (decoder_rc); - } - - /* Process NAS message */ - EMM_msg *emm_msg = &nas_msg.plain.emm; - - switch (emm_msg->header.message_type) { - case EMM_STATUS: - rc = emm_recv_status(ueid, &emm_msg->emm_status, emm_cause); - break; - - case ATTACH_REQUEST: - rc = emm_recv_attach_request( - ueid, - &emm_msg->attach_request, - emm_cause); - break; - - case IDENTITY_RESPONSE: - rc = emm_recv_identity_response( - ueid, - &emm_msg->identity_response, - emm_cause); - break; - - case AUTHENTICATION_RESPONSE: - rc = emm_recv_authentication_response( - ueid, - &emm_msg->authentication_response, - emm_cause); - break; - - case AUTHENTICATION_FAILURE: - rc = emm_recv_authentication_failure( - ueid, - &emm_msg->authentication_failure, - emm_cause); - break; - - case SECURITY_MODE_COMPLETE: - rc = emm_recv_security_mode_complete( - ueid, - &emm_msg->security_mode_complete, - emm_cause); - break; - - case SECURITY_MODE_REJECT: - rc = emm_recv_security_mode_reject(ueid, - &emm_msg->security_mode_reject, - emm_cause); - break; - - case ATTACH_COMPLETE: - rc = emm_recv_attach_complete(ueid, &emm_msg->attach_complete, - emm_cause); - break; - - case TRACKING_AREA_UPDATE_COMPLETE: - case GUTI_REALLOCATION_COMPLETE: - case UPLINK_NAS_TRANSPORT: - /* TODO */ - break; - - case DETACH_REQUEST: - rc = emm_recv_detach_request(ueid, &emm_msg->detach_request, - emm_cause); - break; - - default: - LOG_TRACE(WARNING, "EMMAS-SAP - EMM message 0x%x is not valid", - emm_msg->header.message_type); - *emm_cause = EMM_CAUSE_MESSAGE_TYPE_NOT_COMPATIBLE; - break; - } - - LOG_FUNC_RETURN (rc); -} - -/**************************************************************************** - ** ** - ** Name: _emm_as_data_ind() ** - ** ** - ** Description: Processes the EMMAS-SAP data transfer indication ** - ** primitive ** - ** ** - ** EMMAS-SAP - AS->EMM: DATA_IND - Data transfer procedure ** - ** ** - ** Inputs: msg: The EMMAS-SAP primitive to process ** - ** Others: None ** - ** ** - ** Outputs: emm_cause: EMM cause code ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -static int _emm_as_data_ind(const emm_as_data_t *msg, int *emm_cause) -{ - LOG_FUNC_IN; - - int rc = RETURNerror; - - LOG_TRACE(INFO, "EMMAS-SAP - Received AS data transfer indication " - "(ueid="NAS_UE_ID_FMT", delivered=%s, length=%d)", msg->ueid, - (msg->delivered)? "TRUE" : "FALSE", msg->NASmsg.length); - - if (msg->delivered) { - if (msg->NASmsg.length > 0) { - /* Process the received NAS message */ - char *plain_msg = (char *)malloc(msg->NASmsg.length); - - if (plain_msg) { - nas_message_security_header_t header; - emm_security_context_t *security = NULL; /* Current EPS NAS security context */ - - memset(&header, 0, sizeof(header)); - /* Decrypt the received security protected message */ - emm_data_context_t *emm_ctx = NULL; -#if defined(NAS_BUILT_IN_EPC) - - if (msg->ueid > 0) { - emm_ctx = emm_data_context_get(&_emm_data, msg->ueid); - - if (emm_ctx) { - security = emm_ctx->security; - } - } - -#else - - if (msg->ueid < EMM_DATA_NB_UE_MAX) { - emm_ctx = _emm_data.ctx[msg->ueid]; - - if (emm_ctx) { - security = emm_ctx->security; - } - } - -#endif - int bytes = nas_message_decrypt((char *)(msg->NASmsg.value), - plain_msg, - &header, - msg->NASmsg.length, - security - ); - - if (bytes < 0) { - /* Failed to decrypt the message */ - *emm_cause = EMM_CAUSE_PROTOCOL_ERROR; - LOG_FUNC_RETURN (bytes); - } else if (header.protocol_discriminator == - EPS_MOBILITY_MANAGEMENT_MESSAGE) { - /* Process EMM data */ - rc = _emm_as_recv(msg->ueid, plain_msg, bytes, emm_cause); - } else if (header.protocol_discriminator == - EPS_SESSION_MANAGEMENT_MESSAGE) { - const OctetString data = {bytes, (uint8_t *)plain_msg}; - /* Foward ESM data to EPS session management */ - rc = lowerlayer_data_ind(msg->ueid, &data); - } - - free(plain_msg); - } - } else { - /* Process successfull lower layer transfer indication */ - rc = lowerlayer_success(msg->ueid); - } - } else { - /* Process lower layer transmission failure of NAS message */ - rc = lowerlayer_failure(msg->ueid); - } - - LOG_FUNC_RETURN (rc); -} - -/**************************************************************************** - ** ** - ** Name: _emm_as_establish_req() ** - ** ** - ** Description: Processes the EMMAS-SAP connection establish request ** - ** primitive ** - ** ** - ** EMMAS-SAP - AS->EMM: ESTABLISH_REQ - NAS signalling connection ** - ** The AS notifies the NAS that establishment of the signal- ** - ** ling connection has been requested to tranfer initial NAS ** - ** message from the UE. ** - ** ** - ** Inputs: msg: The EMMAS-SAP primitive to process ** - ** Others: None ** - ** ** - ** Outputs: emm_cause: EMM cause code ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -static int _emm_as_establish_req(const emm_as_establish_t *msg, int *emm_cause) -{ - LOG_FUNC_IN; - - struct emm_data_context_s *emm_ctx = NULL; - emm_security_context_t *emm_security_context = NULL; - int decoder_rc; - int rc = RETURNerror; - - LOG_TRACE(INFO, "EMMAS-SAP - Received AS connection establish request"); - - nas_message_t nas_msg; - memset(&nas_msg, 0 , sizeof(nas_message_t)); - -#if defined(NAS_BUILT_IN_EPC) - emm_ctx = emm_data_context_get(&_emm_data, msg->ueid); -#else - - if (msg->ueid < EMM_DATA_NB_UE_MAX) { - emm_ctx = _emm_data.ctx[msg->ueid]; - } - -#endif - - if (emm_ctx) { - emm_security_context = emm_ctx->security; - } - - /* Decode initial NAS message */ - decoder_rc = nas_message_decode( - (char *)(msg->NASmsg.value), - &nas_msg, - msg->NASmsg.length, - emm_security_context); - - if (decoder_rc < TLV_DECODE_FATAL_ERROR) { - *emm_cause = EMM_CAUSE_PROTOCOL_ERROR; - LOG_FUNC_RETURN (decoder_rc); - } else if (decoder_rc == TLV_DECODE_UNEXPECTED_IEI) { - *emm_cause = EMM_CAUSE_IE_NOT_IMPLEMENTED; - } else if (decoder_rc < 0) { - *emm_cause = EMM_CAUSE_PROTOCOL_ERROR; - } - - /* Process initial NAS message */ - EMM_msg *emm_msg = &nas_msg.plain.emm; - - switch (emm_msg->header.message_type) { - case ATTACH_REQUEST: - rc = emm_recv_attach_request( - msg->ueid, - &emm_msg->attach_request, - emm_cause); - break; - - case DETACH_REQUEST: - rc = RETURNok; /* TODO */ - break; - - case TRACKING_AREA_UPDATE_REQUEST: - rc = emm_recv_tracking_area_update_request( - msg->ueid, - &emm_msg->tracking_area_update_request, - emm_cause); - break; - - case SERVICE_REQUEST: - rc = RETURNok; /* TODO */ - break; - - case EXTENDED_SERVICE_REQUEST: - rc = RETURNok; /* TODO */ - break; - - default: - LOG_TRACE(WARNING, "EMMAS-SAP - Initial NAS message 0x%x is " - "not valid", emm_msg->header.message_type); - *emm_cause = EMM_CAUSE_MESSAGE_TYPE_NOT_COMPATIBLE; - break; - } - - LOG_FUNC_RETURN (rc); -} - -/**************************************************************************** - ** ** - ** Name: _emm_as_cell_info_res() ** - ** ** - ** Description: Processes the EMMAS-SAP cell information response ** - ** primitive ** - ** ** - ** EMMAS-SAP - AS->EMM: CELL_INFO_RES - PLMN and cell selection procedure ** - ** The NAS received a response to cell selection request pre- ** - ** viously sent to the Access-Startum. If a suitable cell is ** - ** found to serve the selected PLMN with associated Radio Ac- ** - ** cess Technologies, this cell is selected to camp on. ** - ** ** - ** Inputs: msg: The EMMAS-SAP primitive to process ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -static int _emm_as_cell_info_res(const emm_as_cell_info_t *msg) -{ - LOG_FUNC_IN; - - int rc = RETURNok; - - LOG_TRACE(INFO, "EMMAS-SAP - Received AS cell information response"); - - - - LOG_FUNC_RETURN (rc); -} - -/**************************************************************************** - ** ** - ** Name: _emm_as_cell_info_ind() ** - ** ** - ** Description: Processes the EMMAS-SAP cell information indication ** - ** primitive ** - ** ** - ** EMMAS-SAP - AS->EMM: CELL_INFO_IND - PLMN and cell selection procedure ** - ** ** - ** Inputs: msg: The EMMAS-SAP primitive to process ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -static int _emm_as_cell_info_ind(const emm_as_cell_info_t *msg) -{ - LOG_FUNC_IN; - - int rc = RETURNok; - - LOG_TRACE(INFO, "EMMAS-SAP - Received AS cell information indication"); - - /* TODO */ - - LOG_FUNC_RETURN (rc); -} - -/* - * -------------------------------------------------------------------------- - * Functions executed to send data to the network when requested within EMM - * procedure processing - * -------------------------------------------------------------------------- - */ - -/**************************************************************************** - ** ** - ** Name: _emm_as_set_header() ** - ** ** - ** Description: Setup the security header of the given NAS message ** - ** ** - ** Inputs: security: The NAS security data to use ** - ** Others: None ** - ** ** - ** Outputs: msg: The NAS message ** - ** Return: Pointer to the plain NAS message to be se- ** - ** curity protected if setting of the securi- ** - ** ty header succeed; ** - ** NULL pointer otherwise ** - ** Others: None ** - ** ** - ***************************************************************************/ -static EMM_msg *_emm_as_set_header(nas_message_t *msg, - const emm_as_security_data_t *security) -{ - LOG_FUNC_IN; - - msg->header.protocol_discriminator = EPS_MOBILITY_MANAGEMENT_MESSAGE; - - if ( security && (security->ksi != EMM_AS_NO_KEY_AVAILABLE) ) { - /* A valid EPS security context exists */ - if (security->is_new) { - /* New EPS security context is taken into use */ - if (security->k_int) { - if (security->k_enc) { - /* NAS integrity and cyphering keys are available */ - msg->header.security_header_type = - SECURITY_HEADER_TYPE_INTEGRITY_PROTECTED_CYPHERED_NEW; - } else { - /* NAS integrity key only is available */ - msg->header.security_header_type = - SECURITY_HEADER_TYPE_INTEGRITY_PROTECTED_NEW; - } - - LOG_FUNC_RETURN (&msg->security_protected.plain.emm); - } - } else if (security->k_int) { - if (security->k_enc) { - /* NAS integrity and cyphering keys are available */ - msg->header.security_header_type = - SECURITY_HEADER_TYPE_INTEGRITY_PROTECTED_CYPHERED; - } else { - /* NAS integrity key only is available */ - msg->header.security_header_type = - SECURITY_HEADER_TYPE_INTEGRITY_PROTECTED; - } - - LOG_FUNC_RETURN (&msg->security_protected.plain.emm); - } else { - /* No valid EPS security context exists */ - msg->header.security_header_type = SECURITY_HEADER_TYPE_NOT_PROTECTED; - LOG_FUNC_RETURN (&msg->plain.emm); - } - } else { - /* No valid EPS security context exists */ - msg->header.security_header_type = SECURITY_HEADER_TYPE_NOT_PROTECTED; - LOG_FUNC_RETURN (&msg->plain.emm); - } - - /* A valid EPS security context exists but NAS integrity key - * is not available */ - LOG_FUNC_RETURN (NULL); -} - -/**************************************************************************** - ** ** - ** Name: _emm_as_encode() ** - ** ** - ** Description: Encodes NAS message into NAS information container ** - ** ** - ** Inputs: msg: The NAS message to encode ** - ** length: The maximum length of the NAS message ** - ** Others: None ** - ** ** - ** Outputs: info: The NAS information container ** - ** msg: The NAS message to encode ** - ** Return: The number of bytes successfully encoded ** - ** Others: None ** - ** ** - ***************************************************************************/ -static int -_emm_as_encode( - as_nas_info_t *info, - nas_message_t *msg, - int length, - emm_security_context_t *emm_security_context) -{ - LOG_FUNC_IN; - - int bytes = 0; - - if (msg->header.security_header_type != SECURITY_HEADER_TYPE_NOT_PROTECTED) { - emm_msg_header_t *header = &msg->security_protected.plain.emm.header; - /* Expand size of protected NAS message */ - length += NAS_MESSAGE_SECURITY_HEADER_SIZE; - /* Set header of plain NAS message */ - header->protocol_discriminator = EPS_MOBILITY_MANAGEMENT_MESSAGE; - header->security_header_type = SECURITY_HEADER_TYPE_NOT_PROTECTED; - } - - /* Allocate memory to the NAS information container */ - info->data = (Byte_t *)malloc(length * sizeof(Byte_t)); - - if (info->data != NULL) { - /* Encode the NAS message */ - bytes = nas_message_encode( - (char *)(info->data), - msg, - length, - emm_security_context); - - if (bytes > 0) { - info->length = bytes; - } else { - free(info->data); - info->length = 0; - info->data = NULL; - } - } - - LOG_FUNC_RETURN (bytes); -} - -/**************************************************************************** - ** ** - ** Name: _emm_as_encrypt() ** - ** ** - ** Description: Encryts NAS message into NAS information container ** - ** ** - ** Inputs: header: The Security header in used ** - ** msg: The NAS message to encrypt ** - ** length: The maximum length of the NAS message ** - ** Others: None ** - ** ** - ** Outputs: info: The NAS information container ** - ** Return: The number of bytes successfully encrypted ** - ** Others: None ** - ** ** - ***************************************************************************/ -static int -_emm_as_encrypt( - as_nas_info_t *info, - const nas_message_security_header_t *header, - const char *msg, - int length, - emm_security_context_t *emm_security_context) -{ - LOG_FUNC_IN; - - int bytes = 0; - - if (header->security_header_type != SECURITY_HEADER_TYPE_NOT_PROTECTED) { - /* Expand size of protected NAS message */ - length += NAS_MESSAGE_SECURITY_HEADER_SIZE; - } - - /* Allocate memory to the NAS information container */ - info->data = (Byte_t *)malloc(length * sizeof(Byte_t)); - - if (info->data != NULL) { - /* Encrypt the NAS information message */ - bytes = nas_message_encrypt( - msg, - (char *)(info->data), - header, - length, - emm_security_context); - - if (bytes > 0) { - info->length = bytes; - } else { - free(info->data); - info->length = 0; - info->data = NULL; - } - } - - LOG_FUNC_RETURN (bytes); -} - -/**************************************************************************** - ** ** - ** Name: _emm_as_send() ** - ** ** - ** Description: Builds NAS message according to the given EMMAS Service ** - ** Access Point primitive and sends it to the Access Stratum ** - ** sublayer ** - ** ** - ** Inputs: msg: The EMMAS-SAP primitive to be sent ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -static int _emm_as_send(const emm_as_t *msg) -{ - LOG_FUNC_IN; - - as_message_t as_msg; - memset(&as_msg, 0 , sizeof(as_message_t)); - - switch (msg->primitive) { - case _EMMAS_DATA_REQ: - as_msg.msgID = _emm_as_data_req( - &msg->u.data, - &as_msg.msg.ul_info_transfer_req); - break; - - case _EMMAS_STATUS_IND: - as_msg.msgID = _emm_as_status_ind( - &msg->u.status, - &as_msg.msg.ul_info_transfer_req); - break; - - case _EMMAS_RELEASE_REQ: - as_msg.msgID = _emm_as_release_req( - &msg->u.release, - &as_msg.msg.nas_release_req); - break; - - case _EMMAS_SECURITY_REQ: - as_msg.msgID = _emm_as_security_req( - &msg->u.security, - &as_msg.msg.dl_info_transfer_req); - break; - - case _EMMAS_SECURITY_REJ: - as_msg.msgID = _emm_as_security_rej( - &msg->u.security, - &as_msg.msg.dl_info_transfer_req); - break; - - case _EMMAS_ESTABLISH_CNF: - as_msg.msgID = _emm_as_establish_cnf( - &msg->u.establish, - &as_msg.msg.nas_establish_rsp); - break; - - case _EMMAS_ESTABLISH_REJ: - as_msg.msgID = _emm_as_establish_rej( - &msg->u.establish, - &as_msg.msg.nas_establish_rsp); - break; - - case _EMMAS_PAGE_IND: - as_msg.msgID = _emm_as_page_ind(&msg->u.page, - &as_msg.msg.paging_req); - break; - - - case _EMMAS_CELL_INFO_REQ: - as_msg.msgID = _emm_as_cell_info_req(&msg->u.cell_info, - &as_msg.msg.cell_info_req); - /* - * TODO: NAS may provide a list of equivalent PLMNs, if available, - * that AS shall use for cell selection and cell reselection. - */ - break; - - default: - as_msg.msgID = 0; - break; - } - - /* Send the message to the Access Stratum or S1AP in case of MME */ - if (as_msg.msgID > 0) { -#if defined(NAS_BUILT_IN_EPC) - LOG_TRACE(DEBUG, "EMMAS-SAP - " - "Sending msg with id 0x%x, primitive %s (%d) to S1AP layer for transmission", - as_msg.msgID, - _emm_as_primitive_str[msg->primitive - _EMMAS_START - 1], - msg->primitive); - - switch (as_msg.msgID) { - case AS_DL_INFO_TRANSFER_REQ: { - nas_itti_dl_data_req( - as_msg.msg.dl_info_transfer_req.UEid, - as_msg.msg.dl_info_transfer_req.nasMsg.data, - as_msg.msg.dl_info_transfer_req.nasMsg.length); - LOG_FUNC_RETURN (RETURNok); - } - break; - - case AS_NAS_ESTABLISH_RSP: - case AS_NAS_ESTABLISH_CNF: { - if (as_msg.msg.nas_establish_rsp.errCode != AS_SUCCESS) { - nas_itti_dl_data_req( - as_msg.msg.nas_establish_rsp.UEid, - as_msg.msg.nas_establish_rsp.nasMsg.data, - as_msg.msg.nas_establish_rsp.nasMsg.length); - LOG_FUNC_RETURN (RETURNok); - } else { - LOG_TRACE(DEBUG, "EMMAS-SAP - " - "Sending nas_itti_establish_cnf to S1AP UE ID 0x%x" - " selected_encryption_algorithm 0x%04X", - " selected_integrity_algorithm 0x%04X", - as_msg.msg.nas_establish_rsp.UEid, - as_msg.msg.nas_establish_rsp.selected_encryption_algorithm, - as_msg.msg.nas_establish_rsp.selected_integrity_algorithm); - /* Handle success case */ - nas_itti_establish_cnf( - as_msg.msg.nas_establish_rsp.UEid, - as_msg.msg.nas_establish_rsp.errCode, - as_msg.msg.nas_establish_rsp.nasMsg.data, - as_msg.msg.nas_establish_rsp.nasMsg.length, - as_msg.msg.nas_establish_rsp.selected_encryption_algorithm, - as_msg.msg.nas_establish_rsp.selected_integrity_algorithm); - LOG_FUNC_RETURN (RETURNok); - } - } - break; - - default: - break; - } - -#endif - } - - LOG_FUNC_RETURN (RETURNerror); -} - -/**************************************************************************** - ** ** - ** Name: _emm_as_data_req() ** - ** ** - ** Description: Processes the EMMAS-SAP data transfer request ** - ** primitive ** - ** ** - ** EMMAS-SAP - EMM->AS: DATA_REQ - Data transfer procedure ** - ** ** - ** Inputs: msg: The EMMAS-SAP primitive to process ** - ** Others: None ** - ** ** - ** Outputs: as_msg: The message to send to the AS ** - ** Return: The identifier of the AS message ** - ** Others: None ** - ** ** - ***************************************************************************/ -static int _emm_as_data_req(const emm_as_data_t *msg, - ul_info_transfer_req_t *as_msg) -{ - LOG_FUNC_IN; - - int size = 0; - int is_encoded = FALSE; - - LOG_TRACE(INFO, "EMMAS-SAP - Send AS data transfer request"); - - nas_message_t nas_msg; - memset(&nas_msg, 0 , sizeof(nas_message_t)); - - /* Setup the AS message */ - if (msg->guti) { - as_msg->s_tmsi.MMEcode = msg->guti->gummei.MMEcode; - as_msg->s_tmsi.m_tmsi = msg->guti->m_tmsi; - } else { - as_msg->UEid = msg->ueid; - } - - /* Setup the NAS security header */ - EMM_msg *emm_msg = _emm_as_set_header(&nas_msg, &msg->sctx); - - /* Setup the NAS information message */ - if (emm_msg != NULL) switch (msg->NASinfo) { - - case EMM_AS_NAS_DATA_DETACH: - size = emm_send_detach_accept(msg, &emm_msg->detach_accept); - break; - - default: - /* Send other NAS messages as already encoded ESM messages */ - size = msg->NASmsg.length; - is_encoded = TRUE; - break; - } - - if (size > 0) { - int bytes; - emm_security_context_t *emm_security_context = NULL; - struct emm_data_context_s *emm_ctx = NULL; -#if defined(NAS_BUILT_IN_EPC) - emm_ctx = emm_data_context_get(&_emm_data, msg->ueid); -#else - - if (msg->ueid < EMM_DATA_NB_UE_MAX) { - emm_ctx = _emm_data.ctx[msg->ueid]; - } - -#endif - - if (emm_ctx) { - emm_security_context = emm_ctx->security; - } - - - - if (emm_security_context) { - nas_msg.header.sequence_number = emm_security_context->dl_count.seq_num; - LOG_TRACE(DEBUG, - "Set nas_msg.header.sequence_number -> %u", - nas_msg.header.sequence_number); - } - - if (!is_encoded) { - /* Encode the NAS information message */ - bytes = _emm_as_encode(&as_msg->nasMsg, - &nas_msg, - size, - emm_security_context); - } else { - /* Encrypt the NAS information message */ - bytes = _emm_as_encrypt(&as_msg->nasMsg, - &nas_msg.header, - (char *)(msg->NASmsg.value), - size, - emm_security_context); - } - - if (bytes > 0) { - LOG_FUNC_RETURN (AS_DL_INFO_TRANSFER_REQ); - } - } - - LOG_FUNC_RETURN (0); -} - -/**************************************************************************** - ** ** - ** Name: _emm_as_status_ind() ** - ** ** - ** Description: Processes the EMMAS-SAP status indication primitive ** - ** ** - ** EMMAS-SAP - EMM->AS: STATUS_IND - EMM status report procedure ** - ** ** - ** Inputs: msg: The EMMAS-SAP primitive to process ** - ** Others: None ** - ** ** - ** Outputs: as_msg: The message to send to the AS ** - ** Return: The identifier of the AS message ** - ** Others: None ** - ** ** - ***************************************************************************/ -static int _emm_as_status_ind(const emm_as_status_t *msg, - ul_info_transfer_req_t *as_msg) -{ - LOG_FUNC_IN; - - int size = 0; - - LOG_TRACE(INFO, "EMMAS-SAP - Send AS status indication (cause=%d)", - msg->emm_cause); - - nas_message_t nas_msg; - memset(&nas_msg, 0 , sizeof(nas_message_t)); - - /* Setup the AS message */ - if (msg->guti) { - as_msg->s_tmsi.MMEcode = msg->guti->gummei.MMEcode; - as_msg->s_tmsi.m_tmsi = msg->guti->m_tmsi; - } else { - as_msg->UEid = msg->ueid; - } - - /* Setup the NAS security header */ - EMM_msg *emm_msg = _emm_as_set_header(&nas_msg, &msg->sctx); - - /* Setup the NAS information message */ - if (emm_msg != NULL) { - size = emm_send_status(msg, &emm_msg->emm_status); - } - - if (size > 0) { - emm_security_context_t *emm_security_context = NULL; - struct emm_data_context_s *emm_ctx = NULL; -#if defined(NAS_BUILT_IN_EPC) - emm_ctx = emm_data_context_get(&_emm_data, msg->ueid); -#else - - if (msg->ueid < EMM_DATA_NB_UE_MAX) { - emm_ctx = _emm_data.ctx[msg->ueid]; - } - -#endif - - if (emm_ctx) { - emm_security_context = emm_ctx->security; - } - - if (emm_security_context) { - nas_msg.header.sequence_number = emm_security_context->dl_count.seq_num; - LOG_TRACE(DEBUG, - "Set nas_msg.header.sequence_number -> %u", - nas_msg.header.sequence_number); - } - - /* Encode the NAS information message */ - int bytes = _emm_as_encode( - &as_msg->nasMsg, - &nas_msg, - size, - emm_security_context); - - if (bytes > 0) { - LOG_FUNC_RETURN (AS_DL_INFO_TRANSFER_REQ); - } - } - - LOG_FUNC_RETURN (0); -} - -/**************************************************************************** - ** ** - ** Name: _emm_as_release_req() ** - ** ** - ** Description: Processes the EMMAS-SAP connection release request ** - ** primitive ** - ** ** - ** EMMAS-SAP - EMM->AS: RELEASE_REQ - NAS signalling release procedure ** - ** ** - ** Inputs: msg: The EMMAS-SAP primitive to process ** - ** Others: None ** - ** ** - ** Outputs: as_msg: The message to send to the AS ** - ** Return: The identifier of the AS message ** - ** Others: None ** - ** ** - ***************************************************************************/ -static int _emm_as_release_req(const emm_as_release_t *msg, - nas_release_req_t *as_msg) -{ - LOG_FUNC_IN; - - LOG_TRACE(INFO, "EMMAS-SAP - Send AS release request"); - - /* Setup the AS message */ - if (msg->guti) { - as_msg->s_tmsi.MMEcode = msg->guti->gummei.MMEcode; - as_msg->s_tmsi.m_tmsi = msg->guti->m_tmsi; - } else { - as_msg->UEid = msg->ueid; - } - - if (msg->cause == EMM_AS_CAUSE_AUTHENTICATION) { - as_msg->cause = AS_AUTHENTICATION_FAILURE; - } else if (msg->cause == EMM_AS_CAUSE_DETACH) { - as_msg->cause = AS_DETACH; - } - - LOG_FUNC_RETURN (AS_NAS_RELEASE_REQ); -} - - -/**************************************************************************** - ** ** - ** Name: _emm_as_security_req() ** - ** ** - ** Description: Processes the EMMAS-SAP security request primitive ** - ** ** - ** EMMAS-SAP - EMM->AS: SECURITY_REQ - Security mode control procedure ** - ** ** - ** Inputs: msg: The EMMAS-SAP primitive to process ** - ** Others: None ** - ** ** - ** Outputs: as_msg: The message to send to the AS ** - ** Return: The identifier of the AS message ** - ** Others: None ** - ** ** - ***************************************************************************/ -static int _emm_as_security_req(const emm_as_security_t *msg, - dl_info_transfer_req_t *as_msg) -{ - LOG_FUNC_IN; - - int size = 0; - - LOG_TRACE(INFO, "EMMAS-SAP - Send AS security request"); - - nas_message_t nas_msg; - memset(&nas_msg, 0 , sizeof(nas_message_t)); - - /* Setup the AS message */ - if (msg->guti) { - as_msg->s_tmsi.MMEcode = msg->guti->gummei.MMEcode; - as_msg->s_tmsi.m_tmsi = msg->guti->m_tmsi; - } else { - as_msg->UEid = msg->ueid; - } - - /* Setup the NAS security header */ - EMM_msg *emm_msg = _emm_as_set_header(&nas_msg, &msg->sctx); - - /* Setup the NAS security message */ - if (emm_msg != NULL) switch (msg->msgType) { - case EMM_AS_MSG_TYPE_IDENT: - if (msg->guti) { - MSC_LOG_EVENT(MSC_NAS_EMM_MME, "0 send IDENTITY_REQUEST to s_TMSI %u.%u ", as_msg->s_tmsi.MMEcode, as_msg->s_tmsi.m_tmsi); - } else { - MSC_LOG_EVENT(MSC_NAS_EMM_MME, "0 send IDENTITY_REQUEST to ue id "NAS_UE_ID_FMT" ", as_msg->UEid); - } - size = emm_send_identity_request(msg, - &emm_msg->identity_request); - break; - - case EMM_AS_MSG_TYPE_AUTH: - if (msg->guti) { - MSC_LOG_EVENT(MSC_NAS_EMM_MME, "0 send AUTHENTICATION_REQUEST to s_TMSI %u.%u ", as_msg->s_tmsi.MMEcode, as_msg->s_tmsi.m_tmsi); - } else { - MSC_LOG_EVENT(MSC_NAS_EMM_MME, "0 send AUTHENTICATION_REQUEST to ue id "NAS_UE_ID_FMT" ", as_msg->UEid); - } - size = emm_send_authentication_request(msg, - &emm_msg->authentication_request); - break; - - case EMM_AS_MSG_TYPE_SMC: - if (msg->guti) { - MSC_LOG_EVENT(MSC_NAS_EMM_MME, "0 send SECURITY_MODE_COMMAND to s_TMSI %u.%u ", as_msg->s_tmsi.MMEcode, as_msg->s_tmsi.m_tmsi); - } else { - MSC_LOG_EVENT(MSC_NAS_EMM_MME, "0 send SECURITY_MODE_COMMAND to ue id "NAS_UE_ID_FMT" ", as_msg->UEid); - } - size = emm_send_security_mode_command(msg, - &emm_msg->security_mode_command); - break; - - default: - LOG_TRACE(WARNING, "EMMAS-SAP - Type of NAS security " - "message 0x%.2x is not valid", msg->msgType); - } - - if (size > 0) { - struct emm_data_context_s *emm_ctx = NULL; - emm_security_context_t *emm_security_context = NULL; -#if defined(NAS_BUILT_IN_EPC) - emm_ctx = emm_data_context_get(&_emm_data, msg->ueid); -#else - - if (msg->ueid < EMM_DATA_NB_UE_MAX) { - emm_ctx = _emm_data.ctx[msg->ueid]; - } - -#endif - - if (emm_ctx) { - emm_security_context = emm_ctx->security; - - if (emm_security_context) { - nas_msg.header.sequence_number = emm_security_context->dl_count.seq_num; - LOG_TRACE(DEBUG, - "Set nas_msg.header.sequence_number -> %u", - nas_msg.header.sequence_number); - } - } - - /* Encode the NAS security message */ - int bytes = _emm_as_encode( - &as_msg->nasMsg, - &nas_msg, - size, - emm_security_context); - - if (bytes > 0) { - LOG_FUNC_RETURN (AS_DL_INFO_TRANSFER_REQ); - } - } - - LOG_FUNC_RETURN (0); -} - -/**************************************************************************** - ** ** - ** Name: _emm_as_security_rej() ** - ** ** - ** Description: Processes the EMMAS-SAP security reject primitive ** - ** ** - ** EMMAS-SAP - EMM->AS: SECURITY_REJ - Security mode control procedure ** - ** ** - ** Inputs: msg: The EMMAS-SAP primitive to process ** - ** Others: None ** - ** ** - ** Outputs: as_msg: The message to send to the AS ** - ** Return: The identifier of the AS message ** - ** Others: None ** - ** ** - ***************************************************************************/ -static int _emm_as_security_rej(const emm_as_security_t *msg, - dl_info_transfer_req_t *as_msg) -{ - LOG_FUNC_IN; - - int size = 0; - - LOG_TRACE(INFO, "EMMAS-SAP - Send AS security reject"); - - nas_message_t nas_msg; - memset(&nas_msg, 0 , sizeof(nas_message_t)); - - /* Setup the AS message */ - if (msg->guti) { - as_msg->s_tmsi.MMEcode = msg->guti->gummei.MMEcode; - as_msg->s_tmsi.m_tmsi = msg->guti->m_tmsi; - } else { - as_msg->UEid = msg->ueid; - } - - /* Setup the NAS security header */ - EMM_msg *emm_msg = _emm_as_set_header(&nas_msg, &msg->sctx); - - /* Setup the NAS security message */ - if (emm_msg != NULL) switch (msg->msgType) { - case EMM_AS_MSG_TYPE_AUTH: - if (msg->guti) { - MSC_LOG_EVENT(MSC_NAS_EMM_MME, "0 send AUTHENTICATION_REJECT to s_TMSI %u.%u ", as_msg->s_tmsi.MMEcode, as_msg->s_tmsi.m_tmsi); - } else { - MSC_LOG_EVENT(MSC_NAS_EMM_MME, "0 send AUTHENTICATION_REJECT to ue id "NAS_UE_ID_FMT" ", as_msg->UEid); - } - size = emm_send_authentication_reject( - &emm_msg->authentication_reject); - break; - - default: - LOG_TRACE(WARNING, "EMMAS-SAP - Type of NAS security " - "message 0x%.2x is not valid", msg->msgType); - } - - if (size > 0) { - struct emm_data_context_s *emm_ctx = NULL; - emm_security_context_t *emm_security_context = NULL; -#if defined(NAS_BUILT_IN_EPC) - emm_ctx = emm_data_context_get(&_emm_data, msg->ueid); -#else - - if (msg->ueid < EMM_DATA_NB_UE_MAX) { - emm_ctx = _emm_data.ctx[msg->ueid]; - } - -#endif - - if (emm_ctx) { - emm_security_context = emm_ctx->security; - if (emm_security_context) { - nas_msg.header.sequence_number = emm_security_context->dl_count.seq_num; - LOG_TRACE(DEBUG, - "Set nas_msg.header.sequence_number -> %u", - nas_msg.header.sequence_number); - } else { - LOG_TRACE(DEBUG, - "No security context, not set nas_msg.header.sequence_number -> %u", - nas_msg.header.sequence_number); - } - } - - /* Encode the NAS security message */ - int bytes = _emm_as_encode( - &as_msg->nasMsg, - &nas_msg, - size, - emm_security_context); - - if (bytes > 0) { - LOG_FUNC_RETURN (AS_DL_INFO_TRANSFER_REQ); - } - } - - LOG_FUNC_RETURN (0); -} - -/**************************************************************************** - ** ** - ** Name: _emm_as_establish_cnf() ** - ** ** - ** Description: Processes the EMMAS-SAP connection establish confirm ** - ** primitive ** - ** ** - ** EMMAS-SAP - EMM->AS: ESTABLISH_CNF - NAS signalling connection ** - ** ** - ** Inputs: msg: The EMMAS-SAP primitive to process ** - ** Others: None ** - ** ** - ** Outputs: as_msg: The message to send to the AS ** - ** Return: The identifier of the AS message ** - ** Others: None ** - ** ** - ***************************************************************************/ -static int _emm_as_establish_cnf(const emm_as_establish_t *msg, - nas_establish_rsp_t *as_msg) -{ - EMM_msg *emm_msg; - int size = 0; - - LOG_FUNC_IN; - - LOG_TRACE(INFO, "EMMAS-SAP - Send AS connection establish confirmation"); - - nas_message_t nas_msg; - memset(&nas_msg, 0 , sizeof(nas_message_t)); - - /* Setup the AS message */ - as_msg->UEid = msg->ueid; - - if (msg->UEid.guti == NULL) { - LOG_TRACE(WARNING, "EMMAS-SAP - GUTI is NULL..."); - LOG_FUNC_RETURN (0); - } - - as_msg->s_tmsi.MMEcode = msg->UEid.guti->gummei.MMEcode; - as_msg->s_tmsi.m_tmsi = msg->UEid.guti->m_tmsi; - - /* Setup the NAS security header */ - emm_msg = _emm_as_set_header(&nas_msg, &msg->sctx); - - /* Setup the initial NAS information message */ - if (emm_msg != NULL) switch (msg->NASinfo) { - case EMM_AS_NAS_INFO_ATTACH: - LOG_TRACE(WARNING, - "EMMAS-SAP - emm_as_establish.nasMSG.length=%d", - msg->NASmsg.length); - - MSC_LOG_EVENT(MSC_NAS_EMM_MME, "0 send ATTACH_ACCEPT to s_TMSI %u.%u ", as_msg->s_tmsi.MMEcode, as_msg->s_tmsi.m_tmsi); - - size = emm_send_attach_accept(msg, &emm_msg->attach_accept); - break; - - default: - LOG_TRACE(WARNING, "EMMAS-SAP - Type of initial NAS " - "message 0x%.2x is not valid", msg->NASinfo); - break; - } - - if (size > 0) { - struct emm_data_context_s *emm_ctx = NULL; - emm_security_context_t *emm_security_context = NULL; -#if defined(NAS_BUILT_IN_EPC) - emm_ctx = emm_data_context_get(&_emm_data, msg->ueid); -#else - - if (msg->ueid < EMM_DATA_NB_UE_MAX) { - emm_ctx = _emm_data.ctx[msg->ueid]; - } - -#endif - - if (emm_ctx) { - emm_security_context = emm_ctx->security; - - if (emm_security_context) { - as_msg->nas_ul_count = 0x00000000 | - (emm_security_context->ul_count.overflow << 8) | - emm_security_context->ul_count.seq_num; - LOG_TRACE(DEBUG, "EMMAS-SAP - NAS UL COUNT %8x", - as_msg->nas_ul_count); - } - - nas_msg.header.sequence_number = emm_security_context->dl_count.seq_num; - LOG_TRACE(DEBUG, - "Set nas_msg.header.sequence_number -> %u", - nas_msg.header.sequence_number); - - as_msg->selected_encryption_algorithm = htons(0x8000 >> emm_security_context->selected_algorithms.encryption); - as_msg->selected_integrity_algorithm = htons(0x8000 >> emm_security_context->selected_algorithms.integrity); - - LOG_TRACE(DEBUG, - "Set nas_msg.selected_encryption_algorithm -> NBO: 0x%04X (%u)", - as_msg->selected_encryption_algorithm, - emm_security_context->selected_algorithms.encryption); - LOG_TRACE(DEBUG, - "Set nas_msg.selected_integrity_algorithm -> NBO: 0x%04X (%u)", - as_msg->selected_integrity_algorithm, - emm_security_context->selected_algorithms.integrity); - - } - - /* Encode the initial NAS information message */ - int bytes = _emm_as_encode( - &as_msg->nasMsg, - &nas_msg, - size, - emm_security_context); - - if (bytes > 0) { - as_msg->errCode = AS_SUCCESS; - LOG_FUNC_RETURN (AS_NAS_ESTABLISH_CNF); - } - } - - LOG_TRACE(WARNING, "EMMAS-SAP - Size <= 0"); - LOG_FUNC_RETURN (0); -} - -/**************************************************************************** - ** ** - ** Name: _emm_as_establish_rej() ** - ** ** - ** Description: Processes the EMMAS-SAP connection establish reject ** - ** primitive ** - ** ** - ** EMMAS-SAP - EMM->AS: ESTABLISH_REJ - NAS signalling connection ** - ** ** - ** Inputs: msg: The EMMAS-SAP primitive to process ** - ** Others: None ** - ** ** - ** Outputs: as_msg: The message to send to the AS ** - ** Return: The identifier of the AS message ** - ** Others: None ** - ** ** - ***************************************************************************/ -static int _emm_as_establish_rej(const emm_as_establish_t *msg, - nas_establish_rsp_t *as_msg) -{ - EMM_msg *emm_msg; - int size = 0; - nas_message_t nas_msg; - - LOG_FUNC_IN; - - LOG_TRACE(INFO, "EMMAS-SAP - Send AS connection establish reject"); - - memset(&nas_msg, 0 , sizeof(nas_message_t)); - - /* Setup the AS message */ - if (msg->UEid.guti) { - as_msg->s_tmsi.MMEcode = msg->UEid.guti->gummei.MMEcode; - as_msg->s_tmsi.m_tmsi = msg->UEid.guti->m_tmsi; - } else { - as_msg->UEid = msg->ueid; - } - - /* Setup the NAS security header */ - emm_msg = _emm_as_set_header(&nas_msg, &msg->sctx); - - /* Setup the NAS information message */ - if (emm_msg != NULL) switch (msg->NASinfo) { - case EMM_AS_NAS_INFO_ATTACH: - if (msg->UEid.guti) { - MSC_LOG_EVENT(MSC_NAS_EMM_MME, "0 send ATTACH_REJECT to s_TMSI %u.%u ", as_msg->s_tmsi.MMEcode, as_msg->s_tmsi.m_tmsi); - } else { - MSC_LOG_EVENT(MSC_NAS_EMM_MME, "0 send ATTACH_REJECT to ue id "NAS_UE_ID_FMT" ", as_msg->UEid); - } - size = emm_send_attach_reject(msg, &emm_msg->attach_reject); - break; - - case EMM_AS_NAS_INFO_TAU: - if (msg->UEid.guti) { - MSC_LOG_EVENT(MSC_NAS_EMM_MME, "0 send TRACKING_AREA_UPDATE_REJECT to s_TMSI %u.%u ", as_msg->s_tmsi.MMEcode, as_msg->s_tmsi.m_tmsi); - } else { - MSC_LOG_EVENT(MSC_NAS_EMM_MME, "0 send TRACKING_AREA_UPDATE_REJECT to ue id "NAS_UE_ID_FMT" ", as_msg->UEid); - } - size = emm_send_tracking_area_update_reject(msg, - &emm_msg->tracking_area_update_reject); - break; - - default: - LOG_TRACE(WARNING, "EMMAS-SAP - Type of initial NAS " - "message 0x%.2x is not valid", msg->NASinfo); - break; - } - - if (size > 0) { - struct emm_data_context_s *emm_ctx = NULL; - emm_security_context_t *emm_security_context = NULL; -#if defined(NAS_BUILT_IN_EPC) - emm_ctx = emm_data_context_get(&_emm_data, msg->ueid); -#else - - if (msg->ueid < EMM_DATA_NB_UE_MAX) { - emm_ctx = _emm_data.ctx[msg->ueid]; - } - -#endif - - if (emm_ctx) { - emm_security_context = emm_ctx->security; - - if (emm_security_context) { - nas_msg.header.sequence_number = emm_security_context->dl_count.seq_num; - LOG_TRACE(DEBUG, - "Set nas_msg.header.sequence_number -> %u", - nas_msg.header.sequence_number); - } - } - - /* Encode the initial NAS information message */ - int bytes = _emm_as_encode( - &as_msg->nasMsg, - &nas_msg, - size, - emm_security_context); - - if (bytes > 0) { - as_msg->errCode = AS_TERMINATED_NAS; - LOG_FUNC_RETURN (AS_NAS_ESTABLISH_RSP); - } - } - - LOG_FUNC_RETURN (0); -} - -/**************************************************************************** - ** ** - ** Name: _emm_as_page_ind() ** - ** ** - ** Description: Processes the EMMAS-SAP paging data indication primitive ** - ** ** - ** EMMAS-SAP - EMM->AS: PAGE_IND - Paging data procedure ** - ** ** - ** Inputs: msg: The EMMAS-SAP primitive to process ** - ** Others: None ** - ** ** - ** Outputs: as_msg: The message to send to the AS ** - ** Return: The identifier of the AS message ** - ** Others: None ** - ** ** - ***************************************************************************/ -static int _emm_as_page_ind(const emm_as_page_t *msg, paging_req_t *as_msg) -{ - LOG_FUNC_IN; - - int bytes = 0; - - LOG_TRACE(INFO, "EMMAS-SAP - Send AS data paging indication"); - - /* TODO */ - - if (bytes > 0) { - LOG_FUNC_RETURN (AS_PAGING_IND); - } - - LOG_FUNC_RETURN (0); -} - - -/**************************************************************************** - ** ** - ** Name: _emm_as_cell_info_req() ** - ** ** - ** Description: Processes the EMMAS-SAP cell information request ** - ** primitive ** - ** ** - ** EMMAS-SAP - EMM->AS: CELL_INFO_REQ - PLMN and cell selection procedure ** - ** The NAS requests the AS to select a cell belonging to the ** - ** selected PLMN with associated Radio Access Technologies. ** - ** ** - ** Inputs: msg: The EMMAS-SAP primitive to process ** - ** Others: None ** - ** ** - ** Outputs: as_msg: The message to send to the AS ** - ** Return: The identifier of the AS message ** - ** Others: None ** - ** ** - ***************************************************************************/ -static int _emm_as_cell_info_req(const emm_as_cell_info_t *msg, - cell_info_req_t *as_msg) -{ - LOG_FUNC_IN; - - LOG_TRACE(INFO, "EMMAS-SAP - Send AS cell information request"); - - as_msg->plmnID = msg->plmnIDs.plmn[0]; - as_msg->rat = msg->rat; - - LOG_FUNC_RETURN (AS_CELL_INFO_REQ); -} - diff --git a/openair-cn/NAS/MME/EMM/SAP/emm_asDef.h b/openair-cn/NAS/MME/EMM/SAP/emm_asDef.h deleted file mode 100644 index fbd2a6b38e..0000000000 --- a/openair-cn/NAS/MME/EMM/SAP/emm_asDef.h +++ /dev/null @@ -1,276 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** - -Source emm_asDef.h - -Version 0.1 - -Date 2012/10/16 - -Product NAS stack - -Subsystem EPS Mobility Management - -Author Frederic Maurel - -Description Defines the EMM primitives available at the EMMAS Service - Access Point to transfer NAS messages to/from the Access - Stratum sublayer. - -*****************************************************************************/ -#ifndef __EMM_ASDEF_H__ -#define __EMM_ASDEF_H__ - -#include "commonDef.h" -#include "OctetString.h" - -/****************************************************************************/ -/********************* G L O B A L C O N S T A N T S *******************/ -/****************************************************************************/ - -/* - * EMMAS-SAP primitives - */ -typedef enum emm_as_primitive_u { - _EMMAS_START = 200, - _EMMAS_SECURITY_REQ, /* EMM->AS: Security request */ - _EMMAS_SECURITY_IND, /* AS->EMM: Security indication */ - _EMMAS_SECURITY_RES, /* EMM->AS: Security response */ - _EMMAS_SECURITY_REJ, /* EMM->AS: Security reject */ - _EMMAS_ESTABLISH_REQ, /* EMM->AS: Connection establish request */ - _EMMAS_ESTABLISH_CNF, /* AS->EMM: Connection establish confirm */ - _EMMAS_ESTABLISH_REJ, /* AS->EMM: Connection establish reject */ - _EMMAS_RELEASE_REQ, /* EMM->AS: Connection release request */ - _EMMAS_RELEASE_IND, /* AS->EMM: Connection release indication */ - _EMMAS_DATA_REQ, /* EMM->AS: Data transfer request */ - _EMMAS_DATA_IND, /* AS->EMM: Data transfer indication */ - _EMMAS_PAGE_IND, /* AS->EMM: Paging data indication */ - _EMMAS_STATUS_IND, /* AS->EMM: Status indication */ - _EMMAS_CELL_INFO_REQ, /* EMM->AS: Cell information request */ - _EMMAS_CELL_INFO_RES, /* AS->EMM: Cell information response */ - _EMMAS_CELL_INFO_IND, /* AS->EMM: Cell information indication */ - _EMMAS_END -} emm_as_primitive_t; - -/* Data used to setup EPS NAS security */ -typedef struct emm_as_security_data_s { - uint8_t is_new; /* New security data indicator */ -#define EMM_AS_NO_KEY_AVAILABLE 0xff - uint8_t ksi; /* NAS key set identifier */ - uint8_t sqn; /* Sequence number */ - uint32_t count; /* NAS counter */ - const OctetString *k_enc; /* NAS cyphering key */ - const OctetString *k_int; /* NAS integrity key */ -} emm_as_security_data_t; - -/****************************************************************************/ -/************************ G L O B A L T Y P E S ************************/ -/****************************************************************************/ - -/* - * EMMAS primitive for security - * ---------------------------- - */ -typedef struct emm_as_security_s { - uint32_t ueid; /* UE lower layer identifier */ - const GUTI_t *guti; /* GUTI temporary mobile identity */ - emm_as_security_data_t sctx;/* EPS NAS security context */ - int emm_cause; /* EMM failure cause code */ - /* - * Identity request/response - */ - uint8_t identType; /* Type of requested UE's identity */ - const imsi_t *imsi; /* The requested IMSI of the UE */ - const imei_t *imei; /* The requested IMEI of the UE */ - uint32_t tmsi; /* The requested TMSI of the UE */ - /* - * Authentication request/response - */ - uint8_t ksi; /* NAS key set identifier */ - const OctetString *rand; /* Random challenge number */ - const OctetString *autn; /* Authentication token */ - const OctetString *res; /* Authentication response */ - const OctetString *auts; /* Synchronisation failure */ - /* - * Security Mode Command - */ - uint8_t eea; /* Replayed EPS encryption algorithms */ - uint8_t eia; /* Replayed EPS integrity algorithms */ - uint8_t uea; /* Replayed UMTS encryption algorithms */ - uint8_t ucs2; - uint8_t uia; /* Replayed UMTS integrity algorithms */ - uint8_t gea; /* Replayed GPRS encryption algorithms */ - uint8_t umts_present; - uint8_t gprs_present; - - // Added by LG - uint8_t selected_eea; /* Selected EPS encryption algorithms */ - uint8_t selected_eia; /* Selected EPS integrity algorithms */ - -#define EMM_AS_MSG_TYPE_IDENT 0x01 /* Identification message */ -#define EMM_AS_MSG_TYPE_AUTH 0x02 /* Authentication message */ -#define EMM_AS_MSG_TYPE_SMC 0x03 /* Security Mode Command */ - uint8_t msgType; /* Type of NAS security message to transfer */ -} emm_as_security_t; - -/* - * EMMAS primitive for connection establishment - * -------------------------------------------- - */ -typedef struct emm_as_EPS_identity_s { - const GUTI_t *guti; /* The GUTI, if valid */ - const tai_t *tai; /* The last visited registered Tracking - * Area Identity, if available */ - const imsi_t *imsi; /* IMSI in case of "AttachWithImsi" */ - const imei_t *imei; /* UE's IMEI for emergency bearer services */ -} emm_as_EPS_identity_t; - -typedef struct emm_as_establish_s { - uint32_t ueid; /* UE lower layer identifier */ - emm_as_EPS_identity_t UEid; /* UE's EPS mobile identity */ - emm_as_security_data_t sctx;/* EPS NAS security context */ - int switch_off; /* TRUE if the UE is switched off */ - uint8_t type; /* Network attach/detach type */ - uint8_t RRCcause; /* Connection establishment cause */ - uint8_t RRCtype; /* Associated call type */ - const plmn_t *plmnID; /* Identifier of the selected PLMN */ - uint8_t ksi; /* NAS key set identifier */ - uint8_t encryption:4; /* Ciphering algorithm */ - uint8_t integrity:4; /* Integrity protection algorithm */ - int emm_cause; /* EMM failure cause code */ - const GUTI_t *new_guti; /* New GUTI, if re-allocated */ - int n_tacs; /* Number of concecutive tracking areas - * the UE is registered to */ - tac_t tac; /* Code of the first tracking area the UE - * is registered to */ -#define EMM_AS_NAS_INFO_ATTACH 0x01 /* Attach request */ -#define EMM_AS_NAS_INFO_DETACH 0x02 /* Detach request */ -#define EMM_AS_NAS_INFO_TAU 0x03 /* Tracking Area Update request */ -#define EMM_AS_NAS_INFO_SR 0x04 /* Service Request */ -#define EMM_AS_NAS_INFO_EXTSR 0x05 /* Extended Service Request */ - uint8_t NASinfo; /* Type of initial NAS information to transfer */ - OctetString NASmsg; /* NAS message to be transfered within - * initial NAS information message */ -} emm_as_establish_t; - -/* - * EMMAS primitive for connection release - * -------------------------------------- - */ -typedef struct emm_as_release_s { - uint32_t ueid; /* UE lower layer identifier */ - const GUTI_t *guti; /* GUTI temporary mobile identity */ -#define EMM_AS_CAUSE_AUTHENTICATION 0x01 /* Authentication failure */ -#define EMM_AS_CAUSE_DETACH 0x02 /* Detach requested */ - uint8_t cause; /* Release cause */ -} emm_as_release_t; - -/* - * EMMAS primitive for data transfer - * --------------------------------- - */ -typedef struct emm_as_data_s { - uint32_t ueid; /* UE lower layer identifier */ - const GUTI_t *guti; /* GUTI temporary mobile identity */ - emm_as_security_data_t sctx;/* EPS NAS security context */ - int switch_off; /* TRUE if the UE is switched off */ - uint8_t type; /* Network detach type */ - uint8_t delivered; /* Data message delivery indicator */ -#define EMM_AS_NAS_DATA_ATTACH 0x01 /* Attach complete */ -#define EMM_AS_NAS_DATA_DETACH 0x02 /* Detach request */ - uint8_t NASinfo; /* Type of NAS information to transfer */ - OctetString NASmsg; /* NAS message to be transfered */ -} emm_as_data_t; - -/* - * EMMAS primitive for paging - * -------------------------- - */ -typedef struct emm_as_page_s {} emm_as_page_t; - -/* - * EMMAS primitive for status indication - * ------------------------------------- - */ -typedef struct emm_as_status_s { - uint32_t ueid; /* UE lower layer identifier */ - const GUTI_t *guti; /* GUTI temporary mobile identity */ - emm_as_security_data_t sctx;/* EPS NAS security context */ - int emm_cause; /* EMM failure cause code */ -} emm_as_status_t; - -/* - * EMMAS primitive for cell information - * ------------------------------------ - */ -typedef struct emm_as_cell_info_s { - uint8_t found; /* Indicates whether a suitable cell is found */ -#define EMM_AS_PLMN_LIST_SIZE 6 - PLMN_LIST_T(EMM_AS_PLMN_LIST_SIZE) plmnIDs; - /* List of identifiers of available PLMNs */ - Byte_t rat; /* Bitmap of Radio Access Technologies */ - tac_t tac; /* Tracking Area Code */ - ci_t cellID; /* cell identity */ -} emm_as_cell_info_t; - -/* - * -------------------------------- - * Structure of EMMAS-SAP primitive - * -------------------------------- - */ -typedef struct emm_as_s { - emm_as_primitive_t primitive; - union { - emm_as_security_t security; - emm_as_establish_t establish; - emm_as_release_t release; - emm_as_data_t data; - emm_as_page_t page; - emm_as_status_t status; - emm_as_cell_info_t cell_info; - } u; -} emm_as_t; - -/****************************************************************************/ -/******************** G L O B A L V A R I A B L E S ********************/ -/****************************************************************************/ - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -/* - * Defined in LowerLayer.c - * Setup security data according to the given EPS security context - */ -void emm_as_set_security_data(emm_as_security_data_t *data, const void *context, - int is_new, int is_ciphered); - -#endif /* __EMM_ASDEF_H__*/ diff --git a/openair-cn/NAS/MME/EMM/SAP/emm_cn.c b/openair-cn/NAS/MME/EMM/SAP/emm_cn.c deleted file mode 100644 index 603e849c14..0000000000 --- a/openair-cn/NAS/MME/EMM/SAP/emm_cn.c +++ /dev/null @@ -1,468 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** - -Source emm_cn.c - -Version 0.1 - -Date 2013/12/05 - -Product NAS stack - -Subsystem EPS Core Network - -Author Sebastien Roux, Lionel GAUTHIER - -Description - -*****************************************************************************/ - -#include - -#if defined(NAS_BUILT_IN_EPC) - -#include "nas_log.h" -#include "commonDef.h" - -#include "emm_cn.h" -#include "emm_sap.h" -#include "emm_proc.h" -#include "emm_cause.h" - -#include "esm_send.h" // LG -#include "esm_proc.h" // LG -#include "esm_cause.h" // LG -#include "assertions.h"// LG -#include "emmData.h" // LG -#include "esm_sap.h" // LG -#include "EmmCommon.h" // LG -extern int emm_cn_wrapper_attach_accept(emm_data_context_t *emm_ctx, void *data); - -/* - * Internal data used for attach procedure - */ -typedef struct { - unsigned int ueid; /* UE identifier */ -#define ATTACH_COUNTER_MAX 5 - unsigned int retransmission_count; /* Retransmission counter */ - OctetString esm_msg; /* ESM message to be sent within - * the Attach Accept message */ -} attach_data_t; - -/* - * String representation of EMMCN-SAP primitives - */ -static const char *_emm_cn_primitive_str[] = { - "EMM_CN_AUTHENTICATION_PARAM_RES", - "EMM_CN_AUTHENTICATION_PARAM_FAIL", - "EMM_CN_DEREGISTER_UE", - "EMM_CN_PDN_CONNECTIVITY_RES", - "EMM_CN_PDN_CONNECTIVITY_FAIL", -}; - -#define EMM_CN_SAP_BUFFER_SIZE 4096 -static char _emm_cn_sap_buffer[EMM_CN_SAP_BUFFER_SIZE]; - -static int _emm_cn_authentication_res(const emm_cn_auth_res_t *msg) -{ - emm_data_context_t *emm_ctx = NULL; - int rc = RETURNerror; - OctetString loc_rand; - OctetString autn; - - /* We received security vector from HSS. Try to setup security with UE */ - - LOG_FUNC_IN; - - emm_ctx = emm_data_context_get(&_emm_data, msg->ue_id); - - if (emm_ctx == NULL) { - LOG_TRACE(ERROR, "EMM-PROC - " - "Failed to find UE associated to id "NAS_UE_ID_FMT"...", msg->ue_id); - LOG_FUNC_RETURN (rc); - } - - /* Copy provided vector to user context */ - memcpy(emm_ctx->vector.kasme, msg->vector.kasme, AUTH_KASME_SIZE); - memcpy(emm_ctx->vector.autn, msg->vector.autn, AUTH_AUTN_SIZE); - memcpy(emm_ctx->vector.rand, msg->vector.rand, AUTH_RAND_SIZE); - memcpy(emm_ctx->vector.xres, msg->vector.xres.data, msg->vector.xres.size); - - LOG_TRACE(INFO, "EMM-PROC - Received RAND ..: "RAND_FORMAT"\n", - RAND_DISPLAY(msg->vector.rand)); - LOG_TRACE(INFO, "EMM-PROC - Received AUTN ..: "AUTN_FORMAT"\n", - AUTN_DISPLAY(msg->vector.autn)); - LOG_TRACE(INFO, "EMM-PROC - Received KASME .: "KASME_FORMAT" "KASME_FORMAT"\n", - KASME_DISPLAY_1(msg->vector.kasme), - KASME_DISPLAY_2(msg->vector.kasme)); - - loc_rand.value = emm_ctx->vector.rand; - loc_rand.length = AUTH_RAND_SIZE; - - autn.value = emm_ctx->vector.autn; - autn.length = AUTH_AUTN_SIZE; - - emm_ctx->vector.xres_size = msg->vector.xres.size; - - /* 3GPP TS 24.401, Figure 5.3.2.1-1, point 5a - * No EMM context exists for the UE in the network; authentication - * and NAS security setup to activate integrity protection and NAS - * ciphering are mandatory. - */ - rc = emm_proc_authentication(emm_ctx, - emm_ctx->ueid, - 0, // TODO: eksi != 0 - &loc_rand, - &autn, - emm_attach_security, - NULL, - NULL); - - if (rc != RETURNok) { - /* Failed to initiate the authentication procedure */ - LOG_TRACE(WARNING, "EMM-PROC - " - "Failed to initiate authentication procedure"); - emm_ctx->emm_cause = EMM_CAUSE_ILLEGAL_UE; - } - - LOG_FUNC_RETURN (rc); -} - -static int _emm_cn_authentication_fail(const emm_cn_auth_fail_t *msg) -{ - int rc = RETURNerror; - - LOG_FUNC_IN; - - rc = emm_proc_attach_reject(msg->ue_id, msg->cause); - - LOG_FUNC_RETURN (rc); -} - -static int _emm_cn_deregister_ue(const uint32_t ue_id) -{ - int rc = RETURNok; - - LOG_FUNC_IN; - LOG_TRACE(WARNING, "EMM-PROC - " - "TODO deregister UE "NAS_UE_ID_FMT", following procedure is a test", ue_id); - emm_proc_detach_request(ue_id, EMM_DETACH_TYPE_EPS /* ??? emm_proc_detach_type_t*/, - 1 /*switch_off*/, 0 /*native_ksi*/, 0 /*ksi*/, - NULL /*guti*/, NULL /*imsi*/, NULL /*imei*/); - LOG_FUNC_RETURN (rc); -} - -static int _emm_cn_pdn_connectivity_res(const emm_cn_pdn_res_t *msg_pP) -{ - int rc = RETURNok; - struct emm_data_context_s *emm_ctx_p = NULL; - esm_proc_pdn_type_t esm_pdn_type = ESM_PDN_TYPE_IPV4; - esm_proc_data_t *esm_proc_data_p = NULL; - ESM_msg esm_msg; - EpsQualityOfService qos; - ProtocolConfigurationOptions pco; - unsigned int pco_in_index = 0; - signed int length_in_pco = 0; - uint16_t pi_or_ci = 0; // protocol identifier or container identifier; - uint8_t length_pi_or_ci = 0; - - OctetString rsp = { 0, NULL}; - int is_standalone = 0; // warning hardcoded - int triggered_by_ue = 1; // warning hardcoded - attach_data_t *data_p = NULL; - int esm_cause = ESM_CAUSE_SUCCESS; - int pid = 0; - unsigned int new_ebi = 0; - - - LOG_FUNC_IN; - emm_ctx_p = emm_data_context_get(&_emm_data, msg_pP->ue_id); - - if (emm_ctx_p == NULL) { - LOG_TRACE(ERROR, "EMMCN-SAP - " - "Failed to find UE associated to id "NAS_UE_ID_FMT"...", msg_pP->ue_id); - LOG_FUNC_RETURN (rc); - } - - memset(&esm_msg, 0 , sizeof(ESM_msg)); - - switch (msg_pP->pdn_type) { - case IPv4: - LOG_TRACE(INFO, "EMM - esm_pdn_type = ESM_PDN_TYPE_IPV4"); - esm_pdn_type = ESM_PDN_TYPE_IPV4; - break; - - case IPv6: - LOG_TRACE(INFO, "EMM - esm_pdn_type = ESM_PDN_TYPE_IPV6"); - esm_pdn_type = ESM_PDN_TYPE_IPV6; - break; - - case IPv4_AND_v6: - LOG_TRACE(INFO, "EMM - esm_pdn_type = ESM_PDN_TYPE_IPV4V6"); - esm_pdn_type = ESM_PDN_TYPE_IPV4V6; - break; - - default: - LOG_TRACE(INFO, "EMM - esm_pdn_type = ESM_PDN_TYPE_IPV4 (forced to default)"); - esm_pdn_type = ESM_PDN_TYPE_IPV4; - } - - LOG_TRACE(INFO, "EMM - qci = %u ", msg_pP->qci); - LOG_TRACE(INFO, "EMM - qos.qci = %u ", msg_pP->qos.qci); - LOG_TRACE(INFO, "EMM - qos.mbrUL = %u ", msg_pP->qos.mbrUL); - LOG_TRACE(INFO, "EMM - qos.mbrDL = %u ", msg_pP->qos.mbrDL); - LOG_TRACE(INFO, "EMM - qos.gbrUL = %u ", msg_pP->qos.gbrUL); - LOG_TRACE(INFO, "EMM - qos.gbrDL = %u ", msg_pP->qos.gbrDL); - qos.bitRatesPresent = 0; - qos.bitRatesExtPresent = 0; -#warning "Some work to do here about qos" - qos.qci = msg_pP->qci; - qos.bitRates.maxBitRateForUL = 0;//msg_pP->qos.mbrUL; - qos.bitRates.maxBitRateForDL = 0;//msg_pP->qos.mbrDL; - qos.bitRates.guarBitRateForUL = 0;//msg_pP->qos.gbrUL; - qos.bitRates.guarBitRateForDL = 0;//msg_pP->qos.gbrDL; - - qos.bitRatesExt.maxBitRateForUL = 0; - qos.bitRatesExt.maxBitRateForDL = 0; - qos.bitRatesExt.guarBitRateForUL = 0; - qos.bitRatesExt.guarBitRateForDL = 0; - - //-------------------------------------------------------------------------- - // PCO processing - //-------------------------------------------------------------------------- - memset(&pco, 0, sizeof(ProtocolConfigurationOptions)); - length_in_pco = msg_pP->pco.byte[1]; - if ((length_in_pco+1+1) != msg_pP->pco.length) { - LOG_TRACE(WARNING, "PCO: mismatch in lengths length_pco+1+1 %u != msg_pP->pco.length %u\n", - length_in_pco+1+1, msg_pP->pco.length); - } - pco.configurationprotol = msg_pP->pco.byte[2] & 0x07; - - for (int i = 0; i < msg_pP->pco.length; i++) { - LOG_TRACE(WARNING, "EMMCN_PDN_CONNECTIVITY_RES.pco.byte[%u] = 0x%x", i, msg_pP->pco.byte[i]); - } - - - if ((length_in_pco > 0) && (msg_pP->pco.byte[2] & 0x80)) { - pco_in_index = PCO_MIN_LENGTH; - while (length_in_pco >= 3) { - pi_or_ci = (((uint16_t)msg_pP->pco.byte[pco_in_index]) << 8) | (uint16_t)msg_pP->pco.byte[pco_in_index+1]; - pco_in_index += 2; - length_pi_or_ci = msg_pP->pco.byte[pco_in_index++]; - pco.protocolid[pco.num_protocol_id_or_container_id] = pi_or_ci; - pco.lengthofprotocolid[pco.num_protocol_id_or_container_id] = length_pi_or_ci; - pco.protocolidcontents[pco.num_protocol_id_or_container_id].value = malloc(length_pi_or_ci); - pco.protocolidcontents[pco.num_protocol_id_or_container_id].length = length_pi_or_ci; - memcpy(pco.protocolidcontents[pco.num_protocol_id_or_container_id].value, - &msg_pP->pco.byte[pco_in_index], - length_pi_or_ci); - - LOG_TRACE(WARNING, "PCO: Found pi_or_ci 0x%x length %u content %s\n", - pi_or_ci, length_pi_or_ci, dump_octet_string(&pco.protocolidcontents[pco.num_protocol_id_or_container_id])); - pco.num_protocol_id_or_container_id++; - pco_in_index += length_pi_or_ci; - - length_in_pco = length_in_pco - (length_pi_or_ci + 2 + 1); - } // while (length_in_pco >= 3) { - } // if ((length_in_pco > 0) && (msg_pP->pco.byte[2] & 0x80)) { - /*************************************************************************/ - /* CODE THAT WAS IN esm_recv.c/esm_recv_pdn_connectivity_request() */ - /*************************************************************************/ - /* Execute the PDN connectivity procedure requested by the UE */ - pid = esm_proc_pdn_connectivity_request( - emm_ctx_p, - msg_pP->pti, - msg_pP->request_type, - &msg_pP->apn, - esm_pdn_type, - &msg_pP->pdn_addr, - NULL, - &esm_cause); - LOG_TRACE(INFO, "EMM - APN = %s ", (char *)(msg_pP->apn.value)); - - if (pid != RETURNerror) { - /* Create local default EPS bearer context */ - rc = esm_proc_default_eps_bearer_context( - emm_ctx_p, - pid, - &new_ebi, - &msg_pP->qos, - &esm_cause); - - if (rc != RETURNerror) { - esm_cause = ESM_CAUSE_SUCCESS; - } - } else { - LOG_FUNC_RETURN (rc); - } - - /**************************************************************************/ - /* END OF CODE THAT WAS IN esm_recv.c/esm_recv_pdn_connectivity_request() */ - /**************************************************************************/ - LOG_TRACE(INFO, "EMM - APN = %s ", (char *)(msg_pP->apn.value)); - - - /*************************************************************************/ - /* CODE THAT WAS IN esm_sap.c/_esm_sap_recv() */ - /*************************************************************************/ - /* Return default EPS bearer context request message */ - rc = esm_send_activate_default_eps_bearer_context_request( - msg_pP->pti, - new_ebi, //msg_pP->ebi, - &esm_msg.activate_default_eps_bearer_context_request, - &msg_pP->apn, - &pco, - esm_pdn_type, - &msg_pP->pdn_addr, - &qos, - ESM_CAUSE_SUCCESS); - - - if (rc != RETURNerror) { - /* Encode the returned ESM response message */ - int size = esm_msg_encode(&esm_msg, (uint8_t *)_emm_cn_sap_buffer, - EMM_CN_SAP_BUFFER_SIZE); - LOG_TRACE(INFO, "ESM encoded MSG size %d ", size); - - if (size > 0) { - rsp.length = size; - rsp.value = (uint8_t *)(_emm_cn_sap_buffer); - } - - /* Complete the relevant ESM procedure */ - rc = esm_proc_default_eps_bearer_context_request( - is_standalone, - emm_ctx_p, - new_ebi, //0, //ESM_EBI_UNASSIGNED, //msg->ebi, - &rsp, - triggered_by_ue); - - if (rc != RETURNok) { - /* Return indication that ESM procedure failed */ - LOG_FUNC_RETURN (rc); - } - } else { - LOG_TRACE(INFO, "ESM send activate_default_eps_bearer_context_request failed"); - } - - /*************************************************************************/ - /* END OF CODE THAT WAS IN esm_sap.c/_esm_sap_recv() */ - /*************************************************************************/ - - LOG_TRACE(INFO, "EMM - APN = %s ", (char *)(msg_pP->apn.value)); - data_p = (attach_data_t *)emm_proc_common_get_args(msg_pP->ue_id); - - /* Setup the ESM message container */ - data_p->esm_msg.value = (uint8_t *)malloc(rsp.length); - - if (data_p->esm_msg.value) { - data_p->esm_msg.length = rsp.length; - LOG_TRACE(INFO, "EMM - copy ESM MSG %d bytes", data_p->esm_msg.length); - memcpy(data_p->esm_msg.value, - rsp.value, - rsp.length); - } else { - data_p->esm_msg.length = 0; - } - - /* Send attach accept message to the UE */ - rc = emm_cn_wrapper_attach_accept(emm_ctx_p, data_p); - - if (rc != RETURNerror) { - if (emm_ctx_p->guti_is_new && emm_ctx_p->old_guti) { - /* Implicit GUTI reallocation; - * Notify EMM that common procedure has been initiated - */ - emm_sap_t emm_sap; - emm_sap.primitive = EMMREG_COMMON_PROC_REQ; - emm_sap.u.emm_reg.ueid = msg_pP->ue_id; - rc = emm_sap_send(&emm_sap); - } - } - - LOG_TRACE(INFO, "EMM - APN = %s ", (char *)(msg_pP->apn.value)); - LOG_FUNC_RETURN (rc); -} - -static int _emm_cn_pdn_connectivity_fail(const emm_cn_pdn_fail_t *msg) -{ - int rc = RETURNok; - - LOG_FUNC_IN; - - LOG_FUNC_RETURN (rc); -} - -int emm_cn_send(const emm_cn_t *msg) -{ - int rc = RETURNerror; - emm_cn_primitive_t primitive = msg->primitive; - - LOG_FUNC_IN; - - LOG_TRACE(INFO, "EMMCN-SAP - Received primitive %s (%d)", - _emm_cn_primitive_str[primitive - _EMMCN_START - 1], primitive); - - switch (primitive) { - case _EMMCN_AUTHENTICATION_PARAM_RES: - rc = _emm_cn_authentication_res(msg->u.auth_res); - break; - - case _EMMCN_AUTHENTICATION_PARAM_FAIL: - rc = _emm_cn_authentication_fail(msg->u.auth_fail); - break; - - case EMMCN_DEREGISTER_UE: - rc = _emm_cn_deregister_ue(msg->u.deregister.UEid); - break; - - case EMMCN_PDN_CONNECTIVITY_RES: - rc = _emm_cn_pdn_connectivity_res(msg->u.emm_cn_pdn_res); - break; - - case EMMCN_PDN_CONNECTIVITY_FAIL: - rc = _emm_cn_pdn_connectivity_fail(msg->u.emm_cn_pdn_fail); - break; - - default: - /* Other primitives are forwarded to the Access Stratum */ - rc = RETURNerror; - break; - } - - if (rc != RETURNok) { - LOG_TRACE(ERROR, "EMMCN-SAP - Failed to process primitive %s (%d)", - _emm_cn_primitive_str[primitive - _EMMCN_START - 1], - primitive); - } - - LOG_FUNC_RETURN (rc); -} -#endif diff --git a/openair-cn/NAS/MME/EMM/SAP/emm_cn.h b/openair-cn/NAS/MME/EMM/SAP/emm_cn.h deleted file mode 100644 index cb4e687b62..0000000000 --- a/openair-cn/NAS/MME/EMM/SAP/emm_cn.h +++ /dev/null @@ -1,56 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** - -Source emm_cn.h - -Version 0.1 - -Date 2013/12/05 - -Product NAS stack - -Subsystem EPS Core Network - -Author Sebastien Roux, Lionel GAUTHIER - -Description - -*****************************************************************************/ - -#include "emm_cnDef.h" - -#ifndef _EMM_CN_H_ -#define _EMM_CN_H_ - -#if defined(NAS_BUILT_IN_EPC) -int emm_cn_send(const emm_cn_t *msg); -#endif - -#endif /* _EMM_CN_H_ */ diff --git a/openair-cn/NAS/MME/EMM/SAP/emm_cnDef.h b/openair-cn/NAS/MME/EMM/SAP/emm_cnDef.h deleted file mode 100644 index 738871e5eb..0000000000 --- a/openair-cn/NAS/MME/EMM/SAP/emm_cnDef.h +++ /dev/null @@ -1,88 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** - -Source emm_cnDef.h - -Version 0.1 - -Date 2013/12/05 - -Product NAS stack - -Subsystem EPS Core Network - -Author Sebastien Roux, Lionel GAUTHIER - -Description - -*****************************************************************************/ - -#if defined(NAS_BUILT_IN_EPC) -#include "intertask_interface.h" -#endif - -#ifndef __EMM_CNDEF_H__ -#define __EMM_CNDEF_H__ - -typedef enum emmcn_primitive_s { - _EMMCN_START = 400, -#if defined(NAS_BUILT_IN_EPC) - _EMMCN_AUTHENTICATION_PARAM_RES, - _EMMCN_AUTHENTICATION_PARAM_FAIL, - _EMMCN_DEREGISTER_UE, - _EMMCN_PDN_CONNECTIVITY_RES, // LG - _EMMCN_PDN_CONNECTIVITY_FAIL,// LG -#endif - _EMMCN_END -} emm_cn_primitive_t; - -#if defined(NAS_BUILT_IN_EPC) -typedef nas_auth_param_rsp_t emm_cn_auth_res_t; -typedef nas_auth_param_fail_t emm_cn_auth_fail_t; -typedef nas_pdn_connectivity_rsp_t emm_cn_pdn_res_t; -typedef nas_pdn_connectivity_fail_t emm_cn_pdn_fail_t; - -typedef struct emm_cn_deregister_ue_s { - uint32_t UEid; -} emm_cn_deregister_ue_t; - -typedef struct emm_mme_ul_s { - emm_cn_primitive_t primitive; - union { - emm_cn_auth_res_t *auth_res; - emm_cn_auth_fail_t *auth_fail; - emm_cn_deregister_ue_t deregister; - emm_cn_pdn_res_t *emm_cn_pdn_res; - emm_cn_pdn_fail_t *emm_cn_pdn_fail; - } u; -} emm_cn_t; -#endif - -#endif /* __EMM_CNDEF_H__ */ diff --git a/openair-cn/NAS/MME/EMM/SAP/emm_esm.c b/openair-cn/NAS/MME/EMM/SAP/emm_esm.c deleted file mode 100644 index 2a7af5c780..0000000000 --- a/openair-cn/NAS/MME/EMM/SAP/emm_esm.c +++ /dev/null @@ -1,147 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** -Source emm_esm.c - -Version 0.1 - -Date 2012/10/16 - -Product NAS stack - -Subsystem EPS Mobility Management - -Author Frederic Maurel - -Description Defines the EMMESM Service Access Point that provides - interlayer services to the EPS Session Management sublayer - for service registration and activate/deactivate PDN - connections. - -*****************************************************************************/ - -#include "emm_esm.h" -#include "commonDef.h" -#include "nas_log.h" - -#include "LowerLayer.h" - - -/****************************************************************************/ -/**************** E X T E R N A L D E F I N I T I O N S ****************/ -/****************************************************************************/ - -/****************************************************************************/ -/******************* L O C A L D E F I N I T I O N S *******************/ -/****************************************************************************/ - -/* - * String representation of EMMESM-SAP primitives - */ -static const char *_emm_esm_primitive_str[] = { - "EMMESM_RELEASE_IND", - "EMMESM_UNITDATA_REQ", - "EMMESM_UNITDATA_IND", -}; - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -/**************************************************************************** - ** ** - ** Name: emm_esm_initialize() ** - ** ** - ** Description: Initializes the EMMESM Service Access Point ** - ** ** - ** Inputs: None ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: None ** - ** Others: NONE ** - ** ** - ***************************************************************************/ -void emm_esm_initialize(void) -{ - LOG_FUNC_IN; - - /* TODO: Initialize the EMMESM-SAP */ - - LOG_FUNC_OUT; -} - -/**************************************************************************** - ** ** - ** Name: emm_esm_send() ** - ** ** - ** Description: Processes the EMMESM Service Access Point primitive ** - ** ** - ** Inputs: msg: The EMMESM-SAP primitive to process ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int emm_esm_send(const emm_esm_t *msg) -{ - LOG_FUNC_IN; - - int rc = RETURNerror; - emm_esm_primitive_t primitive = msg->primitive; - - LOG_TRACE(INFO, "EMMESM-SAP - Received primitive %s (%d)", - _emm_esm_primitive_str[primitive - _EMMESM_START - 1], primitive); - - switch (primitive) { - - case _EMMESM_UNITDATA_REQ: - /* ESM requests EMM to transfer ESM data unit to lower layer */ - rc = lowerlayer_data_req(msg->ueid, &msg->u.data.msg); - break; - - default: - break; - - } - - if (rc != RETURNok) { - LOG_TRACE(WARNING, "EMMESM-SAP - Failed to process primitive %s (%d)", - _emm_esm_primitive_str[primitive - _EMMESM_START - 1], - primitive); - } - - LOG_FUNC_RETURN (rc); -} - -/****************************************************************************/ -/********************* L O C A L F U N C T I O N S *********************/ -/****************************************************************************/ diff --git a/openair-cn/NAS/MME/EMM/SAP/emm_esmDef.h b/openair-cn/NAS/MME/EMM/SAP/emm_esmDef.h deleted file mode 100644 index 3fbc035bdf..0000000000 --- a/openair-cn/NAS/MME/EMM/SAP/emm_esmDef.h +++ /dev/null @@ -1,116 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** -Source emm_esmDef.h - -Version 0.1 - -Date 2012/10/16 - -Product NAS stack - -Subsystem EPS Mobility Management - -Author Frederic Maurel - -Description Defines the EMMESM Service Access Point that provides - interlayer services to the EPS Session Management sublayer - for service registration and activate/deactivate PDN - connections. - -*****************************************************************************/ -#ifndef __EMM_ESMDEF_H__ -#define __EMM_ESMDEF_H__ - -#include "OctetString.h" -#include "emmData.h" - -/****************************************************************************/ -/********************* G L O B A L C O N S T A N T S *******************/ -/****************************************************************************/ - -/* - * EMMESM-SAP primitives - */ -typedef enum { - _EMMESM_START = 100, - _EMMESM_RELEASE_IND, - _EMMESM_UNITDATA_REQ, - _EMMESM_UNITDATA_IND, - _EMMESM_END -} emm_esm_primitive_t; - -/****************************************************************************/ -/************************ G L O B A L T Y P E S ************************/ -/****************************************************************************/ - -/* - * EMMESM primitive for connection establishment - * --------------------------------------------- - */ -typedef struct { - int is_emergency; /* Indicates whether the PDN connection is established - * for emergency bearer services only */ - int is_attached; /* Indicates whether the UE remains attached to the - * network */ -} emm_esm_establish_t; - -/* - * EMMESM primitive for data transfer - * ---------------------------------- - */ -typedef struct { - OctetString msg; /* ESM message to be transfered */ -} emm_esm_data_t; - -/* - * --------------------------------- - * Structure of EMMESM-SAP primitive - * --------------------------------- - */ -typedef struct { - emm_esm_primitive_t primitive; - unsigned int ueid; - emm_data_context_t *ctx; - union { - emm_esm_establish_t establish; - emm_esm_data_t data; - } u; - /* TODO: complete emm_esm_t structure definition */ -} emm_esm_t; - -/****************************************************************************/ -/******************** G L O B A L V A R I A B L E S ********************/ -/****************************************************************************/ - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -#endif /* __EMM_ESMDEF_H__*/ diff --git a/openair-cn/NAS/MME/EMM/SAP/emm_fsm.c b/openair-cn/NAS/MME/EMM/SAP/emm_fsm.c deleted file mode 100644 index bbbace861b..0000000000 --- a/openair-cn/NAS/MME/EMM/SAP/emm_fsm.c +++ /dev/null @@ -1,328 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** - -Source emm_fsm.c - -Version 0.1 - -Date 2012/10/03 - -Product NAS stack - -Subsystem EPS Mobility Management - -Author Frederic Maurel - -Description Defines the EPS Mobility Management procedures executed at - the EMMREG Service Access Point. - -*****************************************************************************/ - -#include "emm_fsm.h" -#include "commonDef.h" -#include "nas_log.h" - -#include "mme_api.h" -#include "emmData.h" - -#if defined(NAS_BUILT_IN_EPC) -# include "assertions.h" -#endif -# include "msc.h" - -/****************************************************************************/ -/**************** E X T E R N A L D E F I N I T I O N S ****************/ -/****************************************************************************/ - - -#define EMM_FSM_NB_UE_MAX (MME_API_NB_UE_MAX + 1) - -/****************************************************************************/ -/******************* L O C A L D E F I N I T I O N S *******************/ -/****************************************************************************/ - -/* - * ----------------------------------------------------------------------------- - * Data used for trace logging - * ----------------------------------------------------------------------------- - */ - -/* String representation of EMM events */ -static const char *_emm_fsm_event_str[] = { - "COMMON_PROC_REQ", - "COMMON_PROC_CNF", - "COMMON_PROC_REJ", - "PROC_ABORT", - "ATTACH_CNF", - "ATTACH_REJ", - "DETACH_INIT", - "DETACH_REQ", - "DETACH_FAILED", - "DETACH_CNF", - "TAU_REQ", - "TAU_CNF", - "TAU_REJ", - "SERVICE_REQ", - "SERVICE_CNF", - "SERVICE_REJ", - "LOWERLAYER_SUCCESS", - "LOWERLAYER_FAILURE", - "LOWERLAYER_RELEASE", -}; - -/* String representation of EMM status */ -static const char *_emm_fsm_status_str[EMM_STATE_MAX] = { - "INVALID", - "DEREGISTERED", - "REGISTERED", - "DEREGISTERED-INITIATED", - "COMMON-PROCEDURE-INITIATED", -}; - -/* - * ----------------------------------------------------------------------------- - * EPS Mobility Management state machine handlers - * ----------------------------------------------------------------------------- - */ - -/* Type of the EPS Mobility Management state machine handler */ -typedef int(*emm_fsm_handler_t)(const emm_reg_t *); - -int EmmDeregistered(const emm_reg_t *); -int EmmRegistered(const emm_reg_t *); -int EmmDeregisteredInitiated(const emm_reg_t *); -int EmmCommonProcedureInitiated(const emm_reg_t *); - -/* EMM state machine handlers */ -static const emm_fsm_handler_t _emm_fsm_handlers[EMM_STATE_MAX] = { - NULL, - EmmDeregistered, - EmmRegistered, - EmmDeregisteredInitiated, - EmmCommonProcedureInitiated, -}; - -/* - * ----------------------------------------------------------------------------- - * Current EPS Mobility Management status - * ----------------------------------------------------------------------------- - */ - -#if !defined(NAS_BUILT_IN_EPC) -emm_fsm_state_t _emm_fsm_status[EMM_FSM_NB_UE_MAX]; -#endif - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -/**************************************************************************** - ** ** - ** Name: emm_fsm_initialize() ** - ** ** - ** Description: Initializes the EMM state machine ** - ** ** - ** Inputs: None ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: None ** - ** Others: _emm_fsm_status ** - ** ** - ***************************************************************************/ -void emm_fsm_initialize(void) -{ - int ueid; - LOG_FUNC_IN; - - -#if !defined(NAS_BUILT_IN_EPC) - - for (ueid = 0; ueid < EMM_FSM_NB_UE_MAX; ueid++) { - _emm_fsm_status[ueid] = EMM_DEREGISTERED; - } - -#endif - - LOG_FUNC_OUT; -} - -/**************************************************************************** - ** ** - ** Name: emm_fsm_set_status() ** - ** ** - ** Description: Set the EPS Mobility Management status to the given state ** - ** ** - ** Inputs: ueid: Lower layers UE identifier ** - ** status: The new EMM status ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: _emm_fsm_status ** - ** ** - ***************************************************************************/ -int emm_fsm_set_status( - unsigned int ueid, - void *ctx, - emm_fsm_state_t status) -{ - LOG_FUNC_IN; - -#if defined(NAS_BUILT_IN_EPC) - emm_data_context_t *emm_ctx = (emm_data_context_t *)ctx; - - DevAssert(emm_ctx != NULL); - - if ((status < EMM_STATE_MAX) && (ueid > 0)) { - - if (status != emm_ctx->_emm_fsm_status) { - LOG_TRACE(INFO, "EMM-FSM - Status changed: %s ===> %s", - _emm_fsm_status_str[emm_ctx->_emm_fsm_status], - _emm_fsm_status_str[status]); - MSC_LOG_EVENT(MSC_NAS_EMM_MME, "0 EMM state %s ", _emm_fsm_status_str[status]); - emm_ctx->_emm_fsm_status = status; - } - - LOG_FUNC_RETURN (RETURNok); - } - -#else - - if ( (status < EMM_STATE_MAX) && (ueid < EMM_FSM_NB_UE_MAX) ) { - if (status != _emm_fsm_status[ueid]) { - LOG_TRACE(INFO, "EMM-FSM - Status changed: %s ===> %s", - _emm_fsm_status_str[_emm_fsm_status[ueid]], - _emm_fsm_status_str[status]); - - _emm_fsm_status[ueid] = status; - } - - LOG_FUNC_RETURN (RETURNok); - } - -#endif - - LOG_FUNC_RETURN (RETURNerror); -} - -/**************************************************************************** - ** ** - ** Name: emm_fsm_get_status() ** - ** ** - ** Description: Get the current value of the EPS Mobility Management ** - ** status ** - ** ** - ** Inputs: ueid: Lower layers UE identifier ** - ** Others: _emm_fsm_status ** - ** ** - ** Outputs: None ** - ** Return: The current value of the EMM status ** - ** Others: None ** - ** ** - ***************************************************************************/ -emm_fsm_state_t emm_fsm_get_status(unsigned int ueid, void *ctx) -{ -# if defined(NAS_BUILT_IN_EPC) - emm_data_context_t *emm_ctx = (emm_data_context_t *)ctx; - if (emm_ctx == NULL) { - LOG_TRACE(INFO, "EMM-FSM - try again get context ueid "NAS_UE_ID_FMT" ", - ueid); - emm_ctx = emm_data_context_get(&_emm_data, ueid); - } - if (emm_ctx != NULL) { - return emm_ctx->_emm_fsm_status; - } - -# else - - if (ueid < EMM_FSM_NB_UE_MAX) { - return (_emm_fsm_status[ueid]); - } -#endif - return EMM_STATE_MAX; -} - -/**************************************************************************** - ** ** - ** Name: emm_fsm_process() ** - ** ** - ** Description: Executes the EMM state machine ** - ** ** - ** Inputs: evt: The EMMREG-SAP event to process ** - ** Others: _emm_fsm_status ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int emm_fsm_process(const emm_reg_t *evt) -{ - int rc; - emm_fsm_state_t status; - emm_reg_primitive_t primitive; - - LOG_FUNC_IN; - - primitive = evt->primitive; - -# if defined(NAS_BUILT_IN_EPC) - emm_data_context_t *emm_ctx = (emm_data_context_t *)evt->ctx; - DevAssert(emm_ctx != NULL); - - status = emm_fsm_get_status(0, emm_ctx); -# else - - if (evt->ueid >= EMM_FSM_NB_UE_MAX) { - LOG_FUNC_RETURN (RETURNerror); - } - - status = _emm_fsm_status[evt->ueid]; -# endif - - LOG_TRACE(INFO, "EMM-FSM - Received event %s (%d) in state %s", - _emm_fsm_event_str[primitive - _EMMREG_START - 1], primitive, - _emm_fsm_status_str[status]); - -#if defined(NAS_BUILT_IN_EPC) - DevAssert(status != EMM_INVALID); -#endif - - /* Execute the EMM state machine */ - rc = (_emm_fsm_handlers[status])(evt); - - LOG_FUNC_RETURN (rc); -} - -/****************************************************************************/ -/********************* L O C A L F U N C T I O N S *********************/ -/****************************************************************************/ - diff --git a/openair-cn/NAS/MME/EMM/SAP/emm_fsm.h b/openair-cn/NAS/MME/EMM/SAP/emm_fsm.h deleted file mode 100644 index 15ca989cc5..0000000000 --- a/openair-cn/NAS/MME/EMM/SAP/emm_fsm.h +++ /dev/null @@ -1,91 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** - -Source emm_fsm.h - -Version 0.1 - -Date 2012/10/03 - -Product NAS stack - -Subsystem EPS Mobility Management - -Author Frederic Maurel - -Description Defines the EPS Mobility Management procedures executed at - the EMMREG Service Access Point. - -*****************************************************************************/ -#ifndef __EMM_FSM_H__ -#define __EMM_FSM_H__ - -#include "emm_regDef.h" - -/****************************************************************************/ -/********************* G L O B A L C O N S T A N T S *******************/ -/****************************************************************************/ - -/****************************************************************************/ -/************************ G L O B A L T Y P E S ************************/ -/****************************************************************************/ - -/* - * States of the EPS Mobility Management sublayer - * ---------------------------------------------- - * The EMM protocol of the UE and the network is described by means of two - * different state machines. - */ -typedef enum { - EMM_INVALID, - EMM_DEREGISTERED, - EMM_REGISTERED, - EMM_DEREGISTERED_INITIATED, - EMM_COMMON_PROCEDURE_INITIATED, - EMM_STATE_MAX -} emm_fsm_state_t; - -/****************************************************************************/ -/******************** G L O B A L V A R I A B L E S ********************/ -/****************************************************************************/ - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -void emm_fsm_initialize(void); - -//LG 2015-03-13 struct emm_data_context_t; -int emm_fsm_set_status(unsigned int ueid, void *ctx, emm_fsm_state_t status); -emm_fsm_state_t emm_fsm_get_status(unsigned int ueid, void *ctx); - -int emm_fsm_process(const emm_reg_t *evt); - -#endif /* __EMM_FSM_H__*/ diff --git a/openair-cn/NAS/MME/EMM/SAP/emm_recv.c b/openair-cn/NAS/MME/EMM/SAP/emm_recv.c deleted file mode 100644 index 2f0d944679..0000000000 --- a/openair-cn/NAS/MME/EMM/SAP/emm_recv.c +++ /dev/null @@ -1,748 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** - -Source emm_recv.c - -Version 0.1 - -Date 2013/01/30 - -Product NAS stack - -Subsystem EPS Mobility Management - -Author Frederic Maurel - -Description Defines functions executed at the EMMAS Service Access - Point upon receiving EPS Mobility Management messages - from the Access Stratum sublayer. - -*****************************************************************************/ - -#include "emm_recv.h" -#include "commonDef.h" -#include "nas_log.h" - -#include "emm_msgDef.h" -#include "emm_cause.h" -#include "emm_proc.h" - -#include // memcpy - -/****************************************************************************/ -/**************** E X T E R N A L D E F I N I T I O N S ****************/ -/****************************************************************************/ - -/****************************************************************************/ -/******************* L O C A L D E F I N I T I O N S *******************/ -/****************************************************************************/ - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -/****************************************************************************/ -/********************* L O C A L F U N C T I O N S *********************/ -/****************************************************************************/ - -/* - * -------------------------------------------------------------------------- - * Functions executed by both the UE and the MME upon receiving EMM messages - * -------------------------------------------------------------------------- - */ -/**************************************************************************** - ** ** - ** Name: emm_recv_status() ** - ** ** - ** Description: Processes EMM status message ** - ** ** - ** Inputs: ueid: UE lower layer identifier ** - ** msg: The received EMM message ** - ** Others: None ** - ** ** - ** Outputs: emm_cause: EMM cause code ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int emm_recv_status(unsigned int ueid, emm_status_msg *msg, int *emm_cause) -{ - LOG_FUNC_IN; - - int rc; - - LOG_TRACE(INFO, "EMMAS-SAP - Received EMM Status message (cause=%d)", - msg->emmcause); - - /* - * Message checking - */ - *emm_cause = EMM_CAUSE_SUCCESS; - /* - * Message processing - */ - rc = emm_proc_status_ind(ueid, msg->emmcause); - - LOG_FUNC_RETURN (rc); -} - -/* - * -------------------------------------------------------------------------- - * Functions executed by the MME upon receiving EMM message from the UE - * -------------------------------------------------------------------------- - */ -/**************************************************************************** - ** ** - ** Name: emm_recv_attach_request() ** - ** ** - ** Description: Processes Attach Request message ** - ** ** - ** Inputs: ueid: UE lower layer identifier ** - ** msg: The received EMM message ** - ** Others: None ** - ** ** - ** Outputs: emm_cause: EMM cause code ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int emm_recv_attach_request(unsigned int ueid, const attach_request_msg *msg, - int *emm_cause) -{ - int rc; - uint8_t gea = 0; - emm_proc_attach_type_t type; - - LOG_FUNC_IN; - - LOG_TRACE(INFO, "EMMAS-SAP - Received Attach Request message"); - - /* - * Message checking - */ -#if !defined(UPDATE_RELEASE_9) - - /* SR: In releases 9 and beyond the mandatory ie (old GUTI) has been removed */ - if ( (msg->oldgutiorimsi.guti.typeofidentity == EPS_MOBILE_IDENTITY_GUTI) && - !(msg->presencemask & ATTACH_REQUEST_OLD_GUTI_TYPE_PRESENT) ) { - /* The Old GUTI type IE shall be included if the type of identity - * in the EPS mobile identity IE is set to "GUTI" */ - *emm_cause = EMM_CAUSE_INVALID_MANDATORY_INFO; - LOG_TRACE(WARNING, "EMMAS-SAP - [%08x] - Received GUTI identity without " - "old GUTI IEI", ueid); - } else -#endif /* !defined(UPDATE_RELEASE_9) */ - if (msg->uenetworkcapability.spare != 0b000) { - /* Spare bits shall be coded as zero */ - *emm_cause = EMM_CAUSE_PROTOCOL_ERROR; - LOG_TRACE(WARNING, "EMMAS-SAP - [%08x] - Non zero spare bits is suspicious", - ueid); - } - - /* Handle message checking error */ - if (*emm_cause != EMM_CAUSE_SUCCESS) { - /* 3GPP TS 24.301, section 5.5.1.2.7, case b - * Perform protocol error abnormal case on the network side */ - rc = emm_proc_attach_reject(ueid, *emm_cause); - *emm_cause = EMM_CAUSE_SUCCESS; - LOG_FUNC_RETURN (rc); - } - - /* - * Message processing - */ - /* Get the EPS attach type */ - if (msg->epsattachtype == EPS_ATTACH_TYPE_EPS) { - type = EMM_ATTACH_TYPE_EPS; - } else if (msg->epsattachtype == EPS_ATTACH_TYPE_IMSI) { - type = EMM_ATTACH_TYPE_IMSI; - } else if (msg->epsattachtype == EPS_ATTACH_TYPE_EMERGENCY) { - type = EMM_ATTACH_TYPE_EMERGENCY; - } else if (msg->epsattachtype == EPS_ATTACH_TYPE_RESERVED) { - type = EMM_ATTACH_TYPE_RESERVED; - } else { - /* All other values shall be interpreted as "EPS attach" */ - type = EMM_ATTACH_TYPE_EPS; - } - - /* Get the EPS mobile identity */ - GUTI_t guti, *p_guti = NULL; - imsi_t imsi, *p_imsi = NULL; - imei_t imei, *p_imei = NULL; - - if (msg->oldgutiorimsi.guti.typeofidentity == EPS_MOBILE_IDENTITY_GUTI) { - /* Get the GUTI */ - p_guti = &guti; - guti.gummei.plmn.MCCdigit1 = msg->oldgutiorimsi.guti.mccdigit1; - guti.gummei.plmn.MCCdigit2 = msg->oldgutiorimsi.guti.mccdigit2; - guti.gummei.plmn.MCCdigit3 = msg->oldgutiorimsi.guti.mccdigit3; - guti.gummei.plmn.MNCdigit1 = msg->oldgutiorimsi.guti.mncdigit1; - guti.gummei.plmn.MNCdigit2 = msg->oldgutiorimsi.guti.mncdigit2; - guti.gummei.plmn.MNCdigit3 = msg->oldgutiorimsi.guti.mncdigit3; - guti.gummei.MMEgid = msg->oldgutiorimsi.guti.mmegroupid; - guti.gummei.MMEcode = msg->oldgutiorimsi.guti.mmecode; - guti.m_tmsi = msg->oldgutiorimsi.guti.mtmsi; - } else if (msg->oldgutiorimsi.imsi.typeofidentity == EPS_MOBILE_IDENTITY_IMSI) { - /* Get the IMSI */ - p_imsi = &imsi; - imsi.u.num.digit1 = msg->oldgutiorimsi.imsi.digit1; - imsi.u.num.digit2 = msg->oldgutiorimsi.imsi.digit2; - imsi.u.num.digit3 = msg->oldgutiorimsi.imsi.digit3; - imsi.u.num.digit4 = msg->oldgutiorimsi.imsi.digit4; - imsi.u.num.digit5 = msg->oldgutiorimsi.imsi.digit5; - imsi.u.num.digit6 = msg->oldgutiorimsi.imsi.digit6; - imsi.u.num.digit7 = msg->oldgutiorimsi.imsi.digit7; - imsi.u.num.digit8 = msg->oldgutiorimsi.imsi.digit8; - imsi.u.num.digit9 = msg->oldgutiorimsi.imsi.digit9; - imsi.u.num.digit10 = msg->oldgutiorimsi.imsi.digit10; - imsi.u.num.digit11 = msg->oldgutiorimsi.imsi.digit11; - imsi.u.num.digit12 = msg->oldgutiorimsi.imsi.digit12; - imsi.u.num.digit13 = msg->oldgutiorimsi.imsi.digit13; - imsi.u.num.digit14 = msg->oldgutiorimsi.imsi.digit14; - imsi.u.num.digit15 = msg->oldgutiorimsi.imsi.digit15; - imsi.u.num.parity = msg->oldgutiorimsi.imsi.oddeven; - } else if (msg->oldgutiorimsi.imei.typeofidentity == EPS_MOBILE_IDENTITY_IMEI) { - /* Get the IMEI */ - p_imei = &imei; - imei.u.num.digit1 = msg->oldgutiorimsi.imei.digit1; - imei.u.num.digit2 = msg->oldgutiorimsi.imei.digit2; - imei.u.num.digit3 = msg->oldgutiorimsi.imei.digit3; - imei.u.num.digit4 = msg->oldgutiorimsi.imei.digit4; - imei.u.num.digit5 = msg->oldgutiorimsi.imei.digit5; - imei.u.num.digit6 = msg->oldgutiorimsi.imei.digit6; - imei.u.num.digit7 = msg->oldgutiorimsi.imei.digit7; - imei.u.num.digit8 = msg->oldgutiorimsi.imei.digit8; - imei.u.num.digit9 = msg->oldgutiorimsi.imei.digit9; - imei.u.num.digit10 = msg->oldgutiorimsi.imei.digit10; - imei.u.num.digit11 = msg->oldgutiorimsi.imei.digit11; - imei.u.num.digit12 = msg->oldgutiorimsi.imei.digit12; - imei.u.num.digit13 = msg->oldgutiorimsi.imei.digit13; - imei.u.num.digit14 = msg->oldgutiorimsi.imei.digit14; - imei.u.num.digit15 = msg->oldgutiorimsi.imei.digit15; - imei.u.num.parity = msg->oldgutiorimsi.imei.oddeven; - } - - /* TODO: Get the UE network capabilities */ - - /* Get the Last visited registered TAI */ - tai_t tai, *p_tai = NULL; - - if (msg->presencemask & ATTACH_REQUEST_LAST_VISITED_REGISTERED_TAI_PRESENT) { - p_tai = &tai; - tai.plmn.MCCdigit1 = msg->lastvisitedregisteredtai.mccdigit1; - tai.plmn.MCCdigit2 = msg->lastvisitedregisteredtai.mccdigit2; - tai.plmn.MCCdigit3 = msg->lastvisitedregisteredtai.mccdigit3; - tai.plmn.MNCdigit1 = msg->lastvisitedregisteredtai.mncdigit1; - tai.plmn.MNCdigit2 = msg->lastvisitedregisteredtai.mncdigit2; - tai.plmn.MNCdigit3 = msg->lastvisitedregisteredtai.mncdigit3; - tai.tac = msg->lastvisitedregisteredtai.tac; - } - - /* Execute the requested UE attach procedure */ -#warning " TODO gea to be review" - - if (msg->msnetworkcapability.msnetworkcapabilityvalue.length > 0) { - gea = (msg->msnetworkcapability.msnetworkcapabilityvalue.value[0] & 0x80) >> 1; - - if ((gea) && (msg->msnetworkcapability.msnetworkcapabilityvalue.length >= 2)) { - gea |= ((msg->msnetworkcapability.msnetworkcapabilityvalue.value[1] & 0x60) >> 1); - } - } - - rc = emm_proc_attach_request(ueid, type, - msg->naskeysetidentifier.tsc != NAS_KEY_SET_IDENTIFIER_MAPPED, - msg->naskeysetidentifier.naskeysetidentifier, - msg->oldgutitype != GUTI_MAPPED, p_guti, p_imsi, p_imei, p_tai, - msg->uenetworkcapability.eea, - msg->uenetworkcapability.eia, - msg->uenetworkcapability.ucs2, - msg->uenetworkcapability.uea, - msg->uenetworkcapability.uia, - gea, - msg->uenetworkcapability.umts_present, - msg->uenetworkcapability.gprs_present, - &msg->esmmessagecontainer.esmmessagecontainercontents); - - LOG_FUNC_RETURN (rc); -} - -/**************************************************************************** - ** ** - ** Name: emm_recv_attach_complete() ** - ** ** - ** Description: Processes Attach Complete message ** - ** ** - ** Inputs: ueid: UE lower layer identifier ** - ** msg: The received EMM message ** - ** Others: None ** - ** ** - ** Outputs: emm_cause: EMM cause code ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int emm_recv_attach_complete(unsigned int ueid, const attach_complete_msg *msg, - int *emm_cause) -{ - LOG_FUNC_IN; - - int rc; - - LOG_TRACE(INFO, "EMMAS-SAP - Received Attach Complete message"); - - /* Execute the attach procedure completion */ - rc = emm_proc_attach_complete(ueid, - &msg->esmmessagecontainer.esmmessagecontainercontents); - - LOG_FUNC_RETURN (rc); -} - -/**************************************************************************** - ** ** - ** Name: emm_recv_detach_request() ** - ** ** - ** Description: Processes Detach Request message ** - ** ** - ** Inputs: ueid: UE lower layer identifier ** - ** msg: The received EMM message ** - ** Others: None ** - ** ** - ** Outputs: emm_cause: EMM cause code ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int emm_recv_detach_request(unsigned int ueid, const detach_request_msg *msg, - int *emm_cause) -{ - LOG_FUNC_IN; - - int rc; - - LOG_TRACE(INFO, "EMMAS-SAP - Received Detach Request message"); - - /* - * Message processing - */ - /* Get the detach type */ - emm_proc_detach_type_t type; - - if (msg->detachtype.typeofdetach == DETACH_TYPE_EPS) { - type = EMM_DETACH_TYPE_EPS; - } else if (msg->detachtype.typeofdetach == DETACH_TYPE_IMSI) { - type = EMM_DETACH_TYPE_IMSI; - } else if (msg->detachtype.typeofdetach == DETACH_TYPE_EPS_IMSI) { - type = EMM_DETACH_TYPE_EPS_IMSI; - } else if (msg->detachtype.typeofdetach == DETACH_TYPE_RESERVED_1) { - type = EMM_DETACH_TYPE_RESERVED; - } else if (msg->detachtype.typeofdetach == DETACH_TYPE_RESERVED_2) { - type = EMM_DETACH_TYPE_RESERVED; - } else { - /* All other values are interpreted as "combined EPS/IMSI detach" */ - type = DETACH_TYPE_EPS_IMSI; - } - - /* Get the EPS mobile identity */ - GUTI_t guti, *p_guti = NULL; - imsi_t imsi, *p_imsi = NULL; - imei_t imei, *p_imei = NULL; - - if (msg->gutiorimsi.guti.typeofidentity == EPS_MOBILE_IDENTITY_GUTI) { - /* Get the GUTI */ - p_guti = &guti; - guti.gummei.plmn.MCCdigit1 = msg->gutiorimsi.guti.mccdigit1; - guti.gummei.plmn.MCCdigit2 = msg->gutiorimsi.guti.mccdigit2; - guti.gummei.plmn.MCCdigit3 = msg->gutiorimsi.guti.mccdigit3; - guti.gummei.plmn.MNCdigit1 = msg->gutiorimsi.guti.mncdigit1; - guti.gummei.plmn.MNCdigit2 = msg->gutiorimsi.guti.mncdigit2; - guti.gummei.plmn.MNCdigit3 = msg->gutiorimsi.guti.mncdigit3; - guti.gummei.MMEgid = msg->gutiorimsi.guti.mmegroupid; - guti.gummei.MMEcode = msg->gutiorimsi.guti.mmecode; - guti.m_tmsi = msg->gutiorimsi.guti.mtmsi; - } else if (msg->gutiorimsi.imsi.typeofidentity == EPS_MOBILE_IDENTITY_IMSI) { - /* Get the IMSI */ - p_imsi = &imsi; - imsi.u.num.digit1 = msg->gutiorimsi.imsi.digit1; - imsi.u.num.digit2 = msg->gutiorimsi.imsi.digit2; - imsi.u.num.digit3 = msg->gutiorimsi.imsi.digit3; - imsi.u.num.digit4 = msg->gutiorimsi.imsi.digit4; - imsi.u.num.digit5 = msg->gutiorimsi.imsi.digit5; - imsi.u.num.digit6 = msg->gutiorimsi.imsi.digit6; - imsi.u.num.digit7 = msg->gutiorimsi.imsi.digit7; - imsi.u.num.digit8 = msg->gutiorimsi.imsi.digit8; - imsi.u.num.digit9 = msg->gutiorimsi.imsi.digit9; - imsi.u.num.digit10 = msg->gutiorimsi.imsi.digit10; - imsi.u.num.digit11 = msg->gutiorimsi.imsi.digit11; - imsi.u.num.digit12 = msg->gutiorimsi.imsi.digit12; - imsi.u.num.digit13 = msg->gutiorimsi.imsi.digit13; - imsi.u.num.digit14 = msg->gutiorimsi.imsi.digit14; - imsi.u.num.digit15 = msg->gutiorimsi.imsi.digit15; - imsi.u.num.parity = msg->gutiorimsi.imsi.oddeven; - } else if (msg->gutiorimsi.imei.typeofidentity == EPS_MOBILE_IDENTITY_IMEI) { - /* Get the IMEI */ - p_imei = &imei; - imei.u.num.digit1 = msg->gutiorimsi.imei.digit1; - imei.u.num.digit2 = msg->gutiorimsi.imei.digit2; - imei.u.num.digit3 = msg->gutiorimsi.imei.digit3; - imei.u.num.digit4 = msg->gutiorimsi.imei.digit4; - imei.u.num.digit5 = msg->gutiorimsi.imei.digit5; - imei.u.num.digit6 = msg->gutiorimsi.imei.digit6; - imei.u.num.digit7 = msg->gutiorimsi.imei.digit7; - imei.u.num.digit8 = msg->gutiorimsi.imei.digit8; - imei.u.num.digit9 = msg->gutiorimsi.imei.digit9; - imei.u.num.digit10 = msg->gutiorimsi.imei.digit10; - imei.u.num.digit11 = msg->gutiorimsi.imei.digit11; - imei.u.num.digit12 = msg->gutiorimsi.imei.digit12; - imei.u.num.digit13 = msg->gutiorimsi.imei.digit13; - imei.u.num.digit14 = msg->gutiorimsi.imei.digit14; - imei.u.num.digit15 = msg->gutiorimsi.imei.digit15; - imei.u.num.parity = msg->gutiorimsi.imei.oddeven; - } - - /* Execute the UE initiated detach procedure completion by the network */ - rc = emm_proc_detach_request(ueid, type, - msg->detachtype.switchoff != DETACH_TYPE_NORMAL_DETACH, - msg->naskeysetidentifier.tsc != NAS_KEY_SET_IDENTIFIER_MAPPED, - msg->naskeysetidentifier.naskeysetidentifier, - p_guti, p_imsi, p_imei); - - LOG_FUNC_RETURN (rc); -} - -/**************************************************************************** - ** ** - ** Name: emm_recv_tracking_area_update_request() ** - ** ** - ** Description: Processes Tracking Area Update Request message ** - ** ** - ** Inputs: ueid: UE lower layer identifier ** - ** msg: The received EMM message ** - ** Others: None ** - ** ** - ** Outputs: emm_cause: EMM cause code ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int emm_recv_tracking_area_update_request(unsigned int ueid, - const tracking_area_update_request_msg *msg, - int *emm_cause) -{ - int rc = RETURNok; - - LOG_FUNC_IN; - - LOG_TRACE(INFO, "EMMAS-SAP - Received Tracking Area Update Request message"); - - /* LW: Not completely implemented; send a Received Tracking Area Update Reject to induce a Attach Request from UE! */ - rc = emm_proc_tracking_area_update_reject(ueid, EMM_CAUSE_IMPLICITLY_DETACHED); - - LOG_FUNC_RETURN (rc); -} - -/**************************************************************************** - ** ** - ** Name: emm_recv_identity_response() ** - ** ** - ** Description: Processes Identity Response message ** - ** ** - ** Inputs: ueid: UE lower layer identifier ** - ** msg: The received EMM message ** - ** Others: None ** - ** ** - ** Outputs: emm_cause: EMM cause code ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int emm_recv_identity_response(unsigned int ueid, identity_response_msg *msg, - int *emm_cause) -{ - LOG_FUNC_IN; - - int rc = RETURNok; - - LOG_TRACE(INFO, "EMMAS-SAP - Received Identity Response message"); - - /* - * Message processing - */ - /* Get the mobile identity */ - imsi_t imsi, *p_imsi = NULL; - imei_t imei, *p_imei = NULL; - struct tmsi_struct_t { - uint8_t digit1:4; - uint8_t digit2:4; - uint8_t digit3:4; - uint8_t digit4:4; - uint8_t digit5:4; - uint8_t digit6:4; - uint8_t digit7:4; - uint8_t digit8:4; - } tmsi, *p_tmsi = NULL; - - if (msg->mobileidentity.imsi.typeofidentity == MOBILE_IDENTITY_IMSI) { - /* Get the IMSI */ - p_imsi = &imsi; - imsi.u.num.digit1 = msg->mobileidentity.imsi.digit1; - imsi.u.num.digit2 = msg->mobileidentity.imsi.digit2; - imsi.u.num.digit3 = msg->mobileidentity.imsi.digit3; - imsi.u.num.digit4 = msg->mobileidentity.imsi.digit4; - imsi.u.num.digit5 = msg->mobileidentity.imsi.digit5; - imsi.u.num.digit6 = msg->mobileidentity.imsi.digit6; - imsi.u.num.digit7 = msg->mobileidentity.imsi.digit7; - imsi.u.num.digit8 = msg->mobileidentity.imsi.digit8; - imsi.u.num.digit9 = msg->mobileidentity.imsi.digit9; - imsi.u.num.digit10 = msg->mobileidentity.imsi.digit10; - imsi.u.num.digit11 = msg->mobileidentity.imsi.digit11; - imsi.u.num.digit12 = msg->mobileidentity.imsi.digit12; - imsi.u.num.digit13 = msg->mobileidentity.imsi.digit13; - imsi.u.num.digit14 = msg->mobileidentity.imsi.digit14; - imsi.u.num.digit15 = msg->mobileidentity.imsi.digit15; - imsi.u.num.parity = msg->mobileidentity.imsi.oddeven; - } else if ((msg->mobileidentity.imei.typeofidentity == MOBILE_IDENTITY_IMEI) || - (msg->mobileidentity.imeisv.typeofidentity==MOBILE_IDENTITY_IMEISV)) { - /* Get the IMEI */ - p_imei = &imei; - imei.u.num.digit1 = msg->mobileidentity.imei.digit1; - imei.u.num.digit2 = msg->mobileidentity.imei.digit2; - imei.u.num.digit3 = msg->mobileidentity.imei.digit3; - imei.u.num.digit4 = msg->mobileidentity.imei.digit4; - imei.u.num.digit5 = msg->mobileidentity.imei.digit5; - imei.u.num.digit6 = msg->mobileidentity.imei.digit6; - imei.u.num.digit7 = msg->mobileidentity.imei.digit7; - imei.u.num.digit8 = msg->mobileidentity.imei.digit8; - imei.u.num.digit9 = msg->mobileidentity.imei.digit9; - imei.u.num.digit10 = msg->mobileidentity.imei.digit10; - imei.u.num.digit11 = msg->mobileidentity.imei.digit11; - imei.u.num.digit12 = msg->mobileidentity.imei.digit12; - imei.u.num.digit13 = msg->mobileidentity.imei.digit13; - imei.u.num.digit14 = msg->mobileidentity.imei.digit14; - imei.u.num.digit15 = msg->mobileidentity.imei.digit15; - imei.u.num.parity = msg->mobileidentity.imei.oddeven; - } else if (msg->mobileidentity.tmsi.typeofidentity == MOBILE_IDENTITY_TMSI) { - /* Get the TMSI */ - p_tmsi = &tmsi; - tmsi.digit1 = msg->mobileidentity.tmsi.digit2; - tmsi.digit2 = msg->mobileidentity.tmsi.digit3; - tmsi.digit3 = msg->mobileidentity.tmsi.digit4; - tmsi.digit4 = msg->mobileidentity.tmsi.digit5; - tmsi.digit5 = msg->mobileidentity.tmsi.digit6; - tmsi.digit6 = msg->mobileidentity.tmsi.digit7; - tmsi.digit7 = msg->mobileidentity.tmsi.digit8; - tmsi.digit8 = msg->mobileidentity.tmsi.digit9; - } - - /* Execute the identification completion procedure */ - rc = emm_proc_identification_complete(ueid, p_imsi, p_imei, - (uint32_t *)(p_tmsi)); - LOG_FUNC_RETURN (rc); -} - -/**************************************************************************** - ** ** - ** Name: emm_recv_authentication_response() ** - ** ** - ** Description: Processes Authentication Response message ** - ** ** - ** Inputs: ueid: UE lower layer identifier ** - ** msg: The received EMM message ** - ** Others: None ** - ** ** - ** Outputs: emm_cause: EMM cause code ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int emm_recv_authentication_response(unsigned int ueid, - authentication_response_msg *msg, - int *emm_cause) -{ - LOG_FUNC_IN; - - int rc = RETURNok; - - LOG_TRACE(INFO, "EMMAS-SAP - Received Authentication Response message"); - - /* - * Message checking - */ - if (msg->authenticationresponseparameter.res.length == 0) { - /* RES parameter shall not be null */ - *emm_cause = EMM_CAUSE_INVALID_MANDATORY_INFO; - } - - /* Handle message checking error */ - if (*emm_cause != EMM_CAUSE_SUCCESS) { - LOG_FUNC_RETURN (RETURNerror); - } - - /* - * Message processing - */ - /* Execute the authentication completion procedure */ - rc = emm_proc_authentication_complete(ueid, EMM_CAUSE_SUCCESS, - &msg->authenticationresponseparameter.res); - LOG_FUNC_RETURN (rc); -} - -/**************************************************************************** - ** ** - ** Name: emm_recv_authentication_failure() ** - ** ** - ** Description: Processes Authentication Failure message ** - ** ** - ** Inputs: ueid: UE lower layer identifier ** - ** msg: The received EMM message ** - ** Others: None ** - ** ** - ** Outputs: emm_cause: EMM cause code ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int emm_recv_authentication_failure(unsigned int ueid, - authentication_failure_msg *msg, - int *emm_cause) -{ - LOG_FUNC_IN; - - int rc = RETURNok; - - LOG_TRACE(INFO, "EMMAS-SAP - Received Authentication Failure message"); - - /* - * Message checking - */ - if (msg->emmcause == EMM_CAUSE_SUCCESS) { - *emm_cause = EMM_CAUSE_INVALID_MANDATORY_INFO; - } else if ( (msg->emmcause == EMM_CAUSE_SYNCH_FAILURE) && - !(msg->presencemask & - AUTHENTICATION_FAILURE_AUTHENTICATION_FAILURE_PARAMETER_PRESENT) ) { - /* AUTS parameter shall be present in case of "synch failure" */ - *emm_cause = EMM_CAUSE_INVALID_MANDATORY_INFO; - } - - /* Handle message checking error */ - if (*emm_cause != EMM_CAUSE_SUCCESS) { - LOG_FUNC_RETURN (RETURNerror); - } - - /* - * Message processing - */ - /* Execute the authentication completion procedure */ - rc = emm_proc_authentication_complete(ueid, msg->emmcause, - &msg->authenticationfailureparameter.auts); - LOG_FUNC_RETURN (rc); -} - -/**************************************************************************** - ** ** - ** Name: emm_recv_security_mode_complete() ** - ** ** - ** Description: Processes Security Mode Complete message ** - ** ** - ** Inputs: ueid: UE lower layer identifier ** - ** msg: The received EMM message ** - ** Others: None ** - ** ** - ** Outputs: emm_cause: EMM cause code ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int -emm_recv_security_mode_complete( - unsigned int ueid, - security_mode_complete_msg *msg, - int *emm_cause) -{ - LOG_FUNC_IN; - - int rc = RETURNok; - - LOG_TRACE(INFO, "EMMAS-SAP - Received Security Mode Complete message"); - - /* - * Message processing - */ - /* Execute the NAS security mode control completion procedure */ - rc = emm_proc_security_mode_complete(ueid); - - LOG_FUNC_RETURN (rc); -} - -/**************************************************************************** - ** ** - ** Name: emm_recv_security_mode_reject() ** - ** ** - ** Description: Processes Security Mode Reject message ** - ** ** - ** Inputs: ueid: UE lower layer identifier ** - ** msg: The received EMM message ** - ** Others: None ** - ** ** - ** Outputs: emm_cause: EMM cause code ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int emm_recv_security_mode_reject(unsigned int ueid, - security_mode_reject_msg *msg, - int *emm_cause) -{ - LOG_FUNC_IN; - - int rc = RETURNok; - - LOG_TRACE(INFO, "EMMAS-SAP - Received Security Mode Reject message " - "(cause=%d)", msg->emmcause); - - /* - * Message checking - */ - if (msg->emmcause == EMM_CAUSE_SUCCESS) { - *emm_cause = EMM_CAUSE_INVALID_MANDATORY_INFO; - } - - /* Handle message checking error */ - if (*emm_cause != EMM_CAUSE_SUCCESS) { - LOG_FUNC_RETURN (RETURNerror); - } - - /* - * Message processing - */ - /* Execute the NAS security mode commend not accepted by the UE */ - rc = emm_proc_security_mode_reject(ueid); - - LOG_FUNC_RETURN (rc); -} diff --git a/openair-cn/NAS/MME/EMM/SAP/emm_recv.h b/openair-cn/NAS/MME/EMM/SAP/emm_recv.h deleted file mode 100644 index 6b59722c54..0000000000 --- a/openair-cn/NAS/MME/EMM/SAP/emm_recv.h +++ /dev/null @@ -1,129 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** - -Source emm_recv.h - -Version 0.1 - -Date 2013/01/30 - -Product NAS stack - -Subsystem EPS Mobility Management - -Author Frederic Maurel - -Description Defines functions executed at the EMMAS Service Access - Point upon receiving EPS Mobility Management messages - from the Access Stratum sublayer. - -*****************************************************************************/ -#ifndef __EMM_RECV_H__ -#define __EMM_RECV_H__ - -#include "EmmStatus.h" - -#include "DetachRequest.h" -#include "DetachAccept.h" - - -#include "AttachRequest.h" -#include "AttachComplete.h" -#include "TrackingAreaUpdateRequest.h" -#include "TrackingAreaUpdateComplete.h" -#include "ServiceRequest.h" -#include "ExtendedServiceRequest.h" -#include "GutiReallocationComplete.h" -#include "AuthenticationResponse.h" -#include "AuthenticationFailure.h" -#include "IdentityResponse.h" -#include "NASSecurityModeComplete.h" -#include "SecurityModeReject.h" -#include "UplinkNasTransport.h" - -/****************************************************************************/ -/********************* G L O B A L C O N S T A N T S *******************/ -/****************************************************************************/ - -/****************************************************************************/ -/************************ G L O B A L T Y P E S ************************/ -/****************************************************************************/ - -/****************************************************************************/ -/******************** G L O B A L V A R I A B L E S ********************/ -/****************************************************************************/ - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -/* - * -------------------------------------------------------------------------- - * Functions executed by both the UE and the MME upon receiving EMM messages - * -------------------------------------------------------------------------- - */ -int emm_recv_status(unsigned int ueid, emm_status_msg *msg, int *emm_cause); - -/* - * -------------------------------------------------------------------------- - * Functions executed by the UE upon receiving EMM message from the network - * -------------------------------------------------------------------------- - */ - - -/* - * -------------------------------------------------------------------------- - * Functions executed by the MME upon receiving EMM message from the UE - * -------------------------------------------------------------------------- - */ -int emm_recv_attach_request(unsigned int ueid, const attach_request_msg *msg, - int *emm_cause); -int emm_recv_attach_complete(unsigned int ueid, const attach_complete_msg *msg, - int *emm_cause); - -int emm_recv_detach_request(unsigned int ueid, const detach_request_msg *msg, - int *emm_cause); - -int emm_recv_tracking_area_update_request(unsigned int ueid, - const tracking_area_update_request_msg *msg, - int *emm_cause); - -int emm_recv_identity_response(unsigned int ueid, identity_response_msg *msg, - int *emm_cause); -int emm_recv_authentication_response(unsigned int ueid, - authentication_response_msg *msg, int *emm_cause); -int emm_recv_authentication_failure(unsigned int ueid, - authentication_failure_msg *msg, int *emm_cause); -int emm_recv_security_mode_complete(unsigned int ueid, - security_mode_complete_msg *msg, int *emm_cause); -int emm_recv_security_mode_reject(unsigned int ueid, - security_mode_reject_msg *msg, int *emm_cause); - -#endif /* __EMM_RECV_H__*/ diff --git a/openair-cn/NAS/MME/EMM/SAP/emm_reg.h b/openair-cn/NAS/MME/EMM/SAP/emm_reg.h deleted file mode 100644 index 62d333395c..0000000000 --- a/openair-cn/NAS/MME/EMM/SAP/emm_reg.h +++ /dev/null @@ -1,73 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** - -Source emm_reg.h - -Version 0.1 - -Date 2012/10/16 - -Product NAS stack - -Subsystem EPS Mobility Management - -Author Frederic Maurel - -Description Defines the EMMREG Service Access Point that provides - registration services for location updating and attach/detach - procedures. - -*****************************************************************************/ -#ifndef __EMM_REG_H__ -#define __EMM_REG_H__ - -#include "emm_regDef.h" - -/****************************************************************************/ -/********************* G L O B A L C O N S T A N T S *******************/ -/****************************************************************************/ - -/****************************************************************************/ -/************************ G L O B A L T Y P E S ************************/ -/****************************************************************************/ - -/****************************************************************************/ -/******************** G L O B A L V A R I A B L E S ********************/ -/****************************************************************************/ - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -void emm_reg_initialize(void); - -int emm_reg_send(const emm_reg_t *msg); - -#endif /* __EMM_REG_H__*/ diff --git a/openair-cn/NAS/MME/EMM/SAP/emm_regDef.h b/openair-cn/NAS/MME/EMM/SAP/emm_regDef.h deleted file mode 100644 index 801e107fe1..0000000000 --- a/openair-cn/NAS/MME/EMM/SAP/emm_regDef.h +++ /dev/null @@ -1,138 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** - -Source emm_regDef.h - -Version 0.1 - -Date 2012/10/16 - -Product NAS stack - -Subsystem EPS Mobility Management - -Author Frederic Maurel - -Description Defines the EMMREG Service Access Point that provides - registration services for location updating and attach/detach - procedures. - -*****************************************************************************/ -#ifndef __EMM_REGDEF_H__ -#define __EMM_REGDEF_H__ - -#include "commonDef.h" - -/****************************************************************************/ -/********************* G L O B A L C O N S T A N T S *******************/ -/****************************************************************************/ - -/* - * EMMREG-SAP primitives - */ -typedef enum { - _EMMREG_START = 0, - _EMMREG_COMMON_PROC_REQ, /* EMM common procedure requested */ - _EMMREG_COMMON_PROC_CNF, /* EMM common procedure successful */ - _EMMREG_COMMON_PROC_REJ, /* EMM common procedure failed */ - _EMMREG_PROC_ABORT, /* EMM procedure aborted */ - _EMMREG_ATTACH_CNF, /* EPS network attach accepted */ - _EMMREG_ATTACH_REJ, /* EPS network attach rejected */ - _EMMREG_DETACH_INIT, /* Network detach initiated */ - _EMMREG_DETACH_REQ, /* Network detach requested */ - _EMMREG_DETACH_FAILED, /* Network detach attempt failed */ - _EMMREG_DETACH_CNF, /* Network detach accepted */ - _EMMREG_TAU_REQ, - _EMMREG_TAU_CNF, - _EMMREG_TAU_REJ, - _EMMREG_SERVICE_REQ, - _EMMREG_SERVICE_CNF, - _EMMREG_SERVICE_REJ, - _EMMREG_LOWERLAYER_SUCCESS, /* Data successfully delivered */ - _EMMREG_LOWERLAYER_FAILURE, /* Lower layer failure indication */ - _EMMREG_LOWERLAYER_RELEASE, /* NAS signalling connection released */ - _EMMREG_END -} emm_reg_primitive_t; - -/****************************************************************************/ -/************************ G L O B A L T Y P E S ************************/ -/****************************************************************************/ - - -/* - * EMMREG primitive for attach procedure - * ------------------------------------- - */ -typedef struct { - int is_emergency; /* TRUE if the UE was attempting to register to - * the network for emergency services only */ -} emm_reg_attach_t; - -/* - * EMMREG primitive for detach procedure - * ------------------------------------- - */ -typedef struct { - int switch_off; /* TRUE if the UE is switched off */ - int type; /* Network detach type */ -} emm_reg_detach_t; - -/* - * EMMREG primitive for EMM common procedures - * ------------------------------------------ - */ -typedef struct { - int is_attached; /* UE context attach indicator */ -} emm_reg_common_t; - -/* - * Structure of EMMREG-SAP primitive - */ -typedef struct { - emm_reg_primitive_t primitive; - unsigned int ueid; - void *ctx; - - union { - emm_reg_attach_t attach; - emm_reg_detach_t detach; - emm_reg_common_t common; - } u; -} emm_reg_t; - -/****************************************************************************/ -/******************** G L O B A L V A R I A B L E S ********************/ -/****************************************************************************/ - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -#endif /* __EMM_REGDEF_H__*/ diff --git a/openair-cn/NAS/MME/EMM/SAP/emm_sap.c b/openair-cn/NAS/MME/EMM/SAP/emm_sap.c deleted file mode 100644 index b1aa086864..0000000000 --- a/openair-cn/NAS/MME/EMM/SAP/emm_sap.c +++ /dev/null @@ -1,154 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** -Source emm_sap.c - -Version 0.1 - -Date 2012/10/01 - -Product NAS stack - -Subsystem EPS Mobility Management - -Author Frederic Maurel - -Description Defines the EMM Service Access Points at which the EPS - Mobility Management sublayer provides procedures for the - control of security and mobility when the User Equipment - is using the Evolved UTRA Network. - -*****************************************************************************/ - -#include "emm_sap.h" -#include "commonDef.h" -#include "nas_log.h" - -#include "emm_reg.h" -#include "emm_esm.h" -#include "emm_as.h" -#include "emm_cn.h" - -/****************************************************************************/ -/**************** E X T E R N A L D E F I N I T I O N S ****************/ -/****************************************************************************/ - -/****************************************************************************/ -/******************* L O C A L D E F I N I T I O N S *******************/ -/****************************************************************************/ - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -/**************************************************************************** - ** ** - ** Name: emm_sap_initialize() ** - ** ** - ** Description: Initializes the EMM Service Access Points ** - ** ** - ** Inputs: None ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: None ** - ** Others: NONE ** - ** ** - ***************************************************************************/ -void emm_sap_initialize(void) -{ - LOG_FUNC_IN; - - emm_reg_initialize(); - emm_esm_initialize(); - emm_as_initialize(); - - LOG_FUNC_OUT; -} - -/**************************************************************************** - ** ** - ** Name: emm_sap_send() ** - ** ** - ** Description: Processes the EMM Service Access Point primitive ** - ** ** - ** Inputs: msg: The EMM-SAP primitive to process ** - ** Others: None ** - ** ** - ** Outputs: msg: The EMM-SAP primitive to process ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int emm_sap_send(emm_sap_t *msg) -{ - int rc = RETURNerror; - - emm_primitive_t primitive = msg->primitive; - - LOG_FUNC_IN; - - /* Check the EMM-SAP primitive */ - if ( (primitive > (emm_primitive_t)EMMREG_PRIMITIVE_MIN) && - (primitive < (emm_primitive_t)EMMREG_PRIMITIVE_MAX) ) { - /* Forward to the EMMREG-SAP */ - msg->u.emm_reg.primitive = primitive; - rc = emm_reg_send(&msg->u.emm_reg); - } else if ( (primitive > (emm_primitive_t)EMMESM_PRIMITIVE_MIN) && - (primitive < (emm_primitive_t)EMMESM_PRIMITIVE_MAX) ) { - /* Forward to the EMMESM-SAP */ - msg->u.emm_esm.primitive = primitive; - rc = emm_esm_send(&msg->u.emm_esm); - } else if ( (primitive > (emm_primitive_t)EMMAS_PRIMITIVE_MIN) && - (primitive < (emm_primitive_t)EMMAS_PRIMITIVE_MAX) ) { - /* Forward to the EMMAS-SAP */ - msg->u.emm_as.primitive = primitive; - rc = emm_as_send(&msg->u.emm_as); - } - -#if defined(NAS_BUILT_IN_EPC) - else if ( (primitive > (emm_primitive_t)EMMCN_PRIMITIVE_MIN) && - (primitive < (emm_primitive_t)EMMCN_PRIMITIVE_MAX) ) { - /* Forward to the EMMCN-SAP */ - msg->u.emm_cn.primitive = primitive; - rc = emm_cn_send(&msg->u.emm_cn); - } - -#endif - else { - LOG_TRACE(WARNING, "EMM-SAP - Out of range primitive (%d)", primitive); - } - - LOG_FUNC_RETURN (rc); -} - -/****************************************************************************/ -/********************* L O C A L F U N C T I O N S *********************/ -/****************************************************************************/ - diff --git a/openair-cn/NAS/MME/EMM/SAP/emm_sap.h b/openair-cn/NAS/MME/EMM/SAP/emm_sap.h deleted file mode 100644 index 7cee702e60..0000000000 --- a/openair-cn/NAS/MME/EMM/SAP/emm_sap.h +++ /dev/null @@ -1,171 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** - -Source emm_sap.h - -Version 0.1 - -Date 2012/10/01 - -Product NAS stack - -Subsystem EPS Mobility Management - -Author Frederic Maurel - -Description Defines the EMM Service Access Points at which the EPS - Mobility Management sublayer provides procedures for the - control of security and mobility when the User Equipment - is using the Evolved UTRA Network. - -*****************************************************************************/ -#ifndef __EMM_SAP_H__ -#define __EMM_SAP_H__ - -#include "emmData.h" -#include "emm_regDef.h" -#include "emm_esmDef.h" -#include "emm_asDef.h" -#include "emm_cnDef.h" - -/****************************************************************************/ -/********************* G L O B A L C O N S T A N T S *******************/ -/****************************************************************************/ - -/* - * EPS Mobility Management primitives - * ---------------------------------- - * EMMREG-SAP provides registration services for location updating and - * attach/detach procedures; - * EMMESM-SAP provides interlayer services to the EPS Session Management - * sublayer for service registration and activate/deactivate PDP context; - * EMMAS-SAP provides services to the Access Stratum sublayer for NAS message - * transfer; - */ -typedef enum { - /* EMMREG-SAP */ - EMMREG_COMMON_PROC_REQ = _EMMREG_COMMON_PROC_REQ, - EMMREG_COMMON_PROC_CNF = _EMMREG_COMMON_PROC_CNF, - EMMREG_COMMON_PROC_REJ = _EMMREG_COMMON_PROC_REJ, - EMMREG_PROC_ABORT = _EMMREG_PROC_ABORT, - EMMREG_ATTACH_CNF = _EMMREG_ATTACH_CNF, - EMMREG_ATTACH_REJ = _EMMREG_ATTACH_REJ, - EMMREG_DETACH_INIT = _EMMREG_DETACH_INIT, - EMMREG_DETACH_REQ = _EMMREG_DETACH_REQ, - EMMREG_DETACH_FAILED = _EMMREG_DETACH_FAILED, - EMMREG_DETACH_CNF = _EMMREG_DETACH_CNF, - EMMREG_TAU_REQ = _EMMREG_TAU_REQ, - EMMREG_TAU_CNF = _EMMREG_TAU_CNF, - EMMREG_TAU_REJ = _EMMREG_TAU_REJ, - EMMREG_SERVICE_REQ = _EMMREG_SERVICE_REQ, - EMMREG_SERVICE_CNF = _EMMREG_SERVICE_CNF, - EMMREG_SERVICE_REJ = _EMMREG_SERVICE_REJ, - EMMREG_LOWERLAYER_SUCCESS = _EMMREG_LOWERLAYER_SUCCESS, - EMMREG_LOWERLAYER_FAILURE = _EMMREG_LOWERLAYER_FAILURE, - EMMREG_LOWERLAYER_RELEASE = _EMMREG_LOWERLAYER_RELEASE, - /* EMMESM-SAP */ - EMMESM_RELEASE_IND = _EMMESM_RELEASE_IND, - EMMESM_UNITDATA_REQ = _EMMESM_UNITDATA_REQ, - EMMESM_UNITDATA_IND = _EMMESM_UNITDATA_IND, - /* EMMAS-SAP */ - EMMAS_SECURITY_REQ = _EMMAS_SECURITY_REQ, - EMMAS_SECURITY_IND = _EMMAS_SECURITY_IND, - EMMAS_SECURITY_RES = _EMMAS_SECURITY_RES, - EMMAS_SECURITY_REJ = _EMMAS_SECURITY_REJ, - EMMAS_ESTABLISH_REQ = _EMMAS_ESTABLISH_REQ, - EMMAS_ESTABLISH_CNF = _EMMAS_ESTABLISH_CNF, - EMMAS_ESTABLISH_REJ = _EMMAS_ESTABLISH_REJ, - EMMAS_RELEASE_REQ = _EMMAS_RELEASE_REQ, - EMMAS_RELEASE_IND = _EMMAS_RELEASE_IND, - EMMAS_DATA_REQ = _EMMAS_DATA_REQ, - EMMAS_DATA_IND = _EMMAS_DATA_IND, - EMMAS_PAGE_IND = _EMMAS_PAGE_IND, - EMMAS_STATUS_IND = _EMMAS_STATUS_IND, - EMMAS_CELL_INFO_REQ = _EMMAS_CELL_INFO_REQ, - EMMAS_CELL_INFO_RES = _EMMAS_CELL_INFO_RES, - EMMAS_CELL_INFO_IND = _EMMAS_CELL_INFO_IND, - -#ifdef NAS_BUILT_IN_EPC - EMMCN_AUTHENTICATION_PARAM_RES = _EMMCN_AUTHENTICATION_PARAM_RES, - EMMCN_AUTHENTICATION_PARAM_FAIL = _EMMCN_AUTHENTICATION_PARAM_FAIL, - EMMCN_DEREGISTER_UE = _EMMCN_DEREGISTER_UE, - EMMCN_PDN_CONNECTIVITY_RES = _EMMCN_PDN_CONNECTIVITY_RES, - EMMCN_PDN_CONNECTIVITY_FAIL = _EMMCN_PDN_CONNECTIVITY_FAIL -#endif -} emm_primitive_t; - -/* - * Minimal identifier for EMM-SAP primitives - */ -#define EMMREG_PRIMITIVE_MIN _EMMREG_START -#define EMMESM_PRIMITIVE_MIN _EMMESM_START -#define EMMAS_PRIMITIVE_MIN _EMMAS_START -#define EMMCN_PRIMITIVE_MIN _EMMCN_START - -/* - * Maximal identifier for EMM-SAP primitives - */ -#define EMMREG_PRIMITIVE_MAX _EMMREG_END -#define EMMESM_PRIMITIVE_MAX _EMMESM_END -#define EMMAS_PRIMITIVE_MAX _EMMAS_END -#define EMMCN_PRIMITIVE_MAX _EMMCN_END - -/****************************************************************************/ -/************************ G L O B A L T Y P E S ************************/ -/****************************************************************************/ - -/* - * Structure of EPS Mobility Management primitive - */ -typedef struct emm_sap_s { - emm_primitive_t primitive; - union { - emm_reg_t emm_reg; /* EMMREG-SAP primitives */ - emm_esm_t emm_esm; /* EMMESM-SAP primitives */ - emm_as_t emm_as; /* EMMAS-SAP primitives */ -#if defined(NAS_BUILT_IN_EPC) - emm_cn_t emm_cn; /* EMMCN-SAP primitives */ -#endif - } u; -} emm_sap_t; - -/****************************************************************************/ -/******************** G L O B A L V A R I A B L E S ********************/ -/****************************************************************************/ - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -void emm_sap_initialize(void); - -int emm_sap_send(emm_sap_t *msg); - -#endif /* __EMM_SAP_H__*/ diff --git a/openair-cn/NAS/MME/EMM/SAP/emm_send.c b/openair-cn/NAS/MME/EMM/SAP/emm_send.c deleted file mode 100644 index 3dac6eb7e0..0000000000 --- a/openair-cn/NAS/MME/EMM/SAP/emm_send.c +++ /dev/null @@ -1,509 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** - -Source emm_send.c - -Version 0.1 - -Date 2013/01/30 - -Product NAS stack - -Subsystem EPS Mobility Management - -Author Frederic Maurel - -Description Defines functions executed at the EMMAS Service Access - Point to send EPS Mobility Management messages to the - Access Stratum sublayer. - -*****************************************************************************/ - -#include "emm_send.h" -#include "commonDef.h" -#include "nas_log.h" - -#include "emm_msgDef.h" -#include "emm_proc.h" - -#include // strlen - -/****************************************************************************/ -/**************** E X T E R N A L D E F I N I T I O N S ****************/ -/****************************************************************************/ - -/****************************************************************************/ -/******************* L O C A L D E F I N I T I O N S *******************/ -/****************************************************************************/ - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -/* - * -------------------------------------------------------------------------- - * Functions executed by both the UE and the MME to send EMM messages - * -------------------------------------------------------------------------- - */ -/**************************************************************************** - ** ** - ** Name: emm_send_status() ** - ** ** - ** Description: Builds EMM status message ** - ** ** - ** The EMM status message is sent by the UE or the network ** - ** at any time to report certain error conditions. ** - ** ** - ** Inputs: emm_cause: EMM cause code ** - ** Others: None ** - ** ** - ** Outputs: emm_msg: The EMM message to be sent ** - ** Return: The size of the EMM message ** - ** Others: None ** - ** ** - ***************************************************************************/ -int emm_send_status(const emm_as_status_t *msg, emm_status_msg *emm_msg) -{ - LOG_FUNC_IN; - - int size = EMM_HEADER_MAXIMUM_LENGTH; - - LOG_TRACE(WARNING, "EMMAS-SAP - Send EMM Status message (cause=%d)", - msg->emm_cause); - - /* Mandatory - Message type */ - emm_msg->messagetype = EMM_STATUS; - - /* Mandatory - EMM cause */ - size += EMM_CAUSE_MAXIMUM_LENGTH; - emm_msg->emmcause = msg->emm_cause; - - LOG_FUNC_RETURN (size); -} - -/**************************************************************************** - ** ** - ** Name: emm_send_detach_accept() ** - ** ** - ** Description: Builds Detach Accept message ** - ** ** - ** The Detach Accept message is sent by the UE or the net- ** - ** work to indicate that the detach procedure has been com- ** - ** pleted. ** - ** ** - ** Inputs: msg: The EMMAS-SAP primitive to process ** - ** Others: None ** - ** ** - ** Outputs: emm_msg: The EMM message to be sent ** - ** Return: The size of the EMM message ** - ** Others: None ** - ** ** - ***************************************************************************/ -int emm_send_detach_accept(const emm_as_data_t *msg, - detach_accept_msg *emm_msg) -{ - LOG_FUNC_IN; - - int size = EMM_HEADER_MAXIMUM_LENGTH; - - LOG_TRACE(INFO, "EMMAS-SAP - Send Detach Accept message"); - - /* Mandatory - Message type */ - emm_msg->messagetype = DETACH_ACCEPT; - - LOG_FUNC_RETURN (size); -} - - -/* - * -------------------------------------------------------------------------- - * Functions executed by the MME to send EMM messages to the UE - * -------------------------------------------------------------------------- - */ -/**************************************************************************** - ** ** - ** Name: emm_send_attach_accept() ** - ** ** - ** Description: Builds Attach Accept message ** - ** ** - ** The Attach Accept message is sent by the network to the ** - ** UE to indicate that the corresponding attach request has ** - ** been accepted. ** - ** ** - ** Inputs: msg: The EMMAS-SAP primitive to process ** - ** Others: None ** - ** ** - ** Outputs: emm_msg: The EMM message to be sent ** - ** Return: The size of the EMM message ** - ** Others: None ** - ** ** - ***************************************************************************/ -int emm_send_attach_accept(const emm_as_establish_t *msg, - attach_accept_msg *emm_msg) -{ - LOG_FUNC_IN; - - int size = EMM_HEADER_MAXIMUM_LENGTH; - - LOG_TRACE(INFO, "EMMAS-SAP - Send Attach Accept message"); - LOG_TRACE(INFO, "EMMAS-SAP - size = EMM_HEADER_MAXIMUM_LENGTH(%d)", - size); - - /* Mandatory - Message type */ - emm_msg->messagetype = ATTACH_ACCEPT; - - /* Mandatory - EPS attach result */ - size += EPS_ATTACH_RESULT_MAXIMUM_LENGTH; - emm_msg->epsattachresult = EPS_ATTACH_RESULT_EPS; - - /* Mandatory - T3412 value */ - size += GPRS_TIMER_MAXIMUM_LENGTH; - emm_msg->t3412value.unit = GPRS_TIMER_UNIT_0S; - LOG_TRACE(INFO, "EMMAS-SAP - size += GPRS_TIMER_MAXIMUM_LENGTH(%d) (%d)", - GPRS_TIMER_MAXIMUM_LENGTH, size); - - /* Mandatory - Tracking area identity list */ - size += TRACKING_AREA_IDENTITY_LIST_MINIMUM_LENGTH; - emm_msg->tailist.typeoflist = - TRACKING_AREA_IDENTITY_LIST_ONE_PLMN_CONSECUTIVE_TACS; - emm_msg->tailist.numberofelements = msg->n_tacs; - emm_msg->tailist.mccdigit1 = msg->UEid.guti->gummei.plmn.MCCdigit1; - emm_msg->tailist.mccdigit2 = msg->UEid.guti->gummei.plmn.MCCdigit2; - emm_msg->tailist.mccdigit3 = msg->UEid.guti->gummei.plmn.MCCdigit3; - emm_msg->tailist.mncdigit1 = msg->UEid.guti->gummei.plmn.MNCdigit1; - emm_msg->tailist.mncdigit2 = msg->UEid.guti->gummei.plmn.MNCdigit2; - emm_msg->tailist.mncdigit3 = msg->UEid.guti->gummei.plmn.MNCdigit3; - emm_msg->tailist.tac = msg->tac; - LOG_TRACE(INFO, - "EMMAS-SAP - size += "\ - "TRACKING_AREA_IDENTITY_LIST_MINIMUM_LENGTH(%d) (%d)", - TRACKING_AREA_IDENTITY_LIST_MINIMUM_LENGTH, - size); - - /* Mandatory - ESM message container */ - size += ESM_MESSAGE_CONTAINER_MINIMUM_LENGTH + msg->NASmsg.length; - emm_msg->esmmessagecontainer.esmmessagecontainercontents = msg->NASmsg; - LOG_TRACE(INFO, - "EMMAS-SAP - size += "\ - "ESM_MESSAGE_CONTAINER_MINIMUM_LENGTH(%d) (%d)", - ESM_MESSAGE_CONTAINER_MINIMUM_LENGTH, - size); - - /* Optional - GUTI */ - if (msg->new_guti) { - size += EPS_MOBILE_IDENTITY_MAXIMUM_LENGTH; - emm_msg->presencemask |= ATTACH_ACCEPT_GUTI_PRESENT; - emm_msg->guti.guti.typeofidentity = EPS_MOBILE_IDENTITY_GUTI; - emm_msg->guti.guti.oddeven = EPS_MOBILE_IDENTITY_EVEN; - emm_msg->guti.guti.mmegroupid = msg->new_guti->gummei.MMEgid; - emm_msg->guti.guti.mmecode = msg->new_guti->gummei.MMEcode; - emm_msg->guti.guti.mtmsi = msg->new_guti->m_tmsi; - emm_msg->guti.guti.mccdigit1 = msg->new_guti->gummei.plmn.MCCdigit1; - emm_msg->guti.guti.mccdigit2 = msg->new_guti->gummei.plmn.MCCdigit2; - emm_msg->guti.guti.mccdigit3 = msg->new_guti->gummei.plmn.MCCdigit3; - emm_msg->guti.guti.mncdigit1 = msg->new_guti->gummei.plmn.MNCdigit1; - emm_msg->guti.guti.mncdigit2 = msg->new_guti->gummei.plmn.MNCdigit2; - emm_msg->guti.guti.mncdigit3 = msg->new_guti->gummei.plmn.MNCdigit3; - LOG_TRACE(INFO, - "EMMAS-SAP - size += "\ - "EPS_MOBILE_IDENTITY_MAXIMUM_LENGTH(%d) (%d)", - EPS_MOBILE_IDENTITY_MAXIMUM_LENGTH, - size); - } - - LOG_FUNC_RETURN (size); -} - -/**************************************************************************** - ** ** - ** Name: emm_send_attach_reject() ** - ** ** - ** Description: Builds Attach Reject message ** - ** ** - ** The Attach Reject message is sent by the network to the ** - ** UE to indicate that the corresponding attach request has ** - ** been rejected. ** - ** ** - ** Inputs: msg: The EMMAS-SAP primitive to process ** - ** Others: None ** - ** ** - ** Outputs: emm_msg: The EMM message to be sent ** - ** Return: The size of the EMM message ** - ** Others: None ** - ** ** - ***************************************************************************/ -int emm_send_attach_reject(const emm_as_establish_t *msg, - attach_reject_msg *emm_msg) -{ - LOG_FUNC_IN; - - int size = EMM_HEADER_MAXIMUM_LENGTH; - - LOG_TRACE(INFO, "EMMAS-SAP - Send Attach Reject message (cause=%d)", - msg->emm_cause); - - /* Mandatory - Message type */ - emm_msg->messagetype = ATTACH_REJECT; - - /* Mandatory - EMM cause */ - size += EMM_CAUSE_MAXIMUM_LENGTH; - emm_msg->emmcause = msg->emm_cause; - - /* Optional - ESM message container */ - if (msg->NASmsg.length > 0) { - size += ESM_MESSAGE_CONTAINER_MINIMUM_LENGTH + msg->NASmsg.length; - emm_msg->presencemask |= ATTACH_REJECT_ESM_MESSAGE_CONTAINER_PRESENT; - emm_msg->esmmessagecontainer.esmmessagecontainercontents = msg->NASmsg; - } - - LOG_FUNC_RETURN (size); -} - -/**************************************************************************** - ** ** - ** Name: emm_send_tracking_area_update_reject() ** - ** ** - ** Description: Builds Tracking Area Update Reject message ** - ** ** - ** The Tracking Area Update Reject message is sent by the ** - ** network to the UE to indicate that the corresponding ** - ** tracking area update has been rejected. ** - ** ** - ** Inputs: msg: The EMMAS-SAP primitive to process ** - ** Others: None ** - ** ** - ** Outputs: emm_msg: The EMM message to be sent ** - ** Return: The size of the EMM message ** - ** Others: None ** - ** ** - ***************************************************************************/ -int emm_send_tracking_area_update_reject(const emm_as_establish_t *msg, - tracking_area_update_reject_msg *emm_msg) -{ - LOG_FUNC_IN; - - int size = EMM_HEADER_MAXIMUM_LENGTH; - - LOG_TRACE(INFO, "EMMAS-SAP - Send Tracking Area Update Reject message (cause=%d)", - msg->emm_cause); - - /* Mandatory - Message type */ - emm_msg->messagetype = TRACKING_AREA_UPDATE_REJECT; - - /* Mandatory - EMM cause */ - size += EMM_CAUSE_MAXIMUM_LENGTH; - emm_msg->emmcause = msg->emm_cause; - - LOG_FUNC_RETURN (size); -} - -/**************************************************************************** - ** ** - ** Name: emm_send_identity_request() ** - ** ** - ** Description: Builds Identity Request message ** - ** ** - ** The Identity Request message is sent by the network to ** - ** the UE to request the UE to provide the specified identi- ** - ** ty. ** - ** ** - ** Inputs: msg: The EMMAS-SAP primitive to process ** - ** Others: None ** - ** ** - ** Outputs: emm_msg: The EMM message to be sent ** - ** Return: The size of the EMM message ** - ** Others: None ** - ** ** - ***************************************************************************/ -int emm_send_identity_request(const emm_as_security_t *msg, - identity_request_msg *emm_msg) -{ - LOG_FUNC_IN; - - int size = EMM_HEADER_MAXIMUM_LENGTH; - - LOG_TRACE(INFO, "EMMAS-SAP - Send Identity Request message"); - - /* Mandatory - Message type */ - emm_msg->messagetype = IDENTITY_REQUEST; - - /* Mandatory - Identity type 2 */ - size += IDENTITY_TYPE_2_MAXIMUM_LENGTH; - - if (msg->identType == EMM_IDENT_TYPE_IMSI) { - emm_msg->identitytype = IDENTITY_TYPE_2_IMSI; - } else if (msg->identType == EMM_IDENT_TYPE_TMSI) { - emm_msg->identitytype = IDENTITY_TYPE_2_TMSI; - } else if (msg->identType == EMM_IDENT_TYPE_IMEI) { - emm_msg->identitytype = IDENTITY_TYPE_2_IMEI; - } else { - /* All other values are interpreted as "IMSI" */ - emm_msg->identitytype = IDENTITY_TYPE_2_IMSI; - } - - LOG_FUNC_RETURN (size); -} - -/**************************************************************************** - ** ** - ** Name: emm_send_authentication_request() ** - ** ** - ** Description: Builds Authentication Request message ** - ** ** - ** The Authentication Request message is sent by the network ** - ** to the UE to initiate authentication of the UE identity. ** - ** ** - ** Inputs: msg: The EMMAS-SAP primitive to process ** - ** Others: None ** - ** ** - ** Outputs: emm_msg: The EMM message to be sent ** - ** Return: The size of the EMM message ** - ** Others: None ** - ** ** - ***************************************************************************/ -int emm_send_authentication_request(const emm_as_security_t *msg, - authentication_request_msg *emm_msg) -{ - LOG_FUNC_IN; - - int size = EMM_HEADER_MAXIMUM_LENGTH; - - LOG_TRACE(INFO, "EMMAS-SAP - Send Authentication Request message"); - - /* Mandatory - Message type */ - emm_msg->messagetype = AUTHENTICATION_REQUEST; - - /* Mandatory - NAS key set identifier */ - size += NAS_KEY_SET_IDENTIFIER_MAXIMUM_LENGTH; - emm_msg->naskeysetidentifierasme.tsc = NAS_KEY_SET_IDENTIFIER_NATIVE; - emm_msg->naskeysetidentifierasme.naskeysetidentifier = msg->ksi; - - /* Mandatory - Authentication parameter RAND */ - size += AUTHENTICATION_PARAMETER_RAND_MAXIMUM_LENGTH; - emm_msg->authenticationparameterrand.rand = *msg->rand; - - /* Mandatory - Authentication parameter AUTN */ - size += AUTHENTICATION_PARAMETER_AUTN_MAXIMUM_LENGTH; - emm_msg->authenticationparameterautn.autn = *msg->autn; - - LOG_FUNC_RETURN (size); -} - -/**************************************************************************** - ** ** - ** Name: emm_send_authentication_reject() ** - ** ** - ** Description: Builds Authentication Reject message ** - ** ** - ** The Authentication Reject message is sent by the network ** - ** to the UE to indicate that the authentication procedure ** - ** has failed and that the UE shall abort all activities. ** - ** ** - ** Inputs: None ** - ** Others: None ** - ** ** - ** Outputs: emm_msg: The EMM message to be sent ** - ** Return: The size of the EMM message ** - ** Others: None ** - ** ** - ***************************************************************************/ -int emm_send_authentication_reject(authentication_reject_msg *emm_msg) -{ - LOG_FUNC_IN; - - int size = EMM_HEADER_MAXIMUM_LENGTH; - - LOG_TRACE(INFO, "EMMAS-SAP - Send Authentication Reject message"); - - /* Mandatory - Message type */ - emm_msg->messagetype = AUTHENTICATION_REJECT; - - LOG_FUNC_RETURN (size); -} - -/**************************************************************************** - ** ** - ** Name: emm_send_security_mode_command() ** - ** ** - ** Description: Builds Security Mode Command message ** - ** ** - ** The Security Mode Command message is sent by the network ** - ** to the UE to establish NAS signalling security. ** - ** ** - ** Inputs: msg: The EMMAS-SAP primitive to process ** - ** Others: None ** - ** ** - ** Outputs: emm_msg: The EMM message to be sent ** - ** Return: The size of the EMM message ** - ** Others: None ** - ** ** - ***************************************************************************/ -int emm_send_security_mode_command(const emm_as_security_t *msg, - security_mode_command_msg *emm_msg) -{ - LOG_FUNC_IN; - - int size = EMM_HEADER_MAXIMUM_LENGTH; - - LOG_TRACE(INFO, "EMMAS-SAP - Send Security Mode Command message"); - - /* Mandatory - Message type */ - emm_msg->messagetype = SECURITY_MODE_COMMAND; - - /* Selected NAS security algorithms */ - size += NAS_SECURITY_ALGORITHMS_MAXIMUM_LENGTH; - emm_msg->selectednassecurityalgorithms.typeofcipheringalgorithm = - msg->selected_eea; - emm_msg->selectednassecurityalgorithms.typeofintegrityalgorithm = - msg->selected_eia; - - /* NAS key set identifier */ - size += NAS_KEY_SET_IDENTIFIER_MAXIMUM_LENGTH; - emm_msg->naskeysetidentifier.tsc = NAS_KEY_SET_IDENTIFIER_NATIVE; - emm_msg->naskeysetidentifier.naskeysetidentifier = msg->ksi; - - /* Replayed UE security capabilities */ - size += UE_SECURITY_CAPABILITY_MAXIMUM_LENGTH; - emm_msg->replayeduesecuritycapabilities.eea = msg->eea; - emm_msg->replayeduesecuritycapabilities.eia = msg->eia; - emm_msg->replayeduesecuritycapabilities.umts_present = msg->umts_present; - emm_msg->replayeduesecuritycapabilities.gprs_present = msg->gprs_present; - - emm_msg->replayeduesecuritycapabilities.uea = msg->uea; - emm_msg->replayeduesecuritycapabilities.uia = msg->uia; - emm_msg->replayeduesecuritycapabilities.gea = msg->gea; - - LOG_FUNC_RETURN (size); -} - - -/****************************************************************************/ -/********************* L O C A L F U N C T I O N S *********************/ -/****************************************************************************/ diff --git a/openair-cn/NAS/MME/EMM/SAP/emm_send.h b/openair-cn/NAS/MME/EMM/SAP/emm_send.h deleted file mode 100644 index 16c9c5f9d5..0000000000 --- a/openair-cn/NAS/MME/EMM/SAP/emm_send.h +++ /dev/null @@ -1,122 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** - -Source emm_send.h - -Version 0.1 - -Date 2013/01/30 - -Product NAS stack - -Subsystem EPS Mobility Management - -Author Frederic Maurel - -Description Defines functions executed at the EMMAS Service Access - Point to send EPS Mobility Management messages to the - Access Stratum sublayer. - -*****************************************************************************/ -#ifndef __EMM_SEND_H__ -#define __EMM_SEND_H__ - -#include "EmmStatus.h" - -#include "DetachRequest.h" -#include "DetachAccept.h" - -#include "AttachAccept.h" -#include "AttachReject.h" -#include "TrackingAreaUpdateAccept.h" -#include "TrackingAreaUpdateReject.h" -#include "ServiceReject.h" -#include "GutiReallocationCommand.h" -#include "AuthenticationRequest.h" -#include "AuthenticationReject.h" -#include "IdentityRequest.h" -#include "NASSecurityModeCommand.h" -#include "EmmInformation.h" -#include "DownlinkNasTransport.h" -#include "CsServiceNotification.h" - -#include "emm_asDef.h" - -/****************************************************************************/ -/********************* G L O B A L C O N S T A N T S *******************/ -/****************************************************************************/ - -/****************************************************************************/ -/************************ G L O B A L T Y P E S ************************/ -/****************************************************************************/ - -/****************************************************************************/ -/******************** G L O B A L V A R I A B L E S ********************/ -/****************************************************************************/ - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -/* - * -------------------------------------------------------------------------- - * Functions executed by both the UE and the MME to send EMM messages - * -------------------------------------------------------------------------- - */ -int emm_send_status(const emm_as_status_t *, emm_status_msg *); - -int emm_send_detach_accept(const emm_as_data_t *, detach_accept_msg *); - -/* - * -------------------------------------------------------------------------- - * Functions executed by the UE to send EMM messages to the network - * -------------------------------------------------------------------------- - */ - - -/* - * -------------------------------------------------------------------------- - * Functions executed by the MME to send EMM messages to the UE - * -------------------------------------------------------------------------- - */ -int emm_send_attach_accept(const emm_as_establish_t *, attach_accept_msg *); -int emm_send_attach_reject(const emm_as_establish_t *, attach_reject_msg *); - -int emm_send_tracking_area_update_reject(const emm_as_establish_t *msg, - tracking_area_update_reject_msg *emm_msg); - -int emm_send_identity_request(const emm_as_security_t *, identity_request_msg *); -int emm_send_authentication_request(const emm_as_security_t *, - authentication_request_msg *); -int emm_send_authentication_reject(authentication_reject_msg *); -int emm_send_security_mode_command(const emm_as_security_t *, - security_mode_command_msg *); - -#endif /* __EMM_SEND_H__*/ diff --git a/openair-cn/NAS/MME/EMM/SecurityModeControl.c b/openair-cn/NAS/MME/EMM/SecurityModeControl.c deleted file mode 100644 index bd04316ee2..0000000000 --- a/openair-cn/NAS/MME/EMM/SecurityModeControl.c +++ /dev/null @@ -1,804 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** -Source SecurityModeControl.c - -Version 0.1 - -Date 2013/04/22 - -Product NAS stack - -Subsystem Template body file - -Author Frederic Maurel - -Description Defines the security mode control EMM procedure executed by the - Non-Access Stratum. - - The purpose of the NAS security mode control procedure is to - take an EPS security context into use, and initialise and start - NAS signalling security between the UE and the MME with the - corresponding EPS NAS keys and EPS security algorithms. - - Furthermore, the network may also initiate a SECURITY MODE COM- - MAND in order to change the NAS security algorithms for a cur- - rent EPS security context already in use. - -*****************************************************************************/ - -#include // malloc, free -#include // memcpy -#include - -#include "emm_proc.h" -#include "nas_log.h" -#include "nas_timer.h" - -#include "emmData.h" - -#include "emm_sap.h" -#include "emm_cause.h" - -#include "UeSecurityCapability.h" - -#if defined(ENABLE_ITTI) -# include "assertions.h" -#endif -#include "secu_defs.h" -#include "msc.h" - -/****************************************************************************/ -/**************** E X T E R N A L D E F I N I T I O N S ****************/ -/****************************************************************************/ - -/****************************************************************************/ -/******************* L O C A L D E F I N I T I O N S *******************/ -/****************************************************************************/ - -/* - * -------------------------------------------------------------------------- - * Internal data handled by the security mode control procedure in the UE - * -------------------------------------------------------------------------- - */ - -/* - * -------------------------------------------------------------------------- - * Internal data handled by the security mode control procedure in the MME - * -------------------------------------------------------------------------- - */ -/* - * Timer handlers - */ -static void *_security_t3460_handler(void *); - -/* - * Function executed whenever the ongoing EMM procedure that initiated - * the security mode control procedure is aborted or the maximum value of the - * retransmission timer counter is exceed - */ -static int _security_abort(void *); -static int _security_select_algorithms( - const int ue_eiaP, - const int ue_eeaP, - int * const mme_eiaP, - int * const mme_eeaP); -/* - * Internal data used for security mode control procedure - */ -typedef struct { - unsigned int ueid; /* UE identifier */ -#define SECURITY_COUNTER_MAX 5 - unsigned int retransmission_count; /* Retransmission counter */ - int ksi; /* NAS key set identifier */ - int eea; /* Replayed EPS encryption algorithms */ - int eia; /* Replayed EPS integrity algorithms */ - int ucs2; /* Replayed Alphabet */ - int uea; /* Replayed UMTS encryption algorithms */ - int uia; /* Replayed UMTS integrity algorithms */ - int gea; /* Replayed G encryption algorithms */ - int umts_present:1; - int gprs_present:1; - int selected_eea; /* Selected EPS encryption algorithms */ - int selected_eia; /* Selected EPS integrity algorithms */ - int notify_failure; /* Indicates whether the security mode control - * procedure failure shall be notified to the - * ongoing EMM procedure */ -} security_data_t; - -static int _security_request(security_data_t *data, int is_new); - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - - -/* - * -------------------------------------------------------------------------- - * Security mode control procedure executed by the MME - * -------------------------------------------------------------------------- - */ - - -/**************************************************************************** - ** ** - ** Name: emm_proc_security_mode_control() ** - ** ** - ** Description: Initiates the security mode control procedure. ** - ** ** - ** 3GPP TS 24.301, section 5.4.3.2 ** - ** The MME initiates the NAS security mode control procedure ** - ** by sending a SECURITY MODE COMMAND message to the UE and ** - ** starting timer T3460. The message shall be sent unciphe- ** - ** red but shall be integrity protected using the NAS inte- ** - ** grity key based on KASME. ** - ** ** - ** Inputs: ueid: UE lower layer identifier ** - ** ksi: NAS key set identifier ** - ** eea: Replayed EPS encryption algorithms ** - ** eia: Replayed EPS integrity algorithms ** - ** success: Callback function executed when the secu- ** - ** rity mode control procedure successfully ** - ** completes ** - ** reject: Callback function executed when the secu- ** - ** rity mode control procedure fails or is ** - ** rejected ** - ** failure: Callback function executed whener a lower ** - ** layer failure occured before the security ** - ** mode control procedure comnpletes ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int emm_proc_security_mode_control(unsigned int ueid, int ksi, - int eea, int eia,int ucs2, int uea, int uia, int gea, int umts_present, int gprs_present, - emm_common_success_callback_t success, - emm_common_reject_callback_t reject, - emm_common_failure_callback_t failure) -{ - int rc = RETURNerror; - int security_context_is_new = FALSE; - int mme_eea = NAS_SECURITY_ALGORITHMS_EEA0; - int mme_eia = NAS_SECURITY_ALGORITHMS_EIA0; - /* Get the UE context */ - emm_data_context_t *emm_ctx = NULL; - - LOG_FUNC_IN; - - LOG_TRACE(INFO, "EMM-PROC - Initiate security mode control procedure " - "KSI = %d EEA = %d EIA = %d", - ksi, eea, eia); - -#if defined(NAS_BUILT_IN_EPC) - - if (ueid > 0) { - emm_ctx = emm_data_context_get(&_emm_data, ueid); - } - -#else - - if (ueid < EMM_DATA_NB_UE_MAX) { - emm_ctx = _emm_data.ctx[ueid]; - } - -#endif - - if (emm_ctx && emm_ctx->security) { - if (emm_ctx->security->type == EMM_KSI_NOT_AVAILABLE) { - /* The security mode control procedure is initiated to take into use - * the EPS security context created after a successful execution of - * the EPS authentication procedure */ - emm_ctx->security->type = EMM_KSI_NATIVE; - emm_ctx->security->eksi = ksi; - emm_ctx->security->dl_count.overflow = 0; - emm_ctx->security->dl_count.seq_num = 0; - - /* TODO !!! Compute Kasme, and NAS cyphering and integrity keys */ - // LG: Kasme should have been received from authentication - // information request (S6A) - // Kasme is located in emm_ctx->vector.kasme - FREE_OCTET_STRING(emm_ctx->security->kasme); - - emm_ctx->security->kasme.value = malloc(32); - memcpy(emm_ctx->security->kasme.value, - emm_ctx->vector.kasme, - 32); - emm_ctx->security->kasme.length = 32; - - rc = _security_select_algorithms( - eia, - eea, - &mme_eia, - &mme_eea); - - emm_ctx->security->selected_algorithms.encryption = mme_eea; - emm_ctx->security->selected_algorithms.integrity = mme_eia; - - if (rc == RETURNerror) { - LOG_TRACE(WARNING, - "EMM-PROC - Failed to select security algorithms"); - LOG_FUNC_RETURN (RETURNerror); - } - - if ( ! emm_ctx->security->knas_int.value) { - emm_ctx->security->knas_int.value = malloc(AUTH_KNAS_INT_SIZE); - } else { - LOG_TRACE(ERROR, - " TODO realloc emm_ctx->security->knas_int OctetString"); - LOG_FUNC_RETURN (RETURNerror); - } - - emm_ctx->security->knas_int.length = AUTH_KNAS_INT_SIZE; - derive_key_nas( - NAS_INT_ALG, - emm_ctx->security->selected_algorithms.integrity, - emm_ctx->vector.kasme, - emm_ctx->security->knas_int.value); - - if ( ! emm_ctx->security->knas_enc.value) { - emm_ctx->security->knas_enc.value = malloc(AUTH_KNAS_ENC_SIZE); - } else { - LOG_TRACE(ERROR, - " TODO realloc emm_ctx->security->knas_enc OctetString"); - LOG_FUNC_RETURN (RETURNerror); - } - - emm_ctx->security->knas_enc.length = AUTH_KNAS_ENC_SIZE; - derive_key_nas( - NAS_ENC_ALG, - emm_ctx->security->selected_algorithms.encryption, - emm_ctx->vector.kasme, - emm_ctx->security->knas_enc.value); - - /* Set new security context indicator */ - security_context_is_new = TRUE; - } - } else { - LOG_TRACE(WARNING, "EMM-PROC - No EPS security context exists"); - LOG_FUNC_RETURN (RETURNerror); - } - - /* Allocate parameters of the retransmission timer callback */ - security_data_t *data = - (security_data_t *)malloc(sizeof(security_data_t)); - - if (data != NULL) { - /* Setup ongoing EMM procedure callback functions */ - rc = emm_proc_common_initialize(ueid, success, reject, failure, - _security_abort, data); - - if (rc != RETURNok) { - LOG_TRACE(WARNING, "Failed to initialize EMM callback functions"); - free(data); - LOG_FUNC_RETURN (RETURNerror); - } - - /* Set the UE identifier */ - data->ueid = ueid; - /* Reset the retransmission counter */ - data->retransmission_count = 0; - /* Set the key set identifier */ - data->ksi = ksi; - /* Set the EPS encryption algorithms to be replayed to the UE */ - data->eea = eea; - /* Set the EPS integrity algorithms to be replayed to the UE */ - data->eia = eia; - data->ucs2 = ucs2; - /* Set the UMTS encryption algorithms to be replayed to the UE */ - data->uea = uea; - /* Set the UMTS integrity algorithms to be replayed to the UE */ - data->uia = uia; - /* Set the GPRS integrity algorithms to be replayed to the UE */ - data->gea = gea; - data->umts_present = umts_present; - data->gprs_present = gprs_present; - /* Set the EPS encryption algorithms selected to the UE */ - data->selected_eea = emm_ctx->security->selected_algorithms.encryption; - /* Set the EPS integrity algorithms selected to the UE */ - data->selected_eia = emm_ctx->security->selected_algorithms.integrity; - /* Set the failure notification indicator */ - data->notify_failure = FALSE; - /* Send security mode command message to the UE */ - rc = _security_request(data, security_context_is_new); - - if (rc != RETURNerror) { - /* - * Notify EMM that common procedure has been initiated - */ - MSC_LOG_TX_MESSAGE( - MSC_NAS_EMM_MME, - MSC_NAS_EMM_MME, - NULL,0, - "0 EMMREG_COMMON_PROC_REQ ue id "NAS_UE_ID_FMT" (security mode control)", ueid); - emm_sap_t emm_sap; - emm_sap.primitive = EMMREG_COMMON_PROC_REQ; - emm_sap.u.emm_reg.ueid = ueid; - emm_sap.u.emm_reg.ctx = emm_ctx; - rc = emm_sap_send(&emm_sap); - } - } - - LOG_FUNC_RETURN (rc); -} - -/**************************************************************************** - ** ** - ** Name: emm_proc_security_mode_complete() ** - ** ** - ** Description: Performs the security mode control completion procedure ** - ** executed by the network. ** - ** ** - ** 3GPP TS 24.301, section 5.4.3.4 ** - ** Upon receiving the SECURITY MODE COMPLETE message, the ** - ** MME shall stop timer T3460. ** - ** From this time onward the MME shall integrity protect and ** - ** encipher all signalling messages with the selected NAS ** - ** integrity and ciphering algorithms. ** - ** ** - ** Inputs: ueid: UE lower layer identifier ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int emm_proc_security_mode_complete(unsigned int ueid) -{ - emm_data_context_t *emm_ctx = NULL; - - int rc = RETURNerror; - emm_sap_t emm_sap; - - LOG_FUNC_IN; - - LOG_TRACE(INFO, "EMM-PROC - Security mode complete (ueid="NAS_UE_ID_FMT")", ueid); - - - /* Get the UE context */ -#if defined(NAS_BUILT_IN_EPC) - if (ueid > 0) { - emm_ctx = emm_data_context_get(&_emm_data, ueid); - } -#else - if (ueid < EMM_DATA_NB_UE_MAX) { - emm_ctx = _emm_data.ctx[ueid]; - } -#endif - - if (emm_ctx) { - /* Stop timer T3460 */ - LOG_TRACE(INFO, "EMM-PROC - Stop timer T3460 (%d)", emm_ctx->T3460.id); - emm_ctx->T3460.id = nas_timer_stop(emm_ctx->T3460.id); - MSC_LOG_EVENT(MSC_NAS_EMM_MME, "0 T3460 stopped UE "NAS_UE_ID_FMT" ", ueid); - } - /* Release retransmission timer paramaters */ - security_data_t *data = (security_data_t *)(emm_proc_common_get_args(ueid)); - - if (data) { - free(data); - } - - if (emm_ctx && emm_ctx->security) { - /* - * Notify EMM that the authentication procedure successfully completed - */ - MSC_LOG_TX_MESSAGE( - MSC_NAS_EMM_MME, - MSC_NAS_EMM_MME, - NULL,0, - "0 EMMREG_COMMON_PROC_CNF ue id "NAS_UE_ID_FMT" (security mode complete)", ueid); - emm_sap.primitive = EMMREG_COMMON_PROC_CNF; - emm_sap.u.emm_reg.ueid = ueid; - emm_sap.u.emm_reg.ctx = emm_ctx; - emm_sap.u.emm_reg.u.common.is_attached = emm_ctx->is_attached; - } else { - LOG_TRACE(ERROR, "EMM-PROC - No EPS security context exists"); - /* - * Notify EMM that the authentication procedure failed - */ - MSC_LOG_TX_MESSAGE( - MSC_NAS_EMM_MME, - MSC_NAS_EMM_MME, - NULL,0, - "0 EMMREG_COMMON_PROC_REJ ue id "NAS_UE_ID_FMT" (security mode complete)", ueid); - emm_sap.primitive = EMMREG_COMMON_PROC_REJ; - emm_sap.u.emm_reg.ueid = ueid; - emm_sap.u.emm_reg.ctx = emm_ctx; - } - - rc = emm_sap_send(&emm_sap); - - LOG_FUNC_RETURN (rc); -} - -/**************************************************************************** - ** ** - ** Name: emm_proc_security_mode_reject() ** - ** ** - ** Description: Performs the security mode control not accepted by the UE ** - ** ** - ** 3GPP TS 24.301, section 5.4.3.5 ** - ** Upon receiving the SECURITY MODE REJECT message, the MME ** - ** shall stop timer T3460 and abort the ongoing procedure ** - ** that triggered the initiation of the NAS security mode ** - ** control procedure. ** - ** The MME shall apply the EPS security context in use befo- ** - ** re the initiation of the security mode control procedure, ** - ** if any, to protect any subsequent messages. ** - ** ** - ** ** - ** Inputs: ueid: UE lower layer identifier ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int emm_proc_security_mode_reject(unsigned int ueid) -{ - emm_data_context_t *emm_ctx = NULL; - int rc = RETURNerror; - - LOG_FUNC_IN; - - LOG_TRACE(WARNING, "EMM-PROC - Security mode command not accepted by the UE" - "(ueid="NAS_UE_ID_FMT")", ueid); - - - - /* Get the UE context */ -#if defined(NAS_BUILT_IN_EPC) - if (ueid > 0) { - emm_ctx = emm_data_context_get(&_emm_data, ueid); - DevAssert(emm_ctx != NULL); - } -#else - if (ueid < EMM_DATA_NB_UE_MAX) { - emm_ctx = _emm_data.ctx[ueid]; - } -#endif - if (emm_ctx) { - /* Stop timer T3460 */ - LOG_TRACE(INFO, "EMM-PROC - Stop timer T3460 (%d)", emm_ctx->T3460.id); - emm_ctx->T3460.id = nas_timer_stop(emm_ctx->T3460.id); - MSC_LOG_EVENT(MSC_NAS_EMM_MME, "0 T3460 stopped UE "NAS_UE_ID_FMT" ", ueid); - } - /* Release retransmission timer paramaters */ - security_data_t *data = (security_data_t *)(emm_proc_common_get_args(ueid)); - if (data) { - free(data); - } - - /* Set the key set identifier to its previous value */ - if (emm_ctx && emm_ctx->security) { - /* XXX - Usually, the MME should be able to maintain a current and - * a non-current EPS security context simultaneously as the UE do. - * This implementation choose to have only one security context by UE - * in the MME, thus security mode control procedure is only performed - * to take into use the first EPS security context created after a - * successful execution of the EPS authentication procedure */ - emm_ctx->security->type = EMM_KSI_NOT_AVAILABLE; - } - - /* - * Notify EMM that the authentication procedure failed - */ - MSC_LOG_TX_MESSAGE( - MSC_NAS_EMM_MME, - MSC_NAS_EMM_MME, - NULL,0, - "0 EMMREG_COMMON_PROC_REJ ue id "NAS_UE_ID_FMT" (security mode reject)", ueid); - emm_sap_t emm_sap; - emm_sap.primitive = EMMREG_COMMON_PROC_REJ; - emm_sap.u.emm_reg.ueid = ueid; - emm_sap.u.emm_reg.ctx = emm_ctx; - rc = emm_sap_send(&emm_sap); - - LOG_FUNC_RETURN (rc); -} - -/****************************************************************************/ -/********************* L O C A L F U N C T I O N S *********************/ -/****************************************************************************/ - - - -/* - * -------------------------------------------------------------------------- - * Timer handlers - * -------------------------------------------------------------------------- - */ - -/**************************************************************************** - ** ** - ** Name: _security_t3460_handler() ** - ** ** - ** Description: T3460 timeout handler ** - ** Upon T3460 timer expiration, the security mode command ** - ** message is retransmitted and the timer restarted. When ** - ** retransmission counter is exceed, the MME shall abort the ** - ** security mode control procedure. ** - ** ** - ** 3GPP TS 24.301, section 5.4.3.7, case b ** - ** ** - ** Inputs: args: handler parameters ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: None ** - ** Others: None ** - ** ** - ***************************************************************************/ -static void *_security_t3460_handler(void *args) -{ - LOG_FUNC_IN; - - int rc; - - security_data_t *data = (security_data_t *)(args); - - /* Increment the retransmission counter */ - data->retransmission_count += 1; - - LOG_TRACE(WARNING, "EMM-PROC - T3460 timer expired, retransmission " - "counter = %d", data->retransmission_count); - - if (data->retransmission_count < SECURITY_COUNTER_MAX) { - /* Send security mode command message to the UE */ - rc = _security_request(data, FALSE); - } else { - /* Set the failure notification indicator */ - data->notify_failure = TRUE; - /* Abort the security mode control procedure */ - rc = _security_abort(data); - } - - LOG_FUNC_RETURN (NULL); -} - -/* - * -------------------------------------------------------------------------- - * MME specific local functions - * -------------------------------------------------------------------------- - */ - -/**************************************************************************** - ** ** - ** Name: _security_request() ** - ** ** - ** Description: Sends SECURITY MODE COMMAND message and start timer T3460 ** - ** ** - ** Inputs: data: Security mode control internal data ** - ** is_new: Indicates whether a new security context ** - ** has just been taken into use ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: T3460 ** - ** ** - ***************************************************************************/ -int _security_request(security_data_t *data, int is_new) -{ - struct emm_data_context_s *emm_ctx = NULL; - - emm_sap_t emm_sap; - int rc; - - LOG_FUNC_IN; - - /* - * Notify EMM-AS SAP that Security Mode Command message has to be sent - * to the UE - */ - emm_sap.primitive = EMMAS_SECURITY_REQ; - emm_sap.u.emm_as.u.security.guti = NULL; - emm_sap.u.emm_as.u.security.ueid = data->ueid; - emm_sap.u.emm_as.u.security.msgType = EMM_AS_MSG_TYPE_SMC; - emm_sap.u.emm_as.u.security.ksi = data->ksi; - emm_sap.u.emm_as.u.security.eea = data->eea; - emm_sap.u.emm_as.u.security.eia = data->eia; - emm_sap.u.emm_as.u.security.ucs2 = data->ucs2; - emm_sap.u.emm_as.u.security.uea = data->uea; - emm_sap.u.emm_as.u.security.uia = data->uia; - emm_sap.u.emm_as.u.security.gea = data->gea; - emm_sap.u.emm_as.u.security.umts_present = data->umts_present; - emm_sap.u.emm_as.u.security.gprs_present = data->gprs_present; - emm_sap.u.emm_as.u.security.selected_eea = data->selected_eea; - emm_sap.u.emm_as.u.security.selected_eia = data->selected_eia; - -#if defined(NAS_BUILT_IN_EPC) - if (data->ueid > 0) { - emm_ctx = emm_data_context_get(&_emm_data, data->ueid); - } -#else - if (data->ueid < EMM_DATA_NB_UE_MAX) { - emm_ctx = _emm_data.ctx[data->ueid]; - } -#endif - - /* Setup EPS NAS security data */ - emm_as_set_security_data(&emm_sap.u.emm_as.u.security.sctx, - emm_ctx->security, is_new, FALSE); - MSC_LOG_TX_MESSAGE( - MSC_NAS_EMM_MME, - MSC_NAS_EMM_MME, - NULL,0, - "0 EMMAS_SECURITY_REQ ue id "NAS_UE_ID_FMT" ", data->ueid); - rc = emm_sap_send(&emm_sap); - - if (rc != RETURNerror) { - if (emm_ctx->T3460.id != NAS_TIMER_INACTIVE_ID) { - /* Re-start T3460 timer */ - emm_ctx->T3460.id = nas_timer_restart(emm_ctx->T3460.id); - MSC_LOG_EVENT(MSC_NAS_EMM_MME, "0 T3460 restarted UE "NAS_UE_ID_FMT" ", data->ueid); - } else { - /* Start T3460 timer */ - emm_ctx->T3460.id = nas_timer_start(emm_ctx->T3460.sec, _security_t3460_handler, data); - MSC_LOG_EVENT(MSC_NAS_EMM_MME, "0 T3460 started UE "NAS_UE_ID_FMT" ", data->ueid); - } - LOG_TRACE(INFO,"EMM-PROC - Timer T3460 (%d) expires in %ld seconds", - emm_ctx->T3460.id, emm_ctx->T3460.sec); - } - LOG_FUNC_RETURN (rc); -} - -/**************************************************************************** - ** ** - ** Name: _security_abort() ** - ** ** - ** Description: Aborts the security mode control procedure currently in ** - ** progress ** - ** ** - ** Inputs: args: Security mode control data to be released ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: T3460 ** - ** ** - ***************************************************************************/ -static int _security_abort(void *args) -{ - LOG_FUNC_IN; - - struct emm_data_context_s *emm_ctx = NULL; - int rc = RETURNerror; - - security_data_t *data = (security_data_t *)(args); - - if (data) { - unsigned int ueid = data->ueid; - int notify_failure = data->notify_failure; - - LOG_TRACE(WARNING, "EMM-PROC - Abort security mode control procedure " - "(ueid="NAS_UE_ID_FMT")", ueid); -#if defined(NAS_BUILT_IN_EPC) - if (data->ueid > 0) { - emm_ctx = emm_data_context_get(&_emm_data, data->ueid); - } -#else - if (data->ueid < EMM_DATA_NB_UE_MAX) { - emm_ctx = _emm_data.ctx[data->ueid]; - } -#endif - /* Stop timer T3460 */ - if (emm_ctx->T3460.id != NAS_TIMER_INACTIVE_ID) { - LOG_TRACE(INFO, "EMM-PROC - Stop timer T3460 (%d)", emm_ctx->T3460.id); - emm_ctx->T3460.id = nas_timer_stop(emm_ctx->T3460.id); - MSC_LOG_EVENT(MSC_NAS_EMM_MME, "0 T3460 stopped UE "NAS_UE_ID_FMT" ", ueid); - } - - /* Release retransmission timer paramaters */ - free(data); - - /* - * Notify EMM that the security mode control procedure failed - */ - if (notify_failure) { - MSC_LOG_TX_MESSAGE( - MSC_NAS_EMM_MME, - MSC_NAS_EMM_MME, - NULL,0, - "0 EMMREG_COMMON_PROC_REJ ue id "NAS_UE_ID_FMT" (security abort)", data->ueid); - emm_sap_t emm_sap; - emm_sap.primitive = EMMREG_COMMON_PROC_REJ; - emm_sap.u.emm_reg.ueid = ueid; - rc = emm_sap_send(&emm_sap); - } else { - rc = RETURNok; - } - } - - LOG_FUNC_RETURN (rc); -} - - -/**************************************************************************** - ** ** - ** Name: _security_select_algorithms() ** - ** ** - ** Description: Select int and enc algorithms based on UE capabilities and** - ** MME capabilities and MME preferences ** - ** ** - ** Inputs: ue_eia: integrity algorithms supported by UE ** - ** ue_eea: ciphering algorithms supported by UE ** - ** ** - ** Outputs: mme_eia: integrity algorithms supported by MME ** - ** mme_eea: ciphering algorithms supported by MME ** - ** ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -static int _security_select_algorithms( - const int ue_eiaP, - const int ue_eeaP, - int * const mme_eiaP, - int * const mme_eeaP) -{ - LOG_FUNC_IN; - - int rc = RETURNerror; - int preference_index; - - *mme_eiaP = NAS_SECURITY_ALGORITHMS_EIA0; - *mme_eeaP = NAS_SECURITY_ALGORITHMS_EEA0; - - for (preference_index = 0; preference_index < 8; preference_index++) { - if (ue_eiaP & (0x80 >> _emm_data.conf.prefered_integrity_algorithm[preference_index])) { - LOG_TRACE(DEBUG, - "Selected NAS_SECURITY_ALGORITHMS_EIA%d (choice num %d)", - _emm_data.conf.prefered_integrity_algorithm[preference_index], - preference_index); - *mme_eiaP = _emm_data.conf.prefered_integrity_algorithm[preference_index]; - break; - } - } - - for (preference_index = 0; preference_index < 8; preference_index++) { - if (ue_eeaP & (0x80 >> _emm_data.conf.prefered_ciphering_algorithm[preference_index])) { - LOG_TRACE(DEBUG, - "Selected NAS_SECURITY_ALGORITHMS_EEA%d (choice num %d)", - _emm_data.conf.prefered_ciphering_algorithm[preference_index], - preference_index); - *mme_eeaP = _emm_data.conf.prefered_ciphering_algorithm[preference_index]; - break; - } - } - - LOG_FUNC_RETURN (RETURNok); -} - - diff --git a/openair-cn/NAS/MME/EMM/ServiceRequestHdl.c b/openair-cn/NAS/MME/EMM/ServiceRequestHdl.c deleted file mode 100644 index 1655b22d71..0000000000 --- a/openair-cn/NAS/MME/EMM/ServiceRequestHdl.c +++ /dev/null @@ -1,93 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** -Source ServiceRequest.c - -Version 0.1 - -Date 2013/05/07 - -Product NAS stack - -Subsystem EPS Mobility Management - -Author Frederic Maurel - -Description Defines the service request EMM procedure executed by the - Non-Access Stratum. - - The purpose of the service request procedure is to transfer - the EMM mode from EMM-IDLE to EMM-CONNECTED mode and establish - the radio and S1 bearers when uplink user data or signalling - is to be sent. - - This procedure is used when the network has downlink signalling - pending, the UE has uplink signalling pending, the UE or the - network has user data pending and the UE is in EMM-IDLE mode. - -*****************************************************************************/ - -#include "emm_proc.h" -#include "nas_log.h" -#include "nas_timer.h" - -#include "emmData.h" - -#include "emm_sap.h" - -/****************************************************************************/ -/**************** E X T E R N A L D E F I N I T I O N S ****************/ -/****************************************************************************/ - -/****************************************************************************/ -/******************* L O C A L D E F I N I T I O N S *******************/ -/****************************************************************************/ - -/* - * -------------------------------------------------------------------------- - * Internal data handled by the service request procedure in the UE - * -------------------------------------------------------------------------- - */ - -/* - * -------------------------------------------------------------------------- - * Internal data handled by the service request procedure in the MME - * -------------------------------------------------------------------------- - */ - - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -/****************************************************************************/ -/********************* L O C A L F U N C T I O N S *********************/ -/****************************************************************************/ - - diff --git a/openair-cn/NAS/MME/EMM/TrackingAreaUpdate.c b/openair-cn/NAS/MME/EMM/TrackingAreaUpdate.c deleted file mode 100644 index 09ae70da85..0000000000 --- a/openair-cn/NAS/MME/EMM/TrackingAreaUpdate.c +++ /dev/null @@ -1,188 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** -Source TrackingAreaUpdate.c - -Version 0.1 - -Date 2013/05/07 - -Product NAS stack - -Subsystem EPS Mobility Management - -Author Frederic Maurel - -Description Defines the tracking area update EMM procedure executed by the - Non-Access Stratum. - - The tracking area updating procedure is always initiated by the - UE and is used to update the registration of the actual tracking - area of a UE in the network, to periodically notify the availa- - bility of the UE to the network, for MME load balancing, to up- - date certain UE specific parameters in the network. - -*****************************************************************************/ - -#include "emm_proc.h" -#include "nas_log.h" -#include "nas_timer.h" - -#include "emmData.h" - -#include "emm_sap.h" -#include "emm_cause.h" - -#include // memcmp, memcpy - -/****************************************************************************/ -/**************** E X T E R N A L D E F I N I T I O N S ****************/ -/****************************************************************************/ - -/****************************************************************************/ -/******************* L O C A L D E F I N I T I O N S *******************/ -/****************************************************************************/ - -/* - * -------------------------------------------------------------------------- - * Internal data handled by the tracking area update procedure in the MME - * -------------------------------------------------------------------------- - */ -static int _emm_tracking_area_update_reject(void *args); - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -/**************************************************************************** - ** ** - ** Name: emm_proc_tracking_area_update_reject() ** - ** ** - ** Description: ** - ** ** - ** Inputs: ueid: UE lower layer identifier ** - ** emm_cause: EMM cause code to be reported ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: _emm_data ** - ** ** - ***************************************************************************/ -int emm_proc_tracking_area_update_reject(unsigned int ueid, int emm_cause) -{ - LOG_FUNC_IN; - - int rc; - - /* Create temporary UE context */ - emm_data_context_t ue_ctx; - memset(&ue_ctx, 0 , sizeof(emm_data_context_t)); - ue_ctx.is_dynamic = FALSE; - ue_ctx.ueid = ueid; - - /* Update the EMM cause code */ -#if defined(NAS_BUILT_IN_EPC) - - if (ueid > 0) -#else - if (ueid < EMM_DATA_NB_UE_MAX) -#endif - { - ue_ctx.emm_cause = emm_cause; - } else { - ue_ctx.emm_cause = EMM_CAUSE_ILLEGAL_UE; - } - - /* Do not accept attach request with protocol error */ - rc = _emm_tracking_area_update_reject(&ue_ctx); - - LOG_FUNC_RETURN(rc); -} - -/****************************************************************************/ -/********************* L O C A L F U N C T I O N S *********************/ -/****************************************************************************/ - - - -/**************************************************************************** - ** ** - ** Name: _emm_tracking_area_update_reject() ** - ** ** - ** Description: Performs the tracking area update procedure not accepted ** - ** by the network. ** - ** ** - ** Inputs: args: UE context data ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -static int _emm_tracking_area_update_reject(void *args) -{ - LOG_FUNC_IN; - - int rc = RETURNerror; - - emm_data_context_t *emm_ctx = (emm_data_context_t *)(args); - - if (emm_ctx) { - emm_sap_t emm_sap; - LOG_TRACE(WARNING, "EMM-PROC - EMM tracking area update procedure not accepted " - "by the network (ueid="NAS_UE_ID_FMT", cause=%d)", - emm_ctx->ueid, emm_ctx->emm_cause); - /* - * Notify EMM-AS SAP that Tracking Area Update Reject message has to be sent - * onto the network - */ - emm_sap.primitive = EMMAS_ESTABLISH_REJ; - emm_sap.u.emm_as.u.establish.ueid = emm_ctx->ueid; - emm_sap.u.emm_as.u.establish.UEid.guti = NULL; - - if (emm_ctx->emm_cause == EMM_CAUSE_SUCCESS) { - emm_ctx->emm_cause = EMM_CAUSE_ILLEGAL_UE; - } - - emm_sap.u.emm_as.u.establish.emm_cause = emm_ctx->emm_cause; - emm_sap.u.emm_as.u.establish.NASinfo = EMM_AS_NAS_INFO_TAU; - emm_sap.u.emm_as.u.establish.NASmsg.length = 0; - emm_sap.u.emm_as.u.establish.NASmsg.value = NULL; - - /* Setup EPS NAS security data */ - emm_as_set_security_data(&emm_sap.u.emm_as.u.establish.sctx, - emm_ctx->security, FALSE, TRUE); - rc = emm_sap_send(&emm_sap); - } - - LOG_FUNC_RETURN(rc); -} - diff --git a/openair-cn/NAS/MME/EMM/emmData.h b/openair-cn/NAS/MME/EMM/emmData.h deleted file mode 100644 index e17214badb..0000000000 --- a/openair-cn/NAS/MME/EMM/emmData.h +++ /dev/null @@ -1,285 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** -Source emmData.h - -Version 0.1 - -Date 2012/10/18 - -Product NAS stack - -Subsystem EPS Mobility Management - -Author Frederic Maurel - -Description Defines internal private data handled by EPS Mobility - Management sublayer. - -*****************************************************************************/ -#ifndef __EMMDATA_H__ -#define __EMMDATA_H__ - -#include "commonDef.h" -#include "networkDef.h" -#include "securityDef.h" - -#include "OctetString.h" -#include "nas_timer.h" - -#include "esmData.h" - -#include "emm_fsm.h" -#include "mme_api.h" -# if defined(NAS_BUILT_IN_EPC) -# include "tree.h" -# endif - -/****************************************************************************/ -/********************* G L O B A L C O N S T A N T S *******************/ -/****************************************************************************/ - - -/* Checks Mobile Country Code equality */ -#define MCCS_ARE_EQUAL(n1, n2) (((n1).MCCdigit1 == (n2).MCCdigit1) && \ - ((n1).MCCdigit2 == (n2).MCCdigit2) && \ - ((n1).MCCdigit3 == (n2).MCCdigit3)) - -/* Checks Mobile Network Code equality */ -#define MNCS_ARE_EQUAL(n1, n2) (((n1).MNCdigit1 == (n2).MNCdigit1) && \ - ((n1).MNCdigit2 == (n2).MNCdigit2) && \ - ((n1).MNCdigit3 == (n2).MNCdigit3)) - -/* Checks PLMNs equality */ -#define PLMNS_ARE_EQUAL(p1, p2) ((MCCS_ARE_EQUAL((p1),(p2))) && \ - (MNCS_ARE_EQUAL((p1),(p2)))) - -/* Checks TAIs equality */ -#define TAIS_ARE_EQUAL(t1, t2) ((PLMNS_ARE_EQUAL((t1).plmn,(t2).plmn)) && \ - ((t1).tac == (t2).tac)) - -/****************************************************************************/ -/************************ G L O B A L T Y P E S ************************/ -/****************************************************************************/ - -/* - * -------------------------------------------------------------------------- - * EPS NAS security context handled by EPS Mobility Management sublayer in - * the UE and in the MME - * -------------------------------------------------------------------------- - */ -/* Type of security context */ -typedef enum { - EMM_KSI_NOT_AVAILABLE = 0, - EMM_KSI_NATIVE, - EMM_KSI_MAPPED -} emm_ksi_t; - -/* EPS NAS security context structure */ -typedef struct emm_security_context_s { - emm_ksi_t type; /* Type of security context */ - int eksi; /* NAS key set identifier for E-UTRAN */ - OctetString kasme; /* ASME security key (native context) */ - //OctetString ksgsn; /* SGSN security key (mapped context) */ - OctetString knas_enc; /* NAS cyphering key */ - OctetString knas_int; /* NAS integrity key */ - struct count_s{ - uint32_t spare:8; - uint32_t overflow:16; - uint32_t seq_num:8; - } dl_count, ul_count; /* Downlink and uplink count parameters */ - struct { - uint8_t eps_encryption; /* algorithm used for ciphering */ - uint8_t eps_integrity; /* algorithm used for integrity protection */ - uint8_t umts_encryption; /* algorithm used for ciphering */ - uint8_t umts_integrity; /* algorithm used for integrity protection */ - uint8_t gprs_encryption; /* algorithm used for ciphering */ - uint8_t umts_present:1; - uint8_t gprs_present:1; - } capability; /* UE network capability */ - struct { - uint8_t encryption:4; /* algorithm used for ciphering */ - uint8_t integrity:4; /* algorithm used for integrity protection */ - } selected_algorithms; /* MME selected algorithms */ -} emm_security_context_t; - -/* - * -------------------------------------------------------------------------- - * EMM internal data handled by EPS Mobility Management sublayer in the UE - * -------------------------------------------------------------------------- - */ - -/* - * -------------------------------------------------------------------------- - * EMM internal data handled by EPS Mobility Management sublayer in the MME - * -------------------------------------------------------------------------- - */ -/* - * Structure of the EMM context established by the network for a particular UE - * --------------------------------------------------------------------------- - */ -typedef struct emm_data_context_s { -#if defined(NAS_BUILT_IN_EPC) - RB_ENTRY(emm_data_context_s) entries; -#endif - - unsigned int ueid; /* UE identifier */ - int is_dynamic; /* Dynamically allocated context indicator */ - int is_attached; /* Attachment indicator */ - int is_emergency;/* Emergency bearer services indicator */ - - imsi_t *imsi; /* The IMSI provided by the UE or the MME */ - imei_t *imei; /* The IMEI provided by the UE */ - int guti_is_new; /* New GUTI indicator */ - GUTI_t *guti; /* The GUTI assigned to the UE */ - GUTI_t *old_guti; /* The old GUTI */ - int n_tacs; /* Number of consecutive tracking areas the UE is - * registered to */ - tac_t tac; /* Code of the first tracking area the UE is - * registered to */ - - int ksi; /* Security key set identifier provided by the UE */ - int eea; /* EPS encryption algorithms supported by the UE */ - int eia; /* EPS integrity algorithms supported by the UE */ - int ucs2; /* UCS2 Alphabet*/ - int uea; /* UMTS encryption algorithms supported by the UE */ - int uia; /* UMTS integrity algorithms supported by the UE */ - int gea; /* GPRS encryption algorithms supported by the UE */ - int umts_present; /* For encoding ue network capabilities (variable size)*/ - int gprs_present; /* For encoding ue network capabilities (variable size)*/ - - auth_vector_t vector;/* EPS authentication vector */ - emm_security_context_t *security; /* Current EPS NAS security context */ - OctetString esm_msg; /* ESM message contained within the initial request*/ - int emm_cause; /* EMM failure cause code */ - - emm_fsm_state_t _emm_fsm_status; - - struct nas_timer_t T3450; /* EMM message retransmission timer */ - struct nas_timer_t T3460; /* Authentication timer */ - struct nas_timer_t T3470; /* Identification timer */ - - esm_data_context_t esm_data_ctx; -} emm_data_context_t; - -/* - * Structure of the EMM data - * ------------------------- - */ -typedef struct emm_data_s { - /* - * MME configuration - * ----------------- - */ - mme_api_emm_config_t conf; - /* - * EMM contexts - * ------------ - */ -# if defined(NAS_BUILT_IN_EPC) - /* Use a tree for ue data context within MME */ - RB_HEAD(emm_data_context_map, emm_data_context_s) ctx_map; -# else -# define EMM_DATA_NB_UE_MAX (MME_API_NB_UE_MAX + 1) - emm_data_context_t *ctx [EMM_DATA_NB_UE_MAX]; -# endif -} emm_data_t; - -struct emm_data_context_s *emm_data_context_get( - emm_data_t *_emm_data, unsigned int _ueid); - -struct emm_data_context_s *emm_data_context_remove( - emm_data_t *_emm_data, struct emm_data_context_s *elm); - -void emm_data_context_add(emm_data_t *emm_data, struct emm_data_context_s *elm); -void emm_data_context_dump(struct emm_data_context_s *elm_pP); - -void emm_data_context_dump_all(void); - - -/****************************************************************************/ -/******************** G L O B A L V A R I A B L E S ********************/ -/****************************************************************************/ - -/* - * -------------------------------------------------------------------------- - * EPS mobility management data (used within EMM only) - * -------------------------------------------------------------------------- - */ -emm_data_t _emm_data; - - -/* - * -------------------------------------------------------------------------- - * EPS mobility management timers – Network side - * -------------------------------------------------------------------------- - */ -#define T3450_DEFAULT_VALUE 6 /* 6 seconds */ -#define T3460_DEFAULT_VALUE 6 /* 6 seconds */ -#define T3470_DEFAULT_VALUE 6 /* 6 seconds */ - -/* - * mobile reachable timer - * ---------------------- - * The network supervises the periodic tracking area updating procedure - * of the UE by means of the mobile reachable timer. - * If the UE is not attached for emergency bearer services, the mobile - * reachable timer is 4 minutes greater than T3412. - * If the UE is attached for emergency bearer services, the MME shall - * set the mobile reachable timer with a value equal to T3412. When - * the mobile reachable timer expires, the MME shall locally detach the UE. - * - * The mobile reachable timer shall be reset and started, when the MME - * releases the NAS signalling connection for the UE. The mobile reachable - * timer shall be stopped when a NAS signalling connection is established - * for the UE. - */ - -/* - * implicit detach timer - * --------------------- - * If ISR is activated, the default value of the implicit detach timer is - * 4 minutes greater than T3423. - * If the implicit detach timer expires before the UE contacts the network, - * the network shall implicitly detach the UE. - * If the MME includes timer T3346 in the TRACKING AREA UPDATE REJECT message - * or the SERVICE REJECT message and T3346 is greater than T3412, the MME - * sets the mobile reachable timer and the implicit detach timer such that - * the sum of the timer values is greater than T3346. - * - * Upon expiry of the mobile reachable timer the network shall start the - * implicit detach timer. The implicit detach timer shall be stopped when - * a NAS signalling connection is established for the UE. - */ - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -#endif /* __EMMDATA_H__*/ diff --git a/openair-cn/NAS/MME/EMM/emm_data_ctx.c b/openair-cn/NAS/MME/EMM/emm_data_ctx.c deleted file mode 100644 index 4030e08e95..0000000000 --- a/openair-cn/NAS/MME/EMM/emm_data_ctx.c +++ /dev/null @@ -1,185 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -#include -#include - -#if defined(NAS_BUILT_IN_EPC) -#include "assertions.h" -#include "tree.h" -#include "emmData.h" -#include "nas_log.h" -#include "security_types.h" - -static inline -int emm_data_ctxt_compare_ueid(struct emm_data_context_s *p1, - struct emm_data_context_s *p2); - -RB_PROTOTYPE(emm_data_context_map, emm_data_context_s, entries, - emm_data_ctxt_compare_ueid); - -/* Generate functions used for the MAP */ -RB_GENERATE(emm_data_context_map, emm_data_context_s, entries, - emm_data_ctxt_compare_ueid); - -static inline -int emm_data_ctxt_compare_ueid(struct emm_data_context_s *p1, - struct emm_data_context_s *p2) -{ - if (p1->ueid > p2->ueid) { - return 1; - } - - if (p1->ueid < p2->ueid) { - return -1; - } - - /* Matching reference -> return 0 */ - return 0; -} - -struct emm_data_context_s *emm_data_context_get( - emm_data_t *emm_data, unsigned int _ueid) -{ - struct emm_data_context_s reference; - - DevAssert(emm_data != NULL); - DevCheck(_ueid > 0, _ueid, 0, 0); - - memset(&reference, 0, sizeof(struct emm_data_context_s)); - reference.ueid = _ueid; - return RB_FIND(emm_data_context_map, &emm_data->ctx_map, &reference); -} - -struct emm_data_context_s *emm_data_context_remove( - emm_data_t *emm_data, struct emm_data_context_s *elm) -{ - LOG_TRACE(INFO, "EMM-CTX - Remove in context %p UE id "NAS_UE_ID_FMT" ", elm, elm->ueid); - return RB_REMOVE(emm_data_context_map, &emm_data->ctx_map, elm); -} - -void emm_data_context_add(emm_data_t *emm_data, struct emm_data_context_s *elm) -{ - LOG_TRACE(INFO, "EMM-CTX - Add in context %p UE id "NAS_UE_ID_FMT" ", elm, elm->ueid); - RB_INSERT(emm_data_context_map, &emm_data->ctx_map, elm); -} - -void emm_data_context_dump(struct emm_data_context_s *elm_pP) -{ - if (elm_pP != NULL) { - char imsi_str[16]; - char guti_str[22]; - int k, size, remaining_size; - char key_string[KASME_LENGTH_OCTETS*2]; - LOG_TRACE(INFO, "EMM-CTX: ue id: "NAS_UE_ID_FMT" (UE identifier)", elm_pP->ueid); - LOG_TRACE(INFO, " is_dynamic: %u (Dynamically allocated context indicator)", elm_pP->is_dynamic); - LOG_TRACE(INFO, " is_attached: %u (Attachment indicator)", elm_pP->is_attached); - LOG_TRACE(INFO, " is_emergency: %u (Emergency bearer services indicator)", elm_pP->is_emergency); - NAS_IMSI2STR(elm_pP->imsi, imsi_str, 16); - LOG_TRACE(INFO, " imsi: %s (The IMSI provided by the UE or the MME)", imsi_str); - LOG_TRACE(INFO, " imei: TODO (The IMEI provided by the UE)"); - LOG_TRACE(INFO, " guti_is_new: %u (New GUTI indicator)", elm_pP->guti_is_new); - GUTI2STR(elm_pP->guti, guti_str, 22); - LOG_TRACE(INFO, " guti: %s (The GUTI assigned to the UE)", guti_str); - GUTI2STR(elm_pP->old_guti, guti_str, 22); - LOG_TRACE(INFO, " old_guti: %s (The old GUTI)", guti_str); - LOG_TRACE(INFO, " n_tacs: %u (Number of consecutive tracking areas the UE is registered to)", elm_pP->n_tacs); - LOG_TRACE(INFO, " tac: 0x%04x (Code of the first tracking area the UE is registered to)", elm_pP->n_tacs); - LOG_TRACE(INFO, " ksi: %u (Security key set identifier provided by the UE)", elm_pP->ksi); - - LOG_TRACE(INFO, " auth_vector: (EPS authentication vector)"); - LOG_TRACE(INFO, " kasme: "KASME_FORMAT""KASME_FORMAT, KASME_DISPLAY_1(elm_pP->vector.kasme), KASME_DISPLAY_2(elm_pP->vector.kasme)); - LOG_TRACE(INFO, " rand: "RAND_FORMAT, RAND_DISPLAY(elm_pP->vector.rand)); - LOG_TRACE(INFO, " autn: "AUTN_FORMAT, AUTN_DISPLAY(elm_pP->vector.autn)); - for (k = 0; k < XRES_LENGTH_MAX; k++) {sprintf(&key_string[k * 3], "%02x,", elm_pP->vector.xres[k]);} - key_string[k * 3 - 1] = '\0'; - LOG_TRACE(INFO, " xres: %s\n", key_string); - - if (elm_pP->security != NULL) { - LOG_TRACE(INFO, " security context: (Current EPS NAS security context)"); - LOG_TRACE(INFO, " type: %s (Type of security context)", - (elm_pP->security->type == EMM_KSI_NOT_AVAILABLE)?"KSI_NOT_AVAILABLE":(elm_pP->security->type == EMM_KSI_NATIVE)?"KSI_NATIVE":"KSI_MAPPED"); - LOG_TRACE(INFO, " eksi: %u (NAS key set identifier for E-UTRAN)", elm_pP->security->eksi); - - if (elm_pP->security->kasme.length > 0) { - size = 0; - size = 0;remaining_size=KASME_LENGTH_OCTETS*2; - for (k = 0; k < elm_pP->security->kasme.length; k++) { - size +=snprintf(&key_string[size], remaining_size, "0x%x ", elm_pP->security->kasme.value[k]); - remaining_size -= size; - } - } else { - size +=snprintf(&key_string[0], remaining_size, "None"); - } - LOG_TRACE(INFO, " kasme: %s (ASME security key (native context))", key_string); - if (elm_pP->security->knas_enc.length > 0) { - size = 0; - size = 0;remaining_size=KASME_LENGTH_OCTETS*2; - for (k = 0; k < elm_pP->security->knas_enc.length; k++) { - size +=snprintf(&key_string[size], remaining_size, "0x%x ", elm_pP->security->knas_enc.value[k]); - remaining_size -= size; - } - } else { - size +=snprintf(&key_string[0], remaining_size, "None"); - } - LOG_TRACE(INFO, " knas_enc: %s (NAS cyphering key)", key_string); - if (elm_pP->security->knas_int.length > 0) { - size = 0;remaining_size=KASME_LENGTH_OCTETS*2; - for (k = 0; k < elm_pP->security->knas_int.length; k++) { - size +=snprintf(&key_string[size], remaining_size, "0x%x ", elm_pP->security->knas_int.value[k]); - remaining_size -= size; - } - } else { - size +=snprintf(&key_string[0], remaining_size, "None"); - } - LOG_TRACE(INFO, " knas_int: %s (NAS integrity key)", key_string); - LOG_TRACE(INFO, " dl_count.overflow: %u ", elm_pP->security->dl_count.overflow); - LOG_TRACE(INFO, " dl_count.seq_num: %u ", elm_pP->security->dl_count.seq_num); - LOG_TRACE(INFO, " ul_count.overflow: %u ", elm_pP->security->ul_count.overflow); - LOG_TRACE(INFO, " ul_count.seq_num: %u ", elm_pP->security->ul_count.seq_num); - LOG_TRACE(INFO, " TODO capability"); - LOG_TRACE(INFO, " selected_algorithms.encryption: %x ", elm_pP->security->selected_algorithms.encryption); - LOG_TRACE(INFO, " selected_algorithms.integrity: %x ", elm_pP->security->selected_algorithms.integrity); - } else { - LOG_TRACE(INFO, " No security context"); - } - LOG_TRACE(INFO, " _emm_fsm_status %u ", elm_pP->_emm_fsm_status); - LOG_TRACE(INFO, " TODO esm_data_ctx"); - } -} - -void emm_data_context_dump_all(void) -{ - struct emm_data_context_s *elm_p = NULL; - LOG_TRACE(INFO, "EMM-CTX - Dump all contexts:"); - RB_FOREACH(elm_p, emm_data_context_map,&_emm_data.ctx_map) { - emm_data_context_dump(elm_p); - } -} -#endif diff --git a/openair-cn/NAS/MME/EMM/emm_main.c b/openair-cn/NAS/MME/EMM/emm_main.c deleted file mode 100644 index c90a7836f5..0000000000 --- a/openair-cn/NAS/MME/EMM/emm_main.c +++ /dev/null @@ -1,138 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** -Source emm_main.c - -Version 0.1 - -Date 2012/10/10 - -Product NAS stack - -Subsystem EPS Mobility Management - -Author Frederic Maurel - -Description Defines the EPS Mobility Management procedure call manager, - the main entry point for elementary EMM processing. - -*****************************************************************************/ - -#include "emm_main.h" -#include "nas_log.h" -#include "emmData.h" - - -#if defined(NAS_BUILT_IN_EPC) -# include "mme_config.h" -#endif - -/****************************************************************************/ -/**************** E X T E R N A L D E F I N I T I O N S ****************/ -/****************************************************************************/ - -/****************************************************************************/ -/******************* L O C A L D E F I N I T I O N S *******************/ -/****************************************************************************/ - - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - - -/**************************************************************************** - ** ** - ** Name: emm_main_initialize() ** - ** ** - ** Description: Initializes EMM internal data ** - ** ** - ** Inputs: None ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: None ** - ** Others: _emm_data ** - ** ** - ***************************************************************************/ -#if defined(NAS_BUILT_IN_EPC) -void emm_main_initialize(mme_config_t *mme_config_p) -#else -void emm_main_initialize(void) -#endif -{ - LOG_FUNC_IN; - - /* Retreive MME supported configuration data */ -#if defined(NAS_BUILT_IN_EPC) - - if (mme_api_get_emm_config(&_emm_data.conf, mme_config_p) != RETURNok) -#else - if (mme_api_get_emm_config(&_emm_data.conf) != RETURNok) -#endif - { - LOG_TRACE(ERROR, "EMM-MAIN - Failed to get MME configuration data"); - } - -#if defined(NAS_BUILT_IN_EPC) - RB_INIT(&_emm_data.ctx_map); -#endif - - LOG_FUNC_OUT; -} - -/**************************************************************************** - ** ** - ** Name: emm_main_cleanup() ** - ** ** - ** Description: Performs the EPS Mobility Management clean up procedure ** - ** ** - ** Inputs: None ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: None ** - ** Others: None ** - ** ** - ***************************************************************************/ -void emm_main_cleanup(void) -{ - LOG_FUNC_IN; - - - LOG_FUNC_OUT; -} - - - -/****************************************************************************/ -/********************* L O C A L F U N C T I O N S *********************/ -/****************************************************************************/ - - diff --git a/openair-cn/NAS/MME/EMM/emm_main.h b/openair-cn/NAS/MME/EMM/emm_main.h deleted file mode 100644 index ac3772a24f..0000000000 --- a/openair-cn/NAS/MME/EMM/emm_main.h +++ /dev/null @@ -1,82 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** -Source emm_main.h - -Version 0.1 - -Date 2012/10/10 - -Product NAS stack - -Subsystem EPS Mobility Management - -Author Frederic Maurel - -Description Defines the EPS Mobility Management procedure call manager, - the main entry point for elementary EMM processing. - -*****************************************************************************/ -#ifndef __EMM_MAIN_H__ -#define __EMM_MAIN_H__ - -#if defined(NAS_BUILT_IN_EPC) -# include "mme_config.h" -#endif - -#include "commonDef.h" -#include "networkDef.h" - -/****************************************************************************/ -/********************* G L O B A L C O N S T A N T S *******************/ -/****************************************************************************/ - -/****************************************************************************/ -/************************ G L O B A L T Y P E S ************************/ -/****************************************************************************/ - -/****************************************************************************/ -/******************** G L O B A L V A R I A B L E S ********************/ -/****************************************************************************/ - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - - -# if defined(NAS_BUILT_IN_EPC) -void emm_main_initialize(mme_config_t *mme_config_p); -# else -void emm_main_initialize(void); -# endif -void emm_main_cleanup(void); - - - -#endif /* __EMM_MAIN_H__*/ diff --git a/openair-cn/NAS/MME/EMM/emm_proc.h b/openair-cn/NAS/MME/EMM/emm_proc.h deleted file mode 100644 index d7892a03b1..0000000000 --- a/openair-cn/NAS/MME/EMM/emm_proc.h +++ /dev/null @@ -1,199 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** -Source emm_proc.h - -Version 0.1 - -Date 2012/10/16 - -Product NAS stack - -Subsystem EPS Mobility Management - -Author Frederic Maurel - -Description Defines the EPS Mobility Management procedures executed at - the EMM Service Access Points. - -*****************************************************************************/ -#ifndef __EMM_PROC_H__ -#define __EMM_PROC_H__ - -#include "commonDef.h" -#include "OctetString.h" - -#include "EmmCommon.h" -#include "emmData.h" - - -/****************************************************************************/ -/********************* G L O B A L C O N S T A N T S *******************/ -/****************************************************************************/ - -/* Type of network attachment */ -typedef enum { - EMM_ATTACH_TYPE_EPS = 0, - EMM_ATTACH_TYPE_IMSI, - EMM_ATTACH_TYPE_EMERGENCY, - EMM_ATTACH_TYPE_RESERVED, -} emm_proc_attach_type_t; - -/* Type of network detach */ -typedef enum { - EMM_DETACH_TYPE_EPS = 0, - EMM_DETACH_TYPE_IMSI, - EMM_DETACH_TYPE_EPS_IMSI, - EMM_DETACH_TYPE_REATTACH, - EMM_DETACH_TYPE_NOT_REATTACH, - EMM_DETACH_TYPE_RESERVED, -} emm_proc_detach_type_t; - -/* Type of requested identity */ -typedef enum { - EMM_IDENT_TYPE_NOT_AVAILABLE = 0, - EMM_IDENT_TYPE_IMSI, - EMM_IDENT_TYPE_IMEI, - EMM_IDENT_TYPE_IMEISV, - EMM_IDENT_TYPE_TMSI -} emm_proc_identity_type_t; - -/****************************************************************************/ -/************************ G L O B A L T Y P E S ************************/ -/****************************************************************************/ - -/****************************************************************************/ -/******************** G L O B A L V A R I A B L E S ********************/ -/****************************************************************************/ - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -/* - *--------------------------------------------------------------------------- - * EMM status procedure - *--------------------------------------------------------------------------- - */ -int emm_proc_status_ind(unsigned int ueid, int emm_cause); -int emm_proc_status(unsigned int ueid, int emm_cause); - -/* - *--------------------------------------------------------------------------- - * Lower layer procedure - *--------------------------------------------------------------------------- - */ - - -/* - *--------------------------------------------------------------------------- - * UE's Idle mode procedure - *--------------------------------------------------------------------------- - */ - - -/* - * -------------------------------------------------------------------------- - * Attach procedure - * -------------------------------------------------------------------------- - */ - - -int emm_proc_attach_request(unsigned int ueid, emm_proc_attach_type_t type, - int native_ksi, int ksi, int native_guti, GUTI_t *guti, imsi_t *imsi, - imei_t *imei, tai_t *tai, int eea, int eia, int ucs2, int uea, int uia, int gea, - int umts_present, int gprs_present, const OctetString *esm_msg); -int emm_proc_attach_reject(unsigned int ueid, int emm_cause); -int emm_proc_attach_complete(unsigned int ueid, const OctetString *esm_msg); -int emm_proc_tracking_area_update_reject(unsigned int ueid, int emm_cause); - -/* - * -------------------------------------------------------------------------- - * Detach procedure - * -------------------------------------------------------------------------- - */ - -int emm_proc_detach(unsigned int ueid, emm_proc_detach_type_t type); -int emm_proc_detach_request(unsigned int ueid, emm_proc_detach_type_t type, - int switch_off, int native_ksi, int ksi, GUTI_t *guti, imsi_t *imsi, - imei_t *imei); - -/* - * -------------------------------------------------------------------------- - * Identification procedure - * -------------------------------------------------------------------------- - */ -int emm_proc_identification(unsigned int ueid, - emm_data_context_t *emm_ctx, - emm_proc_identity_type_t type, - emm_common_success_callback_t success, - emm_common_reject_callback_t reject, - emm_common_failure_callback_t failure); -int emm_proc_identification_complete(unsigned int ueid, const imsi_t *imsi, - const imei_t *imei, uint32_t *tmsi); - -/* - * -------------------------------------------------------------------------- - * Authentication procedure - * -------------------------------------------------------------------------- - */ - -int emm_proc_authentication(void *ctx, unsigned int ueid, int ksi, - const OctetString *_rand, const OctetString *autn, - emm_common_success_callback_t success, - emm_common_reject_callback_t reject, - emm_common_failure_callback_t failure); -int emm_proc_authentication_complete(unsigned int ueid, int emm_cause, - const OctetString *res); - -int emm_attach_security(void *args); - -/* - * -------------------------------------------------------------------------- - * Security mode control procedure - * -------------------------------------------------------------------------- - */ - -int emm_proc_security_mode_control(unsigned int ueid, int ksi, - int eea, int eia,int ucs2, int uea, int uia, int gea, - int umts_present, int gprs_present, - emm_common_success_callback_t success, - emm_common_reject_callback_t reject, - emm_common_failure_callback_t failure); -int emm_proc_security_mode_complete(unsigned int ueid); -int emm_proc_security_mode_reject(unsigned int ueid); - -/* - *--------------------------------------------------------------------------- - * Network indication handlers - *--------------------------------------------------------------------------- - */ - - -#endif /* __EMM_PROC_H__*/ diff --git a/openair-cn/NAS/MME/ESM/DedicatedEpsBearerContextActivation.c b/openair-cn/NAS/MME/ESM/DedicatedEpsBearerContextActivation.c deleted file mode 100644 index 813b29770d..0000000000 --- a/openair-cn/NAS/MME/ESM/DedicatedEpsBearerContextActivation.c +++ /dev/null @@ -1,442 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** -Source DedicatedEpsBearerContextActivation.c - -Version 0.1 - -Date 2013/07/16 - -Product NAS stack - -Subsystem EPS Session Management - -Author Frederic Maurel - -Description Defines the dedicated EPS bearer context activation ESM - procedure executed by the Non-Access Stratum. - - The purpose of the dedicated EPS bearer context activation - procedure is to establish an EPS bearer context with specific - QoS and TFT between the UE and the EPC. - - The procedure is initiated by the network, but may be requested - by the UE by means of the UE requested bearer resource alloca- - tion procedure or the UE requested bearer resource modification - procedure. - It can be part of the attach procedure or be initiated together - with the default EPS bearer context activation procedure when - the UE initiated stand-alone PDN connectivity procedure. - -*****************************************************************************/ - -#include "esm_proc.h" -#include "commonDef.h" -#include "nas_log.h" - -#include "esm_cause.h" -#include "esm_ebr.h" -#include "esm_ebr_context.h" - -#include "emm_sap.h" - -/****************************************************************************/ -/**************** E X T E R N A L D E F I N I T I O N S ****************/ -/****************************************************************************/ - -/****************************************************************************/ -/******************* L O C A L D E F I N I T I O N S *******************/ -/****************************************************************************/ - -/* - * -------------------------------------------------------------------------- - * Internal data handled by the dedicated EPS bearer context activation - * procedure in the MME - * -------------------------------------------------------------------------- - */ -/* - * Timer handlers - */ -static void *_dedicated_eps_bearer_activate_t3485_handler(void *); - -/* Maximum value of the activate dedicated EPS bearer context request - * retransmission counter */ -#define DEDICATED_EPS_BEARER_ACTIVATE_COUNTER_MAX 5 - -static int _dedicated_eps_bearer_activate(emm_data_context_t *ctx, int ebi, - const OctetString *msg); - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -/* - * -------------------------------------------------------------------------- - * Dedicated EPS bearer context activation procedure executed by the MME - * -------------------------------------------------------------------------- - */ -/**************************************************************************** - ** ** - ** Name: esm_proc_dedicated_eps_bearer_context() ** - ** ** - ** Description: Allocates resources required for activation of a dedica- ** - ** ted EPS bearer context. ** - ** ** - ** Inputs: ueid: UE local identifier ** - ** pid: PDN connection identifier ** - ** esm_qos: EPS bearer level QoS parameters ** - ** tft: Traffic flow template parameters ** - ** Others: None ** - ** ** - ** Outputs: ebi: EPS bearer identity assigned to the new ** - ** dedicated bearer context ** - ** default_ebi: EPS bearer identity of the associated de- ** - ** fault EPS bearer context ** - ** esm_cause: Cause code returned upon ESM procedure ** - ** failure ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int esm_proc_dedicated_eps_bearer_context(emm_data_context_t *ctx, int pid, - unsigned int *ebi, - unsigned int *default_ebi, - const esm_proc_qos_t *qos, - const esm_proc_tft_t *tft, - int *esm_cause) -{ - LOG_FUNC_IN; - - LOG_TRACE(INFO, "ESM-PROC - Dedicated EPS bearer context activation " - "(ueid="NAS_UE_ID_FMT", pid=%d)", ctx->ueid, pid); - - /* Assign new EPS bearer context */ - *ebi = esm_ebr_assign(ctx, ESM_EBI_UNASSIGNED); - - if (*ebi != ESM_EBI_UNASSIGNED) { - /* Create dedicated EPS bearer context */ - *default_ebi = esm_ebr_context_create(ctx, pid, *ebi, FALSE, qos, tft); - - if (*default_ebi == ESM_EBI_UNASSIGNED) { - /* No resource available */ - LOG_TRACE(WARNING, "ESM-PROC - Failed to create dedicated EPS " - "bearer context (ebi=%d)", *ebi); - *esm_cause = ESM_CAUSE_INSUFFICIENT_RESOURCES; - LOG_FUNC_RETURN (RETURNerror); - } - - LOG_FUNC_RETURN (RETURNok); - } - - LOG_TRACE(WARNING, "ESM-PROC - Failed to assign new EPS bearer context"); - *esm_cause = ESM_CAUSE_INSUFFICIENT_RESOURCES; - LOG_FUNC_RETURN (RETURNerror); -} - -/**************************************************************************** - ** ** - ** Name: esm_proc_dedicated_eps_bearer_context_request() ** - ** ** - ** Description: Initiates the dedicated EPS bearer context activation pro-** - ** cedure ** - ** ** - ** 3GPP TS 24.301, section 6.4.2.2 ** - ** The MME initiates the dedicated EPS bearer context activa-** - ** tion procedure by sending an ACTIVATE DEDICATED EPS BEA- ** - ** RER CONTEXT REQUEST message, starting timer T3485 and en- ** - ** tering state BEARER CONTEXT ACTIVE PENDING. ** - ** ** - ** Inputs: is_standalone: Not used (always TRUE) ** - ** ueid: UE lower layer identifier ** - ** ebi: EPS bearer identity ** - ** msg: Encoded ESM message to be sent ** - ** ue_triggered: TRUE if the EPS bearer context procedure ** - ** was triggered by the UE ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int esm_proc_dedicated_eps_bearer_context_request(int is_standalone, - emm_data_context_t *ctx, int ebi, - OctetString *msg, int ue_triggered) -{ - LOG_FUNC_IN; - - int rc = RETURNok; - - LOG_TRACE(INFO,"ESM-PROC - Initiate dedicated EPS bearer context " - "activation (ueid="NAS_UE_ID_FMT", ebi=%d)", ctx->ueid, ebi); - - /* Send activate dedicated EPS bearer context request message and - * start timer T3485 */ - rc = _dedicated_eps_bearer_activate(ctx, ebi, msg); - - if (rc != RETURNerror) { - /* Set the EPS bearer context state to ACTIVE PENDING */ - rc = esm_ebr_set_status(ctx, ebi, ESM_EBR_ACTIVE_PENDING, ue_triggered); - - if (rc != RETURNok) { - /* The EPS bearer context was already in ACTIVE PENDING state */ - LOG_TRACE(WARNING, "ESM-PROC - EBI %d was already ACTIVE PENDING", - ebi); - } - } - - LOG_FUNC_RETURN (rc); -} - -/**************************************************************************** - ** ** - ** Name: esm_proc_dedicated_eps_bearer_context_accept() ** - ** ** - ** Description: Performs dedicated EPS bearer context activation procedu- ** - ** re accepted by the UE. ** - ** ** - ** 3GPP TS 24.301, section 6.4.2.3 ** - ** Upon receipt of the ACTIVATE DEDICATED EPS BEARER CONTEXT ** - ** ACCEPT message, the MME shall stop the timer T3485 and ** - ** enter the state BEARER CONTEXT ACTIVE. ** - ** ** - ** Inputs: ueid: UE local identifier ** - ** ebi: EPS bearer identity ** - ** Others: None ** - ** ** - ** Outputs: esm_cause: Cause code returned upon ESM procedure ** - ** failure ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int esm_proc_dedicated_eps_bearer_context_accept(emm_data_context_t *ctx, int ebi, - int *esm_cause) -{ - LOG_FUNC_IN; - - int rc; - - LOG_TRACE(INFO, "ESM-PROC - Dedicated EPS bearer context activation " - "accepted by the UE (ueid="NAS_UE_ID_FMT", ebi=%d)", ctx->ueid, ebi); - - /* Stop T3485 timer */ - rc = esm_ebr_stop_timer(ctx, ebi); - - if (rc != RETURNerror) { - /* Set the EPS bearer context state to ACTIVE */ - rc = esm_ebr_set_status(ctx, ebi, ESM_EBR_ACTIVE, FALSE); - - if (rc != RETURNok) { - /* The EPS bearer context was already in ACTIVE state */ - LOG_TRACE(WARNING, "ESM-PROC - EBI %d was already ACTIVE", ebi); - *esm_cause = ESM_CAUSE_PROTOCOL_ERROR; - } - } - - LOG_FUNC_RETURN (rc); -} - -/**************************************************************************** - ** ** - ** Name: esm_proc_dedicated_eps_bearer_context_reject() ** - ** ** - ** Description: Performs dedicated EPS bearer context activation procedu- ** - ** re not accepted by the UE. ** - ** ** - ** 3GPP TS 24.301, section 6.4.2.4 ** - ** Upon receipt of the ACTIVATE DEDICATED EPS BEARER CONTEXT ** - ** REJECT message, the MME shall stop the timer T3485, enter ** - ** the state BEARER CONTEXT INACTIVE and abort the dedicated ** - ** EPS bearer context activation procedure. ** - ** The MME also requests the lower layer to release the ra- ** - ** dio resources that were established during the dedicated ** - ** EPS bearer context activation. ** - ** ** - ** Inputs: ueid: UE local identifier ** - ** ebi: EPS bearer identity ** - ** Others: None ** - ** ** - ** Outputs: esm_cause: Cause code returned upon ESM procedure ** - ** failure ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int esm_proc_dedicated_eps_bearer_context_reject(emm_data_context_t *ctx, int ebi, - int *esm_cause) -{ - int rc; - - LOG_FUNC_IN; - - LOG_TRACE(WARNING, "ESM-PROC - Dedicated EPS bearer context activation " - "not accepted by the UE (ueid="NAS_UE_ID_FMT", ebi=%d)", ctx->ueid, ebi); - - /* Stop T3485 timer if running */ - rc = esm_ebr_stop_timer(ctx, ebi); - - if (rc != RETURNerror) { - int pid, bid; - /* Release the dedicated EPS bearer context and enter state INACTIVE */ - rc = esm_proc_eps_bearer_context_deactivate(ctx, TRUE, ebi, - &pid, &bid, NULL); - - if (rc != RETURNok) { - /* Failed to release the dedicated EPS bearer context */ - *esm_cause = ESM_CAUSE_PROTOCOL_ERROR; - } - } - - LOG_FUNC_RETURN (rc); -} - - -/****************************************************************************/ -/********************* L O C A L F U N C T I O N S *********************/ -/****************************************************************************/ - -/* - * -------------------------------------------------------------------------- - * Timer handlers - * -------------------------------------------------------------------------- - */ -/**************************************************************************** - ** ** - ** Name: _dedicated_eps_bearer_activate_t3485_handler() ** - ** ** - ** Description: T3485 timeout handler ** - ** ** - ** 3GPP TS 24.301, section 6.4.2.6, case a ** - ** On the first expiry of the timer T3485, the MME shall re- ** - ** send the ACTIVATE DEDICATED EPS BEARER CONTEXT REQUEST ** - ** and shall reset and restart timer T3485. This retransmis- ** - ** sion is repeated four times, i.e. on the fifth expiry of ** - ** timer T3485, the MME shall abort the procedure, release ** - ** any resources allocated for this activation and enter the ** - ** state BEARER CONTEXT INACTIVE. ** - ** ** - ** Inputs: args: handler parameters ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: None ** - ** Others: None ** - ** ** - ***************************************************************************/ -static void *_dedicated_eps_bearer_activate_t3485_handler(void *args) -{ - LOG_FUNC_IN; - - int rc; - - /* Get retransmission timer parameters data */ - esm_ebr_timer_data_t *data = (esm_ebr_timer_data_t *)(args); - - /* Increment the retransmission counter */ - data->count += 1; - - LOG_TRACE(WARNING, "ESM-PROC - T3485 timer expired (ueid="NAS_UE_ID_FMT", ebi=%d), " - "retransmission counter = %d", - data->ueid, data->ebi, data->count); - - if (data->count < DEDICATED_EPS_BEARER_ACTIVATE_COUNTER_MAX) { - /* Re-send activate dedicated EPS bearer context request message - * to the UE */ - rc = _dedicated_eps_bearer_activate(data->ctx, data->ebi, &data->msg); - } else { - /* - * The maximum number of activate dedicated EPS bearer context request - * message retransmission has exceed - */ - int pid, bid; - /* Release the dedicated EPS bearer context and enter state INACTIVE */ - rc = esm_proc_eps_bearer_context_deactivate(data->ctx, TRUE, - data->ebi, &pid, &bid, - NULL); - - if (rc != RETURNerror) { - /* Stop timer T3485 */ - rc = esm_ebr_stop_timer(data->ctx, data->ebi); - } - } - - LOG_FUNC_RETURN (NULL); -} - -/* - * -------------------------------------------------------------------------- - * MME specific local functions - * -------------------------------------------------------------------------- - */ - -/**************************************************************************** - ** ** - ** Name: _dedicated_eps_bearer_activate() ** - ** ** - ** Description: Sends ACTIVATE DEDICATED EPS BEREAR CONTEXT REQUEST mes- ** - ** sage and starts timer T3485 ** - ** ** - ** Inputs: ueid: UE local identifier ** - ** ebi: EPS bearer identity ** - ** msg: Encoded ESM message to be sent ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: T3485 ** - ** ** - ***************************************************************************/ -static int _dedicated_eps_bearer_activate(emm_data_context_t *ctx, int ebi, - const OctetString *msg) -{ - LOG_FUNC_IN; - - emm_sap_t emm_sap; - int rc; - - /* - * Notify EMM that an activate dedicated EPS bearer context request - * message has to be sent to the UE - */ - emm_esm_data_t *emm_esm = &emm_sap.u.emm_esm.u.data; - emm_sap.primitive = EMMESM_UNITDATA_REQ; - emm_sap.u.emm_esm.ueid = ctx->ueid; - emm_sap.u.emm_esm.ctx = ctx; - emm_esm->msg = *msg; - rc = emm_sap_send(&emm_sap); - - if (rc != RETURNerror) { - /* Start T3485 retransmission timer */ - rc = esm_ebr_start_timer(ctx, ebi, msg, T3485_DEFAULT_VALUE, - _dedicated_eps_bearer_activate_t3485_handler); - } - - LOG_FUNC_RETURN (rc); -} diff --git a/openair-cn/NAS/MME/ESM/DefaultEpsBearerContextActivation.c b/openair-cn/NAS/MME/ESM/DefaultEpsBearerContextActivation.c deleted file mode 100644 index 831fc3327d..0000000000 --- a/openair-cn/NAS/MME/ESM/DefaultEpsBearerContextActivation.c +++ /dev/null @@ -1,497 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** -Source DefaultEpsBearerContextActivation.c - -Version 0.1 - -Date 2013/01/28 - -Product NAS stack - -Subsystem EPS Session Management - -Author Frederic Maurel - -Description Defines the default EPS bearer context activation ESM - procedure executed by the Non-Access Stratum. - - The purpose of the default bearer context activation procedure - is to establish a default EPS bearer context between the UE - and the EPC. - - The procedure is initiated by the network as a response to - the PDN CONNECTIVITY REQUEST message received from the UE. - It can be part of the attach procedure. - -*****************************************************************************/ - -#include "esm_proc.h" -#include "commonDef.h" -#include "nas_log.h" - -#include "esm_cause.h" -#include "esm_ebr.h" -#include "esm_ebr_context.h" - -#include "emm_sap.h" - -/****************************************************************************/ -/**************** E X T E R N A L D E F I N I T I O N S ****************/ -/****************************************************************************/ - -/****************************************************************************/ -/******************* L O C A L D E F I N I T I O N S *******************/ -/****************************************************************************/ - - -/* - * -------------------------------------------------------------------------- - * Internal data handled by the default EPS bearer context activation - * procedure in the MME - * -------------------------------------------------------------------------- - */ -/* - * Timer handlers - */ -static void *_default_eps_bearer_activate_t3485_handler(void *); - -/* Maximum value of the activate default EPS bearer context request - * retransmission counter */ -#define DEFAULT_EPS_BEARER_ACTIVATE_COUNTER_MAX 5 - -static int _default_eps_bearer_activate(emm_data_context_t *ctx, int ebi, - const OctetString *msg); - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -/* - * -------------------------------------------------------------------------- - * Default EPS bearer context activation procedure executed by the MME - * -------------------------------------------------------------------------- - */ -/**************************************************************************** - ** ** - ** Name: esm_proc_default_eps_bearer_context() ** - ** ** - ** Description: Allocates resources required for activation of a default ** - ** EPS bearer context. ** - ** ** - ** Inputs: ueid: UE local identifier ** - ** pid: PDN connection identifier ** - ** qos: EPS bearer level QoS parameters ** - ** Others: None ** - ** ** - ** Outputs: ebi: EPS bearer identity assigned to the de- ** - ** fault EPS bearer context ** - ** esm_cause: Cause code returned upon ESM procedure ** - ** failure ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int esm_proc_default_eps_bearer_context(emm_data_context_t *ctx, int pid, - unsigned int *ebi, - const esm_proc_qos_t *qos, - int *esm_cause) -{ - LOG_FUNC_IN; - - LOG_TRACE(INFO, "ESM-PROC - Default EPS bearer context activation " - "(ueid="NAS_UE_ID_FMT", pid=%d, GBR UL %u GBR DL %u, MBR UL %u MBR DL %u QCI %u)", - ctx->ueid, - pid, - qos->gbrUL, - qos->gbrDL, - qos->mbrUL, - qos->mbrDL, - qos->qci); - - /* Assign new EPS bearer context */ - *ebi = esm_ebr_assign(ctx, ESM_EBI_UNASSIGNED); - - if (*ebi != ESM_EBI_UNASSIGNED) { - /* Create default EPS bearer context */ - *ebi = esm_ebr_context_create(ctx, pid, *ebi, TRUE, qos, NULL); - - if (*ebi == ESM_EBI_UNASSIGNED) { - /* No resource available */ - LOG_TRACE(WARNING, "ESM-PROC - Failed to create new default EPS " - "bearer context (ebi=%d)", *ebi); - *esm_cause = ESM_CAUSE_INSUFFICIENT_RESOURCES; - LOG_FUNC_RETURN (RETURNerror); - } - - LOG_FUNC_RETURN (RETURNok); - } - - LOG_TRACE(WARNING, "ESM-PROC - Failed to assign new EPS bearer context"); - *esm_cause = ESM_CAUSE_INSUFFICIENT_RESOURCES; - LOG_FUNC_RETURN (RETURNerror); -} - -/**************************************************************************** - ** ** - ** Name: esm_proc_default_eps_bearer_context_request() ** - ** ** - ** Description: Initiates the default EPS bearer context activation pro- ** - ** cedure ** - ** ** - ** 3GPP TS 24.301, section 6.4.1.2 ** - ** The MME initiates the default EPS bearer context activa- ** - ** tion procedure by sending an ACTIVATE DEFAULT EPS BEARER ** - ** CONTEXT REQUEST message, starting timer T3485 and ente- ** - ** ring state BEARER CONTEXT ACTIVE PENDING. ** - ** ** - ** Inputs: is_standalone: Indicate whether the default bearer is ** - ** activated as part of the attach procedure ** - ** or as the response to a stand-alone PDN ** - ** CONNECTIVITY REQUEST message ** - ** ueid: UE lower layer identifier ** - ** ebi: EPS bearer identity ** - ** msg: Encoded ESM message to be sent ** - ** ue_triggered: TRUE if the EPS bearer context procedure ** - ** was triggered by the UE ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int esm_proc_default_eps_bearer_context_request(int is_standalone, - emm_data_context_t *ctx, int ebi, - OctetString *msg, int ue_triggered) -{ - int rc = RETURNok; - - LOG_FUNC_IN; - - - if (is_standalone) { - /* Send activate default EPS bearer context request message and - * start timer T3485 */ - LOG_TRACE(INFO,"ESM-PROC - Initiate standalone default EPS bearer context activation " - "(ueid="NAS_UE_ID_FMT", ebi=%d)", ctx->ueid, ebi); - rc = _default_eps_bearer_activate(ctx, ebi, msg); - } else { - LOG_TRACE(INFO,"ESM-PROC - Initiate non standalone default EPS bearer context activation " - "(ueid="NAS_UE_ID_FMT", ebi=%d)", ctx->ueid, ebi); - } - - if (rc != RETURNerror) { - /* Set the EPS bearer context state to ACTIVE PENDING */ - rc = esm_ebr_set_status(ctx, ebi, ESM_EBR_ACTIVE_PENDING, ue_triggered); - - if (rc != RETURNok) { - /* The EPS bearer context was already in ACTIVE PENDING state */ - LOG_TRACE(WARNING, "ESM-PROC - EBI %d was already ACTIVE PENDING", - ebi); - } - } - - LOG_FUNC_RETURN (rc); -} - -/**************************************************************************** - ** ** - ** Name: esm_proc_default_eps_bearer_context_accept() ** - ** ** - ** Description: Performs default EPS bearer context activation procedure ** - ** accepted by the UE. ** - ** ** - ** 3GPP TS 24.301, section 6.4.1.3 ** - ** Upon receipt of the ACTIVATE DEFAULT EPS BEARER CONTEXT ** - ** ACCEPT message, the MME shall enter the state BEARER CON- ** - ** TEXT ACTIVE and stop the timer T3485, if it is running. ** - ** ** - ** Inputs: ueid: UE local identifier ** - ** ebi: EPS bearer identity ** - ** Others: None ** - ** ** - ** Outputs: esm_cause: Cause code returned upon ESM procedure ** - ** failure ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int esm_proc_default_eps_bearer_context_accept(emm_data_context_t *ctx, int ebi, - int *esm_cause) -{ - LOG_FUNC_IN; - - int rc; - - LOG_TRACE(INFO, "ESM-PROC - Default EPS bearer context activation " - "accepted by the UE (ueid="NAS_UE_ID_FMT", ebi=%d)", ctx->ueid, ebi); - - /* Stop T3485 timer if running */ - rc = esm_ebr_stop_timer(ctx, ebi); - - if (rc != RETURNerror) { - /* Set the EPS bearer context state to ACTIVE */ - rc = esm_ebr_set_status(ctx, ebi, ESM_EBR_ACTIVE, FALSE); - - if (rc != RETURNok) { - /* The EPS bearer context was already in ACTIVE state */ - LOG_TRACE(WARNING, "ESM-PROC - EBI %d was already ACTIVE", ebi); - *esm_cause = ESM_CAUSE_PROTOCOL_ERROR; - } - } - - LOG_FUNC_RETURN (rc); -} - -/**************************************************************************** - ** ** - ** Name: esm_proc_default_eps_bearer_context_reject() ** - ** ** - ** Description: Performs default EPS bearer context activation procedure ** - ** not accepted by the UE. ** - ** ** - ** 3GPP TS 24.301, section 6.4.1.4 ** - ** Upon receipt of the ACTIVATE DEFAULT EPS BEARER CONTEXT ** - ** REJECT message, the MME shall enter the state BEARER CON- ** - ** TEXT INACTIVE and stop the timer T3485, if it is running. ** - ** ** - ** Inputs: ueid: UE local identifier ** - ** ebi: EPS bearer identity ** - ** Others: None ** - ** ** - ** Outputs: esm_cause: Cause code returned upon ESM procedure ** - ** failure ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int esm_proc_default_eps_bearer_context_reject(emm_data_context_t *ctx, int ebi, - int *esm_cause) -{ - LOG_FUNC_IN; - - int rc; - - LOG_TRACE(WARNING, "ESM-PROC - Default EPS bearer context activation " - "not accepted by the UE (ueid="NAS_UE_ID_FMT", ebi=%d)", ctx->ueid, ebi); - - /* Stop T3485 timer if running */ - rc = esm_ebr_stop_timer(ctx, ebi); - - if (rc != RETURNerror) { - int pid, bid; - /* Release the default EPS bearer context and enter state INACTIVE */ - rc = esm_proc_eps_bearer_context_deactivate(ctx, TRUE, ebi, - &pid, &bid, NULL); - - if (rc != RETURNok) { - /* Failed to release the default EPS bearer context */ - *esm_cause = ESM_CAUSE_PROTOCOL_ERROR; - } - } - - LOG_FUNC_RETURN (rc); -} - -/**************************************************************************** - ** ** - ** Name: esm_proc_default_eps_bearer_context_failure() ** - ** ** - ** Description: Performs default EPS bearer context activation procedure ** - ** upon receiving notification from the EPS Mobility Manage- ** - ** ment sublayer that EMM procedure that initiated EPS de- ** - ** fault bearer context activation locally failed. ** - ** ** - ** The MME releases the default EPS bearer context previous- ** - ** ly allocated when ACTIVATE DEFAULT EPS BEARER CONTEXT RE- ** - ** QUEST message was received. ** - ** ** - ** Inputs: ueid: UE local identifier ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: The identifier of the PDN connection the ** - ** default EPS bearer context belongs to if ** - ** successfully released; ** - ** RETURNerror otherwise. ** - ** Others: None ** - ** ** - ***************************************************************************/ -int esm_proc_default_eps_bearer_context_failure(emm_data_context_t *ctx) -{ - int rc = RETURNerror; - int pid; - - LOG_FUNC_IN; - - LOG_TRACE(WARNING, "ESM-PROC - Default EPS bearer context activation " - "failure (ueid="NAS_UE_ID_FMT")", ctx->ueid); - - /* Get the EPS bearer identity of the EPS bearer context which is still - * pending in the active pending state */ - int ebi = esm_ebr_get_pending_ebi(ctx, ESM_EBR_ACTIVE_PENDING); - - if (ebi != ESM_EBI_UNASSIGNED) { - int bid; - /* Release the default EPS bearer context and enter state INACTIVE */ - rc = esm_proc_eps_bearer_context_deactivate(ctx, TRUE, ebi, - &pid, &bid, NULL); - } - - if (rc != RETURNerror) { - LOG_FUNC_RETURN (pid); - } - - LOG_FUNC_RETURN (RETURNerror); -} - - - -/****************************************************************************/ -/********************* L O C A L F U N C T I O N S *********************/ -/****************************************************************************/ - -/* - * -------------------------------------------------------------------------- - * Timer handlers - * -------------------------------------------------------------------------- - */ -/**************************************************************************** - ** ** - ** Name: _default_eps_bearer_activate_t3485_handler() ** - ** ** - ** Description: T3485 timeout handler ** - ** ** - ** 3GPP TS 24.301, section 6.4.1.6, case a ** - ** On the first expiry of the timer T3485, the MME shall re- ** - ** send the ACTIVATE DEFAULT EPS BEARER CONTEXT REQUEST and ** - ** shall reset and restart timer T3485. This retransmission ** - ** is repeated four times, i.e. on the fifth expiry of timer ** - ** T3485, the MME shall release possibly allocated resources ** - ** for this activation and shall abort the procedure. ** - ** ** - ** Inputs: args: handler parameters ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: None ** - ** Others: None ** - ** ** - ***************************************************************************/ -static void *_default_eps_bearer_activate_t3485_handler(void *args) -{ - LOG_FUNC_IN; - - int rc; - - /* Get retransmission timer parameters data */ - esm_ebr_timer_data_t *data = (esm_ebr_timer_data_t *)(args); - - /* Increment the retransmission counter */ - data->count += 1; - - LOG_TRACE(WARNING, "ESM-PROC - T3485 timer expired (ueid="NAS_UE_ID_FMT", ebi=%d), " - "retransmission counter = %d", - data->ueid, data->ebi, data->count); - - if (data->count < DEFAULT_EPS_BEARER_ACTIVATE_COUNTER_MAX) { - /* Re-send activate default EPS bearer context request message - * to the UE */ - rc = _default_eps_bearer_activate(data->ctx, data->ebi, &data->msg); - } else { - /* - * The maximum number of activate default EPS bearer context request - * message retransmission has exceed - */ - int pid, bid; - /* Release the default EPS bearer context and enter state INACTIVE */ - rc = esm_proc_eps_bearer_context_deactivate(data->ctx, TRUE, - data->ebi, &pid, &bid, - NULL); - - if (rc != RETURNerror) { - /* Stop timer T3485 */ - rc = esm_ebr_stop_timer(data->ctx, data->ebi); - } - } - - LOG_FUNC_RETURN (NULL); -} - -/* - * -------------------------------------------------------------------------- - * MME specific local functions - * -------------------------------------------------------------------------- - */ - -/**************************************************************************** - ** ** - ** Name: _default_eps_bearer_activate() ** - ** ** - ** Description: Sends ACTIVATE DEFAULT EPS BEREAR CONTEXT REQUEST message ** - ** and starts timer T3485 ** - ** ** - ** Inputs: ueid: UE local identifier ** - ** ebi: EPS bearer identity ** - ** msg: Encoded ESM message to be sent ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: T3485 ** - ** ** - ***************************************************************************/ -static int _default_eps_bearer_activate(emm_data_context_t *ctx, int ebi, - const OctetString *msg) -{ - LOG_FUNC_IN; - - emm_sap_t emm_sap; - int rc; - - /* - * Notify EMM that an activate default EPS bearer context request message - * has to be sent to the UE - */ - emm_esm_data_t *emm_esm = &emm_sap.u.emm_esm.u.data; - emm_sap.primitive = EMMESM_UNITDATA_REQ; - emm_sap.u.emm_esm.ueid = ctx->ueid; - emm_sap.u.emm_esm.ctx = ctx; - emm_esm->msg = *msg; - rc = emm_sap_send(&emm_sap); - - if (rc != RETURNerror) { - /* Start T3485 retransmission timer */ - rc = esm_ebr_start_timer(ctx, ebi, msg, T3485_DEFAULT_VALUE, - _default_eps_bearer_activate_t3485_handler); - } - - LOG_FUNC_RETURN (rc); -} diff --git a/openair-cn/NAS/MME/ESM/EpsBearerContextDeactivation.c b/openair-cn/NAS/MME/ESM/EpsBearerContextDeactivation.c deleted file mode 100644 index b26240a848..0000000000 --- a/openair-cn/NAS/MME/ESM/EpsBearerContextDeactivation.c +++ /dev/null @@ -1,483 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** -Source EpsBearerContextDeactivation.c - -Version 0.1 - -Date 2013/05/22 - -Product NAS stack - -Subsystem EPS Session Management - -Author Frederic Maurel - -Description Defines the EPS bearer context deactivation ESM procedure - executed by the Non-Access Stratum. - - The purpose of the EPS bearer context deactivation procedure - is to deactivate an EPS bearer context or disconnect from a - PDN by deactivating all EPS bearer contexts to the PDN. - The EPS bearer context deactivation procedure is initiated - by the network, and it may be triggered by the UE by means - of the UE requested bearer resource modification procedure - or UE requested PDN disconnect procedure. - -*****************************************************************************/ - -#include "esm_proc.h" -#include "commonDef.h" -#include "nas_log.h" - -#include "emmData.h" -#include "esmData.h" -#include "esm_cause.h" -#include "esm_ebr.h" -#include "esm_ebr_context.h" - -#include "emm_sap.h" -#include "esm_sap.h" - -/****************************************************************************/ -/**************** E X T E R N A L D E F I N I T I O N S ****************/ -/****************************************************************************/ - -/****************************************************************************/ -/******************* L O C A L D E F I N I T I O N S *******************/ -/****************************************************************************/ - - - -/* - * -------------------------------------------------------------------------- - * Internal data handled by the EPS bearer context deactivation procedure - * in the MME - * -------------------------------------------------------------------------- - */ -/* - * Timer handlers - */ -static void *_eps_bearer_deactivate_t3495_handler(void *); - -/* Maximum value of the deactivate EPS bearer context request - * retransmission counter */ -#define EPS_BEARER_DEACTIVATE_COUNTER_MAX 5 - -static int _eps_bearer_deactivate(emm_data_context_t *ctx, int ebi, - const OctetString *msg); -static int _eps_bearer_release(emm_data_context_t *ctx, int ebi, int *pid, int *bid); - - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -/* - * -------------------------------------------------------------------------- - * EPS bearer context deactivation procedure executed by the MME - * -------------------------------------------------------------------------- - */ -/**************************************************************************** - ** ** - ** Name: esm_proc_eps_bearer_context_deactivate() ** - ** ** - ** Description: Locally releases the EPS bearer context identified by the ** - ** given EPS bearer identity, without peer-to-peer signal- ** - ** ling between the UE and the MME, or checks whether an EPS ** - ** bearer context with specified EPS bearer identity has ** - ** been activated for the given UE. ** - ** ** - ** Inputs: ueid: UE lower layer identifier ** - ** is local: TRUE if the EPS bearer context has to be ** - ** locally released without peer-to-peer si- ** - ** gnalling between the UE and the MME ** - ** ebi: EPS bearer identity of the EPS bearer con- ** - ** text to be deactivated ** - ** Others: _esm_data ** - ** ** - ** Outputs: pid: Identifier of the PDN connection the EPS ** - ** bearer belongs to ** - ** bid: Identifier of the released EPS bearer con- ** - ** text entry ** - ** esm_cause: Cause code returned upon ESM procedure ** - ** failure ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int esm_proc_eps_bearer_context_deactivate(emm_data_context_t *ctx, int is_local, - int ebi, int *pid, int *bid, - int *esm_cause) -{ - int rc = RETURNerror; - - LOG_FUNC_IN; - - if (is_local) { - if (ebi != ESM_SAP_ALL_EBI) { - /* Locally release the specified EPS bearer context */ - rc = _eps_bearer_release(ctx, ebi, pid, bid); - } else if (ctx != NULL) { - /* Locally release all the EPS bearer contexts */ - *bid = 0; - - for (*pid = 0; *pid < ESM_DATA_PDN_MAX; (*pid)++) { - if (ctx->esm_data_ctx.pdn[*pid].data) { - rc = _eps_bearer_release(ctx, ESM_EBI_UNASSIGNED, - pid, bid); - - if (rc != RETURNok) { - break; - } - } - } - } - - LOG_FUNC_RETURN (rc); - } - - LOG_TRACE(INFO, "ESM-PROC - EPS bearer context deactivation " - "(ueid="NAS_UE_ID_FMT", ebi=%d)", ctx->ueid, ebi); - - if ((ctx != NULL) && - (*pid < ESM_DATA_PDN_MAX) ) { - if (ctx->esm_data_ctx.pdn[*pid].pid != *pid) { - LOG_TRACE(ERROR, "ESM-PROC - PDN connection identifier %d " - "is not valid", *pid); - *esm_cause = ESM_CAUSE_PROTOCOL_ERROR; - } else if (ctx->esm_data_ctx.pdn[*pid].data == NULL) { - LOG_TRACE(ERROR, "ESM-PROC - PDN connection %d has not been " - "allocated", *pid); - *esm_cause = ESM_CAUSE_PROTOCOL_ERROR; - } else if (!ctx->esm_data_ctx.pdn[*pid].is_active) { - LOG_TRACE(WARNING, "ESM-PROC - PDN connection %d is not active", - *pid); - *esm_cause = ESM_CAUSE_PROTOCOL_ERROR; - } else { - int i; - esm_pdn_t *pdn = ctx->esm_data_ctx.pdn[*pid].data; - - *esm_cause = ESM_CAUSE_INVALID_EPS_BEARER_IDENTITY; - - for (i = 0; i < pdn->n_bearers; i++) { - if (pdn->bearer[i]->ebi != ebi) { - continue; - } - - /* The EPS bearer context to be released is valid */ - rc = RETURNok; - } - } - } - - LOG_FUNC_RETURN (rc); -} - -/**************************************************************************** - ** ** - ** Name: esm_proc_eps_bearer_context_deactivate_request() ** - ** ** - ** Description: Initiates the EPS bearer context deactivation procedure ** - ** ** - ** 3GPP TS 24.301, section 6.4.4.2 ** - ** If a NAS signalling connection exists, the MME initiates ** - ** the EPS bearer context deactivation procedure by sending ** - ** a DEACTIVATE EPS BEARER CONTEXT REQUEST message to the ** - ** UE, starting timer T3495 and entering state BEARER CON- ** - ** TEXT INACTIVE PENDING. ** - ** ** - ** Inputs: is_standalone: Not used - Always TRUE ** - ** ueid: UE lower layer identifier ** - ** ebi: EPS bearer identity ** - ** msg: Encoded ESM message to be sent ** - ** ue_triggered: TRUE if the EPS bearer context procedure ** - ** was triggered by the UE (not used) ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int esm_proc_eps_bearer_context_deactivate_request(int is_standalone, - emm_data_context_t *ctx, int ebi, - OctetString *msg, int ue_triggered) -{ - LOG_FUNC_IN; - - int rc; - - LOG_TRACE(INFO,"ESM-PROC - Initiate EPS bearer context deactivation " - "(ueid="NAS_UE_ID_FMT", ebi=%d)", ctx->ueid, ebi); - - /* Send deactivate EPS bearer context request message and - * start timer T3495 */ - rc = _eps_bearer_deactivate(ctx, ebi, msg); - - if (rc != RETURNerror) { - /* Set the EPS bearer context state to ACTIVE PENDING */ - rc = esm_ebr_set_status(ctx, ebi, ESM_EBR_INACTIVE_PENDING, - ue_triggered); - - if (rc != RETURNok) { - /* The EPS bearer context was already in ACTIVE state */ - LOG_TRACE(WARNING, "ESM-PROC - EBI %d was already INACTIVE PENDING", - ebi); - } - } - - LOG_FUNC_RETURN (rc); -} - -/**************************************************************************** - ** ** - ** Name: esm_proc_eps_bearer_context_deactivate_accept() ** - ** ** - ** Description: Performs EPS bearer context deactivation procedure accep- ** - ** ted by the UE. ** - ** ** - ** 3GPP TS 24.301, section 6.4.4.3 ** - ** Upon receipt of the DEACTIVATE EPS BEARER CONTEXT ACCEPT ** - ** message, the MME shall enter the state BEARER CONTEXT ** - ** INACTIVE and stop the timer T3495. ** - ** ** - ** Inputs: ueid: UE local identifier ** - ** ebi: EPS bearer identity ** - ** Others: None ** - ** ** - ** Outputs: esm_cause: Cause code returned upon ESM procedure ** - ** failure ** - ** Return: The identifier of the PDN connection to be ** - ** released, if it exists; ** - ** RETURNerror otherwise. ** - ** Others: T3495 ** - ** ** - ***************************************************************************/ -int esm_proc_eps_bearer_context_deactivate_accept(emm_data_context_t *ctx, int ebi, - int *esm_cause) -{ - LOG_FUNC_IN; - - int rc; - int pid = RETURNerror; - - LOG_TRACE(INFO, "ESM-PROC - EPS bearer context deactivation " - "accepted by the UE (ueid="NAS_UE_ID_FMT", ebi=%d)", ctx->ueid, ebi); - - /* Stop T3495 timer if running */ - rc = esm_ebr_stop_timer(ctx, ebi); - - if (rc != RETURNerror) { - int bid; - /* Release the EPS bearer context */ - rc = _eps_bearer_release(ctx, ebi, &pid, &bid); - - if (rc != RETURNok) { - /* Failed to release the EPS bearer context */ - *esm_cause = ESM_CAUSE_PROTOCOL_ERROR; - pid = RETURNerror; - } - } - - LOG_FUNC_RETURN (pid); -} - - - -/****************************************************************************/ -/********************* L O C A L F U N C T I O N S *********************/ -/****************************************************************************/ - -/* - * -------------------------------------------------------------------------- - * Timer handlers - * -------------------------------------------------------------------------- - */ -/**************************************************************************** - ** ** - ** Name: _eps_bearer_deactivate_t3495_handler() ** - ** ** - ** Description: T3495 timeout handler ** - ** ** - ** 3GPP TS 24.301, section 6.4.4.5, case a ** - ** On the first expiry of the timer T3495, the MME shall re- ** - ** send the DEACTIVATE EPS BEARER CONTEXT REQUEST and shall ** - ** reset and restart timer T3495. This retransmission is ** - ** repeated four times, i.e. on the fifth expiry of timer ** - ** T3495, the MME shall abort the procedure and deactivate ** - ** the EPS bearer context locally. ** - ** ** - ** Inputs: args: handler parameters ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: None ** - ** Others: None ** - ** ** - ***************************************************************************/ -static void *_eps_bearer_deactivate_t3495_handler(void *args) -{ - LOG_FUNC_IN; - - int rc; - - /* Get retransmission timer parameters data */ - esm_ebr_timer_data_t *data = (esm_ebr_timer_data_t *)(args); - - /* Increment the retransmission counter */ - data->count += 1; - - LOG_TRACE(WARNING, "ESM-PROC - T3495 timer expired (ueid="NAS_UE_ID_FMT", ebi=%d), " - "retransmission counter = %d", - data->ueid, data->ebi, data->count); - - if (data->count < EPS_BEARER_DEACTIVATE_COUNTER_MAX) { - /* Re-send deactivate EPS bearer context request message to the UE */ - rc = _eps_bearer_deactivate(data->ctx, data->ebi, &data->msg); - } else { - /* - * The maximum number of deactivate EPS bearer context request - * message retransmission has exceed - */ - int pid, bid; - /* Deactivate the EPS bearer context locally without peer-to-peer - * signalling between the UE and the MME */ - rc = _eps_bearer_release(data->ctx, data->ebi, &pid, &bid); - - if (rc != RETURNerror) { - /* Stop timer T3495 */ - rc = esm_ebr_stop_timer(data->ctx, data->ebi); - } - } - - LOG_FUNC_RETURN (NULL); -} - -/* - * -------------------------------------------------------------------------- - * MME specific local functions - * -------------------------------------------------------------------------- - */ - -/**************************************************************************** - ** ** - ** Name: _eps_bearer_deactivate() ** - ** ** - ** Description: Sends DEACTIVATE EPS BEREAR CONTEXT REQUEST message and ** - ** starts timer T3495 ** - ** ** - ** Inputs: ueid: UE local identifier ** - ** ebi: EPS bearer identity ** - ** msg: Encoded ESM message to be sent ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: T3495 ** - ** ** - ***************************************************************************/ -static int _eps_bearer_deactivate(emm_data_context_t *ctx, int ebi, - const OctetString *msg) -{ - LOG_FUNC_IN; - - emm_sap_t emm_sap; - int rc; - - /* - * Notify EMM that a deactivate EPS bearer context request message - * has to be sent to the UE - */ - emm_esm_data_t *emm_esm = &emm_sap.u.emm_esm.u.data; - emm_sap.primitive = EMMESM_UNITDATA_REQ; - emm_sap.u.emm_esm.ueid = ctx->ueid; - emm_sap.u.emm_esm.ctx = ctx; - emm_esm->msg = *msg; - rc = emm_sap_send(&emm_sap); - - if (rc != RETURNerror) { - /* Start T3495 retransmission timer */ - rc = esm_ebr_start_timer(ctx, ebi, msg, T3495_DEFAULT_VALUE, - _eps_bearer_deactivate_t3495_handler); - } - - LOG_FUNC_RETURN (rc); -} - -/**************************************************************************** - ** ** - ** Name: _eps_bearer_release() ** - ** ** - ** Description: Releases the EPS bearer context identified by the given ** - ** EPS bearer identity and enters state INACTIVE. ** - ** ** - ** Inputs: ueid: UE local identifier ** - ** ebi: EPS bearer identity ** - ** Others: None ** - ** ** - ** Outputs: pid: Identifier of the PDN connection the EPS ** - ** bearer belongs to ** - ** bid: Identifier of the released EPS bearer con- ** - ** text entry ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -static int _eps_bearer_release(emm_data_context_t *ctx, int ebi, int *pid, int *bid) -{ - LOG_FUNC_IN; - - int rc = RETURNerror; - - /* Release the EPS bearer context entry */ - ebi = esm_ebr_context_release(ctx, ebi, pid, bid); - - if (ebi == ESM_EBI_UNASSIGNED) { - LOG_TRACE(WARNING, "ESM-PROC - Failed to release EPS bearer context"); - } else { - /* Set the EPS bearer context state to INACTIVE */ - rc = esm_ebr_set_status(ctx, ebi, ESM_EBR_INACTIVE, FALSE); - - if (rc != RETURNok) { - /* The EPS bearer context was already in INACTIVE state */ - LOG_TRACE(WARNING, "ESM-PROC - EBI %d was already INACTIVE", ebi); - } else { - /* Release EPS bearer data */ - rc = esm_ebr_release(ctx, ebi); - - if (rc != RETURNok) { - LOG_TRACE(WARNING, - "ESM-PROC - Failed to release EPS bearer data"); - } - } - } - - LOG_FUNC_RETURN (rc); -} - diff --git a/openair-cn/NAS/MME/ESM/EsmStatusHdl.c b/openair-cn/NAS/MME/ESM/EsmStatusHdl.c deleted file mode 100644 index 6edada9f0c..0000000000 --- a/openair-cn/NAS/MME/ESM/EsmStatusHdl.c +++ /dev/null @@ -1,199 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** -Source EsmStatus.c - -Version 0.1 - -Date 2013/06/17 - -Product NAS stack - -Subsystem EPS Session Management - -Author Frederic Maurel - -Description Defines the ESM status procedure executed by the Non-Access - Stratum. - - ESM status procedure can be related to an EPS bearer context - or to a procedure transaction. - - The purpose of the sending of the ESM STATUS message is to - report at any time certain error conditions detected upon - receipt of ESM protocol data. The ESM STATUS message can be - sent by both the MME and the UE. - -*****************************************************************************/ - -#include "esm_proc.h" -#include "commonDef.h" -#include "nas_log.h" - -#include "esm_cause.h" - -#include "emm_sap.h" - -/****************************************************************************/ -/**************** E X T E R N A L D E F I N I T I O N S ****************/ -/****************************************************************************/ - -/****************************************************************************/ -/******************* L O C A L D E F I N I T I O N S *******************/ -/****************************************************************************/ - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -/**************************************************************************** - ** ** - ** Name: esm_proc_status_ind() ** - ** ** - ** Description: Processes received ESM status message. ** - ** ** - ** 3GPP TS 24.301, section 6.7 ** - ** Upon receiving ESM Status message the UE/MME shall take ** - ** different actions depending on the received ESM cause ** - ** value. ** - ** ** - ** Inputs: ueid: UE lower layer identifier ** - ** pti: Procedure transaction identity ** - ** ebi: EPS bearer identity ** - ** esm_cause: Received ESM cause code ** - ** failure ** - ** Others: None ** - ** ** - ** Outputs: esm_cause: Cause code returned upon ESM procedure ** - ** failure ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int esm_proc_status_ind( - emm_data_context_t *ctx, - int pti, int ebi, int *esm_cause) -{ - LOG_FUNC_IN; - - int rc; - - LOG_TRACE(INFO,"ESM-PROC - ESM status procedure requested (cause=%d)", - *esm_cause); - - LOG_TRACE(DEBUG, "ESM-PROC - To be implemented"); - - switch (*esm_cause) { - case ESM_CAUSE_INVALID_EPS_BEARER_IDENTITY: - /* - * Abort any ongoing ESM procedure related to the received EPS - * bearer identity, stop any related timer, and deactivate the - * corresponding EPS bearer context locally - */ - /* TODO */ - rc = RETURNok; - break; - - case ESM_CAUSE_INVALID_PTI_VALUE: - /* - * Abort any ongoing ESM procedure related to the received PTI - * value and stop any related timer - */ - /* TODO */ - rc = RETURNok; - break; - - case ESM_CAUSE_MESSAGE_TYPE_NOT_IMPLEMENTED: - /* - * Abort any ongoing ESM procedure related to the PTI or - * EPS bearer identity and stop any related timer - */ - /* TODO */ - rc = RETURNok; - break; - - default: - /* - * No state transition and no specific action shall be taken; - * local actions are possible - */ - /* TODO */ - rc = RETURNok; - break; - } - - LOG_FUNC_RETURN (rc); -} - -/**************************************************************************** - ** ** - ** Name: esm_proc_status() ** - ** ** - ** Description: Initiates ESM status procedure. ** - ** ** - ** Inputs: is_standalone: Not used - Always TRUE ** - ** ueid: UE lower layer identifier ** - ** ebi: Not used ** - ** msg: Encoded ESM status message to be sent ** - ** ue_triggered: Not used ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int esm_proc_status(int is_standalone, - emm_data_context_t *ctx, - int ebi, OctetString *msg, - int ue_triggered) -{ - LOG_FUNC_IN; - - int rc; - emm_sap_t emm_sap; - - LOG_TRACE(INFO,"ESM-PROC - ESM status procedure requested"); - - /* - * Notity EMM that ESM PDU has to be forwarded to lower layers - */ - emm_sap.primitive = EMMESM_UNITDATA_REQ; - emm_sap.u.emm_esm.ueid = ctx->ueid; - emm_sap.u.emm_esm.ctx = ctx; - emm_sap.u.emm_esm.u.data.msg.length = msg->length; - emm_sap.u.emm_esm.u.data.msg.value = msg->value; - rc = emm_sap_send(&emm_sap); - - LOG_FUNC_RETURN (rc); -} - -/****************************************************************************/ -/********************* L O C A L F U N C T I O N S *********************/ -/****************************************************************************/ diff --git a/openair-cn/NAS/MME/ESM/Makefile b/openair-cn/NAS/MME/ESM/Makefile deleted file mode 100644 index eda83656ac..0000000000 --- a/openair-cn/NAS/MME/ESM/Makefile +++ /dev/null @@ -1,59 +0,0 @@ -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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 . -# -# Contact Information -# OpenAirInterface Admin: openair_admin@eurecom.fr -# OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr -# -# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. -# -################################################################################ -ifndef PROJDIR -PROJDIR = $(PWD)/../.. -endif - -include $(PROJDIR)/Makerules -include $(PROJDIR)/Makefile.inc - -INCLUDES = -I. -I$(INCDIR) -I$(UTILDIR) -I$(IESDIR) -I$(MMEAPIDIR) \ - -I$(EMMSAPDIR) -I$(ESMSAPDIR) -I$(ESMMSGDIR) -I$(EMMDIR) - -all: $(OBJS) - @$(CD) $(ESMMSGDIR) && $(MAKE) - @$(CD) $(ESMSAPDIR) && $(MAKE) - -clean: - $(RM) $(OBJS) *.bak *~ - @$(CD) $(ESMSAPDIR) && $(MAKE) $@ - -veryclean: clean - @$(CD) $(ESMSAPDIR) && $(MAKE) $@ - @$(CD) $(ESMMSGDIR) && $(MAKE) $@ - $(RM) $(TARGET) - -%.o: %.c Makefile $(PROJDIR)/Makerules $(PROJDIR)/Makefile.inc - @echo Compiling $< - @$(CC) $(CFLAGS) -c $< -o $@ - -depend: - makedepend -- ${CFLAGS} -- ${SRCS} - -# DO NOT DELETE THIS LINE -- make depend depends on it. diff --git a/openair-cn/NAS/MME/ESM/PdnConnectivity.c b/openair-cn/NAS/MME/ESM/PdnConnectivity.c deleted file mode 100644 index e2eda77bed..0000000000 --- a/openair-cn/NAS/MME/ESM/PdnConnectivity.c +++ /dev/null @@ -1,556 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** -Source PdnConnectivity.c - -Version 0.1 - -Date 2013/01/02 - -Product NAS stack - -Subsystem EPS Session Management - -Author Frederic Maurel - -Description Defines the PDN connectivity ESM procedure executed by the - Non-Access Stratum. - - The PDN connectivity procedure is used by the UE to request - the setup of a default EPS bearer to a PDN. - - The procedure is used either to establish the 1st default - bearer by including the PDN CONNECTIVITY REQUEST message - into the initial attach message, or to establish subsequent - default bearers to additional PDNs in order to allow the UE - simultaneous access to multiple PDNs by sending the message - stand-alone. - -*****************************************************************************/ - -#include // malloc, free -#include // memset, memcpy, memcmp -#include // isprint - -#include "esm_proc.h" -#include "commonDef.h" -#include "nas_log.h" - -#include "esmData.h" -#include "esm_cause.h" -#include "esm_pt.h" - -# include "mme_api.h" - -#include "emm_sap.h" - -#if defined(ENABLE_ITTI) -# include "assertions.h" -#endif - -/****************************************************************************/ -/**************** E X T E R N A L D E F I N I T I O N S ****************/ -/****************************************************************************/ - -/****************************************************************************/ -/******************* L O C A L D E F I N I T I O N S *******************/ -/****************************************************************************/ - - - -/* - * -------------------------------------------------------------------------- - * Internal data handled by the PDN connectivity procedure in the MME - * -------------------------------------------------------------------------- - */ -/* - * PDN connection handlers - */ -static int _pdn_connectivity_create(emm_data_context_t *ctx, - int pti, - const OctetString *apn, - esm_proc_pdn_type_t pdn_type, - const OctetString *pdn_addr, - int is_emergency); -int _pdn_connectivity_delete(emm_data_context_t *ctx, int pid); - - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - - -/* - * -------------------------------------------------------------------------- - * PDN connectivity procedure executed by the MME - * -------------------------------------------------------------------------- - */ -/**************************************************************************** - ** ** - ** Name: esm_proc_pdn_connectivity_request() ** - ** ** - ** Description: Performs PDN connectivity procedure requested by the UE. ** - ** ** - ** 3GPP TS 24.301, section 6.5.1.3 ** - ** Upon receipt of the PDN CONNECTIVITY REQUEST message, the ** - ** MME checks if connectivity with the requested PDN can be ** - ** established. If no requested APN is provided the MME ** - ** shall use the default APN as the requested APN if the ** - ** request type is different from "emergency", or the APN ** - ** configured for emergency bearer services if the request ** - ** type is "emergency". ** - ** If connectivity with the requested PDN is accepted by the ** - ** network, the MME shall initiate the default EPS bearer ** - ** context activation procedure. ** - ** ** - ** Inputs: ueid: UE local identifier ** - ** pti: Identifies the PDN connectivity procedure ** - ** requested by the UE ** - ** request_type: Type of the PDN request ** - ** pdn_type: PDN type value (IPv4, IPv6, IPv4v6) ** - ** apn: Requested Access Point Name ** - ** Others: _esm_data ** - ** ** - ** Outputs: apn: Default Access Point Name ** - ** pdn_addr: Assigned IPv4 address and/or IPv6 suffix ** - ** esm_qos: EPS bearer level QoS parameters ** - ** esm_cause: Cause code returned upon ESM procedure ** - ** failure ** - ** Return: The identifier of the PDN connection if ** - ** successfully created; ** - ** RETURNerror otherwise. ** - ** Others: _esm_data ** - ** ** - ***************************************************************************/ -int esm_proc_pdn_connectivity_request(emm_data_context_t *ctx, int pti, - esm_proc_pdn_request_t request_type, - OctetString *apn, - esm_proc_pdn_type_t pdn_type, - OctetString *pdn_addr, - esm_proc_qos_t *esm_qos, - int *esm_cause) -{ - int rc = RETURNerror; - int pid = RETURNerror; - - LOG_FUNC_IN; - - LOG_TRACE(INFO, "ESM-PROC - PDN connectivity requested by the UE " - "(ueid="NAS_UE_ID_FMT", pti=%d) PDN type = %s, APN = %s pdn addr = %s", ctx->ueid, pti, - (pdn_type == ESM_PDN_TYPE_IPV4)? "IPv4" : - (pdn_type == ESM_PDN_TYPE_IPV6)? "IPv6" : "IPv4v6", - (apn) ? (char *)(apn->value) : "null", - (pdn_addr) ? (char *)(pdn_addr->value) : "null"); - -#if !defined(NAS_BUILT_IN_EPC) - - /* UE identifier sanity check */ - if (ctx->ueid >= ESM_DATA_NB_UE_MAX) { - LOG_TRACE(WARNING, "ESM-PROC - Number of connected UEs exceeded"); - LOG_FUNC_RETURN (RETURNerror); - } - -#endif - - /* - * Check network IP capabilities - */ - *esm_cause = ESM_CAUSE_SUCCESS; - LOG_TRACE(INFO, "ESM-PROC - _esm_data.conf.features %08x", _esm_data.conf.features); -#warning "Uncomment code about _esm_data.conf.features & (MME_API_IPV4 | MME_API_IPV6) later" -#if defined(ORIGINAL_CODE) - - switch (_esm_data.conf.features & (MME_API_IPV4 | MME_API_IPV6)) { - case (MME_API_IPV4 | MME_API_IPV6): - - /* The network supports both IPv4 and IPv6 connection */ - if ( (pdn_type == ESM_PDN_TYPE_IPV4V6) && - (_esm_data.conf.features & MME_API_SINGLE_ADDR_BEARERS) ) { - /* The network supports single IP version bearers only */ - *esm_cause = ESM_CAUSE_SINGLE_ADDRESS_BEARERS_ONLY_ALLOWED; - } - - rc = RETURNok; - break; - - case MME_API_IPV6: - /* The network supports connection to IPv6 only */ - *esm_cause = ESM_CAUSE_PDN_TYPE_IPV6_ONLY_ALLOWED; - - if (pdn_type != ESM_PDN_TYPE_IPV4) { - rc = RETURNok; - } - - break; - - case MME_API_IPV4: - /* The network supports connection to IPv4 only */ - *esm_cause = ESM_CAUSE_PDN_TYPE_IPV4_ONLY_ALLOWED; - - if (pdn_type != ESM_PDN_TYPE_IPV6) { - rc = RETURNok; - } - - break; - - default: - LOG_TRACE(ERROR, - "ESM-PROC - _esm_data.conf.features incorrect value (no IPV4 or IPV6 ) %X", - _esm_data.conf.features); - } - -#else - rc = RETURNok; -#endif - - if (rc != RETURNerror) { - int is_emergency = (request_type == ESM_PDN_REQUEST_EMERGENCY); -#if defined(ORIGINAL_CODE) - mme_api_ip_version_t mme_pdn_index; - mme_api_qos_t qos; - - switch (pdn_type) { - case ESM_PDN_TYPE_IPV4: - mme_pdn_index = MME_API_IPV4_ADDR; - break; - - case ESM_PDN_TYPE_IPV6: - mme_pdn_index = MME_API_IPV6_ADDR; - break; - - case ESM_PDN_TYPE_IPV4V6: - default: - mme_pdn_index = MME_API_IPV4V6_ADDR; - break; - } - - /* Check if connectivity with the requested PDN can be established */ - rc = mme_api_subscribe(apn, mme_pdn_index, pdn_addr, is_emergency, &qos); - - if (rc != RETURNok) { - LOG_TRACE(WARNING, "ESM-PROC - Connectivity to the requested PDN " - "cannot be established"); - *esm_cause = ESM_CAUSE_REQUEST_REJECTED_UNSPECIFIED; - LOG_FUNC_RETURN (RETURNerror); - } - -#endif - - /* Create new PDN connection */ - pid = _pdn_connectivity_create(ctx, pti, apn, pdn_type, - pdn_addr, is_emergency); -#if defined(ORIGINAL_CODE) - - /* Setup ESM QoS parameters */ - if (esm_qos) { - esm_qos->gbrUL = qos.gbr[MME_API_UPLINK]; - esm_qos->gbrDL = qos.gbr[MME_API_DOWNLINK]; - esm_qos->mbrUL = qos.mbr[MME_API_UPLINK]; - esm_qos->mbrDL = qos.mbr[MME_API_DOWNLINK]; - esm_qos->qci = qos.qci; - } - -#endif - - if (pid < 0) { - LOG_TRACE(WARNING, "ESM-PROC - Failed to create PDN connection"); - *esm_cause = ESM_CAUSE_INSUFFICIENT_RESOURCES; - LOG_FUNC_RETURN(RETURNerror); - } - } - - LOG_FUNC_RETURN(pid); -} - -/**************************************************************************** - ** ** - ** Name: esm_proc_pdn_connectivity_reject() ** - ** ** - ** Description: Performs PDN connectivity procedure not accepted by the ** - ** network. ** - ** ** - ** 3GPP TS 24.301, section 6.5.1.4 ** - ** If connectivity with the requested PDN cannot be accepted ** - ** by the network, the MME shall send a PDN CONNECTIVITY RE- ** - ** JECT message to the UE. ** - ** ** - ** Inputs: is_standalone: Indicates whether the PDN connectivity ** - ** procedure was initiated as part of the at- ** - ** tach procedure ** - ** ueid: UE lower layer identifier ** - ** ebi: Not used ** - ** msg: Encoded PDN connectivity reject message to ** - ** be sent ** - ** ue_triggered: Not used ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int esm_proc_pdn_connectivity_reject(int is_standalone, emm_data_context_t *ctx, - int ebi, OctetString *msg, int ue_triggered) -{ - LOG_FUNC_IN; - - int rc = RETURNerror; - - LOG_TRACE(WARNING, "ESM-PROC - PDN connectivity not accepted by the " - "network (ueid="NAS_UE_ID_FMT")", ctx->ueid); - - if (is_standalone) { - emm_sap_t emm_sap; - /* - * Notity EMM that ESM PDU has to be forwarded to lower layers - */ - emm_sap.primitive = EMMESM_UNITDATA_REQ; - emm_sap.u.emm_esm.ctx = ctx; - emm_sap.u.emm_esm.u.data.msg.length = msg->length; - emm_sap.u.emm_esm.u.data.msg.value = msg->value; - rc = emm_sap_send(&emm_sap); - } - - /* If the PDN connectivity procedure initiated as part of the initial - * attach procedure has failed, an error is returned to notify EMM that - * the ESM sublayer did not accept UE requested PDN connectivity */ - LOG_FUNC_RETURN (rc); -} - -/**************************************************************************** - ** ** - ** Name: esm_proc_pdn_connectivity_failure() ** - ** ** - ** Description: Performs PDN connectivity procedure upon receiving noti- ** - ** fication from the EPS Mobility Management sublayer that ** - ** EMM procedure that initiated PDN connectivity activation ** - ** locally failed. ** - ** ** - ** The MME releases the PDN connection entry allocated when ** - ** the PDN connectivity procedure was requested by the UE. ** - ** ** - ** Inputs: ueid: UE local identifier ** - ** pid: Identifier of the PDN connection to be ** - ** released ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int esm_proc_pdn_connectivity_failure(emm_data_context_t *ctx, int pid) -{ - int pti; - - LOG_FUNC_IN; - - LOG_TRACE(WARNING, "ESM-PROC - PDN connectivity failure (ueid="NAS_UE_ID_FMT", pid=%d)", - ctx->ueid, pid); - - /* Delete the PDN connection entry */ - pti = _pdn_connectivity_delete(ctx, pid); - - if (pti != ESM_PT_UNASSIGNED) { - LOG_FUNC_RETURN (RETURNok); - } - - LOG_FUNC_RETURN (RETURNerror); -} - -/****************************************************************************/ -/********************* L O C A L F U N C T I O N S *********************/ -/****************************************************************************/ - - -/* - *--------------------------------------------------------------------------- - * PDN connection handlers - *--------------------------------------------------------------------------- - */ -/**************************************************************************** - ** ** - ** Name: _pdn_connectivity_create() ** - ** ** - ** Description: Creates a new PDN connection entry for the specified UE ** - ** ** - ** Inputs: ueid: UE local identifier ** - ** ctx: UE context ** - ** pti: Procedure transaction identity ** - ** apn: Access Point Name of the PDN connection ** - ** pdn_type: PDN type (IPv4, IPv6, IPv4v6) ** - ** pdn_addr: Network allocated PDN IPv4 or IPv6 address ** - ** is_emergency: TRUE if the PDN connection has to be esta- ** - ** blished for emergency bearer services ** - ** Others: _esm_data ** - ** ** - ** Outputs: None ** - ** Return: The identifier of the PDN connection if ** - ** successfully created; -1 otherwise. ** - ** Others: _esm_data ** - ** ** - ***************************************************************************/ -static int _pdn_connectivity_create(emm_data_context_t *ctx, - int pti, - const OctetString *apn, - esm_proc_pdn_type_t pdn_type, - const OctetString *pdn_addr, - int is_emergency) -{ - int pid = ESM_DATA_PDN_MAX; - - LOG_TRACE(INFO, "ESM-PROC - Create new PDN connection " - "(pti=%d) APN = %s, IP address = %s (ueid="NAS_UE_ID_FMT")", pti, apn->value, - (pdn_type == ESM_PDN_TYPE_IPV4)? esm_data_get_ipv4_addr(pdn_addr) : - (pdn_type == ESM_PDN_TYPE_IPV6)? esm_data_get_ipv6_addr(pdn_addr) : - esm_data_get_ipv4v6_addr(pdn_addr), ctx->ueid); - - /* Search for an available PDN connection entry */ - for (pid = 0; pid < ESM_DATA_PDN_MAX; pid++) { - if (ctx->esm_data_ctx.pdn[pid].data != NULL) { - continue; - } - - break; - } - - if (pid < ESM_DATA_PDN_MAX) { - /* Create new PDN connection */ - esm_pdn_t *pdn = (esm_pdn_t *)malloc(sizeof(esm_pdn_t)); - - if (pdn != NULL) { - memset(pdn, 0, sizeof(esm_pdn_t)); - /* Increment the number of PDN connections */ - ctx->esm_data_ctx.n_pdns += 1; - /* Set the PDN connection identifier */ - ctx->esm_data_ctx.pdn[pid].pid = pid; - /* Reset the PDN connection active indicator */ - ctx->esm_data_ctx.pdn[pid].is_active = FALSE; - /* Setup the PDN connection data */ - ctx->esm_data_ctx.pdn[pid].data = pdn; - - /* Set the procedure transaction identity */ - pdn->pti = pti; - /* Set the emergency bearer services indicator */ - pdn->is_emergency = is_emergency; - - /* Setup the Access Point Name */ - if ( apn && (apn->length > 0) ) { - pdn->apn.value = (uint8_t *)malloc(apn->length + 1); - - if (pdn->apn.value) { - pdn->apn.length = apn->length; - memcpy(pdn->apn.value, apn->value, apn->length); - pdn->apn.value[pdn->apn.length] = '\0'; - } - } - - /* Setup the IP address allocated by the network */ - if ( pdn_addr && (pdn_addr->length > 0) ) { - int length = - ((pdn_addr->length < ESM_DATA_IP_ADDRESS_SIZE) ? - pdn_addr->length : ESM_DATA_IP_ADDRESS_SIZE); - memcpy(pdn->ip_addr, pdn_addr->value, length); - pdn->type = pdn_type; - } - - /* Return the identifier of the new PDN connection */ - return (ctx->esm_data_ctx.pdn[pid].pid); - } - - LOG_TRACE(WARNING, "ESM-PROC - Failed to create new PDN connection " - "(pid=%d)", pid); - } - - return (-1); -} - -/**************************************************************************** - ** ** - ** Name: _pdn_connectivity_delete() ** - ** ** - ** Description: Deletes PDN connection to the specified UE associated to ** - ** PDN connection entry with given identifier ** - ** ** - ** Inputs: ueid: UE local identifier ** - ** pid: Identifier of the PDN connection to be ** - ** released ** - ** Others: _esm_data ** - ** ** - ** Outputs: None ** - ** Return: The identity of the procedure transaction ** - ** assigned to the PDN connection when suc- ** - ** cessfully released; ** - ** UNASSIGNED value otherwise. ** - ** Others: _esm_data ** - ** ** - ***************************************************************************/ -int _pdn_connectivity_delete(emm_data_context_t *ctx, int pid) -{ - int pti = ESM_PT_UNASSIGNED; - - if (ctx == NULL) { - return pti; - } - - if (pid < ESM_DATA_PDN_MAX) { - if (pid != ctx->esm_data_ctx.pdn[pid].pid) { - LOG_TRACE(ERROR, - "ESM-PROC - PDN connection identifier is not valid"); - } else if (ctx->esm_data_ctx.pdn[pid].data == NULL) { - LOG_TRACE(ERROR, - "ESM-PROC - PDN connection has not been allocated"); - } else if (ctx->esm_data_ctx.pdn[pid].is_active) { - LOG_TRACE(ERROR, "ESM-PROC - PDN connection is active"); - } else { - /* Get the identity of the procedure transaction that created - * the PDN connection */ - pti = ctx->esm_data_ctx.pdn[pid].data->pti; - } - } - - if (pti != ESM_PT_UNASSIGNED) { - /* Decrement the number of PDN connections */ - ctx->esm_data_ctx.n_pdns -= 1; - /* Set the PDN connection as available */ - ctx->esm_data_ctx.pdn[pid].pid = -1; - - /* Release allocated PDN connection data */ - if (ctx->esm_data_ctx.pdn[pid].data->apn.length > 0) { - free(ctx->esm_data_ctx.pdn[pid].data->apn.value); - } - - free(ctx->esm_data_ctx.pdn[pid].data); - ctx->esm_data_ctx.pdn[pid].data = NULL; - LOG_TRACE(WARNING, "ESM-PROC - PDN connection %d released", pid); - } - - /* Return the procedure transaction identity */ - return (pti); -} diff --git a/openair-cn/NAS/MME/ESM/PdnDisconnect.c b/openair-cn/NAS/MME/ESM/PdnDisconnect.c deleted file mode 100644 index 9dfcbd66fb..0000000000 --- a/openair-cn/NAS/MME/ESM/PdnDisconnect.c +++ /dev/null @@ -1,299 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** -Source PdnDisconnect.c - -Version 0.1 - -Date 2013/05/15 - -Product NAS stack - -Subsystem EPS Session Management - -Author Frederic Maurel - -Description Defines the PDN disconnect ESM procedure executed by the - Non-Access Stratum. - - The PDN disconnect procedure is used by the UE to request - disconnection from one PDN. - - All EPS bearer contexts established towards this PDN, inclu- - ding the default EPS bearer context, are released. - -*****************************************************************************/ - -#include "esm_proc.h" -#include "commonDef.h" -#include "nas_log.h" - -#include "esmData.h" -#include "esm_cause.h" -#include "esm_pt.h" -#include "emm_sap.h" - -/****************************************************************************/ -/**************** E X T E R N A L D E F I N I T I O N S ****************/ -/****************************************************************************/ - -extern int _pdn_connectivity_delete(emm_data_context_t *ctx, int pid); - -/****************************************************************************/ -/******************* L O C A L D E F I N I T I O N S *******************/ -/****************************************************************************/ - - -/* - * -------------------------------------------------------------------------- - * Internal data handled by the PDN disconnect procedure in the MME - * -------------------------------------------------------------------------- - */ -/* - * PDN disconnection handlers - */ -static int _pdn_disconnect_get_pid(esm_data_context_t *ctx, int pti); - - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - - - -/* - * -------------------------------------------------------------------------- - * PDN disconnect procedure executed by the MME - * -------------------------------------------------------------------------- - */ -/**************************************************************************** - ** ** - ** Name: esm_proc_pdn_disconnect_request() ** - ** ** - ** Description: Performs PDN disconnect procedure requested by the UE. ** - ** ** - ** 3GPP TS 24.301, section 6.5.2.3 ** - ** Upon receipt of the PDN DISCONNECT REQUEST message, if it ** - ** is accepted by the network, the MME shall initiate the ** - ** bearer context deactivation procedure. ** - ** ** - ** Inputs: ueid: UE lower layer identifier ** - ** pti: Identifies the PDN disconnect procedure ** - ** requested by the UE ** - ** Others: _esm_data ** - ** ** - ** Outputs: esm_cause: Cause code returned upon ESM procedure ** - ** failure ** - ** Return: The identifier of the PDN connection to be ** - ** released, if it exists; ** - ** RETURNerror otherwise. ** - ** Others: None ** - ** ** - ***************************************************************************/ -int esm_proc_pdn_disconnect_request(emm_data_context_t *ctx, int pti, int *esm_cause) -{ - int pid = RETURNerror; - - LOG_FUNC_IN; - - LOG_TRACE(INFO, "ESM-PROC - PDN disconnect requested by the UE " - "(ueid="NAS_UE_ID_FMT", pti=%d)", ctx->ueid, pti); - - /* Get UE's ESM context */ - if (ctx->esm_data_ctx.n_pdns > 1) { - /* Get the identifier of the PDN connection entry assigned to the - * procedure transaction identity */ - pid = _pdn_disconnect_get_pid(&ctx->esm_data_ctx, pti); - - if (pid < 0) { - LOG_TRACE(ERROR, "ESM-PROC - No PDN connection found (pti=%d)", - pti); - *esm_cause = ESM_CAUSE_PROTOCOL_ERROR; - LOG_FUNC_RETURN (RETURNerror); - } - } else { - /* Attempt to disconnect from the last PDN disconnection - * is not allowed */ - *esm_cause = ESM_CAUSE_LAST_PDN_DISCONNECTION_NOT_ALLOWED; - } - - LOG_FUNC_RETURN(pid); -} - -/**************************************************************************** - ** ** - ** Name: esm_proc_pdn_disconnect_accept() ** - ** ** - ** Description: Performs PDN disconnect procedure accepted by the UE. ** - ** ** - ** 3GPP TS 24.301, section 6.5.2.3 ** - ** On reception of DEACTIVATE EPS BEARER CONTEXT ACCEPT mes- ** - ** sage from the UE, the MME releases all the resources re- ** - ** served for the PDN in the network. ** - ** ** - ** Inputs: ueid: UE lower layer identifier ** - ** pid: Identifier of the PDN connection to be ** - ** released ** - ** Others: _esm_data ** - ** ** - ** Outputs: esm_cause: Cause code returned upon ESM procedure ** - ** failure ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int esm_proc_pdn_disconnect_accept(emm_data_context_t *ctx, int pid, int *esm_cause) -{ - LOG_FUNC_IN; - - LOG_TRACE(INFO, "ESM-PROC - PDN disconnect accepted by the UE " - "(ueid="NAS_UE_ID_FMT", pid=%d)", ctx->ueid, pid); - - /* Release the connectivity with the requested PDN */ - int rc = mme_api_unsubscribe(NULL); - - if (rc != RETURNerror) { - /* Delete the PDN connection entry */ - int pti = _pdn_connectivity_delete(ctx, pid); - - if (pti != ESM_PT_UNASSIGNED) { - LOG_FUNC_RETURN (RETURNok); - } - } - - *esm_cause = ESM_CAUSE_PROTOCOL_ERROR; - LOG_FUNC_RETURN (RETURNerror); -} - -/**************************************************************************** - ** ** - ** Name: esm_proc_pdn_disconnect_reject() ** - ** ** - ** Description: Performs PDN disconnect procedure not accepted by the ** - ** network. ** - ** ** - ** 3GPP TS 24.301, section 6.5.2.4 ** - ** Upon receipt of the PDN DISCONNECT REQUEST message, if it ** - ** is not accepted by the network, the MME shall send a PDN ** - ** DISCONNECT REJECT message to the UE. ** - ** ** - ** Inputs: is_standalone: Not used - Always TRUE ** - ** ueid: UE lower layer identifier ** - ** ebi: Not used ** - ** msg: Encoded PDN disconnect reject message to ** - ** be sent ** - ** ue_triggered: Not used ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int esm_proc_pdn_disconnect_reject(int is_standalone, emm_data_context_t *ctx, - int ebi, OctetString *msg, int ue_triggered) -{ - LOG_FUNC_IN; - - int rc; - emm_sap_t emm_sap; - - LOG_TRACE(WARNING, "ESM-PROC - PDN disconnect not accepted by the network " - "(ueid="NAS_UE_ID_FMT")", ctx->ueid); - - /* - * Notity EMM that ESM PDU has to be forwarded to lower layers - */ - emm_sap.primitive = EMMESM_UNITDATA_REQ; - emm_sap.u.emm_esm.ueid = ctx->ueid; - emm_sap.u.emm_esm.ctx = ctx; - emm_sap.u.emm_esm.u.data.msg.length = msg->length; - emm_sap.u.emm_esm.u.data.msg.value = msg->value; - rc = emm_sap_send(&emm_sap); - - LOG_FUNC_RETURN(rc); -} - -/****************************************************************************/ -/********************* L O C A L F U N C T I O N S *********************/ -/****************************************************************************/ - -/* - * -------------------------------------------------------------------------- - * Timer handlers - * -------------------------------------------------------------------------- - */ - - -/* - *--------------------------------------------------------------------------- - * PDN disconnection handlers - *--------------------------------------------------------------------------- - */ - - -/**************************************************************************** - ** ** - ** Name: _pdn_disconnect_get_pid() ** - ** ** - ** Description: Returns the identifier of the PDN connection to which the ** - ** given procedure transaction identity has been assigned ** - ** to establish connectivity to the specified UE ** - ** ** - ** Inputs: ueid: UE local identifier ** - ** pti: The procedure transaction identity ** - ** Others: _esm_data ** - ** ** - ** Outputs: None ** - ** Return: The identifier of the PDN connection if ** - ** found in the list; -1 otherwise. ** - ** Others: None ** - ** ** - ***************************************************************************/ -static int _pdn_disconnect_get_pid(esm_data_context_t *ctx, int pti) -{ - int i = ESM_DATA_PDN_MAX; - - if (ctx != NULL) { - for (i = 0; i < ESM_DATA_PDN_MAX; i++) { - if ( (ctx->pdn[i].pid != -1) && - (ctx->pdn[i].data != NULL) ) { - if (ctx->pdn[i].data->pti != pti) { - continue; - } - - /* PDN entry found */ - break; - } - } - } - - /* Return the identifier of the PDN connection */ - return (ctx->pdn[i].pid); -} diff --git a/openair-cn/NAS/MME/ESM/SAP/Makefile b/openair-cn/NAS/MME/ESM/SAP/Makefile deleted file mode 100644 index 18bae24927..0000000000 --- a/openair-cn/NAS/MME/ESM/SAP/Makefile +++ /dev/null @@ -1,70 +0,0 @@ -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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 . -# -# Contact Information -# OpenAirInterface Admin: openair_admin@eurecom.fr -# OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr -# -# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. -# -################################################################################ -ifndef PROJDIR -PROJDIR = $(PWD)/../../.. -endif - -include $(PROJDIR)/Makerules -include $(PROJDIR)/Makefile.inc - -INCLUDES = -I. -I$(INCDIR) -I$(UTILDIR) -I$(ESMDIR) \ - -I$(IESDIR) -I$(ESMMSGDIR) -I$(EMMDIR) -I$(MMEAPIDIR) -I$(EMMSAPDIR) - -TARGET = $(LIBESMSAP) -TARGETS = $(TARGET).a $(TARGET).so - -all: $(TARGETS) - -%.o: %.c Makefile $(PROJDIR)/Makerules $(PROJDIR)/Makefile.inc - @echo Compiling $< - @$(CC) $(CFLAGS) -c $< -o $@ - -$(TARGET).a: $(OBJS) - @$(RM) $@ - @$(AR) $(ARFLAGS) $@ $(OBJS) - @echo Replacing $@ to $(LIBPROCESS) - @$(RM) $(LIBPROCESS)/$@ - @$(CP) $@ $(LIBPROCESS) - -$(TARGET).so: $(OBJS) - @$(LD) -G -o $@ $(OBJS) - @echo Replacing $@ to $(LIBPROCESS) - @$(RM) $(LIBPROCESS)/$@ - @$(CP) $@ $(LIBPROCESS) - -clean: - $(RM) $(OBJS) *.bak *~ - -veryclean: clean - $(RM) $(TARGETS) - -depend: - makedepend -- ${CFLAGS} -- ${SRCS} - -# DO NOT DELETE THIS LINE -- make depend depends on it. diff --git a/openair-cn/NAS/MME/ESM/SAP/esm_recv.c b/openair-cn/NAS/MME/ESM/SAP/esm_recv.c deleted file mode 100644 index 1114178154..0000000000 --- a/openair-cn/NAS/MME/ESM/SAP/esm_recv.c +++ /dev/null @@ -1,713 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** -Source esm_recv.c - -Version 0.1 - -Date 2013/02/06 - -Product NAS stack - -Subsystem EPS Session Management - -Author Frederic Maurel - -Description Defines functions executed at the ESM Service Access - Point upon receiving EPS Session Management messages - from the EPS Mobility Management sublayer. - -*****************************************************************************/ - -#include "esm_recv.h" -#include "commonDef.h" -#include "nas_log.h" - -#include "esm_pt.h" -#include "esm_ebr.h" -#include "esm_proc.h" - -#include "esm_cause.h" -#include "nas_itti_messaging.h" - - -/****************************************************************************/ -/**************** E X T E R N A L D E F I N I T I O N S ****************/ -/****************************************************************************/ - -/****************************************************************************/ -/******************* L O C A L D E F I N I T I O N S *******************/ -/****************************************************************************/ - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -/* - * -------------------------------------------------------------------------- - * Functions executed by both the UE and the MME upon receiving ESM messages - * -------------------------------------------------------------------------- - */ -/**************************************************************************** - ** ** - ** Name: esm_recv_status() ** - ** ** - ** Description: Processes ESM status message ** - ** ** - ** Inputs: ueid: UE local identifier ** - ** pti: Procedure transaction identity ** - ** ebi: EPS bearer identity ** - ** msg: The received ESM message ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: ESM cause code whenever the processing of ** - ** the ESM message fails ** - ** Others: None ** - ** ** - ***************************************************************************/ - -int esm_recv_status(emm_data_context_t *ctx, int pti, int ebi, - const esm_status_msg *msg) -{ - int esm_cause; - int rc; - - LOG_FUNC_IN; - - LOG_TRACE(INFO, "ESM-SAP - Received ESM status message (pti=%d, ebi=%d)", - pti, ebi); - - /* - * Message processing - */ - /* Get the ESM cause */ - esm_cause = msg->esmcause; - - /* Execute the ESM status procedure */ - rc = esm_proc_status_ind(ctx, pti, ebi, &esm_cause); - - if (rc != RETURNerror) { - esm_cause = ESM_CAUSE_SUCCESS; - } - - /* Return the ESM cause value */ - LOG_FUNC_RETURN (esm_cause); -} - - -/* - * -------------------------------------------------------------------------- - * Functions executed by the MME upon receiving ESM message from the UE - * -------------------------------------------------------------------------- - */ -/**************************************************************************** - ** ** - ** Name: esm_recv_pdn_connectivity_request() ** - ** ** - ** Description: Processes PDN connectivity request message ** - ** ** - ** Inputs: ueid: UE local identifier ** - ** pti: Procedure transaction identity ** - ** ebi: EPS bearer identity ** - ** msg: The received ESM message ** - ** Others: None ** - ** ** - ** Outputs: new_ebi: New assigned EPS bearer identity ** - ** data: PDN connection and EPS bearer context data ** - ** Return: ESM cause code whenever the processing of ** - ** the ESM message fails ** - ** Others: None ** - ** ** - ***************************************************************************/ -int esm_recv_pdn_connectivity_request(emm_data_context_t *ctx, int pti, int ebi, - const pdn_connectivity_request_msg *msg, - unsigned int *new_ebi, void *data) -{ - int esm_cause = ESM_CAUSE_SUCCESS; - uint8_t i; - - LOG_FUNC_IN; - - LOG_TRACE(INFO, "ESM-SAP - Received PDN Connectivity Request message " - "(ueid=%u, pti=%d, ebi=%d)", ctx->ueid, pti, ebi); - - /* - * Procedure transaction identity checking - */ - if ( (pti == ESM_PT_UNASSIGNED) || esm_pt_is_reserved(pti) ) { - /* 3GPP TS 24.301, section 7.3.1, case a - * Reserved or unassigned PTI value - */ - LOG_TRACE(WARNING, "ESM-SAP - Invalid PTI value (pti=%d)", pti); - LOG_FUNC_RETURN (ESM_CAUSE_INVALID_PTI_VALUE); - } - /* - * EPS bearer identity checking - */ - else if ( ebi != ESM_EBI_UNASSIGNED ) { - /* 3GPP TS 24.301, section 7.3.2, case a - * Reserved or assigned EPS bearer identity value */ - LOG_TRACE(WARNING, "ESM-SAP - Invalid EPS bearer identity (ebi=%d)", - ebi); - LOG_FUNC_RETURN (ESM_CAUSE_INVALID_EPS_BEARER_IDENTITY); - } - - /* - * Message processing - */ - /* Get PDN connection and EPS bearer context data structure to setup */ - esm_proc_data_t *esm_data = (esm_proc_data_t *)(data); - - if (data == NULL) { - LOG_TRACE(ERROR, "ESM-SAP - Invalid ESM data structure"); - LOG_FUNC_RETURN (ESM_CAUSE_PROTOCOL_ERROR); - } - - /* Get the PDN connectivity request type */ - int request_type = -1; - - if (msg->requesttype == REQUEST_TYPE_INITIAL_REQUEST) { - request_type = ESM_PDN_REQUEST_INITIAL; - } else if (msg->requesttype == REQUEST_TYPE_HANDOVER) { - request_type = ESM_PDN_REQUEST_HANDOVER; - } else if (msg->requesttype == REQUEST_TYPE_EMERGENCY) { - request_type = ESM_PDN_REQUEST_EMERGENCY; - } else { - /* Unkown PDN request type */ - LOG_TRACE(ERROR, "ESM-SAP - Invalid PDN request type"); - LOG_FUNC_RETURN (ESM_CAUSE_INVALID_MANDATORY_INFO); - } - - /* Get the value of the PDN type indicator */ - if (msg->pdntype == PDN_TYPE_IPV4) { - esm_data->pdn_type = ESM_PDN_TYPE_IPV4; - } else if (msg->pdntype == PDN_TYPE_IPV6) { - esm_data->pdn_type = ESM_PDN_TYPE_IPV6; - } else if (msg->pdntype == PDN_TYPE_IPV4V6) { - esm_data->pdn_type = ESM_PDN_TYPE_IPV4V6; - } else { - /* Unkown PDN type */ - LOG_TRACE(ERROR, "ESM-SAP - Invalid PDN type"); - LOG_FUNC_RETURN (ESM_CAUSE_UNKNOWN_PDN_TYPE); - } - - /* Get the Access Point Name, if provided */ - if (msg->presencemask & PDN_CONNECTIVITY_REQUEST_ACCESS_POINT_NAME_PRESENT) { - esm_data->apn = msg->accesspointname.accesspointnamevalue; - } - - /* Get the ESM information transfer flag */ - if (msg->presencemask & - PDN_CONNECTIVITY_REQUEST_ESM_INFORMATION_TRANSFER_FLAG_PRESENT) { - /* 3GPP TS 24.301, sections 6.5.1.2, 6.5.1.3 - * ESM information, i.e. protocol configuration options, APN, or both, - * has to be sent after the NAS signalling security has been activated - * between the UE and the MME. - * - * The MME then at a later stage in the PDN connectivity procedure - * initiates the ESM information request procedure in which the UE - * can provide the MME with protocol configuration options or APN - * or both. - * The MME waits for completion of the ESM information request - * procedure before proceeding with the PDN connectivity procedure. - */ - //TODO: rc = esm_proc_information_request(); - } - esm_data->pco = msg->protocolconfigurationoptions; - for (i = 0; i < msg->protocolconfigurationoptions.num_protocol_id_or_container_id; i++) { - DUP_OCTET_STRING(msg->protocolconfigurationoptions.protocolidcontents[i], esm_data->pco.protocolidcontents[i]); - esm_data->pco.protocolid[i] = msg->protocolconfigurationoptions.protocolid[i]; - esm_data->pco.lengthofprotocolid[i] = msg->protocolconfigurationoptions.lengthofprotocolid[i]; - } - - -#if defined(ORIGINAL_CODE) - /* Execute the PDN connectivity procedure requested by the UE */ - int pid = esm_proc_pdn_connectivity_request(ctx, pti, request_type, - &esm_data->apn, - esm_data->pdn_type, - &esm_data->pdn_addr, - &esm_data->qos, - &esm_cause); - - if (pid != RETURNerror) { - /* Create local default EPS bearer context */ - int rc = esm_proc_default_eps_bearer_context(ctx, pid, new_ebi, - &esm_data->qos, &esm_cause); - - if (rc != RETURNerror) { - esm_cause = ESM_CAUSE_SUCCESS; - } - } - -#else - int is_emergency = (request_type == ESM_PDN_REQUEST_EMERGENCY); - - nas_itti_pdn_connectivity_req( - pti, - ctx->ueid, - ctx->imsi, - esm_data, - request_type); - esm_cause = ESM_CAUSE_SUCCESS; -#endif - /* Return the ESM cause value */ - LOG_FUNC_RETURN (esm_cause); -} - -/**************************************************************************** - ** ** - ** Name: esm_recv_pdn_disconnect_request() ** - ** ** - ** Description: Processes PDN disconnect request message ** - ** ** - ** Inputs: ueid: UE local identifier ** - ** pti: Procedure transaction identity ** - ** ebi: EPS bearer identity ** - ** msg: The received ESM message ** - ** Others: None ** - ** ** - ** Outputs: linked_ebi: Linked EPS bearer identity of the default ** - ** bearer associated with the PDN to discon- ** - ** nect from ** - ** Return: ESM cause code whenever the processing of ** - ** the ESM message fails ** - ** Others: None ** - ** ** - ***************************************************************************/ -int esm_recv_pdn_disconnect_request(emm_data_context_t *ctx, int pti, int ebi, - const pdn_disconnect_request_msg *msg, - unsigned int *linked_ebi) -{ - LOG_FUNC_IN; - - int esm_cause = ESM_CAUSE_SUCCESS; - - LOG_TRACE(INFO, "ESM-SAP - Received PDN Disconnect Request message " - "(ueid=%d, pti=%d, ebi=%d)", ctx->ueid, pti, ebi); - - /* - * Procedure transaction identity checking - */ - if ( (pti == ESM_PT_UNASSIGNED) || esm_pt_is_reserved(pti) ) { - /* 3GPP TS 24.301, section 7.3.1, case b - * Reserved or unassigned PTI value - */ - LOG_TRACE(WARNING, "ESM-SAP - Invalid PTI value (pti=%d)", pti); - LOG_FUNC_RETURN (ESM_CAUSE_INVALID_PTI_VALUE); - } - /* - * EPS bearer identity checking - */ - else if ( ebi != ESM_EBI_UNASSIGNED ) { - /* 3GPP TS 24.301, section 7.3.2, case b - * Reserved or assigned EPS bearer identity value */ - LOG_TRACE(WARNING, "ESM-SAP - Invalid EPS bearer identity (ebi=%d)", - ebi); - LOG_FUNC_RETURN (ESM_CAUSE_INVALID_EPS_BEARER_IDENTITY); - } - - /* - * Message processing - */ - /* Execute the PDN disconnect procedure requested by the UE */ - int pid = esm_proc_pdn_disconnect_request(ctx, pti, &esm_cause); - - if (pid != RETURNerror) { - /* Get the identity of the default EPS bearer context assigned to - * the PDN connection to disconnect from */ - *linked_ebi = msg->linkedepsbeareridentity; - /* Release the associated default EPS bearer context */ - int bid = 0; - int rc = esm_proc_eps_bearer_context_deactivate(ctx, FALSE, - *linked_ebi, - &pid, &bid, &esm_cause); - - if (rc != RETURNerror) { - esm_cause = ESM_CAUSE_SUCCESS; - } - } - - /* Return the ESM cause value */ - LOG_FUNC_RETURN (esm_cause); -} - -/**************************************************************************** - ** ** - ** Name: esm_recv_activate_default_eps_bearer_context_accept() ** - ** ** - ** Description: Processes Activate Default EPS Bearer Context Accept ** - ** message ** - ** ** - ** Inputs: ueid: UE local identifier ** - ** pti: Procedure transaction identity ** - ** ebi: EPS bearer identity ** - ** msg: The received ESM message ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: ESM cause code whenever the processing of ** - ** the ESM message fails ** - ** Others: None ** - ** ** - ***************************************************************************/ -int esm_recv_activate_default_eps_bearer_context_accept(emm_data_context_t *ctx, - int pti, int ebi, - const activate_default_eps_bearer_context_accept_msg *msg) -{ - LOG_FUNC_IN; - - int esm_cause = ESM_CAUSE_SUCCESS; - - LOG_TRACE(INFO, "ESM-SAP - Received Activate Default EPS Bearer Context " - "Accept message (ueid=%d, pti=%d, ebi=%d)", ctx->ueid, pti, ebi); - - /* - * Procedure transaction identity checking - */ - if (esm_pt_is_reserved(pti)) { - /* 3GPP TS 24.301, section 7.3.1, case f - * Reserved PTI value - */ - LOG_TRACE(WARNING, "ESM-SAP - Invalid PTI value (pti=%d)", pti); - LOG_FUNC_RETURN (ESM_CAUSE_INVALID_PTI_VALUE); - } - /* - * EPS bearer identity checking - */ - else if ( esm_ebr_is_reserved(ebi) || esm_ebr_is_not_in_use(ctx, ebi) ) { - /* 3GPP TS 24.301, section 7.3.2, case f - * Reserved or assigned value that does not match an existing EPS - * bearer context - */ - LOG_TRACE(WARNING, "ESM-SAP - Invalid EPS bearer identity (ebi=%d)", - ebi); - LOG_FUNC_RETURN (ESM_CAUSE_INVALID_EPS_BEARER_IDENTITY); - } - - /* - * Message processing - */ - /* Execute the default EPS bearer context activation procedure accepted - * by the UE */ - int rc = esm_proc_default_eps_bearer_context_accept(ctx, ebi, &esm_cause); - - if (rc != RETURNerror) { - esm_cause = ESM_CAUSE_SUCCESS; - } - - /* Return the ESM cause value */ - LOG_FUNC_RETURN (esm_cause); -} - -/**************************************************************************** - ** ** - ** Name: esm_recv_activate_default_eps_bearer_context_reject() ** - ** ** - ** Description: Processes Activate Default EPS Bearer Context Reject ** - ** message ** - ** ** - ** Inputs: ueid: UE local identifier ** - ** pti: Procedure transaction identity ** - ** ebi: EPS bearer identity ** - ** msg: The received ESM message ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: ESM cause code whenever the processing of ** - ** the ESM message fail ** - ** Others: None ** - ** ** - ***************************************************************************/ -int esm_recv_activate_default_eps_bearer_context_reject(emm_data_context_t *ctx, - int pti, int ebi, - const activate_default_eps_bearer_context_reject_msg *msg) -{ - LOG_FUNC_IN; - - int esm_cause = ESM_CAUSE_SUCCESS; - - LOG_TRACE(INFO, "ESM-SAP - Received Activate Default EPS Bearer Context " - "Reject message (ueid=%d, pti=%d, ebi=%d)", ctx->ueid, pti, ebi); - - /* - * Procedure transaction identity checking - */ - if (esm_pt_is_reserved(pti)) { - /* 3GPP TS 24.301, section 7.3.1, case f - * Reserved PTI value - */ - LOG_TRACE(WARNING, "ESM-SAP - Invalid PTI value (pti=%d)", pti); - LOG_FUNC_RETURN (ESM_CAUSE_INVALID_PTI_VALUE); - } - /* - * EPS bearer identity checking - */ - else if ( esm_ebr_is_reserved(ebi) || esm_ebr_is_not_in_use(ctx, ebi) ) { - /* 3GPP TS 24.301, section 7.3.2, case f - * Reserved or assigned value that does not match an existing EPS - * bearer context - */ - LOG_TRACE(WARNING, "ESM-SAP - Invalid EPS bearer identity (ebi=%d)", - ebi); - LOG_FUNC_RETURN (ESM_CAUSE_INVALID_EPS_BEARER_IDENTITY); - } - - /* - * Message processing - */ - /* Execute the default EPS bearer context activation procedure not accepted - * by the UE */ - int rc = esm_proc_default_eps_bearer_context_reject(ctx, ebi, &esm_cause); - - if (rc != RETURNerror) { - esm_cause = ESM_CAUSE_SUCCESS; - } - - /* Return the ESM cause value */ - LOG_FUNC_RETURN (esm_cause); -} - -/**************************************************************************** - ** ** - ** Name: esm_recv_activate_dedicated_eps_bearer_context_accept() ** - ** ** - ** Description: Processes Activate Dedicated EPS Bearer Context Accept ** - ** message ** - ** ** - ** Inputs: ueid: UE local identifier ** - ** pti: Procedure transaction identity ** - ** ebi: EPS bearer identity ** - ** msg: The received ESM message ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: ESM cause code whenever the processing of ** - ** the ESM message fails ** - ** Others: None ** - ** ** - ***************************************************************************/ -int esm_recv_activate_dedicated_eps_bearer_context_accept(emm_data_context_t *ctx, - int pti, int ebi, - const activate_dedicated_eps_bearer_context_accept_msg *msg) -{ - LOG_FUNC_IN; - - int esm_cause = ESM_CAUSE_SUCCESS; - - LOG_TRACE(INFO, "ESM-SAP - Received Activate Dedicated EPS Bearer " - "Context Accept message (ueid=%d, pti=%d, ebi=%d)", - ctx->ueid, pti, ebi); - - /* - * Procedure transaction identity checking - */ - if (esm_pt_is_reserved(pti)) { - /* 3GPP TS 24.301, section 7.3.1, case f - * Reserved PTI value - */ - LOG_TRACE(WARNING, "ESM-SAP - Invalid PTI value (pti=%d)", pti); - LOG_FUNC_RETURN (ESM_CAUSE_INVALID_PTI_VALUE); - } - /* - * EPS bearer identity checking - */ - else if ( esm_ebr_is_reserved(ebi) || esm_ebr_is_not_in_use(ctx, ebi) ) { - /* 3GPP TS 24.301, section 7.3.2, case f - * Reserved or assigned value that does not match an existing EPS - * bearer context - */ - LOG_TRACE(WARNING, "ESM-SAP - Invalid EPS bearer identity (ebi=%d)", - ebi); - LOG_FUNC_RETURN (ESM_CAUSE_INVALID_EPS_BEARER_IDENTITY); - } - - /* - * Message processing - */ - /* Execute the dedicated EPS bearer context activation procedure accepted - * by the UE */ - int rc = esm_proc_dedicated_eps_bearer_context_accept(ctx, ebi, - &esm_cause); - - if (rc != RETURNerror) { - esm_cause = ESM_CAUSE_SUCCESS; - } - - /* Return the ESM cause value */ - LOG_FUNC_RETURN (esm_cause); -} - -/**************************************************************************** - ** ** - ** Name: esm_recv_activate_dedicated_eps_bearer_context_reject() ** - ** ** - ** Description: Processes Activate Dedicated EPS Bearer Context Reject ** - ** message ** - ** ** - ** Inputs: ueid: UE local identifier ** - ** pti: Procedure transaction identity ** - ** ebi: EPS bearer identity ** - ** msg: The received ESM message ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: ESM cause code whenever the processing of ** - ** the ESM message fail ** - ** Others: None ** - ** ** - ***************************************************************************/ -int esm_recv_activate_dedicated_eps_bearer_context_reject(emm_data_context_t *ctx, - int pti, int ebi, - const activate_dedicated_eps_bearer_context_reject_msg *msg) -{ - LOG_FUNC_IN; - - int esm_cause = ESM_CAUSE_SUCCESS; - - LOG_TRACE(INFO, "ESM-SAP - Received Activate Dedicated EPS Bearer " - "Context Reject message (ueid=%d, pti=%d, ebi=%d)", - ctx->ueid, pti, ebi); - - /* - * Procedure transaction identity checking - */ - if (esm_pt_is_reserved(pti)) { - /* 3GPP TS 24.301, section 7.3.1, case f - * Reserved PTI value - */ - LOG_TRACE(WARNING, "ESM-SAP - Invalid PTI value (pti=%d)", pti); - LOG_FUNC_RETURN (ESM_CAUSE_INVALID_PTI_VALUE); - } - /* - * EPS bearer identity checking - */ - else if ( esm_ebr_is_reserved(ebi) || esm_ebr_is_not_in_use(ctx, ebi) ) { - /* 3GPP TS 24.301, section 7.3.2, case f - * Reserved or assigned value that does not match an existing EPS - * bearer context - */ - LOG_TRACE(WARNING, "ESM-SAP - Invalid EPS bearer identity (ebi=%d)", - ebi); - LOG_FUNC_RETURN (ESM_CAUSE_INVALID_EPS_BEARER_IDENTITY); - } - - /* - * Message processing - */ - /* Execute the dedicated EPS bearer context activation procedure not - * accepted by the UE */ - int rc = esm_proc_dedicated_eps_bearer_context_reject(ctx, ebi, - &esm_cause); - - if (rc != RETURNerror) { - esm_cause = ESM_CAUSE_SUCCESS; - } - - /* Return the ESM cause value */ - LOG_FUNC_RETURN (esm_cause); -} - -/**************************************************************************** - ** ** - ** Name: esm_recv_deactivate_eps_bearer_context_accept() ** - ** ** - ** Description: Processes Deactivate EPS Bearer Context Accept message ** - ** ** - ** Inputs: ueid: UE local identifier ** - ** pti: Procedure transaction identity ** - ** ebi: EPS bearer identity ** - ** msg: The received ESM message ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: ESM cause code whenever the processing of ** - ** the ESM message fails ** - ** Others: None ** - ** ** - ***************************************************************************/ -int esm_recv_deactivate_eps_bearer_context_accept(emm_data_context_t *ctx, - int pti, int ebi, - const deactivate_eps_bearer_context_accept_msg *msg) -{ - LOG_FUNC_IN; - - int esm_cause = ESM_CAUSE_SUCCESS; - - LOG_TRACE(INFO, "ESM-SAP - Received Deactivate EPS Bearer Context " - "Accept message (ueid=%d, pti=%d, ebi=%d)", ctx->ueid, pti, ebi); - - /* - * Procedure transaction identity checking - */ - if (esm_pt_is_reserved(pti)) { - /* 3GPP TS 24.301, section 7.3.1, case f - * Reserved PTI value - */ - LOG_TRACE(WARNING, "ESM-SAP - Invalid PTI value (pti=%d)", pti); - LOG_FUNC_RETURN (ESM_CAUSE_INVALID_PTI_VALUE); - } - /* - * EPS bearer identity checking - */ - else if ( esm_ebr_is_reserved(ebi) || esm_ebr_is_not_in_use(ctx, ebi) ) { - /* 3GPP TS 24.301, section 7.3.2, case f - * Reserved or assigned value that does not match an existing EPS - * bearer context - */ - LOG_TRACE(WARNING, "ESM-SAP - Invalid EPS bearer identity (ebi=%d)", - ebi); - LOG_FUNC_RETURN (ESM_CAUSE_INVALID_EPS_BEARER_IDENTITY); - } - - /* - * Message processing - */ - /* Execute the default EPS bearer context activation procedure accepted - * by the UE */ - int pid = esm_proc_eps_bearer_context_deactivate_accept(ctx, ebi, - &esm_cause); - - if (pid != RETURNerror) { - /* Release all the resources reserved for the PDN */ - int rc = esm_proc_pdn_disconnect_accept(ctx, pid, &esm_cause); - - if (rc != RETURNerror) { - esm_cause = ESM_CAUSE_SUCCESS; - } - } - - /* Return the ESM cause value */ - LOG_FUNC_RETURN (esm_cause); -} - -/****************************************************************************/ -/********************* L O C A L F U N C T I O N S *********************/ -/****************************************************************************/ diff --git a/openair-cn/NAS/MME/ESM/SAP/esm_recv.h b/openair-cn/NAS/MME/ESM/SAP/esm_recv.h deleted file mode 100644 index 6883d61885..0000000000 --- a/openair-cn/NAS/MME/ESM/SAP/esm_recv.h +++ /dev/null @@ -1,129 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** -Source esm_recv.h - -Version 0.1 - -Date 2013/02/06 - -Product NAS stack - -Subsystem EPS Session Management - -Author Frederic Maurel - -Description Defines functions executed at the ESM Service Access - Point upon receiving EPS Session Management messages - from the EPS Mobility Management sublayer. - -*****************************************************************************/ -#ifndef __ESM_RECV_H__ -#define __ESM_RECV_H__ - -#include "EsmStatus.h" -#include "emmData.h" - - -#include "PdnConnectivityRequest.h" -#include "PdnDisconnectRequest.h" -#include "BearerResourceAllocationRequest.h" -#include "BearerResourceModificationRequest.h" - -#include "ActivateDefaultEpsBearerContextAccept.h" -#include "ActivateDefaultEpsBearerContextReject.h" -#include "ActivateDedicatedEpsBearerContextAccept.h" -#include "ActivateDedicatedEpsBearerContextReject.h" -#include "ModifyEpsBearerContextAccept.h" -#include "ModifyEpsBearerContextReject.h" -#include "DeactivateEpsBearerContextAccept.h" - -#include "EsmInformationResponse.h" - -/****************************************************************************/ -/********************* G L O B A L C O N S T A N T S *******************/ -/****************************************************************************/ - -/****************************************************************************/ -/************************ G L O B A L T Y P E S ************************/ -/****************************************************************************/ - -/****************************************************************************/ -/******************** G L O B A L V A R I A B L E S ********************/ -/****************************************************************************/ - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -/* - * -------------------------------------------------------------------------- - * Functions executed by both the UE and the MME upon receiving ESM messages - * -------------------------------------------------------------------------- - */ - -int esm_recv_status(emm_data_context_t *ctx, int pti, int ebi, - const esm_status_msg *msg); - -/* - * -------------------------------------------------------------------------- - * Functions executed by the MME upon receiving ESM message from the UE - * -------------------------------------------------------------------------- - */ -/* - * Transaction related messages - * ---------------------------- - */ -int esm_recv_pdn_connectivity_request(emm_data_context_t *ctx, int pti, int ebi, - const pdn_connectivity_request_msg *msg, unsigned int *new_ebi, void *data); - -int esm_recv_pdn_disconnect_request(emm_data_context_t *ctx, int pti, int ebi, - const pdn_disconnect_request_msg *msg, - unsigned int *linked_ebi); - -/* - * Messages related to EPS bearer contexts - * --------------------------------------- - */ -int esm_recv_activate_default_eps_bearer_context_accept(emm_data_context_t *ctx, - int pti, int ebi, const activate_default_eps_bearer_context_accept_msg *msg); - -int esm_recv_activate_default_eps_bearer_context_reject(emm_data_context_t *ctx, - int pti, int ebi, const activate_default_eps_bearer_context_reject_msg *msg); - -int esm_recv_activate_dedicated_eps_bearer_context_accept(emm_data_context_t *ctx, - int pti, int ebi, const activate_dedicated_eps_bearer_context_accept_msg *msg); - -int esm_recv_activate_dedicated_eps_bearer_context_reject(emm_data_context_t *ctx, - int pti, int ebi, const activate_dedicated_eps_bearer_context_reject_msg *msg); - -int esm_recv_deactivate_eps_bearer_context_accept(emm_data_context_t *ctx, int pti, - int ebi, const deactivate_eps_bearer_context_accept_msg *msg); - -#endif /* __ESM_RECV_H__*/ diff --git a/openair-cn/NAS/MME/ESM/SAP/esm_sap.c b/openair-cn/NAS/MME/ESM/SAP/esm_sap.c deleted file mode 100644 index 9c2d07c2c5..0000000000 --- a/openair-cn/NAS/MME/ESM/SAP/esm_sap.c +++ /dev/null @@ -1,799 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** -Source esm_sap.c - -Version 0.1 - -Date 2012/11/22 - -Product NAS stack - -Subsystem EPS Session Management - -Author Frederic Maurel - -Description Defines the ESM Service Access Points at which the EPS - Session Management sublayer provides procedures for the - EPS bearer context handling and resources allocation. - -*****************************************************************************/ - -#include "esm_sap.h" -#include "esm_recv.h" -#include "esm_send.h" -#include "commonDef.h" -#include "nas_log.h" - -#include "OctetString.h" -#include "TLVDecoder.h" -#include "esm_msgDef.h" -#include "esm_msg.h" - -#include "esm_cause.h" -#include "esm_proc.h" - -#include // memset, strlen -#include - -/****************************************************************************/ -/**************** E X T E R N A L D E F I N I T I O N S ****************/ -/****************************************************************************/ - -/****************************************************************************/ -/******************* L O C A L D E F I N I T I O N S *******************/ -/****************************************************************************/ - - -static int _esm_sap_recv(int msg_type, int is_standalone, emm_data_context_t *ctx, - const OctetString *req, OctetString *rsp, esm_sap_error_t *err); -static int _esm_sap_send(int msg_type, int is_standalone, emm_data_context_t *ctx, - int pti, int ebi, const esm_sap_data_t *data, OctetString *rsp); - -/* - * String representation of ESM-SAP primitives - */ -static const char *_esm_sap_primitive_str[] = { - "ESM_DEFAULT_EPS_BEARER_CONTEXT_ACTIVATE_REQ", - "ESM_DEFAULT_EPS_BEARER_CONTEXT_ACTIVATE_CNF", - "ESM_DEFAULT_EPS_BEARER_CONTEXT_ACTIVATE_REJ", - "ESM_DEDICATED_EPS_BEARER_CONTEXT_ACTIVATE_REQ", - "ESM_DEDICATED_EPS_BEARER_CONTEXT_ACTIVATE_CNF", - "ESM_DEDICATED_EPS_BEARER_CONTEXT_ACTIVATE_REJ", - "ESM_EPS_BEARER_CONTEXT_MODIFY_REQ", - "ESM_EPS_BEARER_CONTEXT_MODIFY_CNF", - "ESM_EPS_BEARER_CONTEXT_MODIFY_REJ", - "ESM_EPS_BEARER_CONTEXT_DEACTIVATE_REQ", - "ESM_EPS_BEARER_CONTEXT_DEACTIVATE_CNF", - "ESM_PDN_CONNECTIVITY_REQ", - "ESM_PDN_CONNECTIVITY_REJ", - "ESM_PDN_DISCONNECT_REQ", - "ESM_PDN_DISCONNECT_REJ", - "ESM_BEARER_RESOURCE_ALLOCATE_REQ", - "ESM_BEARER_RESOURCE_ALLOCATE_REJ", - "ESM_BEARER_RESOURCE_MODIFY_REQ", - "ESM_BEARER_RESOURCE_MODIFY_REJ", - "ESM_UNITDATA_IND", -}; - -/* - * Buffer used to encode ESM messages before being returned to the EPS - * Mobility Management sublayer in order to be sent onto the network - */ -#define ESM_SAP_BUFFER_SIZE 4096 -static char _esm_sap_buffer[ESM_SAP_BUFFER_SIZE]; - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -/**************************************************************************** - ** ** - ** Name: esm_sap_initialize() ** - ** ** - ** Description: Initializes the ESM Service Access Point state machine ** - ** ** - ** Inputs: None ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: None ** - ** Others: NONE ** - ** ** - ***************************************************************************/ -void esm_sap_initialize(void) -{ - LOG_FUNC_IN; - - /* Initialize ESM state machine */ - //esm_fsm_initialize(); - - LOG_FUNC_OUT; -} - -/**************************************************************************** - ** ** - ** Name: esm_sap_send() ** - ** ** - ** Description: Processes the ESM Service Access Point primitive ** - ** ** - ** Inputs: msg: The ESM-SAP primitive to process ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int esm_sap_send(esm_sap_t *msg) -{ - LOG_FUNC_IN; - - int rc = RETURNerror; - int pid; - - /* Check the ESM-SAP primitive */ - esm_primitive_t primitive = msg->primitive; - assert( (primitive > ESM_START) && (primitive < ESM_END)); - - LOG_TRACE(INFO, "ESM-SAP - Received primitive %s (%d)", - _esm_sap_primitive_str[primitive - ESM_START - 1], primitive); - - switch (primitive) { - case ESM_PDN_CONNECTIVITY_REQ: - - /* The MME received a PDN connectivity request message */ - rc = _esm_sap_recv(PDN_CONNECTIVITY_REQUEST, msg->is_standalone, - msg->ctx, msg->recv, &msg->send, &msg->err); - break; - - case ESM_PDN_CONNECTIVITY_REJ: - /* PDN connectivity locally failed */ - pid = esm_proc_default_eps_bearer_context_failure(msg->ctx); - - if (pid != RETURNerror) { - rc = esm_proc_pdn_connectivity_failure(msg->ctx, pid); - } - break; - - case ESM_PDN_DISCONNECT_REQ: - break; - - case ESM_PDN_DISCONNECT_REJ: - break; - - case ESM_BEARER_RESOURCE_ALLOCATE_REQ: - break; - - case ESM_BEARER_RESOURCE_ALLOCATE_REJ: - break; - - case ESM_BEARER_RESOURCE_MODIFY_REQ: - break; - - case ESM_BEARER_RESOURCE_MODIFY_REJ: - break; - - case ESM_DEFAULT_EPS_BEARER_CONTEXT_ACTIVATE_REQ: - break; - - case ESM_DEFAULT_EPS_BEARER_CONTEXT_ACTIVATE_CNF: - /* The MME received activate default ESP bearer context accept */ - rc = _esm_sap_recv(ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_ACCEPT, - msg->is_standalone, msg->ctx, - msg->recv, &msg->send, &msg->err); - break; - - case ESM_DEFAULT_EPS_BEARER_CONTEXT_ACTIVATE_REJ: - /* The MME received activate default ESP bearer context reject */ - rc = _esm_sap_recv(ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REJECT, - msg->is_standalone, msg->ctx, - msg->recv, &msg->send, &msg->err); - break; - - case ESM_DEDICATED_EPS_BEARER_CONTEXT_ACTIVATE_REQ: - break; - - case ESM_DEDICATED_EPS_BEARER_CONTEXT_ACTIVATE_CNF: - break; - - case ESM_DEDICATED_EPS_BEARER_CONTEXT_ACTIVATE_REJ: - break; - - case ESM_EPS_BEARER_CONTEXT_MODIFY_REQ: - break; - - case ESM_EPS_BEARER_CONTEXT_MODIFY_CNF: - break; - - case ESM_EPS_BEARER_CONTEXT_MODIFY_REJ: - break; - - case ESM_EPS_BEARER_CONTEXT_DEACTIVATE_REQ: { - int bid; - /* - * Locally deactivate EPS bearer context - */ - rc = esm_proc_eps_bearer_context_deactivate(msg->ctx, TRUE, - msg->data.eps_bearer_context_deactivate.ebi, - &pid, &bid, NULL); - } - break; - - case ESM_EPS_BEARER_CONTEXT_DEACTIVATE_CNF: - break; - - case ESM_UNITDATA_IND: - rc = _esm_sap_recv(-1, msg->is_standalone, msg->ctx, - msg->recv, &msg->send, &msg->err); - break; - - default: - break; - } - - - if (rc != RETURNok) { - LOG_TRACE(ERROR, "ESM-SAP - Failed to process primitive %s (%d)", - _esm_sap_primitive_str[primitive - ESM_START - 1], primitive); - } - - - LOG_FUNC_RETURN (rc); -} - -/****************************************************************************/ -/********************* L O C A L F U N C T I O N S *********************/ -/****************************************************************************/ - -/**************************************************************************** - ** ** - ** Name: _esm_sap_recv() ** - ** ** - ** Description: Processes ESM messages received from the network: Decodes ** - ** the message and checks whether it is of the expected ty- ** - ** pe, checks the validity of the procedure transaction iden-** - ** tity, checks the validity of the EPS bearer identity, and ** - ** parses the message content. ** - ** If no protocol error is found the ESM response message is ** - ** returned in order to be sent back onto the network upon ** - ** the relevant ESM procedure completion. ** - ** If a protocol error is found the ESM status message is ** - ** returned including the value of the ESM cause code. ** - ** ** - ** Inputs: msg_type: Expected type of the received ESM message ** - ** is_standalone: Indicates whether the ESM message has been ** - ** received standalone or together within EMM ** - ** attach related message ** - ** ueid: UE identifier within the MME ** - ** req: The encoded ESM request message to process ** - ** Others: None ** - ** ** - ** Outputs: rsp: The encoded ESM response message to be re- ** - ** turned upon ESM procedure completion ** - ** err: Error code of the ESM procedure ** - ** Return: RETURNok, RETURNerror ** - ** Others: _esm_sap_buffer ** - ** ** - ***************************************************************************/ -static int _esm_sap_recv(int msg_type, int is_standalone, - emm_data_context_t *ctx, - const OctetString *req, OctetString *rsp, - esm_sap_error_t *err) -{ - esm_proc_procedure_t esm_procedure = NULL; - int esm_cause = ESM_CAUSE_SUCCESS; - int rc = RETURNerror; - int decoder_rc; - - ESM_msg esm_msg; - - LOG_FUNC_IN; - - memset(&esm_msg, 0 , sizeof(ESM_msg)); - - /* Decode the received ESM message */ - decoder_rc = esm_msg_decode(&esm_msg, req->value, req->length); - - /* Process decoding errors */ - if (decoder_rc < 0) { - /* 3GPP TS 24.301, section 7.2 - * Ignore received message that is too short to contain a complete - * message type information element */ - if (decoder_rc == TLV_DECODE_BUFFER_TOO_SHORT) { - LOG_TRACE(WARNING, "ESM-SAP - Discard message too short to " - "contain a complete message type IE"); - /* Return indication that received message has been discarded */ - *err = ESM_SAP_DISCARDED; - LOG_FUNC_RETURN (RETURNok); - } - /* 3GPP TS 24.301, section 7.2 - * Unknown or unforeseen message type */ - else if (decoder_rc == TLV_DECODE_WRONG_MESSAGE_TYPE) { - esm_cause = ESM_CAUSE_MESSAGE_TYPE_NOT_IMPLEMENTED; - } - /* 3GPP TS 24.301, section 7.7.2 - * Conditional IE errors */ - else if (decoder_rc == TLV_DECODE_UNEXPECTED_IEI) { - esm_cause = ESM_CAUSE_CONDITIONAL_IE_ERROR; - } else { - esm_cause = ESM_CAUSE_PROTOCOL_ERROR; - } - } - /* Check the type of the ESM message actually received */ - else if ( (msg_type > 0) && (msg_type != esm_msg.header.message_type) ) { - if (esm_msg.header.message_type != ESM_STATUS) { - /* Semantically incorrect ESM message */ - LOG_TRACE(ERROR, "ESM-SAP - Received ESM message 0x%x is not " - "of the expected type (0x%x)", - esm_msg.header.message_type, msg_type); - esm_cause = ESM_CAUSE_SEMANTICALLY_INCORRECT; - } - } - - /* Get the procedure transaction identity */ - unsigned int pti = esm_msg.header.procedure_transaction_identity; - /* Get the EPS bearer identity */ - unsigned int ebi = esm_msg.header.eps_bearer_identity; - /* Indicate whether the ESM bearer context related procedure was triggered - * by the receipt of a transaction related request message from the UE or - * was triggered network-internally */ - int triggered_by_ue = (pti != PROCEDURE_TRANSACTION_IDENTITY_UNASSIGNED); - /* Indicate whether the received message shall be ignored */ - int is_discarded = FALSE; - - if (esm_cause != ESM_CAUSE_SUCCESS) { - LOG_TRACE(ERROR, "ESM-SAP - Failed to decode expected ESM message " - "0x%x", msg_type); - } - /* Process the received ESM message */ - else switch (esm_msg.header.message_type) { - - - case ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_ACCEPT: - /* - * Process activate default EPS bearer context accept message - * received from the UE - */ - esm_cause = esm_recv_activate_default_eps_bearer_context_accept( - ctx, pti, ebi, - &esm_msg.activate_default_eps_bearer_context_accept); - - if ( (esm_cause == ESM_CAUSE_INVALID_PTI_VALUE) || - (esm_cause == ESM_CAUSE_INVALID_EPS_BEARER_IDENTITY) ) { - /* 3GPP TS 24.301, section 7.3.1, case f - * Ignore ESM message received with reserved PTI value - * 3GPP TS 24.301, section 7.3.2, case f - * Ignore ESM message received with reserved or assigned - * value that does not match an existing EPS bearer context - */ - is_discarded = TRUE; - } - - break; - - case ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REJECT: - /* - * Process activate default EPS bearer context reject message - * received from the UE - */ - esm_cause = esm_recv_activate_default_eps_bearer_context_reject( - ctx, pti, ebi, - &esm_msg.activate_default_eps_bearer_context_reject); - - if ( (esm_cause == ESM_CAUSE_INVALID_PTI_VALUE) || - (esm_cause == ESM_CAUSE_INVALID_EPS_BEARER_IDENTITY) ) { - /* 3GPP TS 24.301, section 7.3.1, case f - * Ignore ESM message received with reserved PTI value - * 3GPP TS 24.301, section 7.3.2, case f - * Ignore ESM message received with reserved or assigned - * value that does not match an existing EPS bearer context - */ - is_discarded = TRUE; - } - - break; - - case DEACTIVATE_EPS_BEARER_CONTEXT_ACCEPT: - /* - * Process deactivate EPS bearer context accept message - * received from the UE - */ - esm_cause = esm_recv_deactivate_eps_bearer_context_accept( - ctx, pti, ebi, - &esm_msg.deactivate_eps_bearer_context_accept); - - if ( (esm_cause == ESM_CAUSE_INVALID_PTI_VALUE) || - (esm_cause == ESM_CAUSE_INVALID_EPS_BEARER_IDENTITY) ) { - /* 3GPP TS 24.301, section 7.3.1, case f - * Ignore ESM message received with reserved PTI value - * 3GPP TS 24.301, section 7.3.2, case f - * Ignore ESM message received with reserved or assigned - * value that does not match an existing EPS bearer context - */ - is_discarded = TRUE; - } - - break; - - case ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_ACCEPT: - /* - * Process activate dedicated EPS bearer context accept message - * received from the UE - */ - esm_cause = esm_recv_activate_dedicated_eps_bearer_context_accept( - ctx, pti, ebi, - &esm_msg.activate_dedicated_eps_bearer_context_accept); - - if ( (esm_cause == ESM_CAUSE_INVALID_PTI_VALUE) || - (esm_cause == ESM_CAUSE_INVALID_EPS_BEARER_IDENTITY) ) { - /* 3GPP TS 24.301, section 7.3.1, case f - * Ignore ESM message received with reserved PTI value - * 3GPP TS 24.301, section 7.3.2, case f - * Ignore ESM message received with reserved or assigned - * value that does not match an existing EPS bearer context - */ - is_discarded = TRUE; - } - - break; - - case ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REJECT: - /* - * Process activate dedicated EPS bearer context reject message - * received from the UE - */ - esm_cause = esm_recv_activate_dedicated_eps_bearer_context_reject( - ctx, pti, ebi, - &esm_msg.activate_dedicated_eps_bearer_context_reject); - - if ( (esm_cause == ESM_CAUSE_INVALID_PTI_VALUE) || - (esm_cause == ESM_CAUSE_INVALID_EPS_BEARER_IDENTITY) ) { - /* 3GPP TS 24.301, section 7.3.1, case f - * Ignore ESM message received with reserved PTI value - * 3GPP TS 24.301, section 7.3.2, case f - * Ignore ESM message received with reserved or assigned - * value that does not match an existing EPS bearer context - */ - is_discarded = TRUE; - } - - break; - - case MODIFY_EPS_BEARER_CONTEXT_ACCEPT: - break; - - case MODIFY_EPS_BEARER_CONTEXT_REJECT: - break; - - case PDN_CONNECTIVITY_REQUEST: { - esm_proc_data_t data; - memset(&data, 0, sizeof(esm_proc_data_t)); - - LOG_TRACE(DEBUG, "ESM-SAP - PDN_CONNECTIVITY_REQUEST pti %u ebi %u", pti, ebi); - - /* - * Process PDN connectivity request message received from the UE - */ - esm_cause = esm_recv_pdn_connectivity_request(ctx, pti, ebi, - &esm_msg.pdn_connectivity_request, - &ebi, &data); - - if (esm_cause != ESM_CAUSE_SUCCESS) { - /* Return reject message */ - rc = esm_send_pdn_connectivity_reject(pti, - &esm_msg.pdn_connectivity_reject, esm_cause); - /* Setup the callback function used to send PDN connectivity - * reject message onto the network */ - esm_procedure = esm_proc_pdn_connectivity_reject; - /* No ESM status message should be returned */ - esm_cause = ESM_CAUSE_SUCCESS; - } else { -#if defined(ORIGINAL_CODE) - /* Setup PDN type */ - int pdn_type = -1; - - if (data.pdn_type == ESM_PDN_TYPE_IPV4) { - pdn_type = PDN_VALUE_TYPE_IPV4; - } else if (data.pdn_type == ESM_PDN_TYPE_IPV6) { - pdn_type = PDN_VALUE_TYPE_IPV6; - } else if (data.pdn_type == ESM_PDN_TYPE_IPV4V6) { - pdn_type = PDN_VALUE_TYPE_IPV4V6; - } - - /* Setup EPS bearer level Quality of Service */ - EpsQualityOfService qos; - qos.bitRatesPresent = 1; - qos.bitRatesExtPresent = 0; - qos.qci = data.qos.qci; - qos.bitRates.maxBitRateForUL = data.qos.mbrUL; - qos.bitRates.maxBitRateForDL = data.qos.mbrDL; - qos.bitRates.guarBitRateForUL = data.qos.gbrUL; - qos.bitRates.guarBitRateForDL = data.qos.gbrDL; - - /* Return default EPS bearer context request message */ - rc = esm_send_activate_default_eps_bearer_context_request( - pti, ebi, - &esm_msg.activate_default_eps_bearer_context_request, - &data.apn, pdn_type, &data.pdn_addr, &qos, esm_cause); -#if 0 - PacketFilters pkfs; - pkfs[0].identifier = 1; - pkfs[0].direction = TRAFFIC_FLOW_TEMPLATE_DOWNLINK_ONLY; - pkfs[0].eval_precedence = 2; - pkfs[0].packetfilter.flags = - (TRAFFIC_FLOW_TEMPLATE_IPV4_REMOTE_ADDR_FLAG | - TRAFFIC_FLOW_TEMPLATE_PROTOCOL_NEXT_HEADER_FLAG | - TRAFFIC_FLOW_TEMPLATE_SINGLE_LOCAL_PORT_FLAG | - TRAFFIC_FLOW_TEMPLATE_SINGLE_REMOTE_PORT_FLAG); - pkfs[0].packetfilter.ipv4remoteaddr[0].addr = 192; - pkfs[0].packetfilter.ipv4remoteaddr[1].addr = 168; - pkfs[0].packetfilter.ipv4remoteaddr[2].addr = 12; - pkfs[0].packetfilter.ipv4remoteaddr[3].addr = 1; - pkfs[0].packetfilter.ipv4remoteaddr[0].mask = 255; - pkfs[0].packetfilter.ipv4remoteaddr[1].mask = 255; - pkfs[0].packetfilter.ipv4remoteaddr[2].mask = 255; - pkfs[0].packetfilter.ipv4remoteaddr[3].mask = 0; - pkfs[0].packetfilter.protocolidentifier_nextheader = 17; - pkfs[0].packetfilter.singlelocalport = 10001; - pkfs[0].packetfilter.singleremoteport = 12001; - pkfs[1].identifier = 2; - pkfs[1].direction = TRAFFIC_FLOW_TEMPLATE_UPLINK_ONLY; - pkfs[1].eval_precedence = 3; - pkfs[1].packetfilter.flags = - (TRAFFIC_FLOW_TEMPLATE_IPV4_REMOTE_ADDR_FLAG | - TRAFFIC_FLOW_TEMPLATE_PROTOCOL_NEXT_HEADER_FLAG | - TRAFFIC_FLOW_TEMPLATE_SINGLE_LOCAL_PORT_FLAG | - TRAFFIC_FLOW_TEMPLATE_SINGLE_REMOTE_PORT_FLAG); - pkfs[1].packetfilter.ipv4remoteaddr[0].addr = 192; - pkfs[1].packetfilter.ipv4remoteaddr[1].addr = 168; - pkfs[1].packetfilter.ipv4remoteaddr[2].addr = 12; - pkfs[1].packetfilter.ipv4remoteaddr[3].addr = 1; - pkfs[1].packetfilter.ipv4remoteaddr[0].mask = 255; - pkfs[1].packetfilter.ipv4remoteaddr[1].mask = 255; - pkfs[1].packetfilter.ipv4remoteaddr[2].mask = 255; - pkfs[1].packetfilter.ipv4remoteaddr[3].mask = 0; - pkfs[1].packetfilter.protocolidentifier_nextheader = 17; - pkfs[1].packetfilter.singlelocalport = 10002; - pkfs[1].packetfilter.singleremoteport = 12002; - /* Return dedicated EPS bearer context request message */ - rc = esm_send_activate_dedicated_eps_bearer_context_request( - pti, ebi, - &esm_msg.activate_dedicated_eps_bearer_context_request, - ebi, &qos, &pkfs, 2); -#endif - esm_procedure = esm_proc_default_eps_bearer_context_request; -#else - esm_cause = ESM_CAUSE_SUCCESS; -#endif - /* Setup the callback function used to send default EPS bearer - * context request message onto the network */ - //esm_procedure = esm_proc_default_eps_bearer_context_request; - } - - break; - } - - - case PDN_DISCONNECT_REQUEST: - /* - * Process PDN disconnect request message received from the UE - */ - esm_cause = esm_recv_pdn_disconnect_request(ctx, pti, ebi, - &esm_msg.pdn_disconnect_request, &ebi); - - if (esm_cause != ESM_CAUSE_SUCCESS) { - /* Return reject message */ - rc = esm_send_pdn_disconnect_reject(pti, - &esm_msg.pdn_disconnect_reject, esm_cause); - /* Setup the callback function used to send PDN connectivity - * reject message onto the network */ - esm_procedure = esm_proc_pdn_disconnect_reject; - /* No ESM status message should be returned */ - esm_cause = ESM_CAUSE_SUCCESS; - } else { - /* Return deactivate EPS bearer context request message */ - rc = esm_send_deactivate_eps_bearer_context_request(pti, ebi, - &esm_msg.deactivate_eps_bearer_context_request, - ESM_CAUSE_REGULAR_DEACTIVATION); - /* Setup the callback function used to send deactivate EPS - * bearer context request message onto the network */ - esm_procedure = esm_proc_eps_bearer_context_deactivate_request; - } - - break; - - case BEARER_RESOURCE_ALLOCATION_REQUEST: - break; - - case BEARER_RESOURCE_MODIFICATION_REQUEST: - break; - - case ESM_INFORMATION_RESPONSE: - break; - - case ESM_STATUS: - /* - * Process received ESM status message - */ - esm_cause = esm_recv_status(ctx, pti, ebi, &esm_msg.esm_status); - break; - - default: - LOG_TRACE(WARNING, "ESM-SAP - Received unexpected ESM message " - "0x%x", esm_msg.header.message_type); - esm_cause = ESM_CAUSE_MESSAGE_TYPE_NOT_IMPLEMENTED; - break; - } - - if ( (esm_cause != ESM_CAUSE_SUCCESS) && (esm_procedure == NULL) ) { - /* ESM message processing failed */ - if (!is_discarded) { - /* 3GPP TS 24.301, section 7.1 - * Handling of unknown, unforeseen, and erroneous protocol data */ - LOG_TRACE(WARNING, "ESM-SAP - Received ESM message is not valid " - "(cause=%d)", esm_cause); - /* Return an ESM status message */ - rc = esm_send_status(pti, ebi, &esm_msg.esm_status, esm_cause); - /* Setup the callback function used to send ESM status message - * onto the network */ - esm_procedure = esm_proc_status; - /* Discard received ESM message */ - is_discarded = TRUE; - } - } else { - /* ESM message processing succeed */ - *err = ESM_SAP_SUCCESS; - rc = RETURNok; - } - - if ( (rc != RETURNerror) && (esm_procedure != NULL) ) { - /* Encode the returned ESM response message */ - int size = esm_msg_encode(&esm_msg, (uint8_t *)_esm_sap_buffer, - ESM_SAP_BUFFER_SIZE); - - if (size > 0) { - rsp->length = size; - rsp->value = (uint8_t *)(_esm_sap_buffer); - } - - /* Complete the relevant ESM procedure */ - rc = (*esm_procedure)(is_standalone, ctx, ebi, rsp, triggered_by_ue); - - if (is_discarded) { - /* Return indication that received message has been discarded */ - *err = ESM_SAP_DISCARDED; - } else if (rc != RETURNok) { - /* Return indication that ESM procedure failed */ - *err = ESM_SAP_FAILED; - } - } else if (is_discarded) { - LOG_TRACE(WARNING, "ESM-SAP - Silently discard message type 0x%x", - esm_msg.header.message_type); - /* Return indication that received message has been discarded */ - *err = ESM_SAP_DISCARDED; - rc = RETURNok; - } - - LOG_FUNC_RETURN(rc); -} - -/**************************************************************************** - ** ** - ** Name: _esm_sap_send() ** - ** ** - ** Description: Processes ESM messages to send onto the network: Encoded ** - ** the message and execute the relevant ESM procedure. ** - ** ** - ** Inputs: msg_type: Type of the ESM message to be sent ** - ** is_standalone: Indicates whether the ESM message has to ** - ** be sent standalone or together within EMM ** - ** attach related message ** - ** ueid: UE identifier within the MME ** - ** pti: Procedure transaction identity ** - ** ebi: EPS bearer identity ** - ** data: Data required to build the message ** - ** Others: None ** - ** ** - ** Outputs: rsp: The encoded ESM response message to be re- ** - ** turned upon ESM procedure completion ** - ** Return: RETURNok, RETURNerror ** - ** Others: _esm_sap_buffer ** - ** ** - ***************************************************************************/ -static int _esm_sap_send(int msg_type, int is_standalone, - emm_data_context_t *ctx, - int pti, int ebi, const esm_sap_data_t *data, - OctetString *rsp) -{ - LOG_FUNC_IN; - - esm_proc_procedure_t esm_procedure = NULL; - int rc = RETURNok; - - /* Indicate whether the message is sent by the UE or the MME */ - int sent_by_ue = FALSE; - - ESM_msg esm_msg; - memset(&esm_msg, 0 , sizeof(ESM_msg)); - - /* Process the ESM message to send */ - switch (msg_type) { - - - - case ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST: - break; - - case ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST: - break; - - case MODIFY_EPS_BEARER_CONTEXT_REQUEST: - break; - - case DEACTIVATE_EPS_BEARER_CONTEXT_REQUEST: - break; - - case PDN_CONNECTIVITY_REJECT: - break; - - case PDN_DISCONNECT_REJECT: - break; - - case BEARER_RESOURCE_ALLOCATION_REJECT: - break; - - case BEARER_RESOURCE_MODIFICATION_REJECT: - break; - - default: - LOG_TRACE(WARNING, "ESM-SAP - Send unexpected ESM message 0x%x", - msg_type); - break; - } - - if (rc != RETURNerror) { - /* Encode the returned ESM response message */ - int size = esm_msg_encode(&esm_msg, (uint8_t *)_esm_sap_buffer, - ESM_SAP_BUFFER_SIZE); - - if (size > 0) { - rsp->length = size; - rsp->value = (uint8_t *)(_esm_sap_buffer); - } - - /* Execute the relevant ESM procedure */ - if (esm_procedure) { - rc = (*esm_procedure)(is_standalone, ctx, pti, rsp, sent_by_ue); - } - } - - LOG_FUNC_RETURN(rc); -} - diff --git a/openair-cn/NAS/MME/ESM/SAP/esm_sap.h b/openair-cn/NAS/MME/ESM/SAP/esm_sap.h deleted file mode 100644 index c2d900a4ae..0000000000 --- a/openair-cn/NAS/MME/ESM/SAP/esm_sap.h +++ /dev/null @@ -1,72 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** -Source esm_sap.h - -Version 0.1 - -Date 2012/11/22 - -Product NAS stack - -Subsystem EPS Session Management - -Author Frederic Maurel - -Description Defines the ESM Service Access Points at which the EPS - Session Management sublayer provides procedures for the - EPS bearer context handling and resources allocation. - -*****************************************************************************/ -#ifndef __ESM_SAP_H__ -#define __ESM_SAP_H__ - -#include "esm_sapDef.h" - -/****************************************************************************/ -/********************* G L O B A L C O N S T A N T S *******************/ -/****************************************************************************/ - -/****************************************************************************/ -/************************ G L O B A L T Y P E S ************************/ -/****************************************************************************/ - -/****************************************************************************/ -/******************** G L O B A L V A R I A B L E S ********************/ -/****************************************************************************/ - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -void esm_sap_initialize(void); - -int esm_sap_send(esm_sap_t *msg); - -#endif /* __ESM_SAP_H__*/ diff --git a/openair-cn/NAS/MME/ESM/SAP/esm_sapDef.h b/openair-cn/NAS/MME/ESM/SAP/esm_sapDef.h deleted file mode 100644 index a1372193f1..0000000000 --- a/openair-cn/NAS/MME/ESM/SAP/esm_sapDef.h +++ /dev/null @@ -1,179 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** -Source esm_sapDef.h - -Version 0.1 - -Date 2012/11/21 - -Product NAS stack - -Subsystem EPS Session Management - -Author Frederic Maurel - -Description Defines the ESM Service Access Point that provides EPS - bearer context handling and resources allocation procedures. - -*****************************************************************************/ - -#include "emmData.h" - -#ifndef __ESM_SAPDEF_H__ -#define __ESM_SAPDEF_H__ - -#include "OctetString.h" - -/****************************************************************************/ -/********************* G L O B A L C O N S T A N T S *******************/ -/****************************************************************************/ - -/* - * EPS Session Management primitives - * --------------------------------- - */ -typedef enum esm_primitive_s { - ESM_START = 0, - /* Procedures related to EPS bearer contexts (initiated by the network) */ - ESM_DEFAULT_EPS_BEARER_CONTEXT_ACTIVATE_REQ, - ESM_DEFAULT_EPS_BEARER_CONTEXT_ACTIVATE_CNF, - ESM_DEFAULT_EPS_BEARER_CONTEXT_ACTIVATE_REJ, - ESM_DEDICATED_EPS_BEARER_CONTEXT_ACTIVATE_REQ, - ESM_DEDICATED_EPS_BEARER_CONTEXT_ACTIVATE_CNF, - ESM_DEDICATED_EPS_BEARER_CONTEXT_ACTIVATE_REJ, - ESM_EPS_BEARER_CONTEXT_MODIFY_REQ, - ESM_EPS_BEARER_CONTEXT_MODIFY_CNF, - ESM_EPS_BEARER_CONTEXT_MODIFY_REJ, - ESM_EPS_BEARER_CONTEXT_DEACTIVATE_REQ, - ESM_EPS_BEARER_CONTEXT_DEACTIVATE_CNF, - /* Transaction related procedures (initiated by the UE) */ - ESM_PDN_CONNECTIVITY_REQ, - ESM_PDN_CONNECTIVITY_REJ, - ESM_PDN_DISCONNECT_REQ, - ESM_PDN_DISCONNECT_REJ, - ESM_BEARER_RESOURCE_ALLOCATE_REQ, - ESM_BEARER_RESOURCE_ALLOCATE_REJ, - ESM_BEARER_RESOURCE_MODIFY_REQ, - ESM_BEARER_RESOURCE_MODIFY_REJ, - /* ESM data indication ("raw" ESM message) */ - ESM_UNITDATA_IND, - ESM_END -} esm_primitive_t; - -/****************************************************************************/ -/************************ G L O B A L T Y P E S ************************/ -/****************************************************************************/ - -/* - * Error code returned upon processing ESM-SAP primitive - */ -typedef enum { - ESM_SAP_SUCCESS = 1, /* ESM-SAP primitive succeed */ - ESM_SAP_DISCARDED, /* ESM-SAP primitive failed, the caller should - * ignore the error */ - ESM_SAP_FAILED /* ESM-SAP primitive failed, the caller should - * take specific action and state transition may - * occurs */ -} esm_sap_error_t; - -/* - * ESM primitive for activate EPS default bearer context procedure - * --------------------------------------------------------------- - */ -typedef struct esm_activate_eps_default_bearer_context_s { -} esm_activate_eps_default_bearer_context_t; - -/* - * ESM primitive for PDN connectivity procedure - * -------------------------------------------- - */ -typedef struct esm_pdn_connectivity_s { - int cid; /* PDN connection local identifier */ - int is_defined; /* Indicates whether a PDN context has been defined - * for the specified APN */ - int pdn_type; /* PDN address type (IPv4, IPv6, IPv4v6) */ - const char *apn; /* PDN's Access Point Name */ - int is_emergency; /* Indicates whether the PDN context has been - * defined to establish connection for emergency - * bearer services */ -} esm_pdn_connectivity_t; - -/* - * ESM primitive for PDN disconnect procedure - * ------------------------------------------ - */ -typedef struct esm_pdn_disconnect_s { - int cid; /* PDN connection local identifier */ -} esm_pdn_disconnect_t; - -/* - * ESM primitive for deactivate EPS bearer context procedure - * --------------------------------------------------------- - */ -typedef struct esm_eps_bearer_context_deactivate_s { -#define ESM_SAP_ALL_EBI 0xff - unsigned int ebi; /* EPS bearer identity of the EPS bearer context - * to be deactivated */ -} esm_eps_bearer_context_deactivate_t; - -/* - * ------------------------------ - * Structure of ESM-SAP primitive - * ------------------------------ - */ -typedef union { - esm_pdn_connectivity_t pdn_connect; - esm_pdn_disconnect_t pdn_disconnect; - esm_eps_bearer_context_deactivate_t eps_bearer_context_deactivate; -} esm_sap_data_t; - -typedef struct esm_sap_s { - esm_primitive_t primitive; /* ESM-SAP primitive to process */ - int is_standalone; /* Indicates whether the ESM message handled - * within this primitive has to be sent/received - * standalone or together within an EMM related - * message */ - emm_data_context_t *ctx; /* UE context */ - unsigned int ueid; /* Local UE identifier */ - esm_sap_error_t err; /* ESM-SAP error code */ - const OctetString *recv; /* Encoded ESM message received */ - OctetString send; /* Encoded ESM message to be sent */ - esm_sap_data_t data; /* ESM message data parameters */ -} esm_sap_t; - -/****************************************************************************/ -/******************** G L O B A L V A R I A B L E S ********************/ -/****************************************************************************/ - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -#endif /* __ESM_SAPDEF_H__*/ diff --git a/openair-cn/NAS/MME/ESM/SAP/esm_send.c b/openair-cn/NAS/MME/ESM/SAP/esm_send.c deleted file mode 100644 index 4926c749a2..0000000000 --- a/openair-cn/NAS/MME/ESM/SAP/esm_send.c +++ /dev/null @@ -1,427 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** -Source esm_send.c - -Version 0.1 - -Date 2013/02/11 - -Product NAS stack - -Subsystem EPS Session Management - -Author Frederic Maurel - -Description Defines functions executed at the ESM Service Access - Point to send EPS Session Management messages to the - EPS Mobility Management sublayer. - -*****************************************************************************/ - -#include "esm_send.h" -#include "commonDef.h" -#include "nas_log.h" - - -#include "esm_msgDef.h" -#include "esm_cause.h" - -#include // strlen - -/****************************************************************************/ -/**************** E X T E R N A L D E F I N I T I O N S ****************/ -/****************************************************************************/ - -/****************************************************************************/ -/******************* L O C A L D E F I N I T I O N S *******************/ -/****************************************************************************/ - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -/* - * -------------------------------------------------------------------------- - * Functions executed by both the UE and the MME to send ESM messages - * -------------------------------------------------------------------------- - */ -/**************************************************************************** - ** ** - ** Name: esm_send_status() ** - ** ** - ** Description: Builds ESM status message ** - ** ** - ** The ESM status message is sent by the network or the UE ** - ** to pass information on the status of the indicated EPS ** - ** bearer context and report certain error conditions. ** - ** ** - ** Inputs: pti: Procedure transaction identity ** - ** ebi: EPS bearer identity ** - ** esm_cause: ESM cause code ** - ** Others: None ** - ** ** - ** Outputs: msg: The ESM message to be sent ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int esm_send_status(int pti, int ebi, esm_status_msg *msg, int esm_cause) -{ - LOG_FUNC_IN; - - /* Mandatory - ESM message header */ - msg->protocoldiscriminator = EPS_SESSION_MANAGEMENT_MESSAGE; - msg->epsbeareridentity = ebi; - msg->messagetype = ESM_STATUS; - msg->proceduretransactionidentity = pti; - - /* Mandatory - ESM cause code */ - msg->esmcause = esm_cause; - - LOG_TRACE(WARNING, "ESM-SAP - Send ESM Status message (pti=%d, ebi=%d)", - msg->proceduretransactionidentity, msg->epsbeareridentity); - - LOG_FUNC_RETURN(RETURNok); -} - - -/* - * -------------------------------------------------------------------------- - * Functions executed by the MME to send ESM message to the UE - * -------------------------------------------------------------------------- - */ -/**************************************************************************** - ** ** - ** Name: esm_send_pdn_connectivity_reject() ** - ** ** - ** Description: Builds PDN Connectivity Reject message ** - ** ** - ** The PDN connectivity reject message is sent by the net- ** - ** work to the UE to reject establishment of a PDN connec- ** - ** tion. ** - ** ** - ** Inputs: pti: Procedure transaction identity ** - ** esm_cause: ESM cause code ** - ** Others: None ** - ** ** - ** Outputs: msg: The ESM message to be sent ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int esm_send_pdn_connectivity_reject(int pti, pdn_connectivity_reject_msg *msg, - int esm_cause) -{ - LOG_FUNC_IN; - - /* Mandatory - ESM message header */ - msg->protocoldiscriminator = EPS_SESSION_MANAGEMENT_MESSAGE; - msg->epsbeareridentity = EPS_BEARER_IDENTITY_UNASSIGNED; - msg->messagetype = PDN_CONNECTIVITY_REJECT; - msg->proceduretransactionidentity = pti; - - /* Mandatory - ESM cause code */ - msg->esmcause = esm_cause; - /* Optional IEs */ - msg->presencemask = 0; - - LOG_TRACE(INFO, "ESM-SAP - Send PDN Connectivity Reject message " - "(pti=%d, ebi=%d)", - msg->proceduretransactionidentity, msg->epsbeareridentity); - - LOG_FUNC_RETURN(RETURNok); -} - -/**************************************************************************** - ** ** - ** Name: esm_send_pdn_disconnect_reject() ** - ** ** - ** Description: Builds PDN Disconnect Reject message ** - ** ** - ** The PDN disconnect reject message is sent by the network ** - ** to the UE to reject release of a PDN connection. ** - ** ** - ** Inputs: pti: Procedure transaction identity ** - ** esm_cause: ESM cause code ** - ** Others: None ** - ** ** - ** Outputs: msg: The ESM message to be sent ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int esm_send_pdn_disconnect_reject(int pti, pdn_disconnect_reject_msg *msg, - int esm_cause) -{ - LOG_FUNC_IN; - - /* Mandatory - ESM message header */ - msg->protocoldiscriminator = EPS_SESSION_MANAGEMENT_MESSAGE; - msg->epsbeareridentity = EPS_BEARER_IDENTITY_UNASSIGNED; - msg->messagetype = PDN_DISCONNECT_REJECT; - msg->proceduretransactionidentity = pti; - - /* Mandatory - ESM cause code */ - msg->esmcause = esm_cause; - /* Optional IEs */ - msg->presencemask = 0; - - LOG_TRACE(INFO, "ESM-SAP - Send PDN Disconnect Reject message " - "(pti=%d, ebi=%d)", - msg->proceduretransactionidentity, msg->epsbeareridentity); - - LOG_FUNC_RETURN(RETURNok); -} - -/**************************************************************************** - ** ** - ** Name: esm_send_activate_default_eps_bearer_context_request() ** - ** ** - ** Description: Builds Activate Default EPS Bearer Context Request ** - ** message ** - ** ** - ** The activate default EPS bearer context request message ** - ** is sent by the network to the UE to request activation of ** - ** a default EPS bearer context. ** - ** ** - ** Inputs: pti: Procedure transaction identity ** - ** ebi: EPS bearer identity ** - ** qos: Subscribed EPS quality of service ** - ** apn: Access Point Name in used ** - ** pdn_addr: PDN IPv4 address and/or IPv6 suffix ** - ** esm_cause: ESM cause code ** - ** Others: None ** - ** ** - ** Outputs: msg: The ESM message to be sent ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int esm_send_activate_default_eps_bearer_context_request(int pti, - int ebi, - activate_default_eps_bearer_context_request_msg *msg, - const OctetString *apn, - const ProtocolConfigurationOptions *pco, - int pdn_type, - const OctetString *pdn_addr, - const EpsQualityOfService *qos, - int esm_cause) -{ - LOG_FUNC_IN; - - /* Mandatory - ESM message header */ - msg->protocoldiscriminator = EPS_SESSION_MANAGEMENT_MESSAGE; - msg->epsbeareridentity = ebi; - msg->messagetype = ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST; - msg->proceduretransactionidentity = pti; - - /* Mandatory - EPS QoS */ - msg->epsqos = *qos; - LOG_TRACE(INFO, "ESM-SAP - epsqos qci: %u", qos->qci); - - if (qos->bitRatesPresent) { - LOG_TRACE(INFO, "ESM-SAP - epsqos maxBitRateForUL: %u", qos->bitRates.maxBitRateForUL); - LOG_TRACE(INFO, "ESM-SAP - epsqos maxBitRateForDL: %u", qos->bitRates.maxBitRateForDL); - LOG_TRACE(INFO, "ESM-SAP - epsqos guarBitRateForUL: %u", qos->bitRates.guarBitRateForUL); - LOG_TRACE(INFO, "ESM-SAP - epsqos guarBitRateForDL: %u", qos->bitRates.guarBitRateForDL); - } else { - LOG_TRACE(INFO, "ESM-SAP - epsqos no bit rates defined"); - } - - if (qos->bitRatesExtPresent) { - LOG_TRACE(INFO, "ESM-SAP - epsqos maxBitRateForUL Ext: %u", qos->bitRatesExt.maxBitRateForUL); - LOG_TRACE(INFO, "ESM-SAP - epsqos maxBitRateForDL Ext: %u", qos->bitRatesExt.maxBitRateForDL); - LOG_TRACE(INFO, "ESM-SAP - epsqos guarBitRateForUL Ext: %u", qos->bitRatesExt.guarBitRateForUL); - LOG_TRACE(INFO, "ESM-SAP - epsqos guarBitRateForDL Ext: %u", qos->bitRatesExt.guarBitRateForDL); - } else { - LOG_TRACE(INFO, "ESM-SAP - epsqos no bit rates ext defined"); - } - - - if ((apn == NULL) || ((apn != NULL) && (apn->value == NULL))) { - LOG_TRACE(WARNING, "ESM-SAP - apn is NULL!"); - } - - LOG_TRACE(INFO, "ESM-SAP - apn is %s", apn->value); - - /* Mandatory - Access Point Name */ - msg->accesspointname.accesspointnamevalue = *apn; - - /* Mandatory - PDN address */ - LOG_TRACE(INFO, "ESM-SAP - pdn_type is %u", pdn_type); - msg->pdnaddress.pdntypevalue = pdn_type; - LOG_TRACE(INFO, "ESM-SAP - pdn_addr is %u", dump_octet_string(pdn_addr)); - msg->pdnaddress.pdnaddressinformation = *pdn_addr; - - /* Optional - ESM cause code */ - msg->presencemask = 0; - - if (esm_cause != ESM_CAUSE_SUCCESS) { - msg->presencemask |= - ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_ESM_CAUSE_PRESENT; - msg->esmcause = esm_cause; - } - - if (pco != NULL) { - msg->presencemask |= - ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT; - msg->protocolconfigurationoptions = *pco; - } - -#warning "TEST LG FORCE APN-AMBR" - LOG_TRACE(INFO, "ESM-SAP - FORCE APN-AMBR"); - msg->presencemask |= - ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_APNAMBR_PRESENT; - msg->apnambr.apnambrfordownlink = 0xfe; // (8640kbps) - msg->apnambr.apnambrforuplink = 0xfe; // (8640kbps) - msg->apnambr.apnambrfordownlink_extended = 0xde; // (200Mbps) - msg->apnambr.apnambrforuplink_extended = 0x9e; // (100Mbps) - msg->apnambr.apnambrfordownlink_extended2 = 0; - msg->apnambr.apnambrforuplink_extended2 = 0; - msg->apnambr.extensions = 0 | APN_AGGREGATE_MAXIMUM_BIT_RATE_MAXIMUM_EXTENSION_PRESENT; - - LOG_TRACE(INFO, "ESM-SAP - Send Activate Default EPS Bearer Context " - "Request message (pti=%d, ebi=%d)", - msg->proceduretransactionidentity, msg->epsbeareridentity); - - LOG_FUNC_RETURN(RETURNok); -} - -/**************************************************************************** - ** ** - ** Name: esm_send_activate_dedicated_eps_bearer_context_request() ** - ** ** - ** Description: Builds Activate Dedicated EPS Bearer Context Request ** - ** message ** - ** ** - ** The activate dedicated EPS bearer context request message ** - ** is sent by the network to the UE to request activation of ** - ** a dedicated EPS bearer context associated with the same ** - ** PDN address(es) and APN as an already active default EPS ** - ** bearer context. ** - ** ** - ** Inputs: pti: Procedure transaction identity ** - ** ebi: EPS bearer identity ** - ** linked_ebi: EPS bearer identity of the default bearer ** - ** associated with the EPS dedicated bearer ** - ** to be activated ** - ** qos: EPS quality of service ** - ** tft: Traffic flow template ** - ** Others: None ** - ** ** - ** Outputs: msg: The ESM message to be sent ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int esm_send_activate_dedicated_eps_bearer_context_request(int pti, int ebi, - activate_dedicated_eps_bearer_context_request_msg *msg, - int linked_ebi, const EpsQualityOfService *qos, - PacketFilters *pkfs, int n_pkfs) -{ - int i; - LOG_FUNC_IN; - - /* Mandatory - ESM message header */ - msg->protocoldiscriminator = EPS_SESSION_MANAGEMENT_MESSAGE; - msg->epsbeareridentity = ebi; - msg->messagetype = ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST; - msg->proceduretransactionidentity = pti; - - /* Mandatory - EPS QoS */ - msg->epsqos = *qos; - - /* Mandatory - traffic flow template */ - msg->tft.tftoperationcode = TRAFFIC_FLOW_TEMPLATE_OPCODE_CREATE; - msg->tft.ebit = TRAFFIC_FLOW_TEMPLATE_PARAMETER_LIST_IS_NOT_INCLUDED; - msg->tft.numberofpacketfilters = n_pkfs; - - for (i = 0; i < msg->tft.numberofpacketfilters; i++) { - msg->tft.packetfilterlist.createtft[i] = (*pkfs)[i]; - } - - /* Optional */ - msg->presencemask = 0; - - LOG_TRACE(INFO, "ESM-SAP - Send Activate Dedicated EPS Bearer Context " - "Request message (pti=%d, ebi=%d)", - msg->proceduretransactionidentity, msg->epsbeareridentity); - - LOG_FUNC_RETURN(RETURNok); -} - -/**************************************************************************** - ** ** - ** Name: esm_send_deactivate_eps_bearer_context_request() ** - ** ** - ** Description: Builds Deactivate EPS Bearer Context Request message ** - ** ** - ** The deactivate EPS bearer context request message is sent ** - ** by the network to request deactivation of an active EPS ** - ** bearer context. ** - ** ** - ** Inputs: pti: Procedure transaction identity ** - ** ebi: EPS bearer identity ** - ** esm_cause: ESM cause code ** - ** Others: None ** - ** ** - ** Outputs: msg: The ESM message to be sent ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int esm_send_deactivate_eps_bearer_context_request(int pti, int ebi, - deactivate_eps_bearer_context_request_msg *msg, - int esm_cause) -{ - LOG_FUNC_IN; - - /* Mandatory - ESM message header */ - msg->protocoldiscriminator = EPS_SESSION_MANAGEMENT_MESSAGE; - msg->epsbeareridentity = ebi; - msg->messagetype = DEACTIVATE_EPS_BEARER_CONTEXT_REQUEST; - msg->proceduretransactionidentity = pti; - - /* Mandatory - ESM cause code */ - msg->esmcause = esm_cause; - /* Optional IEs */ - msg->presencemask = 0; - - LOG_TRACE(INFO, "ESM-SAP - Send Deactivate EPS Bearer Context Request " - "message (pti=%d, ebi=%d)", - msg->proceduretransactionidentity, msg->epsbeareridentity); - - LOG_FUNC_RETURN(RETURNok); -} - -/****************************************************************************/ -/********************* L O C A L F U N C T I O N S *********************/ -/****************************************************************************/ - diff --git a/openair-cn/NAS/MME/ESM/SAP/esm_send.h b/openair-cn/NAS/MME/ESM/SAP/esm_send.h deleted file mode 100644 index 07c0af4635..0000000000 --- a/openair-cn/NAS/MME/ESM/SAP/esm_send.h +++ /dev/null @@ -1,119 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** -Source esm_send.h - -Version 0.1 - -Date 2013/02/11 - -Product NAS stack - -Subsystem EPS Session Management - -Author Frederic Maurel - -Description Defines functions executed at the ESM Service Access - Point to send EPS Session Management messages to the - EPS Mobility Management sublayer. - -*****************************************************************************/ -#ifndef __ESM_SEND_H__ -#define __ESM_SEND_H__ - -#include "EsmStatus.h" - -#include "PdnConnectivityReject.h" -#include "PdnDisconnectReject.h" -#include "BearerResourceAllocationReject.h" -#include "BearerResourceModificationReject.h" - -#include "ActivateDefaultEpsBearerContextRequest.h" -#include "ActivateDedicatedEpsBearerContextRequest.h" -#include "ModifyEpsBearerContextRequest.h" -#include "DeactivateEpsBearerContextRequest.h" - -#include "EsmInformationRequest.h" - -/****************************************************************************/ -/********************* G L O B A L C O N S T A N T S *******************/ -/****************************************************************************/ - -/****************************************************************************/ -/************************ G L O B A L T Y P E S ************************/ -/****************************************************************************/ - -/****************************************************************************/ -/******************** G L O B A L V A R I A B L E S ********************/ -/****************************************************************************/ - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -/* - * -------------------------------------------------------------------------- - * Functions executed by both the UE and the MME to send ESM messages - * -------------------------------------------------------------------------- - */ -int esm_send_status(int pti, int ebi, esm_status_msg *msg, int esm_cause); - - -/* - * -------------------------------------------------------------------------- - * Functions executed by the MME to send ESM message to the UE - * -------------------------------------------------------------------------- - */ -/* - * Transaction related messages - * ---------------------------- - */ -int esm_send_pdn_connectivity_reject(int pti, pdn_connectivity_reject_msg *msg, - int esm_cause); - -int esm_send_pdn_disconnect_reject(int pti, pdn_disconnect_reject_msg *msg, - int esm_cause); - -/* - * Messages related to EPS bearer contexts - * --------------------------------------- - */ -int esm_send_activate_default_eps_bearer_context_request(int pti, int ebi, - activate_default_eps_bearer_context_request_msg *msg, const OctetString *apn, - const ProtocolConfigurationOptions *pco, int pdn_type, const OctetString *pdn_addr, - const EpsQualityOfService *qos, int esm_cause); - -int esm_send_activate_dedicated_eps_bearer_context_request(int pti, int ebi, - activate_dedicated_eps_bearer_context_request_msg *msg, int linked_ebi, - const EpsQualityOfService *qos, PacketFilters *pkfs, int n_pkfs); - -int esm_send_deactivate_eps_bearer_context_request(int pti, int ebi, - deactivate_eps_bearer_context_request_msg *msg, int esm_cause); - -#endif /* __ESM_SEND_H__*/ diff --git a/openair-cn/NAS/MME/ESM/esmData.h b/openair-cn/NAS/MME/ESM/esmData.h deleted file mode 100644 index a5f839c1dc..0000000000 --- a/openair-cn/NAS/MME/ESM/esmData.h +++ /dev/null @@ -1,265 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** -Source esmData.h - -Version 0.1 - -Date 2012/12/04 - -Product NAS stack - -Subsystem EPS Session Management - -Author Frederic Maurel - -Description Defines internal private data handled by EPS Session - Management sublayer. - -*****************************************************************************/ -#include // sprintf - -#include "networkDef.h" -#include "OctetString.h" -#include "EpsBearerIdentity.h" - -#include "mme_api.h" - -#if defined(NAS_BUILT_IN_EPC) -# include "tree.h" -#endif - -#ifndef __ESMDATA_H__ -#define __ESMDATA_H__ - -/****************************************************************************/ -/********************* G L O B A L C O N S T A N T S *******************/ -/****************************************************************************/ - -/* Total number of active EPS bearers */ -#define ESM_DATA_EPS_BEARER_TOTAL 11 - -/****************************************************************************/ -/************************ G L O B A L T Y P E S ************************/ -/****************************************************************************/ - -/* - * Minimal and maximal value of an EPS bearer identity: - * The EPS Bearer Identity (EBI) identifies a message flow - */ -#define ESM_EBI_MIN (EPS_BEARER_IDENTITY_FIRST) -#define ESM_EBI_MAX (EPS_BEARER_IDENTITY_LAST) - -/* EPS bearer context states */ -typedef enum { - ESM_EBR_INACTIVE, /* No EPS bearer context exists */ - ESM_EBR_ACTIVE, /* The EPS bearer context is active, - * in the UE, in the network */ - ESM_EBR_INACTIVE_PENDING, /* The network has initiated an EPS bearer - * context deactivation towards the UE */ - ESM_EBR_MODIFY_PENDING, /* The network has initiated an EPS bearer - * context modification towards the UE */ - ESM_EBR_ACTIVE_PENDING, /* The network has initiated an EPS bearer - * context activation towards the UE */ - ESM_EBR_STATE_MAX -} esm_ebr_state; - -/* ESM message timer retransmission data */ -typedef struct esm_ebr_timer_data_s { - void *ctx; - unsigned int ueid; /* Lower layers UE identifier */ - unsigned int ebi; /* EPS bearer identity */ - unsigned int count; /* Retransmission counter */ - OctetString msg; /* Encoded ESM message to re-transmit */ -} esm_ebr_timer_data_t; - -/* - * ----------------------- - * EPS bearer context data - * ----------------------- - */ -typedef struct esm_ebr_context_s { - unsigned char ebi; /* EPS bearer identity */ - esm_ebr_state status; /* EPS bearer context status */ - - struct nas_timer_t timer; /* Retransmission timer */ - esm_ebr_timer_data_t *args; /* Retransmission timer parameters data */ -} esm_ebr_context_t; - -typedef struct esm_ebr_data_s { - unsigned char index; /* Index of the next EPS bearer context - * identity to be used */ -#define ESM_EBR_DATA_SIZE (ESM_EBI_MAX - ESM_EBI_MIN + 1) - esm_ebr_context_t *context[ESM_EBR_DATA_SIZE + 1]; -} esm_ebr_data_t; - -/* - * -------------------------------------------------------------------------- - * Structure of data handled by EPS Session Management sublayer in the UE - * and in the MME - * -------------------------------------------------------------------------- - */ - -/* - * Structure of an EPS bearer - * -------------------------- - * An EPS bearer is a logical concept which applies to the connection - * between two endpoints (UE and PDN Gateway) with specific QoS attri- - * butes. An EPS bearer corresponds to one Quality of Service policy - * applied within the EPC and E-UTRAN. - */ -typedef struct esm_bearer_s { - int bid; /* Identifier of the EPS bearer */ - unsigned int ebi; /* EPS bearer identity */ - network_qos_t qos; /* EPS bearer level QoS parameters */ - network_tft_t tft; /* Traffic Flow Template for packet filtering */ -} esm_bearer_t; - -/* - * Structure of a PDN connection - * ----------------------------- - * A PDN connection is the association between a UE represented by - * one IPv4 address and/or one IPv6 prefix and a PDN represented by - * an Access Point Name (APN). - */ -typedef struct esm_pdn_s { - unsigned int pti; /* Identity of the procedure transaction executed - * to activate the PDN connection entry */ - int is_emergency; /* Emergency bearer services indicator */ - OctetString apn; /* Access Point Name currently in used */ - int ambr; /* Aggregate Maximum Bit Rate of this APN */ - int type; /* Address PDN type (IPv4, IPv6, IPv4v6) */ -#define ESM_DATA_IPV4_ADDRESS_SIZE 4 -#define ESM_DATA_IPV6_ADDRESS_SIZE 8 -#define ESM_DATA_IP_ADDRESS_SIZE (ESM_DATA_IPV4_ADDRESS_SIZE + \ - ESM_DATA_IPV6_ADDRESS_SIZE) - /* IPv4 PDN address and/or IPv6 prefix */ - char ip_addr[ESM_DATA_IP_ADDRESS_SIZE+1]; - int addr_realloc; /* Indicates whether the UE is allowed to subsequently - * request another PDN connectivity to the same APN - * using an address PDN type (IPv4 or IPv6) other - * than the one already activated */ - int n_bearers; /* Number of allocated EPS bearers; - * default EPS bearer is defined at index 0 */ -#define ESM_DATA_EPS_BEARER_MAX 4 - esm_bearer_t *bearer[ESM_DATA_EPS_BEARER_MAX]; -} esm_pdn_t; - -/* - * Structure of the ESM data - * ------------------------- - * The EPS Session Management sublayer handles data related to PDN - * connections and EPS bearers. Each active PDN connection has a de- - * fault EPS bearer. Several dedicated EPS bearers may exist within - * a PDN connection. - */ -typedef struct esm_data_context_s { - unsigned int ue_id; - - int n_ebrs; /* Total number of active EPS bearer contexts */ - int n_pdns; /* Number of active PDN connections */ - int emergency; /* Indicates whether a PDN connection for emergency - * bearer services is established */ -#define ESM_DATA_PDN_MAX 4 - struct { - int pid; /* Identifier of the PDN connection */ - int is_active; /* TRUE/FALSE if the PDN connection is active/inactive - * or the process to activate/deactivate the PDN - * connection is in progress */ - esm_pdn_t *data; /* Active PDN connection data */ - } pdn[ESM_DATA_PDN_MAX+1]; - - esm_ebr_data_t ebr; -} esm_data_context_t; - - - -/* - * -------------------------------------------------------------------------- - * ESM internal data handled by EPS Session Management sublayer in the MME - * -------------------------------------------------------------------------- - */ -/* - * Structure of the ESM data - * ------------------------- - */ -typedef struct esm_data_s { - /* - * MME configuration - * ----------------- - */ - mme_api_esm_config_t conf; - /* - * ESM contexts - * ------------ - */ -# if defined(NAS_BUILT_IN_EPC) - /* Use a tree for ue data context within MME */ - RB_HEAD(esm_data_context_map, esm_data_context_s) ctx_map; -# else -# define ESM_DATA_NB_UE_MAX (MME_API_NB_UE_MAX + 1) - esm_data_context_t *ctx[ESM_DATA_NB_UE_MAX]; -# endif -} esm_data_t; - -# if defined(NAS_BUILT_IN_EPC) -struct esm_data_context_s *esm_data_context_get( - esm_data_t *esm_data, unsigned int _ueid); - -struct esm_data_context_s *esm_data_context_remove( - esm_data_t *esm_data, struct esm_data_context_s *elm); - -void esm_data_context_add(esm_data_t *esm_data, struct esm_data_context_s *elm); - -# endif - - -/****************************************************************************/ -/******************** G L O B A L V A R I A B L E S ********************/ -/****************************************************************************/ - -/* - * ESM internal data (used within ESM only) - * ---------------------------------------- - */ -esm_data_t _esm_data; - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -extern char ip_addr_str[100]; - -extern char *esm_data_get_ipv4_addr(const OctetString *ip_addr); - -extern char *esm_data_get_ipv6_addr(const OctetString *ip_addr); - -extern char *esm_data_get_ipv4v6_addr(const OctetString *ip_addr); - -#endif /* __ESMDATA_H__*/ diff --git a/openair-cn/NAS/MME/ESM/esm_ebr.c b/openair-cn/NAS/MME/ESM/esm_ebr.c deleted file mode 100644 index 720e69a5eb..0000000000 --- a/openair-cn/NAS/MME/ESM/esm_ebr.c +++ /dev/null @@ -1,680 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** -Source esm_ebr.c - -Version 0.1 - -Date 2013/01/29 - -Product NAS stack - -Subsystem EPS Session Management - -Author Frederic Maurel - -Description Defines functions used to handle state of EPS bearer contexts - and manage ESM messages re-transmission. - -*****************************************************************************/ - -#include // malloc, free -#include // memcpy - -#include "emmData.h" -#include "esm_ebr.h" -#include "commonDef.h" -#include "nas_log.h" - -#include "mme_api.h" -#include "msc.h" - -/****************************************************************************/ -/**************** E X T E R N A L D E F I N I T I O N S ****************/ -/****************************************************************************/ - - -#define ESM_EBR_NB_UE_MAX (MME_API_NB_UE_MAX + 1) - -/****************************************************************************/ -/******************* L O C A L D E F I N I T I O N S *******************/ -/****************************************************************************/ - -/* String representation of EPS bearer context status */ -static const char *_esm_ebr_state_str[ESM_EBR_STATE_MAX] = { - "BEARER CONTEXT INACTIVE", - "BEARER CONTEXT ACTIVE", - "BEARER CONTEXT INACTIVE PENDING", - "BEARER CONTEXT MODIFY PENDING", - "BEARER CONTEXT ACTIVE PENDING" -}; - -/* - * ---------------------------------- - * List of EPS bearer contexts per UE - * ---------------------------------- - */ - -#if !defined(NAS_BUILT_IN_EPC) -static esm_ebr_data_t _esm_ebr_data[ESM_EBR_NB_UE_MAX]; -#endif - -/* - * ---------------------- - * User notification data - * ---------------------- - */ - - -/* Returns the index of the next available entry in the list of EPS bearer - * context data */ -static int _esm_ebr_get_available_entry(emm_data_context_t *ctx); - - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -/**************************************************************************** - ** ** - ** Name: esm_ebr_initialize() ** - ** ** - ** Description: Initialize EPS bearer context data ** - ** ** - ** Inputs: cb: User notification callback ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: None ** - ** Others: _esm_ebr_data ** - ** ** - ***************************************************************************/ -void esm_ebr_initialize(void -) -{ -#if !defined(NAS_BUILT_IN_EPC) - int ueid, i; - - LOG_FUNC_IN; - - for (ueid = 0; ueid < ESM_EBR_NB_UE_MAX; ueid++) { - _esm_ebr_data[ueid].index = 0; - - /* Initialize EPS bearer context data */ - for (i = 0; i < ESM_EBR_DATA_SIZE + 1; i++) { - _esm_ebr_data[ueid].context[i] = NULL; - } - } - LOG_FUNC_OUT; -#endif -} - -/**************************************************************************** - ** ** - ** Name: esm_ebr_assign() ** - ** ** - ** Description: Assigns a new EPS bearer context ** - ** ** - ** Inputs: ueid: Lower layers UE identifier ** - ** ebi: Identity of the new EPS bearer context ** - ** cid: Identifier of the PDN context the EPS bea- ** - ** rer context is associated to ** - ** default_ebr TRUE if the new bearer context is associa- ** - ** ted to a default EPS bearer ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: The identity of the new EPS bearer context ** - ** if successfully assigned; ** - ** the not assigned EBI (0) otherwise. ** - ** Others: _esm_ebr_data ** - ** ** - ***************************************************************************/ -int esm_ebr_assign(emm_data_context_t *ctx, int ebi) -{ - esm_ebr_context_t *ebr_ctx = NULL; - unsigned int ueid = 0; - int i; - - LOG_FUNC_IN; - - ebr_ctx = ctx->esm_data_ctx.ebr.context[ebi - ESM_EBI_MIN]; - - if (ebi != ESM_EBI_UNASSIGNED) { - if ( (ebi < ESM_EBI_MIN) || (ebi > ESM_EBI_MAX) ) { - LOG_FUNC_RETURN (ESM_EBI_UNASSIGNED); - } else if (ebr_ctx != NULL) { - LOG_TRACE(WARNING, "ESM-FSM - EPS bearer context already " - "assigned (ebi=%d)", ebi); - LOG_FUNC_RETURN (ESM_EBI_UNASSIGNED); - } - - /* The specified EPS bearer context is available */ - i = ebi - ESM_EBI_MIN; - } else { - /* Search for an available EPS bearer identity */ - i = _esm_ebr_get_available_entry(ctx); - - if (i < 0) { - LOG_FUNC_RETURN(ESM_EBI_UNASSIGNED); - } - - /* An available EPS bearer context is found */ - ebi = i + ESM_EBI_MIN; - } - - /* Assign new EPS bearer context */ - ebr_ctx = - (esm_ebr_context_t *)malloc(sizeof(esm_ebr_context_t)); - - if (ebr_ctx == NULL) { - LOG_FUNC_RETURN(ESM_EBI_UNASSIGNED); - } - -#if defined(NAS_BUILT_IN_EPC) - ctx->esm_data_ctx.ebr.context[ebi - ESM_EBI_MIN] = ebr_ctx; -#else - _esm_ebr_data[ueid].context[ebi - ESM_EBI_MIN] = ebr_ctx; -#endif - - /* Store the index of the next available EPS bearer identity */ - ctx->esm_data_ctx.ebr.index = i + 1; - - - /* Set the EPS bearer identity */ - ebr_ctx->ebi = ebi; - /* Set the EPS bearer context status to INACTIVE */ - ebr_ctx->status = ESM_EBR_INACTIVE; - /* Disable the retransmission timer */ - ebr_ctx->timer.id = NAS_TIMER_INACTIVE_ID; - /* Setup retransmission timer parameters */ - ebr_ctx->args = NULL; - - LOG_TRACE(INFO, "ESM-FSM - EPS bearer context %d assigned", ebi); - LOG_FUNC_RETURN(ebr_ctx->ebi); -} - -/**************************************************************************** - ** ** - ** Name: esm_ebr_release() ** - ** ** - ** Description: Release the given EPS bearer identity ** - ** ** - ** Inputs: ueid: Lower layers UE identifier ** - ** ebi: The identity of the EPS bearer context to ** - ** be released ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok if the EPS bearer context has ** - ** been successfully released; ** - ** RETURNerror otherwise. ** - ** Others: _esm_ebr_data ** - ** ** - ***************************************************************************/ -int esm_ebr_release( - emm_data_context_t *ctx, - int ebi) -{ - esm_ebr_context_t *ebr_ctx; - - LOG_FUNC_IN; - - if ( (ebi < ESM_EBI_MIN) || (ebi > ESM_EBI_MAX) ) { - LOG_FUNC_RETURN (RETURNerror); - } - - /* Get EPS bearer context data */ - ebr_ctx = ctx->esm_data_ctx.ebr.context[ebi - ESM_EBI_MIN]; - - if ( (ebr_ctx == NULL) || (ebr_ctx->ebi != ebi) ) { - /* EPS bearer context not assigned */ - LOG_FUNC_RETURN (RETURNerror); - } - - /* Do not release active EPS bearer context */ - if (ebr_ctx->status != ESM_EBR_INACTIVE) { - LOG_TRACE(ERROR, "ESM-FSM - EPS bearer context is not INACTIVE"); - LOG_FUNC_RETURN (RETURNerror); - } - - /* Stop the retransmission timer if still running */ - if (ebr_ctx->timer.id != NAS_TIMER_INACTIVE_ID) { - LOG_TRACE(INFO, "ESM-FSM - Stop retransmission timer %d", - ebr_ctx->timer.id); - ebr_ctx->timer.id = nas_timer_stop(ebr_ctx->timer.id); - MSC_LOG_EVENT(MSC_NAS_ESM_MME, "0 Timer %x ebi %u stopped",ebr_ctx->timer.id, ebi); - } - - /* Release the retransmisison timer parameters */ - if (ebr_ctx->args) { - if (ebr_ctx->args->msg.length > 0) { - free(ebr_ctx->args->msg.value); - } - - free(ebr_ctx->args); - ebr_ctx->args = NULL; - } - - /* Release EPS bearer context data */ - free(ebr_ctx); - ebr_ctx = NULL; - - LOG_TRACE(INFO, "ESM-FSM - EPS bearer context %d released", ebi); - LOG_FUNC_RETURN (RETURNok); -} - -/**************************************************************************** - ** ** - ** Name: esm_ebr_start_timer() ** - ** ** - ** Description: Start the timer of the specified EPS bearer context to ** - ** expire after a given time interval. Timer expiration will ** - ** schedule execution of the callback function where stored ** - ** ESM message should be re-transmit. ** - ** ** - ** Inputs: ueid: Lower layers UE identifier ** - ** ebi: The identity of the EPS bearer ** - ** msg: The encoded ESM message to be stored ** - ** sec: The value of the time interval in seconds ** - ** cb: Function executed upon timer expiration ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: _esm_ebr_data ** - ** ** - ***************************************************************************/ -int esm_ebr_start_timer(emm_data_context_t *ctx, int ebi, const OctetString *msg, - long sec, nas_timer_callback_t cb) -{ - esm_ebr_context_t *ebr_ctx; - - LOG_FUNC_IN; - - if ( (ebi < ESM_EBI_MIN) || (ebi > ESM_EBI_MAX) ) { - LOG_TRACE(ERROR, "ESM-FSM - Retransmission timer bad ebi %d", - ebi); - LOG_FUNC_RETURN (RETURNerror); - } - - /* Get EPS bearer context data */ - ebr_ctx = ctx->esm_data_ctx.ebr.context[ebi - ESM_EBI_MIN]; - - if ( (ebr_ctx == NULL) || (ebr_ctx->ebi != ebi) ) { - /* EPS bearer context not assigned */ - LOG_TRACE(ERROR, "ESM-FSM - EPS bearer context not assigned"); - LOG_FUNC_RETURN (RETURNerror); - } - - if (ebr_ctx->timer.id != NAS_TIMER_INACTIVE_ID) { - if (ebr_ctx->args) { - /* Re-start the retransmission timer */ - ebr_ctx->timer.id = nas_timer_restart(ebr_ctx->timer.id); - MSC_LOG_EVENT(MSC_NAS_ESM_MME, "0 Timer %x ebi %u restarted",ebr_ctx->timer.id, ebi); - } - } else { - /* Setup the retransmission timer parameters */ - ebr_ctx->args = (esm_ebr_timer_data_t *)malloc(sizeof(esm_ebr_timer_data_t)); - - if (ebr_ctx->args) { - /* Set the UE identifier */ - ebr_ctx->args->ueid = ctx->ueid; - /* Set the EPS bearer identity */ - ebr_ctx->args->ebi = ebi; - /* Reset the retransmission counter */ - ebr_ctx->args->count = 0; - /* Set the ESM message to be re-transmited */ - ebr_ctx->args->msg.value = (uint8_t *)malloc(msg->length); - ebr_ctx->args->msg.length = 0; - - if (ebr_ctx->args->msg.value) { - memcpy(ebr_ctx->args->msg.value, msg->value, msg->length); - ebr_ctx->args->msg.length = msg->length; - } - - /* Setup the retransmission timer to expire at the given - * time interval */ - ebr_ctx->timer.id = nas_timer_start(sec, cb, ebr_ctx->args); - MSC_LOG_EVENT(MSC_NAS_ESM_MME, "0 Timer %x ebi %u started",ebr_ctx->timer.id, ebi); - ebr_ctx->timer.sec = sec; - } - } - - if ( (ebr_ctx->args != NULL) && (ebr_ctx->timer.id != NAS_TIMER_INACTIVE_ID) ) { - LOG_TRACE(INFO, "ESM-FSM - Retransmission timer %d expires in " - "%ld seconds", ebr_ctx->timer.id, ebr_ctx->timer.sec); - LOG_FUNC_RETURN (RETURNok); - } else { - LOG_TRACE(ERROR, "ESM-FSM - ebr_ctx->args == NULL(%p) or ebr_ctx->timer.id == NAS_TIMER_INACTIVE_ID == -1 (%d)" , - ebr_ctx->args, - ebr_ctx->timer.id); - } - - LOG_FUNC_RETURN (RETURNerror); -} - -/**************************************************************************** - ** ** - ** Name: esm_ebr_stop_timer() ** - ** ** - ** Description: Stop the timer previously started for the given EPS bea- ** - ** rer context ** - ** ** - ** Inputs: ueid: Lower layers UE identifier ** - ** ebi: The identity of the EPS bearer ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: _esm_ebr_data ** - ** ** - ***************************************************************************/ -int esm_ebr_stop_timer(emm_data_context_t *ctx, int ebi) -{ - esm_ebr_context_t *ebr_ctx ; - - LOG_FUNC_IN; - - if ( (ebi < ESM_EBI_MIN) || (ebi > ESM_EBI_MAX) ) { - LOG_FUNC_RETURN (RETURNerror); - } - - /* Get EPS bearer context data */ - ebr_ctx = ctx->esm_data_ctx.ebr.context[ebi - ESM_EBI_MIN]; - - if ( (ebr_ctx == NULL) || (ebr_ctx->ebi != ebi) ) { - /* EPS bearer context not assigned */ - LOG_FUNC_RETURN (RETURNerror); - } - - /* Stop the retransmission timer if still running */ - if (ebr_ctx->timer.id != NAS_TIMER_INACTIVE_ID) { - LOG_TRACE(INFO, "ESM-FSM - Stop retransmission timer %d", - ebr_ctx->timer.id); - ebr_ctx->timer.id = nas_timer_stop(ebr_ctx->timer.id); - MSC_LOG_EVENT(MSC_NAS_ESM_MME, "0 Timer %x ebi %u stopped",ebr_ctx->timer.id, ebi); - } - - /* Release the retransmisison timer parameters */ - if (ebr_ctx->args) { - if (ebr_ctx->args->msg.length > 0) { - free(ebr_ctx->args->msg.value); - } - - free(ebr_ctx->args); - ebr_ctx->args = NULL; - } - - LOG_FUNC_RETURN (RETURNok); -} - -/**************************************************************************** - ** ** - ** Name: esm_ebr_get_pending_ebi() ** - ** ** - ** Description: Returns the EPS bearer identity assigned to the first EPS ** - ** bearer context entry which is pending in the given state ** - ** ** - ** Inputs: ueid: Lower layers UE identifier ** - ** status: The EPS bearer context status ** - ** Others: _esm_ebr_data ** - ** ** - ** Outputs: None ** - ** Return: The EPS bearer identity of the EPS bearer ** - ** context entry if it exists; ** - ** the not assigned EBI (0) otherwise. ** - ** Others: None ** - ** ** - ***************************************************************************/ -int esm_ebr_get_pending_ebi(emm_data_context_t *ctx, esm_ebr_state status) -{ - int i; - - LOG_FUNC_IN; - - for (i = 0; i < ESM_EBR_DATA_SIZE; i++) { - if (ctx->esm_data_ctx.ebr.context[i] == NULL) { - continue; - } - - if (ctx->esm_data_ctx.ebr.context[i]->status != status) { - continue; - } - - /* EPS bearer context entry found */ - break; - } - - if (i < ESM_EBR_DATA_SIZE) { - LOG_FUNC_RETURN (ctx->esm_data_ctx.ebr.context[i]->ebi); - } - - /* EPS bearer context entry not found */ - LOG_FUNC_RETURN (ESM_EBI_UNASSIGNED); -} - -/**************************************************************************** - ** ** - ** Name: esm_ebr_set_status() ** - ** ** - ** Description: Set the status of the specified EPS bearer context to the ** - ** given state ** - ** ** - ** Inputs: ueid: Lower layers UE identifier ** - ** ebi: The identity of the EPS bearer ** - ** status: The new EPS bearer context status ** - ** ue_requested: TRUE/FALSE if the modification of the EPS ** - ** bearer context status was requested by the ** - ** UE/network ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: _esm_ebr_data ** - ** ** - ***************************************************************************/ -int esm_ebr_set_status( - emm_data_context_t *ctx, - int ebi, esm_ebr_state status, int ue_requested) -{ - esm_ebr_context_t *ebr_ctx; - esm_ebr_state old_status; - - LOG_FUNC_IN; - - if (ctx == NULL) { - LOG_FUNC_RETURN (RETURNerror); - } - - - if ( (ebi < ESM_EBI_MIN) || (ebi > ESM_EBI_MAX) ) { - LOG_FUNC_RETURN (RETURNerror); - } - - /* Get EPS bearer context data */ - ebr_ctx = ctx->esm_data_ctx.ebr.context[ebi - ESM_EBI_MIN]; - - if ( (ebr_ctx == NULL) || (ebr_ctx->ebi != ebi) ) { - /* EPS bearer context not assigned */ - LOG_TRACE(ERROR, "ESM-FSM - EPS bearer context not assigned " - "(ebi=%d)", ebi); - LOG_FUNC_RETURN (RETURNerror); - } - - old_status = ebr_ctx->status; - - if (status < ESM_EBR_STATE_MAX) { - if (status != old_status) { - LOG_TRACE(INFO, "ESM-FSM - Status of EPS bearer context %d changed:" - " %s ===> %s", ebi, - _esm_ebr_state_str[old_status], _esm_ebr_state_str[status]); - MSC_LOG_EVENT(MSC_NAS_ESM_MME, "0 ESM state %s => %s "NAS_UE_ID_FMT" ", - _esm_ebr_state_str[old_status], _esm_ebr_state_str[status], ctx->ueid); - - ebr_ctx->status = status; - LOG_FUNC_RETURN (RETURNok); - } else { - LOG_TRACE(INFO, "ESM-FSM - Status of EPS bearer context %d unchanged:" - " %s ", ebi, _esm_ebr_state_str[status]); - } - } - - LOG_FUNC_RETURN (RETURNerror); -} - -/**************************************************************************** - ** ** - ** Name: esm_ebr_get_status() ** - ** ** - ** Description: Get the current status value of the specified EPS bearer ** - ** context ** - ** ** - ** Inputs: ueid: Lower layers UE identifier ** - ** ebi: The identity of the EPS bearer ** - ** Others: _esm_ebr_data ** - ** ** - ** Outputs: None ** - ** Return: The current value of the EPS bearer con- ** - ** text status ** - ** Others: None ** - ** ** - ***************************************************************************/ -esm_ebr_state esm_ebr_get_status( - emm_data_context_t *ctx, - int ebi) -{ - if ( (ebi < ESM_EBI_MIN) || (ebi > ESM_EBI_MAX) ) { - return (ESM_EBR_INACTIVE); - } - - if (ctx->esm_data_ctx.ebr.context[ebi - ESM_EBI_MIN] == NULL) { - /* EPS bearer context not allocated */ - return (ESM_EBR_INACTIVE); - } - - if (ctx->esm_data_ctx.ebr.context[ebi - ESM_EBI_MIN]->ebi != ebi) { - /* EPS bearer context not assigned */ - return (ESM_EBR_INACTIVE); - } - - return (ctx->esm_data_ctx.ebr.context[ebi - ESM_EBI_MIN]->status); -} - - -/**************************************************************************** - ** ** - ** Name: esm_ebr_is_reserved() ** - ** ** - ** Description: Check whether the given EPS bearer identity is a reserved ** - ** value ** - ** ** - ** Inputs: ebi: The identity of the EPS bearer ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: TRUE, FALSE ** - ** Others: None ** - ** ** - ***************************************************************************/ -int esm_ebr_is_reserved(int ebi) -{ - return ( (ebi != ESM_EBI_UNASSIGNED) && (ebi < ESM_EBI_MIN) ); -} - -/**************************************************************************** - ** ** - ** Name: esm_ebr_is_not_in_use() ** - ** ** - ** Description: Check whether the given EPS bearer identity does not ** - ** match an assigned EBI value currently in use ** - ** ** - ** Inputs: ueid: Lower layers UE identifier ** - ** ebi: The identity of the EPS bearer ** - ** Others: _esm_ebr_data ** - ** ** - ** Outputs: None ** - ** Return: TRUE, FALSE ** - ** Others: None ** - ** ** - ***************************************************************************/ -int esm_ebr_is_not_in_use( - emm_data_context_t *ctx, - int ebi) -{ - - return ( (ebi == ESM_EBI_UNASSIGNED) || - (ctx->esm_data_ctx.ebr.context[ebi - ESM_EBI_MIN] == NULL) || - (ctx->esm_data_ctx.ebr.context[ebi - ESM_EBI_MIN]->ebi) != ebi); -} - -/****************************************************************************/ -/********************* L O C A L F U N C T I O N S *********************/ -/****************************************************************************/ - -/**************************************************************************** - ** ** - ** Name: _esm_ebr_get_available_entry() ** - ** ** - ** Description: Returns the index of the next available entry in the list ** - ** of EPS bearer context data ** - ** ** - ** Inputs: ueid: Lower layers UE identifier ** - ** Others: _esm_ebr_data ** - ** ** - ** Outputs: None ** - ** Return: The index of the next available EPS bearer ** - ** context data entry; -1 if no any entry is ** - ** available. ** - ** Others: None ** - ** ** - ***************************************************************************/ -static int _esm_ebr_get_available_entry(emm_data_context_t *ctx) -{ - int i; - - for (i = ctx->esm_data_ctx.ebr.index; i < ESM_EBR_DATA_SIZE; i++) { - if (ctx->esm_data_ctx.ebr.context[i] != NULL) { - continue; - } - - return i; - } - - for (i = 0; i < ctx->esm_data_ctx.ebr.index; i++) { - if (ctx->esm_data_ctx.ebr.context[i] != NULL) { - continue; - } - - return i; - } - - /* No available EBI entry found */ - return (-1); -} diff --git a/openair-cn/NAS/MME/ESM/esm_ebr.h b/openair-cn/NAS/MME/ESM/esm_ebr.h deleted file mode 100644 index bacd62802c..0000000000 --- a/openair-cn/NAS/MME/ESM/esm_ebr.h +++ /dev/null @@ -1,89 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** -Source esm_ebr.h - -Version 0.1 - -Date 2013/01/29 - -Product NAS stack - -Subsystem EPS Session Management - -Author Frederic Maurel - -Description Defines functions used to handle state of EPS bearer contexts - and manage ESM messages re-transmission. - -*****************************************************************************/ -#ifndef __ESM_EBR_H__ -#define __ESM_EBR_H__ - -#include "OctetString.h" -#include "nas_timer.h" - -/****************************************************************************/ -/********************* G L O B A L C O N S T A N T S *******************/ -/****************************************************************************/ - -/* Unassigned EPS bearer identity value */ -#define ESM_EBI_UNASSIGNED (EPS_BEARER_IDENTITY_UNASSIGNED) - -/****************************************************************************/ -/************************ G L O B A L T Y P E S ************************/ -/****************************************************************************/ - -/****************************************************************************/ -/******************** G L O B A L V A R I A B L E S ********************/ -/****************************************************************************/ - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -int esm_ebr_is_reserved(int ebi); - -void esm_ebr_initialize(void); -int esm_ebr_assign(emm_data_context_t *ctx, int ebi); -int esm_ebr_release(emm_data_context_t *ctx, int ebi); - -int esm_ebr_start_timer(emm_data_context_t *ctx, int ebi, const OctetString *msg, - long sec, nas_timer_callback_t cb); -int esm_ebr_stop_timer(emm_data_context_t *ctx, int ebi); - -int esm_ebr_get_pending_ebi(emm_data_context_t *ctx, esm_ebr_state status); - -int esm_ebr_set_status(emm_data_context_t *ctx, int ebi, esm_ebr_state status, - int ue_requested); -esm_ebr_state esm_ebr_get_status(emm_data_context_t *ctx, int ebi); - -int esm_ebr_is_not_in_use(emm_data_context_t *ctx, int ebi); - -#endif /* __ESM_EBR_H__*/ diff --git a/openair-cn/NAS/MME/ESM/esm_ebr_context.c b/openair-cn/NAS/MME/ESM/esm_ebr_context.c deleted file mode 100644 index db0d99500f..0000000000 --- a/openair-cn/NAS/MME/ESM/esm_ebr_context.c +++ /dev/null @@ -1,431 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** -Source esm_ebr_context.h - -Version 0.1 - -Date 2013/05/28 - -Product NAS stack - -Subsystem EPS Session Management - -Author Frederic Maurel - -Description Defines functions used to handle EPS bearer contexts. - -*****************************************************************************/ -#include // malloc, free -#include // memset - -#include "commonDef.h" -#include "nas_log.h" - -#include "emmData.h" -#include "esm_ebr.h" - -#include "esm_ebr_context.h" - -#include "emm_sap.h" - -#if defined(ENABLE_ITTI) -# include "assertions.h" -#endif - - - -/****************************************************************************/ -/**************** E X T E R N A L D E F I N I T I O N S ****************/ -/****************************************************************************/ - -/****************************************************************************/ -/******************* L O C A L D E F I N I T I O N S *******************/ -/****************************************************************************/ - - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -/**************************************************************************** - ** ** - ** Name: esm_ebr_context_create() ** - ** ** - ** Description: Creates a new EPS bearer context to the PDN with the spe- ** - ** cified PDN connection identifier ** - ** ** - ** Inputs: ueid: UE identifier ** - ** pid: PDN connection identifier ** - ** ebi: EPS bearer identity ** - ** is_default: TRUE if the new bearer is a default EPS ** - ** bearer context ** - ** esm_qos: EPS bearer level QoS parameters ** - ** tft: Traffic flow template parameters ** - ** Others: _esm_data ** - ** ** - ** Outputs: None ** - ** Return: The EPS bearer identity of the default EPS ** - ** bearer associated to the new EPS bearer ** - ** context if successfully created; ** - ** UNASSIGN EPS bearer value otherwise. ** - ** Others: _esm_data ** - ** ** - ***************************************************************************/ -int esm_ebr_context_create( - emm_data_context_t *ctx, - int pid, int ebi, int is_default, - const network_qos_t *qos, const network_tft_t *tft) -{ - int bid = 0; - esm_data_context_t *esm_ctx = NULL; - esm_pdn_t *pdn = NULL; - unsigned int ueid = 0; - - LOG_FUNC_IN; - - -# if defined(NAS_BUILT_IN_EPC) - esm_ctx = &ctx->esm_data_ctx; -# else - - if (ueid < ESM_DATA_NB_UE_MAX) { - ctx = _esm_data.ctx[ueid]; - } else { - LOG_FUNC_RETURN (ESM_EBI_UNASSIGNED); - } - -# endif - - bid = ESM_DATA_EPS_BEARER_MAX; - - LOG_TRACE(INFO, "ESM-PROC - Create new %s EPS bearer context (ebi=%d) " - "for PDN connection (pid=%d)", - (is_default)? "default" : "dedicated", ebi, pid); - - if (pid < ESM_DATA_PDN_MAX) { - if (pid != esm_ctx->pdn[pid].pid) { - LOG_TRACE(ERROR, "ESM-PROC - PDN connection identifier %d is " - "not valid", pid); - } else if (esm_ctx->pdn[pid].data == NULL) { - LOG_TRACE(ERROR, "ESM-PROC - PDN connection %d has not been " - "allocated", pid); - } - /* Check the total number of active EPS bearers */ - else if (esm_ctx->n_ebrs > ESM_DATA_EPS_BEARER_TOTAL) { - LOG_TRACE(WARNING, "ESM-PROC - The total number of active EPS" - "bearers is exceeded"); - } else { - /* Get the PDN connection entry */ - pdn = esm_ctx->pdn[pid].data; - - if (is_default) { - /* Default EPS bearer entry is defined at index 0 */ - bid = 0; - - if (pdn->bearer[bid] != NULL) { - LOG_TRACE(ERROR, "ESM-PROC - A default EPS bearer context " - "is already allocated"); - LOG_FUNC_RETURN (ESM_EBI_UNASSIGNED); - } - } else { - /* Search for an available EPS bearer context entry */ - for (bid = 1; bid < ESM_DATA_EPS_BEARER_MAX; bid++) { - if (pdn->bearer[bid] != NULL) { - continue; - } - - break; - } - } - } - } - - if (bid < ESM_DATA_EPS_BEARER_MAX) { - /* Create new EPS bearer context */ - esm_bearer_t *ebr = (esm_bearer_t *)malloc(sizeof(esm_bearer_t)); - - if (ebr != NULL) { - memset(ebr, 0 , sizeof(esm_bearer_t)); - /* Increment the total number of active EPS bearers */ - esm_ctx->n_ebrs += 1; - /* Increment the number of EPS bearer for this PDN connection */ - pdn->n_bearers += 1; - /* Setup the EPS bearer data */ - pdn->bearer[bid] = ebr; - ebr->bid = bid; - ebr->ebi = ebi; - - if (qos != NULL) { - /* EPS bearer level QoS parameters */ - ebr->qos = *qos; - } - - if ( (tft != NULL) && (tft->n_pkfs < NET_PACKET_FILTER_MAX) ) { - int i; - - /* Traffic flow template parameters */ - for (i = 0; i < tft->n_pkfs; i++) { - ebr->tft.pkf[i] = - (network_pkf_t *)malloc(sizeof(network_pkf_t)); - - if (ebr->tft.pkf[i] != NULL) { - *(ebr->tft.pkf[i]) = *(tft->pkf[i]); - ebr->tft.n_pkfs += 1; - } - } - } - - if (is_default) { - /* Set the PDN connection activation indicator */ - esm_ctx->pdn[pid].is_active = TRUE; - - /* Update the emergency bearer services indicator */ - if (pdn->is_emergency) { - esm_ctx->emergency = TRUE; - } - - - } - - /* Return the EPS bearer identity of the default EPS bearer - * associated to the new EPS bearer context */ - LOG_FUNC_RETURN (pdn->bearer[0]->ebi); - } - - LOG_TRACE(WARNING, "ESM-PROC - Failed to create new EPS bearer " - "context (ebi=%d)", ebi); - } - - LOG_FUNC_RETURN (ESM_EBI_UNASSIGNED); -} - -/**************************************************************************** - ** ** - ** Name: esm_ebr_context_release() ** - ** ** - ** Description: Releases EPS bearer context entry previously allocated ** - ** to the EPS bearer with the specified EPS bearer identity ** - ** ** - ** Inputs: ueid: UE identifier ** - ** ebi: EPS bearer identity ** - ** Others: _esm_data ** - ** ** - ** Outputs: pid: Identifier of the PDN connection entry the ** - ** EPS bearer context belongs to ** - ** bid: Identifier of the released EPS bearer con- ** - ** text entry ** - ** Return: The EPS bearer identity associated to the ** - ** EPS bearer context if successfully relea- ** - ** sed; UNASSIGN EPS bearer value otherwise. ** - ** Others: _esm_data ** - ** ** - ***************************************************************************/ -int esm_ebr_context_release( - emm_data_context_t *ctx, - int ebi, int *pid, int *bid) -{ - int found = FALSE; - esm_pdn_t *pdn = NULL; - esm_data_context_t *esm_ctx; - - unsigned int ueid = 0; - - LOG_FUNC_IN; - - - -# if defined(NAS_BUILT_IN_EPC) - esm_ctx = &ctx->esm_data_ctx; -# else - - if (ueid < ESM_DATA_NB_UE_MAX) { - ctx = &_esm_data.ctx[ueid]; - } else { - LOG_FUNC_RETURN (ESM_EBI_UNASSIGNED); - } - -# endif - - if (ebi != ESM_EBI_UNASSIGNED) { - /* - * The identity of the EPS bearer to released is given; - * Release the EPS bearer context entry that match the specified EPS - * bearer identity - */ - - /* Search for active PDN connection */ - for (*pid = 0; *pid < ESM_DATA_PDN_MAX; (*pid)++) { - if ( !esm_ctx->pdn[*pid].is_active ) { - continue; - } - - /* An active PDN connection is found */ - if (esm_ctx->pdn[*pid].data != NULL) { - pdn = esm_ctx->pdn[*pid].data; - - /* Search for the specified EPS bearer context entry */ - for (*bid = 0; *bid < pdn->n_bearers; (*bid)++) { - if (pdn->bearer[*bid] != NULL) { - if (pdn->bearer[*bid]->ebi != ebi) { - continue; - } - - /* The EPS bearer context entry is found */ - found = TRUE; - break; - } - } - } - - if (found) { - break; - } - } - } else { - /* - * The identity of the EPS bearer to released is not given; - * Release the EPS bearer context entry allocated with the EPS - * bearer context identifier (bid) to establish connectivity to - * the PDN identified by the PDN connection identifier (pid). - * Default EPS bearer to a given PDN is always identified by the - * first EPS bearer context entry at index bid = 0 - */ - if (*pid < ESM_DATA_PDN_MAX) { - if (*pid != esm_ctx->pdn[*pid].pid) { - LOG_TRACE(ERROR, "ESM-PROC - PDN connection identifier %d " - "is not valid", *pid); - } else if (!esm_ctx->pdn[*pid].is_active) { - LOG_TRACE(WARNING,"ESM-PROC - PDN connection %d is not active", - *pid); - } else if (esm_ctx->pdn[*pid].data == NULL) { - LOG_TRACE(ERROR, "ESM-PROC - PDN connection %d has not been " - "allocated", *pid); - } else { - pdn = esm_ctx->pdn[*pid].data; - - if (pdn->bearer[*bid] != NULL) { - ebi = pdn->bearer[*bid]->ebi; - found = TRUE; - } - } - } - } - - if (found) { - int i, j; - - /* - * Delete the specified EPS bearer context entry - */ - if (pdn->bearer[*bid]->bid != *bid) { - LOG_TRACE(ERROR, "ESM-PROC - EPS bearer identifier %d is " - "not valid", *bid); - LOG_FUNC_RETURN (ESM_EBI_UNASSIGNED); - } - - LOG_TRACE(WARNING, "ESM-PROC - Release EPS bearer context " - "(ebi=%d)", ebi); - - /* Delete the TFT */ - for (i = 0; i < pdn->bearer[*bid]->tft.n_pkfs; i++) { - free(pdn->bearer[*bid]->tft.pkf[i]); - } - - /* Release the specified EPS bearer data */ - free(pdn->bearer[*bid]); - pdn->bearer[*bid] = NULL; - /* Decrement the number of EPS bearer context allocated - * to the PDN connection */ - pdn->n_bearers -= 1; - /* Decrement the total number of active EPS bearers */ - esm_ctx->n_ebrs -= 1; - - if (*bid == 0) { - /* 3GPP TS 24.301, section 6.4.4.3, 6.4.4.6 - * If the EPS bearer identity is that of the default bearer to a - * PDN, the UE shall delete all EPS bearer contexts associated to - * that PDN connection. - */ - for (i = 1; pdn->n_bearers > 0; i++) { - if (pdn->bearer[i]) { - - LOG_TRACE(WARNING, "ESM-PROC - Release EPS bearer context " - "(ebi=%d)", pdn->bearer[i]->ebi); - - /* Delete the TFT */ - for (j = 0; j < pdn->bearer[i]->tft.n_pkfs; j++) { - free(pdn->bearer[i]->tft.pkf[j]); - } - - /* Set the EPS bearer context state to INACTIVE */ - - (void) esm_ebr_set_status(ctx, pdn->bearer[i]->ebi, - ESM_EBR_INACTIVE, TRUE); - - /* Release EPS bearer data */ - (void) esm_ebr_release(ctx, pdn->bearer[i]->ebi); - // esm_ebr_release() - /* Release dedicated EPS bearer data */ - free(pdn->bearer[i]); - pdn->bearer[i] = NULL; - /* Decrement the number of EPS bearer context allocated - * to the PDN connection */ - pdn->n_bearers -= 1; - /* Decrement the total number of active EPS bearers */ - esm_ctx->n_ebrs -= 1; - } - } - - /* Reset the PDN connection activation indicator */ - esm_ctx->pdn[*pid].is_active = FALSE; - - /* Update the emergency bearer services indicator */ - if (pdn->is_emergency) { - esm_ctx->emergency = FALSE; - } - } - - if (esm_ctx->n_ebrs == 0) { - /* TODO: Release the PDN connection and marked the UE as inactive - * in the network for EPS services (is_attached = FALSE) */ - } - - LOG_FUNC_RETURN (ebi); - } - - LOG_FUNC_RETURN (ESM_EBI_UNASSIGNED); -} - - -/****************************************************************************/ -/********************* L O C A L F U N C T I O N S *********************/ -/****************************************************************************/ - - diff --git a/openair-cn/NAS/MME/ESM/esm_ebr_context.h b/openair-cn/NAS/MME/ESM/esm_ebr_context.h deleted file mode 100644 index c59661d768..0000000000 --- a/openair-cn/NAS/MME/ESM/esm_ebr_context.h +++ /dev/null @@ -1,73 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** -Source esm_ebr_context.h - -Version 0.1 - -Date 2013/05/28 - -Product NAS stack - -Subsystem EPS Session Management - -Author Frederic Maurel - -Description Defines functions used to handle EPS bearer contexts. - -*****************************************************************************/ -#ifndef __ESM_EBR_CONTEXT_H__ -#define __ESM_EBR_CONTEXT_H__ - -#include "networkDef.h" - -/****************************************************************************/ -/********************* G L O B A L C O N S T A N T S *******************/ -/****************************************************************************/ - -/****************************************************************************/ -/************************ G L O B A L T Y P E S ************************/ -/****************************************************************************/ - - -/****************************************************************************/ -/******************** G L O B A L V A R I A B L E S ********************/ -/****************************************************************************/ - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - - -int esm_ebr_context_create(emm_data_context_t *ctx, int pid, int ebi, int is_default, - const network_qos_t *qos, const network_tft_t *tft); - -int esm_ebr_context_release(emm_data_context_t *ctx, int ebi, int *pid, int *bid); - -#endif /* __ESM_EBR_CONTEXT_H__ */ diff --git a/openair-cn/NAS/MME/ESM/esm_main.c b/openair-cn/NAS/MME/ESM/esm_main.c deleted file mode 100644 index 3e883527b9..0000000000 --- a/openair-cn/NAS/MME/ESM/esm_main.c +++ /dev/null @@ -1,134 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** -Source esm_main.c - -Version 0.1 - -Date 2012/12/04 - -Product NAS stack - -Subsystem EPS Session Management - -Author Frederic Maurel - -Description Defines the EPS Session Management procedure call manager, - the main entry point for elementary ESM processing. - -*****************************************************************************/ - -#include "esm_main.h" -#include "commonDef.h" -#include "nas_log.h" - -#include "emmData.h" -#include "esmData.h" -#include "esm_pt.h" -#include "esm_ebr.h" - -/****************************************************************************/ -/**************** E X T E R N A L D E F I N I T I O N S ****************/ -/****************************************************************************/ - -/****************************************************************************/ -/******************* L O C A L D E F I N I T I O N S *******************/ -/****************************************************************************/ - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - - -/**************************************************************************** - ** ** - ** Name: esm_main_initialize() ** - ** ** - ** Description: Initializes ESM internal data ** - ** ** - ** Inputs: None ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: None ** - ** Others: None ** - ** ** - ***************************************************************************/ -void esm_main_initialize(void) -{ - int i; - - LOG_FUNC_IN; - - /* Retreive MME supported configuration data */ - if (mme_api_get_esm_config(&_esm_data.conf) != RETURNok) { - LOG_TRACE(ERROR, "ESM-MAIN - Failed to get MME configuration data"); - } - -# if !defined(NAS_BUILT_IN_EPC) - - /* Initialize ESM contexts */ - for (i = 0; i < ESM_DATA_NB_UE_MAX; i++) { - _esm_data.ctx[i] = NULL; - } - -# endif - - /* Initialize the EPS bearer context manager */ - esm_ebr_initialize(); - - LOG_FUNC_OUT; -} - -/**************************************************************************** - ** ** - ** Name: esm_main_cleanup() ** - ** ** - ** Description: Performs the EPS Session Management clean up procedure ** - ** ** - ** Inputs: None ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: None ** - ** Others: None ** - ** ** - ***************************************************************************/ -void esm_main_cleanup(void) -{ - LOG_FUNC_IN; - - LOG_FUNC_OUT; -} - - -/****************************************************************************/ -/********************* L O C A L F U N C T I O N S *********************/ -/****************************************************************************/ - diff --git a/openair-cn/NAS/MME/ESM/esm_main.h b/openair-cn/NAS/MME/ESM/esm_main.h deleted file mode 100644 index feb80c1c45..0000000000 --- a/openair-cn/NAS/MME/ESM/esm_main.h +++ /dev/null @@ -1,73 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** -Source esm_main.h - -Version 0.1 - -Date 2012/12/04 - -Product NAS stack - -Subsystem EPS Session Management - -Author Frederic Maurel - -Description Defines the EPS Session Management procedure call manager, - the main entry point for elementary ESM processing. - -*****************************************************************************/ - -#ifndef __ESM_MAIN_H__ -#define __ESM_MAIN_H__ - -#include "networkDef.h" - -/****************************************************************************/ -/********************* G L O B A L C O N S T A N T S *******************/ -/****************************************************************************/ - -/****************************************************************************/ -/************************ G L O B A L T Y P E S ************************/ -/****************************************************************************/ - -/****************************************************************************/ -/******************** G L O B A L V A R I A B L E S ********************/ -/****************************************************************************/ - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - - -void esm_main_initialize(void); -void esm_main_cleanup(void); - - -#endif /* __ESM_MAIN_H__*/ diff --git a/openair-cn/NAS/MME/ESM/esm_proc.h b/openair-cn/NAS/MME/ESM/esm_proc.h deleted file mode 100644 index 3015be6543..0000000000 --- a/openair-cn/NAS/MME/ESM/esm_proc.h +++ /dev/null @@ -1,204 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** -Source esm_proc.h - -Version 0.1 - -Date 2013/01/02 - -Product NAS stack - -Subsystem EPS Session Management - -Author Frederic Maurel - -Description Defines the EPS Session Management procedures executed at - the ESM Service Access Points. - -*****************************************************************************/ -#ifndef __ESM_PROC_H__ -#define __ESM_PROC_H__ - -#include "networkDef.h" -#include "OctetString.h" -#include "emmData.h" -#include "ProtocolConfigurationOptions.h" - -/****************************************************************************/ -/********************* G L O B A L C O N S T A N T S *******************/ -/****************************************************************************/ - -/* - * ESM retransmission timers - * ------------------------- - */ - -#define T3485_DEFAULT_VALUE 8 /* Activate EPS bearer request */ -#define T3495_DEFAULT_VALUE 8 /* Deactivate EPS bearer request */ - -/* Type of PDN address */ -typedef enum { - ESM_PDN_TYPE_IPV4 = NET_PDN_TYPE_IPV4, - ESM_PDN_TYPE_IPV6 = NET_PDN_TYPE_IPV6, - ESM_PDN_TYPE_IPV4V6 = NET_PDN_TYPE_IPV4V6 -} esm_proc_pdn_type_t; - -/* Type of PDN request */ -typedef enum { - ESM_PDN_REQUEST_INITIAL = 1, - ESM_PDN_REQUEST_HANDOVER, - ESM_PDN_REQUEST_EMERGENCY -} esm_proc_pdn_request_t; - -/****************************************************************************/ -/************************ G L O B A L T Y P E S ************************/ -/****************************************************************************/ - -/* - * Type of the ESM procedure callback executed when requested by the UE - * or initiated by the network - */ -typedef int (*esm_proc_procedure_t) (int, emm_data_context_t *, int, OctetString *, int); - -/* EPS bearer level QoS parameters */ -typedef network_qos_t esm_proc_qos_t; - -/* Traffic Flow Template for packet filtering */ -typedef network_tft_t esm_proc_tft_t; - -typedef ProtocolConfigurationOptions esm_proc_pco_t; - -/* PDN connection and EPS bearer context data */ -typedef struct { - OctetString apn; - esm_proc_pdn_type_t pdn_type; - OctetString pdn_addr; - esm_proc_qos_t qos; - esm_proc_tft_t tft; - esm_proc_pco_t pco; -} esm_proc_data_t; - -/****************************************************************************/ -/******************** G L O B A L V A R I A B L E S ********************/ -/****************************************************************************/ - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -/* - * -------------------------------------------------------------------------- - * ESM status procedure - * -------------------------------------------------------------------------- - */ - - -int esm_proc_status_ind(emm_data_context_t *ctx, int pti, int ebi, int *esm_cause); -int esm_proc_status(int is_standalone, emm_data_context_t *ctx, int pti, - OctetString *msg, int sent_by_ue); - - -/* - * -------------------------------------------------------------------------- - * PDN connectivity procedure - * -------------------------------------------------------------------------- - */ - -int esm_proc_pdn_connectivity_request(emm_data_context_t *ctx, int pti, - esm_proc_pdn_request_t request_type, OctetString *apn, - esm_proc_pdn_type_t pdn_type, OctetString *pdn_addr, esm_proc_qos_t *esm_qos, - int *esm_cause); - -int esm_proc_pdn_connectivity_reject(int is_standalone, emm_data_context_t *ctx, - int ebi, OctetString *msg, int ue_triggered); -int esm_proc_pdn_connectivity_failure(emm_data_context_t *ctx, int pid); - -/* - * -------------------------------------------------------------------------- - * PDN disconnect procedure - * -------------------------------------------------------------------------- - */ - -int esm_proc_pdn_disconnect_request(emm_data_context_t *ctx, int pti, int *esm_cause); - -int esm_proc_pdn_disconnect_accept(emm_data_context_t *ctx, int pid, int *esm_cause); -int esm_proc_pdn_disconnect_reject(int is_standalone, emm_data_context_t *ctx, - int ebi, OctetString *msg, int ue_triggered); - -/* - * -------------------------------------------------------------------------- - * Default EPS bearer context activation procedure - * -------------------------------------------------------------------------- - */ -int esm_proc_default_eps_bearer_context(emm_data_context_t *ctx, int pid, - unsigned int *ebi, const esm_proc_qos_t *esm_qos, int *esm_cause); -int esm_proc_default_eps_bearer_context_request(int is_standalone, - emm_data_context_t *ctx, int ebi, OctetString *msg, int ue_triggered); -int esm_proc_default_eps_bearer_context_failure(emm_data_context_t *ctx); - -int esm_proc_default_eps_bearer_context_accept(emm_data_context_t *ctx, int ebi, - int *esm_cause); -int esm_proc_default_eps_bearer_context_reject(emm_data_context_t *ctx, int ebi, - int *esm_cause); - - -/* - * -------------------------------------------------------------------------- - * Dedicated EPS bearer context activation procedure - * -------------------------------------------------------------------------- - */ -int esm_proc_dedicated_eps_bearer_context(emm_data_context_t *ctx, int pid, - unsigned int *ebi, unsigned int *default_ebi, const esm_proc_qos_t *qos, - const esm_proc_tft_t *tft, int *esm_cause); -int esm_proc_dedicated_eps_bearer_context_request(int is_standalone, - emm_data_context_t *ctx, int ebi, OctetString *msg, int ue_triggered); - -int esm_proc_dedicated_eps_bearer_context_accept(emm_data_context_t *ctx, int ebi, - int *esm_cause); -int esm_proc_dedicated_eps_bearer_context_reject(emm_data_context_t *ctx, int ebi, - int *esm_cause); - - -/* - * -------------------------------------------------------------------------- - * EPS bearer context deactivation procedure - * -------------------------------------------------------------------------- - */ -int esm_proc_eps_bearer_context_deactivate(emm_data_context_t *ctx, int is_local, - int ebi, int *pid, int *bid, - int *esm_cause); -int esm_proc_eps_bearer_context_deactivate_request(int is_standalone, - emm_data_context_t *ctx, int ebi, OctetString *msg, int ue_triggered); -int esm_proc_eps_bearer_context_deactivate_accept(emm_data_context_t *ctx, int ebi, - int *esm_cause); - - - -#endif /* __ESM_PROC_H__*/ diff --git a/openair-cn/NAS/MME/ESM/esm_pt.c b/openair-cn/NAS/MME/ESM/esm_pt.c deleted file mode 100644 index d9e1be5150..0000000000 --- a/openair-cn/NAS/MME/ESM/esm_pt.c +++ /dev/null @@ -1,95 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** -Source esm_pt.c - -Version 0.1 - -Date 2013/01/03 - -Product NAS stack - -Subsystem EPS Session Management - -Author Frederic Maurel - -Description Defines functions used to handle ESM procedure transactions. - -*****************************************************************************/ - -#include "esm_pt.h" - - -/****************************************************************************/ -/**************** E X T E R N A L D E F I N I T I O N S ****************/ -/****************************************************************************/ - -/* - * Minimal and maximal value of a procedure transaction identity: - * The Procedure Transaction Identity (PTI) identifies bi-directional - * messages flows - */ -#define ESM_PTI_MIN (PROCEDURE_TRANSACTION_IDENTITY_FIRST) -#define ESM_PTI_MAX (PROCEDURE_TRANSACTION_IDENTITY_LAST) - -/****************************************************************************/ -/******************* L O C A L D E F I N I T I O N S *******************/ -/****************************************************************************/ - - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - - - -/**************************************************************************** - ** ** - ** Name: esm_pt_is_reserved() ** - ** ** - ** Description: Check whether the given procedure transaction identity is ** - ** a reserved value ** - ** ** - ** Inputs: pti: The identity of the procedure transaction ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: TRUE, FALSE ** - ** Others: None ** - ** ** - ***************************************************************************/ -int esm_pt_is_reserved(int pti) -{ - return ( (pti != ESM_PT_UNASSIGNED) && (pti > ESM_PTI_MAX) ); -} - -/****************************************************************************/ -/********************* L O C A L F U N C T I O N S *********************/ -/****************************************************************************/ - diff --git a/openair-cn/NAS/MME/ESM/esm_pt.h b/openair-cn/NAS/MME/ESM/esm_pt.h deleted file mode 100644 index 2a2cf81202..0000000000 --- a/openair-cn/NAS/MME/ESM/esm_pt.h +++ /dev/null @@ -1,74 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** -Source esm_pt.h - -Version 0.1 - -Date 2013/01/03 - -Product NAS stack - -Subsystem EPS Session Management - -Author Frederic Maurel - -Description Defines functions used to handle ESM procedure transactions. - -*****************************************************************************/ -#ifndef __ESM_PT_H__ -#define __ESM_PT_H__ - -#include "ProcedureTransactionIdentity.h" - -/****************************************************************************/ -/********************* G L O B A L C O N S T A N T S *******************/ -/****************************************************************************/ - -/* Unassigned procedure transaction identity value */ -#define ESM_PT_UNASSIGNED (PROCEDURE_TRANSACTION_IDENTITY_UNASSIGNED) - -/****************************************************************************/ -/************************ G L O B A L T Y P E S ************************/ -/****************************************************************************/ - - -/****************************************************************************/ -/******************** G L O B A L V A R I A B L E S ********************/ -/****************************************************************************/ - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -int esm_pt_is_reserved(int pti); - - - -#endif /* __ESM_PT_H__*/ diff --git a/openair-cn/NAS/MME/MMEprocess.c b/openair-cn/NAS/MME/MMEprocess.c deleted file mode 100644 index abd29a0c14..0000000000 --- a/openair-cn/NAS/MME/MMEprocess.c +++ /dev/null @@ -1,345 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** - Source MMEprocess.c - - Version 0.1 - - Date 2013/02/26 - - Product NAS stack - - Subsystem MME NAS main process - - Author Frederic Maurel - - Description Implements the Non-Access Stratum protocol for Evolved Packet - system (EPS) running at the Network side. - - *****************************************************************************/ - -#include "commonDef.h" -#include "nas_log.h" -#include "nas_timer.h" - -#include "network_api.h" -#include "nas_network.h" -#include "nas_parser.h" - -#include // exit -#include // poll -#include // memset -#include // sigaction -#include - -/****************************************************************************/ -/**************** E X T E R N A L D E F I N I T I O N S ****************/ -/****************************************************************************/ - -/****************************************************************************/ -/******************* L O C A L D E F I N I T I O N S *******************/ -/****************************************************************************/ - -#define NAS_SLEEP_TIMEOUT 1000 /* 1 second */ - -static void *_nas_network_mngr(void *); - -static int _nas_set_signal_handler(int signal, void (handler)(int)); -static void _nas_signal_handler(int signal); - -static void _nas_clean(int net_fd); - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -/****************************************************************************/ -int main(int argc, const char *argv[]) -{ - /* - * Get the command line options - */ - if (nas_parser_get_options (argc, argv) != RETURNok) { - nas_parser_print_usage (FIRMWARE_VERSION); - exit (EXIT_FAILURE); - } - - /* - * Initialize logging trace utility - */ - nas_log_init (nas_parser_get_trace_level ()); - - const char *nhost = nas_parser_get_network_host (); - const char *nport = nas_parser_get_network_port (); - - LOG_TRACE (INFO, "MME-MAIN - %s -nhost %s -nport %s -trace 0x%x", argv[0], - nhost, nport, - nas_parser_get_trace_level ()); - - /* - * Initialize the Network interface - */ - if (network_api_initialize (nhost, nport) != RETURNok) { - LOG_TRACE (ERROR, "MME-MAIN - network_api_initialize() failed"); - exit (EXIT_FAILURE); - } - - int network_fd = network_api_get_fd (); - - /* - * Initialize the NAS contexts - */ - nas_network_initialize (); - - /* - * Initialize NAS timer handlers - */ - nas_timer_init (); - - /* - * Set up signal handlers - */ - (void) _nas_set_signal_handler (SIGINT, _nas_signal_handler); - (void) _nas_set_signal_handler (SIGTERM, _nas_signal_handler); - - pthread_attr_t attr; - pthread_attr_init (&attr); - pthread_attr_setscope (&attr, PTHREAD_SCOPE_SYSTEM); - pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED); - - /* - * Start thread use to manage the network connection endpoint - */ - pthread_t network_mngr; - - if (pthread_create (&network_mngr, &attr, _nas_network_mngr, - &network_fd) != 0) { - LOG_TRACE (ERROR, "MME-MAIN - " - "Failed to create the network management thread"); - network_api_close (network_fd); - exit (EXIT_FAILURE); - } - - pthread_attr_destroy (&attr); - - /* - * Suspend execution of the main process until the network connection - * endpoint is still active - */ - while (network_fd != -1) { - poll (NULL, 0, NAS_SLEEP_TIMEOUT); - network_fd = network_api_get_fd (); - } - - /* Termination cleanup */ - _nas_clean (network_fd); - - LOG_TRACE - (WARNING, "MME-MAIN - NAS main process exited"); -} - -/****************************************************************************/ -/********************* L O C A L F U N C T I O N S *********************/ -/****************************************************************************/ - -/**************************************************************************** - ** ** - ** Name: _nas_network_mngr() ** - ** ** - ** Description: Manages the connection endpoint use to communicate with ** - ** the network sublayer ** - ** ** - ** Inputs: fd: The descriptor of the network connection ** - ** endpoint ** - ** Others: None ** - ** ** - ** Outputs: Return: None ** - ** Others: None ** - ** ** - ***************************************************************************/ -static void *_nas_network_mngr(void *args) -{ - LOG_FUNC_IN; - - int ret_code; - int network_message_id; - int bytes; - - int *fd = (int *) args; - - LOG_TRACE (INFO, "MME-MAIN - Network connection manager started (%d)", *fd); - - /* Network receiving loop */ - while (TRUE) { - /* Read the network data message */ - bytes = network_api_read_data (*fd); - - if (bytes == RETURNerror) { - /* Failed to read data from the network sublayer; - * exit from the receiving loop */ - LOG_TRACE (ERROR, "MME-MAIN - " - "Failed to read data from the network sublayer"); - break; - } - - if (bytes == 0) { - /* A signal was caught before any data were available */ - continue; - } - - /* Decode the network data message */ - network_message_id = network_api_decode_data (bytes); - - if (network_message_id == RETURNerror) { - /* Failed to decode data read from the network sublayer */ - continue; - } - - /* Process the network data message */ - ret_code = nas_network_process_data (network_message_id, - network_api_get_data ()); - - if (ret_code != RETURNok) { - /* The network data message has not been successfully - * processed */ - LOG_TRACE - (WARNING, "MME-MAIN - " - "The network procedure call 0x%x failed", - network_message_id); - } - } - - /* Close the connection to the network sublayer */LOG_TRACE (WARNING, - "MME-MAIN - " - "The network connection endpoint manager exited"); - - LOG_FUNC_RETURN(NULL); -} - -/**************************************************************************** - ** ** - ** Name: _nas_set_signal_handler() ** - ** ** - ** Description: Set up a signal handler ** - ** ** - ** Inputs: signal: Signal number ** - ** handler: Signal handler ** - ** Others: None ** - ** ** - ** Outputs: Return: RETURNerror, RETURNok ** - ** Others: None ** - ** ** - ***************************************************************************/ -static int _nas_set_signal_handler(int signal, void (handler)(int)) -{ - LOG_FUNC_IN; - - struct sigaction act; - - /* Initialize signal set */ - (void) memset (&act, 0, sizeof(act)); - (void) sigfillset (&act.sa_mask); - (void) sigdelset (&act.sa_mask, SIGHUP); - (void) sigdelset (&act.sa_mask, SIGINT); - (void) sigdelset (&act.sa_mask, SIGTERM); - (void) sigdelset (&act.sa_mask, SIGILL); - (void) sigdelset (&act.sa_mask, SIGTRAP); - (void) sigdelset (&act.sa_mask, SIGIOT); -#ifndef LINUX - (void) sigdelset (&act.sa_mask, SIGEMT); -#endif - (void) sigdelset (&act.sa_mask, SIGFPE); - (void) sigdelset (&act.sa_mask, SIGBUS); - (void) sigdelset (&act.sa_mask, SIGSEGV); - (void) sigdelset (&act.sa_mask, SIGSYS); - - /* Initialize signal handler */ - act.sa_handler = handler; - - if (sigaction (signal, &act, 0) < 0) { - return RETURNerror; - } - - LOG_TRACE (INFO, "MME-MAIN - Handler successfully set for signal %d", signal); - - LOG_FUNC_RETURN(RETURNok); -} - -/**************************************************************************** - ** ** - ** Name: _nas_signal_handler() ** - ** ** - ** Description: Signal handler ** - ** ** - ** Inputs: signal: Signal number ** - ** Others: None ** - ** ** - ** Outputs: Return: None ** - ** Others: None ** - ** ** - ***************************************************************************/ -static void _nas_signal_handler(int signal) -{ - LOG_FUNC_IN; - - LOG_TRACE (WARNING, "MME-MAIN - Signal %d received", signal); - _nas_clean (network_api_get_fd ()); - exit (EXIT_SUCCESS); - - LOG_FUNC_OUT - ; -} - -/**************************************************************************** - ** ** - ** Name: _nas_clean() ** - ** ** - ** Description: Performs termination cleanup ** - ** ** - ** Inputs: net_fd: Network's connection file descriptor ** - ** Others: None ** - ** ** - ** Outputs: Return: None ** - ** Others: None ** - ** ** - ***************************************************************************/ -static void _nas_clean(int net_fd) -{ - LOG_FUNC_IN; - - LOG_TRACE (INFO, "MME-MAIN - Perform EMM and ESM cleanup"); - nas_network_cleanup (); - - LOG_TRACE (INFO, "MME-MAIN - Closing network connection %d", net_fd); - network_api_close (net_fd); - - LOG_FUNC_OUT - ; -} - diff --git a/openair-cn/NAS/MME/nas_defs.h b/openair-cn/NAS/MME/nas_defs.h deleted file mode 100644 index e896d61fbc..0000000000 --- a/openair-cn/NAS/MME/nas_defs.h +++ /dev/null @@ -1,34 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#ifndef NAS_DEFS_H_ -#define NAS_DEFS_H_ - -int nas_init(mme_config_t *mme_config_p); - -#endif /* NAS_DEFS_H_ */ diff --git a/openair-cn/NAS/MME/nas_itti_messaging.c b/openair-cn/NAS/MME/nas_itti_messaging.c deleted file mode 100644 index c22f408954..0000000000 --- a/openair-cn/NAS/MME/nas_itti_messaging.c +++ /dev/null @@ -1,211 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include - -#include "intertask_interface.h" -#include "nas_itti_messaging.h" -#include "msc.h" - - -#define TASK_ORIGIN TASK_NAS_MME - - -#if defined(NAS_BUILT_IN_EPC) -static const uint8_t emm_message_ids[] = { - ATTACH_REQUEST, - ATTACH_ACCEPT, - ATTACH_COMPLETE, - ATTACH_REJECT, - DETACH_REQUEST, - DETACH_ACCEPT, - TRACKING_AREA_UPDATE_REQUEST, - TRACKING_AREA_UPDATE_ACCEPT, - TRACKING_AREA_UPDATE_COMPLETE, - TRACKING_AREA_UPDATE_REJECT, - EXTENDED_SERVICE_REQUEST, - SERVICE_REQUEST, - SERVICE_REJECT, - GUTI_REALLOCATION_COMMAND, - GUTI_REALLOCATION_COMPLETE, - AUTHENTICATION_REQUEST, - AUTHENTICATION_RESPONSE, - AUTHENTICATION_REJECT, - AUTHENTICATION_FAILURE, - IDENTITY_REQUEST, - IDENTITY_RESPONSE, - SECURITY_MODE_COMMAND, - SECURITY_MODE_COMPLETE, - SECURITY_MODE_REJECT, - EMM_STATUS, - EMM_INFORMATION, - DOWNLINK_NAS_TRANSPORT, - UPLINK_NAS_TRANSPORT, - CS_SERVICE_NOTIFICATION, -}; - -static const uint8_t esm_message_ids[] = { - ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST, - ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_ACCEPT, - ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REJECT, - ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST, - ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_ACCEPT, - ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REJECT, - MODIFY_EPS_BEARER_CONTEXT_REQUEST, - MODIFY_EPS_BEARER_CONTEXT_ACCEPT, - MODIFY_EPS_BEARER_CONTEXT_REJECT, - DEACTIVATE_EPS_BEARER_CONTEXT_REQUEST, - DEACTIVATE_EPS_BEARER_CONTEXT_ACCEPT, - PDN_CONNECTIVITY_REQUEST, - PDN_CONNECTIVITY_REJECT, - PDN_DISCONNECT_REQUEST, - PDN_DISCONNECT_REJECT, - BEARER_RESOURCE_ALLOCATION_REQUEST, - BEARER_RESOURCE_ALLOCATION_REJECT, - BEARER_RESOURCE_MODIFICATION_REQUEST, - BEARER_RESOURCE_MODIFICATION_REJECT, - ESM_INFORMATION_REQUEST, - ESM_INFORMATION_RESPONSE, - ESM_STATUS, -}; - -static int _nas_find_message_index(const uint8_t message_id, const uint8_t *message_ids, const int ids_number) -{ - int i; - - for(i = 0; i < ids_number; i ++) { - if (message_id == message_ids[i]) { - return (2 + i); - } - } - - return (1); -} - -int nas_itti_plain_msg(const char *buffer, const nas_message_t *msg, const int length, const int down_link) -{ - MessageDef *message_p; - int data_length = length < NAS_DATA_LENGHT_MAX ? length : NAS_DATA_LENGHT_MAX; - int message_type = -1; - MessagesIds messageId_raw = -1; - MessagesIds messageId_plain = -1; - - /* Define message ids */ - if (msg->header.protocol_discriminator == EPS_MOBILITY_MANAGEMENT_MESSAGE) { - message_type = 0; - messageId_raw = down_link ? NAS_DL_EMM_RAW_MSG : NAS_UL_EMM_RAW_MSG; - messageId_plain = down_link ? NAS_DL_EMM_PLAIN_MSG : NAS_UL_EMM_PLAIN_MSG; - } else { - if (msg->header.protocol_discriminator == EPS_SESSION_MANAGEMENT_MESSAGE) { - message_type = 1; - messageId_raw = down_link ? NAS_DL_ESM_RAW_MSG : NAS_UL_ESM_RAW_MSG; - messageId_plain = down_link ? NAS_DL_ESM_PLAIN_MSG : NAS_UL_ESM_PLAIN_MSG; - } - } - - if (message_type >= 0) { - /* Create and send the RAW message */ - message_p = itti_alloc_new_message(TASK_ORIGIN, messageId_raw); - - NAS_DL_EMM_RAW_MSG(message_p).lenght = length; - memset ((void *) &(NAS_DL_EMM_RAW_MSG(message_p).data), 0, NAS_DATA_LENGHT_MAX); - memcpy ((void *) &(NAS_DL_EMM_RAW_MSG(message_p).data), buffer, data_length); - - itti_send_msg_to_task(TASK_UNKNOWN, INSTANCE_DEFAULT, message_p); - - /* Create and send the plain message */ - if (message_type == 0) { - message_p = itti_alloc_new_message(TASK_ORIGIN, messageId_plain); - - NAS_DL_EMM_PLAIN_MSG(message_p).present = _nas_find_message_index(msg->plain.emm.header.message_type, emm_message_ids, sizeof(emm_message_ids) / sizeof(emm_message_ids[0])); - memcpy ((void *) &(NAS_DL_EMM_PLAIN_MSG(message_p).choice), &msg->plain.emm, sizeof (EMM_msg)); - } else { - message_p = itti_alloc_new_message(TASK_ORIGIN, messageId_plain); - - NAS_DL_ESM_PLAIN_MSG(message_p).present = _nas_find_message_index(msg->plain.esm.header.message_type, esm_message_ids, sizeof(esm_message_ids) / sizeof(esm_message_ids[0])); - memcpy ((void *) &(NAS_DL_ESM_PLAIN_MSG(message_p).choice), &msg->plain.esm, sizeof (ESM_msg)); - } - - return itti_send_msg_to_task(TASK_UNKNOWN, INSTANCE_DEFAULT, message_p); - } - - return EXIT_FAILURE; -} - -int nas_itti_protected_msg(const char *buffer, const nas_message_t *msg, const int length, const int down_link) -{ - MessageDef *message_p = NULL; - - if (msg->header.protocol_discriminator == EPS_MOBILITY_MANAGEMENT_MESSAGE) { - message_p = itti_alloc_new_message(TASK_ORIGIN, down_link ? NAS_DL_EMM_PROTECTED_MSG : NAS_UL_EMM_PROTECTED_MSG); - - memcpy ((void *) &(NAS_DL_EMM_PROTECTED_MSG(message_p).header), &msg->header, sizeof (nas_message_security_header_t)); - NAS_DL_EMM_PROTECTED_MSG(message_p).present = _nas_find_message_index(msg->security_protected.plain.emm.header.message_type, emm_message_ids, sizeof(emm_message_ids) / sizeof(emm_message_ids[0])); - memcpy ((void *) &(NAS_DL_EMM_PROTECTED_MSG(message_p).choice), &msg->security_protected.plain.emm, sizeof (EMM_msg)); - } else { - if (msg->header.protocol_discriminator == EPS_SESSION_MANAGEMENT_MESSAGE) { - message_p = itti_alloc_new_message(TASK_ORIGIN, down_link ? NAS_DL_ESM_PROTECTED_MSG : NAS_UL_ESM_PROTECTED_MSG); - - memcpy ((void *) &(NAS_DL_ESM_PROTECTED_MSG(message_p).header), &msg->header, sizeof (nas_message_security_header_t)); - NAS_DL_ESM_PROTECTED_MSG(message_p).present = _nas_find_message_index(msg->security_protected.plain.esm.header.message_type, esm_message_ids, sizeof(esm_message_ids) / sizeof(esm_message_ids[0])); - memcpy ((void *) &(NAS_DL_ESM_PROTECTED_MSG(message_p).choice), &msg->security_protected.plain.esm, sizeof (ESM_msg)); - } - } - - if (message_p != NULL) { - return itti_send_msg_to_task(TASK_UNKNOWN, INSTANCE_DEFAULT, message_p); - } - - return EXIT_FAILURE; -} -#endif - -#if defined(NAS_BUILT_IN_EPC) -int nas_itti_dl_data_req(const uint32_t ue_id, void *const data, - const uint32_t length) -{ - MessageDef *message_p; - - message_p = itti_alloc_new_message(TASK_NAS_MME, NAS_DOWNLINK_DATA_REQ); - - NAS_DL_DATA_REQ(message_p).UEid = ue_id; - NAS_DL_DATA_REQ(message_p).nasMsg.data = data; - NAS_DL_DATA_REQ(message_p).nasMsg.length = length; - - MSC_LOG_TX_MESSAGE( - MSC_NAS_MME, - MSC_S1AP_MME, - NULL,0, - "0 NAS_DOWNLINK_DATA_REQ ue id "NAS_UE_ID_FMT" len %u", ue_id, length); - - return itti_send_msg_to_task(TASK_S1AP, INSTANCE_DEFAULT, message_p); -} - -#endif - - diff --git a/openair-cn/NAS/MME/nas_itti_messaging.h b/openair-cn/NAS/MME/nas_itti_messaging.h deleted file mode 100644 index e18741f815..0000000000 --- a/openair-cn/NAS/MME/nas_itti_messaging.h +++ /dev/null @@ -1,283 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "assertions.h" -#include "intertask_interface.h" -#include "esm_proc.h" -#include "msc.h" - -#ifndef NAS_ITTI_MESSAGING_H_ -#define NAS_ITTI_MESSAGING_H_ - -# if defined(NAS_BUILT_IN_EPC) -int nas_itti_plain_msg( - const char *buffer, - const nas_message_t *msg, - const int lengthP, - const int instance); - -int nas_itti_protected_msg( - const char *buffer, - const nas_message_t *msg, - const int lengthP, - const int instance); -# endif - -# if defined(NAS_BUILT_IN_EPC) -#include "conversions.h" - -int nas_itti_dl_data_req( - const uint32_t ue_idP, - void *const data_pP, - const uint32_t lengthP); - -static inline void nas_itti_pdn_connectivity_req( - int ptiP, - unsigned int ueidP, - const imsi_t *const imsi_pP, - esm_proc_data_t *proc_data_pP, - esm_proc_pdn_request_t request_typeP) -{ - MessageDef *message_p = NULL; - uint8_t i; - uint8_t index; - - AssertFatal(imsi_pP != NULL, "imsi_pP param is NULL"); - AssertFatal(proc_data_pP != NULL, "proc_data_pP param is NULL"); - - - message_p = itti_alloc_new_message(TASK_NAS_MME, NAS_PDN_CONNECTIVITY_REQ); - memset(&message_p->ittiMsg.nas_pdn_connectivity_req, - 0, - sizeof(nas_pdn_connectivity_req_t)); - - hexa_to_ascii((uint8_t *)imsi_pP->u.value, - NAS_PDN_CONNECTIVITY_REQ(message_p).imsi, - 8); - - NAS_PDN_CONNECTIVITY_REQ(message_p).pti = ptiP; - NAS_PDN_CONNECTIVITY_REQ(message_p).ue_id = ueidP; - NAS_PDN_CONNECTIVITY_REQ(message_p).imsi[15] = '\0'; - - if (isdigit(NAS_PDN_CONNECTIVITY_REQ(message_p).imsi[14])) { - NAS_PDN_CONNECTIVITY_REQ(message_p).imsi_length = 15; - } else { - NAS_PDN_CONNECTIVITY_REQ(message_p).imsi_length = 14; - NAS_PDN_CONNECTIVITY_REQ(message_p).imsi[14] = '\0'; - } - - DUP_OCTET_STRING(proc_data_pP->apn, NAS_PDN_CONNECTIVITY_REQ(message_p).apn); - DUP_OCTET_STRING(proc_data_pP->pdn_addr, NAS_PDN_CONNECTIVITY_REQ(message_p).pdn_addr); - - switch (proc_data_pP->pdn_type) { - case ESM_PDN_TYPE_IPV4: - NAS_PDN_CONNECTIVITY_REQ(message_p).pdn_type = IPv4; - break; - - case ESM_PDN_TYPE_IPV6: - NAS_PDN_CONNECTIVITY_REQ(message_p).pdn_type = IPv6; - break; - - case ESM_PDN_TYPE_IPV4V6: - NAS_PDN_CONNECTIVITY_REQ(message_p).pdn_type = IPv4_AND_v6; - break; - - default: - NAS_PDN_CONNECTIVITY_REQ(message_p).pdn_type = IPv4; - break; - } - - // not efficient but be careful about "typedef network_qos_t esm_proc_qos_t;" - NAS_PDN_CONNECTIVITY_REQ(message_p).qos.gbrUL = proc_data_pP->qos.gbrUL; - NAS_PDN_CONNECTIVITY_REQ(message_p).qos.gbrDL = proc_data_pP->qos.gbrDL; - NAS_PDN_CONNECTIVITY_REQ(message_p).qos.mbrUL = proc_data_pP->qos.mbrUL; - NAS_PDN_CONNECTIVITY_REQ(message_p).qos.mbrDL = proc_data_pP->qos.mbrDL; - NAS_PDN_CONNECTIVITY_REQ(message_p).qos.qci = proc_data_pP->qos.qci; - - NAS_PDN_CONNECTIVITY_REQ(message_p).proc_data = proc_data_pP; - - NAS_PDN_CONNECTIVITY_REQ(message_p).request_type = request_typeP; - - if (proc_data_pP->pco.num_protocol_id_or_container_id <= PROTOCOL_CONFIGURATION_OPTIONS_MAXIMUM_PROTOCOL_ID_OR_CONTAINER_ID) { - NAS_PDN_CONNECTIVITY_REQ(message_p).pco.byte[0] = ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_ACCEPT_PROTOCOL_CONFIGURATION_OPTIONS_IEI; - NAS_PDN_CONNECTIVITY_REQ(message_p).pco.byte[1] = 1 + 3 * proc_data_pP->pco.num_protocol_id_or_container_id; - NAS_PDN_CONNECTIVITY_REQ(message_p).pco.byte[2] = 0x80; // do it fast - i = 0; - index = 3; - while (( i < proc_data_pP->pco.num_protocol_id_or_container_id) && - ((index + proc_data_pP->pco.protocolidcontents[i].length) <= PROTOCOL_CONFIGURATION_OPTIONS_MAXIMUM_LENGTH)){ - NAS_PDN_CONNECTIVITY_REQ(message_p).pco.byte[1] += proc_data_pP->pco.lengthofprotocolid[i]; - NAS_PDN_CONNECTIVITY_REQ(message_p).pco.byte[index++] = (proc_data_pP->pco.protocolid[i] >> 8); - NAS_PDN_CONNECTIVITY_REQ(message_p).pco.byte[index++] = (proc_data_pP->pco.protocolid[i] & 0x00FF); - NAS_PDN_CONNECTIVITY_REQ(message_p).pco.byte[index++] = proc_data_pP->pco.lengthofprotocolid[i]; - if (proc_data_pP->pco.lengthofprotocolid[i] > 0) { - memcpy( &NAS_PDN_CONNECTIVITY_REQ(message_p).pco.byte[index], - proc_data_pP->pco.protocolidcontents[i].value, - proc_data_pP->pco.lengthofprotocolid[i]); - index += proc_data_pP->pco.lengthofprotocolid[i]; - } - i++; - } - NAS_PDN_CONNECTIVITY_REQ(message_p).pco.length = index; - } - - - MSC_LOG_TX_MESSAGE( - MSC_NAS_MME, - MSC_MMEAPP_MME, - NULL,0, - "0 NAS_PDN_CONNECTIVITY_REQ ue id %06"PRIX32" IMSI %X", - ueidP, NAS_PDN_CONNECTIVITY_REQ(message_p).imsi); - - itti_send_msg_to_task(TASK_MME_APP, INSTANCE_DEFAULT, message_p); -} - - - -static inline void nas_itti_establish_cnf( - const uint32_t ue_idP, - const nas_error_code_t error_codeP, - void *const data_pP, - const uint32_t lengthP, - const uint16_t selected_encryption_algorithmP, - const uint16_t selected_integrity_algorithmP) -{ - MessageDef *message_p = NULL; - - message_p = itti_alloc_new_message(TASK_NAS_MME, NAS_CONNECTION_ESTABLISHMENT_CNF); - memset(&message_p->ittiMsg.nas_conn_est_cnf, - 0, - sizeof(nas_conn_est_cnf_t)); - NAS_CONNECTION_ESTABLISHMENT_CNF(message_p).UEid = ue_idP; - NAS_CONNECTION_ESTABLISHMENT_CNF(message_p).errCode = error_codeP; - NAS_CONNECTION_ESTABLISHMENT_CNF(message_p).nasMsg.data = data_pP; - NAS_CONNECTION_ESTABLISHMENT_CNF(message_p).nasMsg.length = lengthP; - NAS_CONNECTION_ESTABLISHMENT_CNF(message_p).selected_encryption_algorithm = selected_encryption_algorithmP; - NAS_CONNECTION_ESTABLISHMENT_CNF(message_p).selected_integrity_algorithm = selected_integrity_algorithmP; - - MSC_LOG_TX_MESSAGE( - MSC_NAS_MME, - MSC_MMEAPP_MME, - NULL,0, - "0 NAS_CONNECTION_ESTABLISHMENT_CNF ue id %06"PRIX32" len %u sea %x sia %x ", - ue_idP, lengthP, selected_encryption_algorithmP, selected_integrity_algorithmP); - - itti_send_msg_to_task(TASK_MME_APP, INSTANCE_DEFAULT, message_p); -} - -static inline void nas_itti_auth_info_req( - const uint32_t ue_idP, - const imsi_t *const imsi_pP, - uint8_t initial_reqP, - const uint8_t *auts_pP) -{ - MessageDef *message_p; - - message_p = itti_alloc_new_message(TASK_NAS_MME, NAS_AUTHENTICATION_PARAM_REQ); - memset(&message_p->ittiMsg.nas_auth_param_req, - 0, - sizeof(nas_auth_param_req_t)); - - hexa_to_ascii((uint8_t *)imsi_pP->u.value, - NAS_AUTHENTICATION_PARAM_REQ(message_p).imsi, 8); - - NAS_AUTHENTICATION_PARAM_REQ(message_p).imsi[15] = '\0'; - - if (isdigit(NAS_AUTHENTICATION_PARAM_REQ(message_p).imsi[14])) { - NAS_AUTHENTICATION_PARAM_REQ(message_p).imsi_length = 15; - } else { - NAS_AUTHENTICATION_PARAM_REQ(message_p).imsi_length = 14; - NAS_AUTHENTICATION_PARAM_REQ(message_p).imsi[14] = '\0'; - } - - NAS_AUTHENTICATION_PARAM_REQ(message_p).initial_req = initial_reqP; - NAS_AUTHENTICATION_PARAM_REQ(message_p).ue_id = ue_idP; - - /* Re-synchronisation */ - if (auts_pP != NULL) { - NAS_AUTHENTICATION_PARAM_REQ(message_p).re_synchronization = 1; - memcpy(NAS_AUTHENTICATION_PARAM_REQ(message_p).auts, auts_pP, AUTS_LENGTH); - } else { - NAS_AUTHENTICATION_PARAM_REQ(message_p).re_synchronization = 0; - memset(NAS_AUTHENTICATION_PARAM_REQ(message_p).auts, 0, AUTS_LENGTH); - } - - MSC_LOG_TX_MESSAGE( - MSC_NAS_MME, - MSC_MMEAPP_MME, - NULL,0, - "0 NAS_AUTHENTICATION_PARAM_REQ ue id %06"PRIX32" IMSI %s ", - ue_idP, NAS_AUTHENTICATION_PARAM_REQ(message_p).imsi); - - itti_send_msg_to_task(TASK_MME_APP, INSTANCE_DEFAULT, message_p); -} - -static inline void nas_itti_establish_rej( - const uint32_t ue_idP, - const imsi_t *const imsi_pP - , uint8_t initial_reqP) -{ - MessageDef *message_p; - - message_p = itti_alloc_new_message(TASK_NAS_MME, NAS_AUTHENTICATION_PARAM_REQ); - memset(&message_p->ittiMsg.nas_auth_param_req, - 0, - sizeof(nas_auth_param_req_t)); - - hexa_to_ascii((uint8_t *)imsi_pP->u.value, - NAS_AUTHENTICATION_PARAM_REQ(message_p).imsi, 8); - - NAS_AUTHENTICATION_PARAM_REQ(message_p).imsi[15] = '\0'; - - if (isdigit(NAS_AUTHENTICATION_PARAM_REQ(message_p).imsi[14])) { - NAS_AUTHENTICATION_PARAM_REQ(message_p).imsi_length = 15; - } else { - NAS_AUTHENTICATION_PARAM_REQ(message_p).imsi_length = 14; - NAS_AUTHENTICATION_PARAM_REQ(message_p).imsi[14] = '\0'; - } - - NAS_AUTHENTICATION_PARAM_REQ(message_p).initial_req = initial_reqP; - NAS_AUTHENTICATION_PARAM_REQ(message_p).ue_id = ue_idP; - - MSC_LOG_TX_MESSAGE( - MSC_NAS_MME, - MSC_MMEAPP_MME, - NULL,0, - "0 NAS_AUTHENTICATION_PARAM_REQ ue id %06"PRIX32" IMSI %s (establish reject)", - ue_idP, NAS_AUTHENTICATION_PARAM_REQ(message_p).imsi); - - itti_send_msg_to_task(TASK_MME_APP, INSTANCE_DEFAULT, message_p); -} -# endif - - -#endif /* NAS_ITTI_MESSAGING_H_ */ diff --git a/openair-cn/NAS/MME/nas_mme_task.c b/openair-cn/NAS/MME/nas_mme_task.c deleted file mode 100644 index 88939f93c2..0000000000 --- a/openair-cn/NAS/MME/nas_mme_task.c +++ /dev/null @@ -1,226 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include -#include -#include - -#include "intertask_interface.h" -#include "mme_config.h" -#include "nas_defs.h" -#include "msc.h" - -#if !defined(DISABLE_USE_NAS) -# include "nas_network.h" -# include "nas_proc.h" -# include "emm_main.h" -# include "nas_log.h" -# include "nas_timer.h" -#endif - -#define NAS_ERROR(x, args...) do { fprintf(stderr, "[NAS] [E]"x, ##args); } while(0) -#define NAS_DEBUG(x, args...) do { fprintf(stdout, "[NAS] [D]"x, ##args); } while(0) -#define NAS_WARN(x, args...) do { fprintf(stdout, "[NAS] [W]"x, ##args); } while(0) - -static void *nas_intertask_interface(void *args_p) -{ - itti_mark_task_ready(TASK_NAS_MME); - MSC_START_USE(); - - while(1) { - MessageDef *received_message_p; - -next_message: - itti_receive_msg(TASK_NAS_MME, &received_message_p); - - switch (ITTI_MSG_ID(received_message_p)) { - case NAS_CONNECTION_ESTABLISHMENT_IND: { -#if defined(DISABLE_USE_NAS) - MessageDef *message_p; - nas_attach_req_t *nas_req_p; - s1ap_initial_ue_message_t *transparent; - - NAS_DEBUG("NAS abstraction: Generating NAS ATTACH REQ\n"); - - message_p = itti_alloc_new_message(TASK_NAS_MME, NAS_ATTACH_REQ); - - nas_req_p = &message_p->ittiMsg.nas_attach_req; - transparent = &message_p->ittiMsg.nas_attach_req.transparent; - - nas_req_p->initial = INITIAL_REQUEST; - sprintf(nas_req_p->imsi, "%14llu", 20834123456789ULL); - - memcpy(transparent, &received_message_p->ittiMsg.nas_conn_est_ind.transparent, - sizeof(s1ap_initial_ue_message_t)); - - itti_send_msg_to_task(TASK_MME_APP, INSTANCE_DEFAULT, message_p); -#else - nas_establish_ind_t *nas_est_ind_p; - - nas_est_ind_p = &received_message_p->ittiMsg.nas_conn_est_ind.nas; - - nas_proc_establish_ind(nas_est_ind_p->UEid, - nas_est_ind_p->tac, - nas_est_ind_p->initialNasMsg.data, - nas_est_ind_p->initialNasMsg.length); -#endif - } - break; - -#if defined(DISABLE_USE_NAS) - - case NAS_ATTACH_ACCEPT: { - itti_send_msg_to_task(TASK_S1AP, INSTANCE_DEFAULT, received_message_p); - goto next_message; - } - break; - - case NAS_AUTHENTICATION_REQ: { - MessageDef *message_p; - nas_auth_resp_t *nas_resp_p; - - NAS_DEBUG("NAS abstraction: Generating NAS AUTHENTICATION RESPONSE\n"); - - message_p = itti_alloc_new_message(TASK_NAS_MME, NAS_AUTHENTICATION_RESP); - - nas_resp_p = &message_p->ittiMsg.nas_auth_resp; - - memcpy(nas_resp_p->imsi, received_message_p->ittiMsg.nas_auth_req.imsi, 16); - - itti_send_msg_to_task(TASK_MME_APP, INSTANCE_DEFAULT, message_p); - } - break; -#else - - case NAS_UPLINK_DATA_IND: { - nas_proc_ul_transfer_ind(NAS_UL_DATA_IND(received_message_p).UEid, - NAS_UL_DATA_IND(received_message_p).nasMsg.data, - NAS_UL_DATA_IND(received_message_p).nasMsg.length); - } - break; - - case NAS_DOWNLINK_DATA_CNF: { - nas_proc_dl_transfer_cnf(NAS_DL_DATA_CNF(received_message_p).UEid); - } break; - - case NAS_DOWNLINK_DATA_REJ: { - nas_proc_dl_transfer_rej(NAS_DL_DATA_REJ(received_message_p).UEid); - } break; - - case NAS_AUTHENTICATION_PARAM_RSP: { - nas_proc_auth_param_res(&NAS_AUTHENTICATION_PARAM_RSP(received_message_p)); - } - break; - - case NAS_AUTHENTICATION_PARAM_FAIL: { - nas_proc_auth_param_fail(&NAS_AUTHENTICATION_PARAM_FAIL(received_message_p)); - } - break; -#endif - - case NAS_PDN_CONNECTIVITY_RSP: { - nas_proc_pdn_connectivity_res(&NAS_PDN_CONNECTIVITY_RSP(received_message_p)); - } - break; - - case NAS_PDN_CONNECTIVITY_FAIL: { - nas_proc_pdn_connectivity_fail(&NAS_PDN_CONNECTIVITY_FAIL(received_message_p)); - } - break; - - - case TIMER_HAS_EXPIRED: { -#if !defined(DISABLE_USE_NAS) - /* Call the NAS timer api */ - nas_timer_handle_signal_expiry(TIMER_HAS_EXPIRED(received_message_p).timer_id, - TIMER_HAS_EXPIRED(received_message_p).arg); -#endif - } - break; - - case S1AP_ENB_DEREGISTERED_IND: { -#if !defined(DISABLE_USE_NAS) - int i; - - for (i = 0; i < S1AP_ENB_DEREGISTERED_IND(received_message_p).nb_ue_to_deregister; i ++) { - nas_proc_deregister_ue(S1AP_ENB_DEREGISTERED_IND(received_message_p).mme_ue_s1ap_id[i]); - } - -#endif - } - break; - - case S1AP_DEREGISTER_UE_REQ: { -#if !defined(DISABLE_USE_NAS) - nas_proc_deregister_ue(S1AP_DEREGISTER_UE_REQ(received_message_p).mme_ue_s1ap_id); -#endif - } - break; - - case TERMINATE_MESSAGE: { - itti_exit_task(); - } - break; - - default: { - NAS_DEBUG("Unkwnon message ID %d:%s from %s\n", - ITTI_MSG_ID(received_message_p), - ITTI_MSG_NAME(received_message_p), - ITTI_MSG_ORIGIN_NAME(received_message_p)); - } - break; - } - - itti_free(ITTI_MSG_ORIGIN_ID(received_message_p), received_message_p); - received_message_p = NULL; - } - - return NULL; -} - -int nas_init(mme_config_t *mme_config_p) -{ - NAS_DEBUG("Initializing NAS task interface\n"); - -#if !defined(DISABLE_USE_NAS) - nas_log_init(0x3F); - nas_network_initialize(mme_config_p); -#endif - - if (itti_create_task(TASK_NAS_MME, &nas_intertask_interface, - NULL) < 0) { - NAS_ERROR("Create task failed"); - NAS_DEBUG("Initializing NAS task interface: FAILED\n"); - return -1; - } - - NAS_DEBUG("Initializing NAS task interface: DONE\n"); - return 0; -} diff --git a/openair-cn/NAS/MME/nas_network.c b/openair-cn/NAS/MME/nas_network.c deleted file mode 100644 index 0af3aa3425..0000000000 --- a/openair-cn/NAS/MME/nas_network.c +++ /dev/null @@ -1,208 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** -Source nas_network.h - -Version 0.1 - -Date 2012/09/20 - -Product NAS stack - -Subsystem NAS main process - -Author Frederic Maurel - -Description NAS procedure functions triggered by the network - -*****************************************************************************/ - -#include "nas_network.h" -#include "commonDef.h" -#include "nas_log.h" -#include "nas_timer.h" - -#include "as_message.h" -#include "nas_proc.h" - -/****************************************************************************/ -/**************** E X T E R N A L D E F I N I T I O N S ****************/ -/****************************************************************************/ - -/****************************************************************************/ -/******************* L O C A L D E F I N I T I O N S *******************/ -/****************************************************************************/ - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -/**************************************************************************** - ** ** - ** Name: nas_network_initialize() ** - ** ** - ** Description: Initializes network internal data ** - ** ** - ** Inputs: None ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: None ** - ** Others: None ** - ** ** - ***************************************************************************/ -#if defined(NAS_BUILT_IN_EPC) -void nas_network_initialize(mme_config_t *mme_config_p) -#else -void nas_network_initialize(void) -#endif -{ - LOG_FUNC_IN; - - /* Initialize the internal NAS processing data */ -# if defined(NAS_BUILT_IN_EPC) - nas_timer_init(); - nas_proc_initialize(mme_config_p); -# else - nas_proc_initialize(); -# endif - - LOG_FUNC_OUT; -} - -/**************************************************************************** - ** ** - ** Name: nas_network_cleanup() ** - ** ** - ** Description: Performs clean up procedure before the system is shutdown ** - ** ** - ** Inputs: None ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: None ** - ** Others: None ** - ** ** - ***************************************************************************/ -void nas_network_cleanup(void) -{ - LOG_FUNC_IN; - - nas_proc_cleanup(); - - LOG_FUNC_OUT; -} - -/**************************************************************************** - ** ** - ** Name: nas_network_process_data() ** - ** ** - ** Description: Process Access Stratum messages received from the network ** - ** and call applicable NAS procedure function. ** - ** ** - ** Inputs: msg_id: AS message identifier ** - ** data: Generic pointer to data structure that has ** - ** to be processed ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok if the message has been success- ** - ** fully processed; RETURNerror otherwise ** - ** Others: None ** - ** ** - ***************************************************************************/ -int nas_network_process_data(int msg_id, const void *data) -{ - LOG_FUNC_IN; - - const as_message_t *msg = (as_message_t *)(data); - int rc = RETURNok; - - /* Sanity check */ - if (msg_id != msg->msgID) { - LOG_TRACE(ERROR, "NET-MAIN - Message identifier 0x%x to process " - "is different from that of the network data (0x%x)", - msg_id, msg->msgID); - LOG_FUNC_RETURN (RETURNerror); - } - - switch (msg_id) { - - - case AS_NAS_ESTABLISH_IND: { - /* Received NAS signalling connection establishment indication */ - const nas_establish_ind_t *indication = &msg->msg.nas_establish_ind; - rc = nas_proc_establish_ind(indication->UEid, - indication->tac, - indication->initialNasMsg.data, - indication->initialNasMsg.length); - break; - } - - case AS_DL_INFO_TRANSFER_CNF: { - const dl_info_transfer_cnf_t *info = &msg->msg.dl_info_transfer_cnf; - - /* Received downlink data transfer confirm */ - if (info->errCode != AS_SUCCESS) { - LOG_TRACE(WARNING, "NET-MAIN - " - "Downlink NAS message not delivered"); - rc = nas_proc_dl_transfer_rej(info->UEid); - } else { - rc = nas_proc_dl_transfer_cnf(info->UEid); - } - - break; - } - - case AS_UL_INFO_TRANSFER_IND: { - const ul_info_transfer_ind_t *info = &msg->msg.ul_info_transfer_ind; - /* Received uplink data transfer indication */ - rc = nas_proc_ul_transfer_ind(info->UEid, - info->nasMsg.data, - info->nasMsg.length); - break; - } - - case AS_RAB_ESTABLISH_CNF: - break; - - default: - LOG_TRACE(ERROR, "NET-MAIN - Unexpected AS message type: 0x%x", - msg_id); - rc = RETURNerror; - break; - } - - LOG_FUNC_RETURN (rc); -} - -/****************************************************************************/ -/********************* L O C A L F U N C T I O N S *********************/ -/****************************************************************************/ - diff --git a/openair-cn/NAS/MME/nas_network.h b/openair-cn/NAS/MME/nas_network.h deleted file mode 100644 index ef235dcdb7..0000000000 --- a/openair-cn/NAS/MME/nas_network.h +++ /dev/null @@ -1,81 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** -Source nas_network.h - -Version 0.1 - -Date 2012/09/20 - -Product NAS stack - -Subsystem NAS main process - -Author Frederic Maurel - -Description NAS procedure functions triggered by the network - -*****************************************************************************/ - -#if defined(NAS_BUILT_IN_EPC) -# include "mme_config.h" -#endif - -#ifndef __NAS_NETWORK_H__ -#define __NAS_NETWORK_H__ - -/****************************************************************************/ -/********************* G L O B A L C O N S T A N T S *******************/ -/****************************************************************************/ - -/****************************************************************************/ -/************************ G L O B A L T Y P E S ************************/ -/****************************************************************************/ - -/****************************************************************************/ -/******************** G L O B A L V A R I A B L E S ********************/ -/****************************************************************************/ - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -#if defined(NAS_BUILT_IN_EPC) -void nas_network_initialize(mme_config_t *mme_config_p); -#else -void nas_network_initialize(void); -#endif - -void nas_network_cleanup(void); - -int nas_network_process_data(int command_id, const void *data); - -const void *nas_network_get_data(void); - -#endif /* __NAS_NETWORK_H__*/ diff --git a/openair-cn/NAS/MME/nas_parser.c b/openair-cn/NAS/MME/nas_parser.c deleted file mode 100644 index af87d1ce97..0000000000 --- a/openair-cn/NAS/MME/nas_parser.c +++ /dev/null @@ -1,243 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** -Source nas_parser.c - -Version 0.1 - -Date 2012/02/27 - -Product NAS stack - -Subsystem NAS main process - -Author Frederic Maurel - -Description NAS command line parser - -*****************************************************************************/ - -#include "nas_parser.h" -#include "parser.h" - -#include // fprintf -#include // atoi - -/****************************************************************************/ -/**************** E X T E R N A L D E F I N I T I O N S ****************/ -/****************************************************************************/ - -/****************************************************************************/ -/******************* L O C A L D E F I N I T I O N S *******************/ -/****************************************************************************/ - -/* - * Identifiers of the NAS command line options - */ -enum { - NAS_PARSER_TRACE_LEVEL, /* Logging trace level */ - NAS_PARSER_NETWORK_HOST, /* Network layer's hostname */ - NAS_PARSER_NETWORK_PORT, /* Network layer's port number */ - NAS_PARSER_NB_OPTIONS -}; - -/* ----------------------------------------------------- - * Definition of the internal NAS command line structure - * ----------------------------------------------------- - * The command line is defined with a name (default is "NASprocess" - * but it will be replaced by the command name actually used at - * runtime), a number of options and the list of options. - * An option is defined with a name, an argument following the name, - * the usage displayed by the usage function and a default value. - */ -static parser_command_line_t nasParserCommandLine = { - "NASprocess", /* Command name */ - NAS_PARSER_NB_OPTIONS, /* Number of options */ - { /* Command line options */ - { - "-trace", "", "Logging trace level\t\t", - NAS_PARSER_DEFAULT_TRACE_LEVEL - }, - { - "-nhost", "", "Network layer's hostname\t", - NAS_PARSER_DEFAULT_NETWORK_HOSTNAME - }, - { - "-nport", "", "Network layer's port number\t", - NAS_PARSER_DEFAULT_NETWORK_PORT_NUMBER - }, - } -}; - -/* - * Converts a string, containing hexadecimal formatted integer, to an integer - */ -static int atohex(const char *a_char); - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -/**************************************************************************** - ** ** - ** Name: nas_parser_print_usage() ** - ** ** - ** Description: Displays the command line options used to run the NAS ** - ** process and the firmware version defined at compilation ** - ** time ** - ** ** - ** Inputs: version: Firmware version ** - ** Others: None ** - ** ** - ** Outputs: Return: None ** - ** Others: None ** - ** ** - ***************************************************************************/ -void nas_parser_print_usage(const char *version) -{ - parser_print_usage(&nasParserCommandLine); - fprintf(stderr, "Version: %s\n", version); -} - -/**************************************************************************** - ** ** - ** Name: nas_parser_get_options() ** - ** ** - ** Description: Gets the command line options used to run the NAS process ** - ** ** - ** Inputs: argc: Number of options ** - ** argv: Pointer to the list of options ** - ** Others: None ** - ** ** - ** Outputs: Return: RETURNerror, RETURNok ** - ** Others: None ** - ** ** - ***************************************************************************/ -int nas_parser_get_options(int argc, const char **argv) -{ - return parser_get_options(argc, argv, &nasParserCommandLine); -} - -/**************************************************************************** - ** ** - ** Name: nas_parser_get_nb_options() ** - ** ** - ** Description: Returns the number of the command line options used to ** - ** run the NAS process ** - ** ** - ** Inputs: None ** - ** Others: None ** - ** ** - ** Outputs: Return: Number of command line options ** - ** Others: None ** - ** ** - ***************************************************************************/ -int nas_parser_get_nb_options(void) -{ - return nasParserCommandLine.nb_options; -} - -/**************************************************************************** - ** ** - ** Name: nas_parser_get_trace_level() ** - ** ** - ** Description: Returns the value of the logging trace level ** - ** ** - ** Inputs: None ** - ** Others: None ** - ** ** - ** Outputs: Return: Value of the logging trace level ** - ** Others: None ** - ** ** - ***************************************************************************/ -int nas_parser_get_trace_level(void) -{ - return atohex( nasParserCommandLine.options[NAS_PARSER_TRACE_LEVEL].pvalue ); -} - -/**************************************************************************** - ** ** - ** Name: nas_parser_get_network_host() ** - ** ** - ** Description: Returns the value of the network layer hostname ** - ** ** - ** Inputs: None ** - ** Others: None ** - ** ** - ** Outputs: Return: Value of the network layer hostname ** - ** Others: None ** - ** ** - ***************************************************************************/ -const char *nas_parser_get_network_host(void) -{ - return nasParserCommandLine.options[NAS_PARSER_NETWORK_HOST].pvalue; -} - -/**************************************************************************** - ** ** - ** Name: nas_parser_get_network_port() ** - ** ** - ** Description: Returns the value of the network layer port number ** - ** ** - ** Inputs: None ** - ** Others: None ** - ** ** - ** Outputs: Return: Value of the network layer port number ** - ** Others: None ** - ** ** - ***************************************************************************/ -const char *nas_parser_get_network_port(void) -{ - return nasParserCommandLine.options[NAS_PARSER_NETWORK_PORT].pvalue; -} - - - -/****************************************************************************/ -/********************* L O C A L F U N C T I O N S *********************/ -/****************************************************************************/ - -static int atohex(const char *a_char) -{ - int result; - - for (result=0; a_char; a_char++) { - if (*a_char >= '0' && *a_char <= '9') { - result = (result << 4) + (*a_char - '0'); - } else if (*a_char >= 'A' && *a_char <= 'F') { - result = (result << 4) + (*a_char - 'A' + 10); - } else if (*a_char >= 'a' && *a_char <= 'f') { - result = (result << 4) + (*a_char - 'a' + 10); - } else { - break; - } - } - - return result; -} diff --git a/openair-cn/NAS/MME/nas_parser.h b/openair-cn/NAS/MME/nas_parser.h deleted file mode 100644 index c536c1375c..0000000000 --- a/openair-cn/NAS/MME/nas_parser.h +++ /dev/null @@ -1,84 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** -Source nas_parser.h - -Version 0.1 - -Date 2012/02/27 - -Product NAS stack - -Subsystem NAS main process - -Author Frederic Maurel - -Description NAS command line parser - -*****************************************************************************/ -#ifndef __NAS_PARSER_H__ -#define __NAS_PARSER_H__ - -/****************************************************************************/ -/********************* G L O B A L C O N S T A N T S *******************/ -/****************************************************************************/ - -/* Logging trace level default value */ -#define NAS_PARSER_DEFAULT_TRACE_LEVEL "0" /* No trace */ - -/* Network layer default hostname */ -#define NAS_PARSER_DEFAULT_NETWORK_HOSTNAME "localhost" - -/* Network layer default port number */ -#define NAS_PARSER_DEFAULT_NETWORK_PORT_NUMBER "12000" - - - -/****************************************************************************/ -/************************ G L O B A L T Y P E S ************************/ -/****************************************************************************/ - -/****************************************************************************/ -/******************** G L O B A L V A R I A B L E S ********************/ -/****************************************************************************/ - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -void nas_parser_print_usage(const char *version); -int nas_parser_get_options(int argc, const char **argv); - -int nas_parser_get_nb_options(void); -int nas_parser_get_trace_level(void); -const char *nas_parser_get_network_host(void); -const char *nas_parser_get_network_port(void); - - -#endif /* __NAS_PARSER_H__*/ diff --git a/openair-cn/NAS/MME/nas_proc.c b/openair-cn/NAS/MME/nas_proc.c deleted file mode 100644 index 7fae146a89..0000000000 --- a/openair-cn/NAS/MME/nas_proc.c +++ /dev/null @@ -1,443 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** -Source nas_proc.c - -Version 0.1 - -Date 2012/09/20 - -Product NAS stack - -Subsystem NAS main process - -Author Frederic Maurel - -Description NAS procedure call manager - -*****************************************************************************/ - -#include "nas_proc.h" -#include "nas_log.h" - -#include "emm_main.h" -#include "emm_sap.h" - -#include "esm_main.h" -#include "esm_sap.h" -#include "msc.h" - -#include // sprintf - -/****************************************************************************/ -/**************** E X T E R N A L D E F I N I T I O N S ****************/ -/****************************************************************************/ - -/****************************************************************************/ -/******************* L O C A L D E F I N I T I O N S *******************/ -/****************************************************************************/ - - - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -/**************************************************************************** - ** ** - ** Name: nas_proc_initialize() ** - ** ** - ** Description: ** - ** ** - ** Inputs: None ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: None ** - ** Others: None ** - ** ** - ***************************************************************************/ -# if defined(NAS_BUILT_IN_EPC) -void nas_proc_initialize(mme_config_t *mme_config_p) -{ - LOG_FUNC_IN; - - /* Initialize the EMM procedure manager */ - emm_main_initialize(mme_config_p); - - /* Initialize the ESM procedure manager */ - esm_main_initialize(); - - LOG_FUNC_OUT; -} -# else -void nas_proc_initialize(void) -{ - LOG_FUNC_IN; - - /* Initialize the EMM procedure manager */ - emm_main_initialize(); - - /* Initialize the ESM procedure manager */ - esm_main_initialize(); - - LOG_FUNC_OUT; -} -# endif - -/**************************************************************************** - ** ** - ** Name: nas_proc_cleanup() ** - ** ** - ** Description: Performs clean up procedure before the system is shutdown ** - ** ** - ** Inputs: None ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: None ** - ** Others: None ** - ** ** - ***************************************************************************/ -void nas_proc_cleanup(void) -{ - LOG_FUNC_IN; - - /* Perform the EPS Mobility Manager's clean up procedure */ - emm_main_cleanup(); - - /* Perform the EPS Session Manager's clean up procedure */ - esm_main_cleanup(); - - LOG_FUNC_OUT; -} - -/* - * -------------------------------------------------------------------------- - * NAS procedures triggered by the user - * -------------------------------------------------------------------------- - */ - - -/**************************************************************************** - ** ** - ** Name: nas_proc_establish_ind() ** - ** ** - ** Description: Processes the NAS signalling connection establishment ** - ** indication message received from the network ** - ** ** - ** Inputs: ueid: UE identifier ** - ** tac: The code of the tracking area the initia- ** - ** ting UE belongs to ** - ** data: The initial NAS message transfered within ** - ** the message ** - ** len: The length of the initial NAS message ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int nas_proc_establish_ind(uint32_t ueid, tac_t tac, - const Byte_t *data, uint32_t len) -{ - LOG_FUNC_IN; - - int rc = RETURNerror; - - if (len > 0) { - emm_sap_t emm_sap; - - MSC_LOG_TX_MESSAGE( - MSC_NAS_MME, - MSC_NAS_EMM_MME, - NULL,0, - "0 EMMAS_ESTABLISH_REQ ue id "NAS_UE_ID_FMT" tac %u", ueid, tac); - /* - * Notify the EMM procedure call manager that NAS signalling - * connection establishment indication message has been received - * from the Access-Stratum sublayer - */ - emm_sap.primitive = EMMAS_ESTABLISH_REQ; - emm_sap.u.emm_as.u.establish.ueid = ueid; - emm_sap.u.emm_as.u.establish.NASmsg.length = len; - emm_sap.u.emm_as.u.establish.NASmsg.value = (uint8_t *)data; - rc = emm_sap_send(&emm_sap); - } - - LOG_FUNC_RETURN (rc); -} - -/**************************************************************************** - ** ** - ** Name: nas_proc_dl_transfer_cnf() ** - ** ** - ** Description: Processes the downlink data transfer confirm message re- ** - ** ceived from the network while NAS message has been succes-** - ** sfully delivered to the NAS sublayer on the receiver side.** - ** ** - ** Inputs: ueid: UE identifier ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int nas_proc_dl_transfer_cnf(uint32_t ueid) -{ - LOG_FUNC_IN; - - emm_sap_t emm_sap; - int rc; - - MSC_LOG_TX_MESSAGE( - MSC_NAS_MME, - MSC_NAS_EMM_MME, - NULL,0, - "0 EMMAS_DATA_IND dl_transfer_conf ue id "NAS_UE_ID_FMT" ", ueid); - - /* - * Notify the EMM procedure call manager that downlink NAS message - * has been successfully delivered to the NAS sublayer on the - * receiver side - */ - emm_sap.primitive = EMMAS_DATA_IND; - emm_sap.u.emm_as.u.data.ueid = ueid; - emm_sap.u.emm_as.u.data.delivered = TRUE; - emm_sap.u.emm_as.u.data.NASmsg.length = 0; - rc = emm_sap_send(&emm_sap); - - LOG_FUNC_RETURN (rc); -} - -/**************************************************************************** - ** ** - ** Name: nas_proc_dl_transfer_rej() ** - ** ** - ** Description: Processes the downlink data transfer confirm message re- ** - ** ceived from the network while NAS message has not been ** - ** delivered to the NAS sublayer on the receiver side. ** - ** ** - ** Inputs: ueid: UE identifier ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int nas_proc_dl_transfer_rej(uint32_t ueid) -{ - LOG_FUNC_IN; - - emm_sap_t emm_sap; - int rc; - - MSC_LOG_TX_MESSAGE( - MSC_NAS_MME, - MSC_NAS_EMM_MME, - NULL,0, - "0 EMMAS_DATA_IND dl_transfer_reject ue id "NAS_UE_ID_FMT" ", ueid); - - /* - * Notify the EMM procedure call manager that transmission - * failure of downlink NAS message indication has been received - * from lower layers - */ - emm_sap.primitive = EMMAS_DATA_IND; - emm_sap.u.emm_as.u.data.ueid = ueid; - emm_sap.u.emm_as.u.data.delivered = FALSE; - emm_sap.u.emm_as.u.data.NASmsg.length = 0; - rc = emm_sap_send(&emm_sap); - - LOG_FUNC_RETURN (rc); -} - -/**************************************************************************** - ** ** - ** Name: nas_proc_ul_transfer_ind() ** - ** ** - ** Description: Processes uplink data transfer indication message recei- ** - ** ved from the network ** - ** ** - ** Inputs: ueid: UE identifier ** - ** data: The transfered NAS message ** - ** len: The length of the NAS message ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int nas_proc_ul_transfer_ind(uint32_t ueid, const Byte_t *data, uint32_t len) -{ - int rc = RETURNerror; - - LOG_FUNC_IN; - - if (len > 0) { - emm_sap_t emm_sap; - /* - * Notify the EMM procedure call manager that data transfer - * indication has been received from the Access-Stratum sublayer - */ - MSC_LOG_TX_MESSAGE( - MSC_NAS_MME, - MSC_NAS_EMM_MME, - NULL,0, - "0 EMMAS_DATA_IND ue id "NAS_UE_ID_FMT" len %u", ueid, len); - - emm_sap.primitive = EMMAS_DATA_IND; - emm_sap.u.emm_as.u.data.ueid = ueid; - emm_sap.u.emm_as.u.data.delivered = TRUE; - emm_sap.u.emm_as.u.data.NASmsg.length = len; - emm_sap.u.emm_as.u.data.NASmsg.value = (uint8_t *)data; - rc = emm_sap_send(&emm_sap); - } - - LOG_FUNC_RETURN (rc); -} - -# if defined(NAS_BUILT_IN_EPC) -int nas_proc_auth_param_res(emm_cn_auth_res_t *emm_cn_auth_res) -{ - int rc = RETURNerror; - emm_sap_t emm_sap; - - LOG_FUNC_IN; - - MSC_LOG_TX_MESSAGE( - MSC_NAS_MME, - MSC_NAS_EMM_MME, - NULL,0, - "0 EMMCN_AUTHENTICATION_PARAM_RES"); - - emm_sap.primitive = EMMCN_AUTHENTICATION_PARAM_RES; - emm_sap.u.emm_cn.u.auth_res = emm_cn_auth_res; - - rc = emm_sap_send(&emm_sap); - - LOG_FUNC_RETURN (rc); -} - -int nas_proc_auth_param_fail(emm_cn_auth_fail_t *emm_cn_auth_fail) -{ - int rc = RETURNerror; - emm_sap_t emm_sap; - - LOG_FUNC_IN; - - MSC_LOG_TX_MESSAGE( - MSC_NAS_MME, - MSC_NAS_EMM_MME, - NULL,0, - "0 EMMCN_AUTHENTICATION_PARAM_FAIL"); - - emm_sap.primitive = EMMCN_AUTHENTICATION_PARAM_FAIL; - emm_sap.u.emm_cn.u.auth_fail = emm_cn_auth_fail; - - rc = emm_sap_send(&emm_sap); - - LOG_FUNC_RETURN (rc); -} - -int nas_proc_deregister_ue(uint32_t ue_id) -{ - int rc = RETURNerror; - emm_sap_t emm_sap; - - LOG_FUNC_IN; - - MSC_LOG_TX_MESSAGE( - MSC_NAS_MME, - MSC_NAS_EMM_MME, - NULL,0, - "0 EMMCN_DEREGISTER_UE ue_id "NAS_UE_ID_FMT" ",ue_id); - - emm_sap.primitive = EMMCN_DEREGISTER_UE; - emm_sap.u.emm_cn.u.deregister.UEid = ue_id; - - rc = emm_sap_send(&emm_sap); - - LOG_FUNC_RETURN (rc); -} - -int nas_proc_pdn_connectivity_res(emm_cn_pdn_res_t *emm_cn_pdn_res) -{ - int rc = RETURNerror; - emm_sap_t emm_sap; - - LOG_FUNC_IN; - - MSC_LOG_TX_MESSAGE( - MSC_NAS_MME, - MSC_NAS_EMM_MME, - NULL,0, - "0 EMMCN_PDN_CONNECTIVITY_RES"); - - emm_sap.primitive = EMMCN_PDN_CONNECTIVITY_RES; - emm_sap.u.emm_cn.u.emm_cn_pdn_res = emm_cn_pdn_res; - - rc = emm_sap_send(&emm_sap); - - LOG_FUNC_RETURN (rc); -} - -int nas_proc_pdn_connectivity_fail(emm_cn_pdn_fail_t *emm_cn_pdn_fail) -{ - int rc = RETURNerror; - emm_sap_t emm_sap; - - LOG_FUNC_IN; - - MSC_LOG_TX_MESSAGE( - MSC_NAS_MME, - MSC_NAS_EMM_MME, - NULL,0, - "0 EMMCN_PDN_CONNECTIVITY_FAIL"); - - emm_sap.primitive = EMMCN_PDN_CONNECTIVITY_FAIL; - emm_sap.u.emm_cn.u.emm_cn_pdn_fail = emm_cn_pdn_fail; - - rc = emm_sap_send(&emm_sap); - - LOG_FUNC_RETURN (rc); -} - - - -# endif - -/****************************************************************************/ -/********************* L O C A L F U N C T I O N S *********************/ -/****************************************************************************/ - diff --git a/openair-cn/NAS/MME/nas_proc.h b/openair-cn/NAS/MME/nas_proc.h deleted file mode 100644 index a00060ed9d..0000000000 --- a/openair-cn/NAS/MME/nas_proc.h +++ /dev/null @@ -1,116 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** -Source nas_proc.h - -Version 0.1 - -Date 2012/09/20 - -Product NAS stack - -Subsystem NAS main process - -Author Frederic Maurel - -Description NAS procedure call manager - -*****************************************************************************/ -#ifndef __NAS_PROC_H__ -#define __NAS_PROC_H__ - -#if defined(NAS_BUILT_IN_EPC) -# include "mme_config.h" -# include "emm_cnDef.h" -#endif - -#include "commonDef.h" -#include "networkDef.h" - -/****************************************************************************/ -/********************* G L O B A L C O N S T A N T S *******************/ -/****************************************************************************/ - -/****************************************************************************/ -/************************ G L O B A L T Y P E S ************************/ -/****************************************************************************/ - -/****************************************************************************/ -/******************** G L O B A L V A R I A B L E S ********************/ -/****************************************************************************/ - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - - -# if defined(NAS_BUILT_IN_EPC) -void nas_proc_initialize(mme_config_t *mme_config_p); -# else -void nas_proc_initialize(void); -# endif - -void nas_proc_cleanup(void); - -/* - * -------------------------------------------------------------------------- - * NAS procedures triggered by the user - * -------------------------------------------------------------------------- - */ - - -/* - * -------------------------------------------------------------------------- - * NAS procedures triggered by the network - * -------------------------------------------------------------------------- - */ - - - -int nas_proc_establish_ind(uint32_t ueid, tac_t tac, const Byte_t *data, - uint32_t len); - -int nas_proc_dl_transfer_cnf(uint32_t ueid); -int nas_proc_dl_transfer_rej(uint32_t ueid); -int nas_proc_ul_transfer_ind(uint32_t ueid, const Byte_t *data, uint32_t len); - -/* - * -------------------------------------------------------------------------- - * NAS procedures triggered by the mme applicative layer - * -------------------------------------------------------------------------- - */ -#if defined(NAS_BUILT_IN_EPC) -int nas_proc_auth_param_res(emm_cn_auth_res_t *emm_cn_auth_res); -int nas_proc_auth_param_fail(emm_cn_auth_fail_t *emm_cn_auth_fail); -int nas_proc_deregister_ue(uint32_t ue_id); -int nas_proc_pdn_connectivity_res(nas_pdn_connectivity_rsp_t *nas_pdn_connectivity_rsp); -int nas_proc_pdn_connectivity_fail(nas_pdn_connectivity_fail_t *nas_pdn_connectivity_fail); -#endif - -#endif /* __NAS_PROC_H__*/ diff --git a/openair-cn/NAS/UE/API/USER/COPYING b/openair-cn/NAS/UE/API/USER/COPYING deleted file mode 100644 index 94a9ed024d..0000000000 --- a/openair-cn/NAS/UE/API/USER/COPYING +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program 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. - - This program 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 this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/openair-cn/NAS/UE/API/USIM/COPYING b/openair-cn/NAS/UE/API/USIM/COPYING deleted file mode 100644 index 94a9ed024d..0000000000 --- a/openair-cn/NAS/UE/API/USIM/COPYING +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program 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. - - This program 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 this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/openair-cn/NAS/UE/EMM/SAP/COPYING b/openair-cn/NAS/UE/EMM/SAP/COPYING deleted file mode 100755 index 94a9ed024d..0000000000 --- a/openair-cn/NAS/UE/EMM/SAP/COPYING +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program 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. - - This program 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 this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/openair-cn/NAS/UE/EMM/SAP/emm_as.h b/openair-cn/NAS/UE/EMM/SAP/emm_as.h deleted file mode 100755 index ca4fc449b7..0000000000 --- a/openair-cn/NAS/UE/EMM/SAP/emm_as.h +++ /dev/null @@ -1,72 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** -Source emm_as.h - -Version 0.1 - -Date 2012/10/16 - -Product NAS stack - -Subsystem EPS Mobility Management - -Author Frederic Maurel - -Description Defines the EMMAS Service Access Point that provides - services to the EPS Mobility Management for NAS message - transfer to/from the Access Stratum sublayer. - -*****************************************************************************/ -#ifndef __EMM_AS_H__ -#define __EMM_AS_H__ - -#include "emm_asDef.h" - -/****************************************************************************/ -/********************* G L O B A L C O N S T A N T S *******************/ -/****************************************************************************/ - -/****************************************************************************/ -/************************ G L O B A L T Y P E S ************************/ -/****************************************************************************/ - -/****************************************************************************/ -/******************** G L O B A L V A R I A B L E S ********************/ -/****************************************************************************/ - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -void emm_as_initialize(void); - -int emm_as_send(const emm_as_t *msg); - -#endif /* __EMM_AS_H__*/ diff --git a/openair-cn/NAS/UE/EMM/SAP/emm_esm.h b/openair-cn/NAS/UE/EMM/SAP/emm_esm.h deleted file mode 100755 index 6967b97ca1..0000000000 --- a/openair-cn/NAS/UE/EMM/SAP/emm_esm.h +++ /dev/null @@ -1,73 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** - -Source emm_esm.h - -Version 0.1 - -Date 2012/10/16 - -Product NAS stack - -Subsystem EPS Mobility Management - -Author Frederic Maurel - -Description Defines the EMMESM Service Access Point that provides - interlayer services to the EPS Session Management sublayer - for service registration and activate/deactivate PDP context. - -*****************************************************************************/ -#ifndef __EMM_ESM_H__ -#define __EMM_ESM_H__ - -#include "emm_esmDef.h" - -/****************************************************************************/ -/********************* G L O B A L C O N S T A N T S *******************/ -/****************************************************************************/ - -/****************************************************************************/ -/************************ G L O B A L T Y P E S ************************/ -/****************************************************************************/ - -/****************************************************************************/ -/******************** G L O B A L V A R I A B L E S ********************/ -/****************************************************************************/ - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -void emm_esm_initialize(void); - -int emm_esm_send(const emm_esm_t *msg); - -#endif /* __EMM_ESM_H__*/ diff --git a/openair-cn/NAS/UE/EMM/SAP/emm_reg.c b/openair-cn/NAS/UE/EMM/SAP/emm_reg.c deleted file mode 100755 index ca19566cb9..0000000000 --- a/openair-cn/NAS/UE/EMM/SAP/emm_reg.c +++ /dev/null @@ -1,126 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** - -Source emm_reg.c - -Version 0.1 - -Date 2012/10/16 - -Product NAS stack - -Subsystem EPS Mobility Management - -Author Frederic Maurel - -Description Defines the EMMREG Service Access Point that provides - registration services for location updating and attach/detach - procedures. - -*****************************************************************************/ - -#include "emm_reg.h" -#include "commonDef.h" -#include "nas_log.h" - -#include "emm_fsm.h" - -#include - -/****************************************************************************/ -/**************** E X T E R N A L D E F I N I T I O N S ****************/ -/****************************************************************************/ - -/****************************************************************************/ -/******************* L O C A L D E F I N I T I O N S *******************/ -/****************************************************************************/ - -/****************************************************************************/ -/****************** E X P O R T E D F U N C T I O N S ******************/ -/****************************************************************************/ - -/**************************************************************************** - ** ** - ** Name: emm_reg_initialize() ** - ** ** - ** Description: Initializes the EMMREG Service Access Point ** - ** ** - ** Inputs: None ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: None ** - ** Others: NONE ** - ** ** - ***************************************************************************/ -void emm_reg_initialize(void) -{ - LOG_FUNC_IN; - - /* Initialize the EMM state machine */ - emm_fsm_initialize(); - - LOG_FUNC_OUT; -} - -/**************************************************************************** - ** ** - ** Name: emm_reg_send() ** - ** ** - ** Description: Processes the EMMREG Service Access Point primitive ** - ** ** - ** Inputs: msg: The EMMREG-SAP primitive to process ** - ** Others: None ** - ** ** - ** Outputs: None ** - ** Return: RETURNok, RETURNerror ** - ** Others: None ** - ** ** - ***************************************************************************/ -int emm_reg_send(const emm_reg_t *msg) -{ - LOG_FUNC_IN; - - int rc; - - /* Check the EMM-SAP primitive */ - emm_reg_primitive_t primitive = msg->primitive; - assert( (primitive > _EMMREG_START) && (primitive < _EMMREG_END)); - - /* Execute the EMM procedure */ - rc = emm_fsm_process(msg); - - LOG_FUNC_RETURN (rc); -} - -/****************************************************************************/ -/********************* L O C A L F U N C T I O N S *********************/ -/****************************************************************************/ - diff --git a/openair-cn/NAS/UE/ESM/SAP/COPYING b/openair-cn/NAS/UE/ESM/SAP/COPYING deleted file mode 100755 index 94a9ed024d..0000000000 --- a/openair-cn/NAS/UE/ESM/SAP/COPYING +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program 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. - - This program 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 this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/openair-cn/NAS/UE/ESM/esm_ip.c b/openair-cn/NAS/UE/ESM/esm_ip.c deleted file mode 100755 index b2fb84b970..0000000000 --- a/openair-cn/NAS/UE/ESM/esm_ip.c +++ /dev/null @@ -1,74 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include "emmData.h" -#include "esmData.h" - -char ip_addr_str[100]; - -inline char *esm_data_get_ipv4_addr(const OctetString *ip_addr) -{ - if (ip_addr->length > 0) { - sprintf(ip_addr_str, "%u.%u.%u.%u", - ip_addr->value[0], ip_addr->value[1], - ip_addr->value[2], ip_addr->value[3]); - return ip_addr_str; - } - - return (NULL); -} - -inline char *esm_data_get_ipv6_addr(const OctetString *ip_addr) -{ - if (ip_addr->length > 0) { - sprintf(ip_addr_str, "%x%.2x:%x%.2x:%x%.2x:%x%.2x", - ip_addr->value[0], ip_addr->value[1], - ip_addr->value[2], ip_addr->value[3], - ip_addr->value[4], ip_addr->value[5], - ip_addr->value[6], ip_addr->value[7]); - return ip_addr_str; - } - - return (NULL); -} - -inline char *esm_data_get_ipv4v6_addr(const OctetString *ip_addr) -{ - if (ip_addr->length > 0) { - sprintf(ip_addr_str, "%u.%u.%u.%u / %x%.2x:%x%.2x:%x%.2x:%x%.2x", - ip_addr->value[0], ip_addr->value[1], - ip_addr->value[2], ip_addr->value[3], - ip_addr->value[4], ip_addr->value[5], - ip_addr->value[6], ip_addr->value[7], - ip_addr->value[8], ip_addr->value[9], - ip_addr->value[10], ip_addr->value[11]); - return ip_addr_str; - } - - return (NULL); -} diff --git a/openair-cn/NEWS b/openair-cn/NEWS deleted file mode 100644 index 8b13789179..0000000000 --- a/openair-cn/NEWS +++ /dev/null @@ -1 +0,0 @@ - diff --git a/openair-cn/OAISIM_MME/COPYING b/openair-cn/OAISIM_MME/COPYING deleted file mode 100644 index 94a9ed024d..0000000000 --- a/openair-cn/OAISIM_MME/COPYING +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program 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. - - This program 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 this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/openair-cn/OAISIM_MME/Makefile.am b/openair-cn/OAISIM_MME/Makefile.am deleted file mode 100644 index 5fb6fd5009..0000000000 --- a/openair-cn/OAISIM_MME/Makefile.am +++ /dev/null @@ -1,76 +0,0 @@ -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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 . -# -# Contact Information -# OpenAirInterface Admin: openair_admin@eurecom.fr -# OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr -# -# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. -# -################################################################################ -if !STANDALONE_EPC -AM_CFLAGS = @ADD_CFLAGS@ \ - -I$(top_srcdir)/COMMON \ - -I$(top_srcdir)/GTPV1-U \ - -I$(top_srcdir)/GTPV1-U/nw-gtpv1u/include \ - -I$(top_srcdir)/GTPV1-U/nw-gtpv1u/shared \ - -I$(top_srcdir)/SCTP \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/api/network \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/include \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/ies \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/emm/msg \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/esm/msg \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/util \ - -I$(top_srcdir)/INTERTASK_INTERFACE \ - -I$(top_srcdir)/SGI \ - -I$(top_srcdir)/MME_APP \ - -I$(top_srcdir)/NAS \ - -I$(top_srcdir)/S11 \ - -I$(top_builddir)/S1AP/MESSAGES \ - -I$(top_srcdir)/S1AP \ - -I$(top_srcdir)/S6A \ - -I$(top_srcdir)/SECU \ - -I$(top_srcdir)/SGW-LITE \ - -I$(top_srcdir)/UDP \ - -I$(top_srcdir)/UTILS \ - -I$(top_srcdir)/UTILS/HASHTABLE - -oaisim_mme_LDADD = \ - $(top_builddir)/INTERTASK_INTERFACE/libitti.la \ - $(top_builddir)/NAS/libnas.la \ - $(top_builddir)/S11/libs11.la \ - $(top_builddir)/S1AP/libs1ap.la \ - $(top_builddir)/S6A/libs6a.la \ - $(top_builddir)/SCTP/libsctpserver.la \ - $(top_builddir)/UTILS/HASHTABLE/libhashtable.la \ - $(top_builddir)/UDP/libudpserver.la \ - $(top_builddir)/MME_APP/libmmeapp.la \ - $(top_builddir)/SECU/libsecu.la \ - $(top_builddir)/UTILS/libutils.la \ - $(top_builddir)/GTPV2-C/nwgtpv2c-0.11/src/libNwGtpv2c.a \ - $(abs_top_builddir)/INTERTASK_INTERFACE/UTIL/LFDS/liblfds6.1.1/liblfds611/bin/liblfds611.a - -oaisim_mme_SOURCES = \ - oai_mme_log.c \ - oaisim_mme.c - -bin_PROGRAMS = oaisim_mme -endif diff --git a/openair-cn/OAISIM_MME/oai_mme_log.c b/openair-cn/OAISIM_MME/oai_mme_log.c deleted file mode 100644 index 533719977a..0000000000 --- a/openair-cn/OAISIM_MME/oai_mme_log.c +++ /dev/null @@ -1,53 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -#include "oaisim_mme.h" -#include "log.h" - -#include -#include - -int oai_mme_log_specific(int log_level) -{ - if (log_level == 1) { - asn_debug = 0; - asn1_xer_print = 1; - fd_g_debug_lvl = INFO; - } else if (log_level == 2) { - asn_debug = 1; - asn1_xer_print = 1; - fd_g_debug_lvl = ANNOYING; - } else { - asn1_xer_print = 0; - asn_debug = 0; - fd_g_debug_lvl = NONE; - } - - return 0; -} diff --git a/openair-cn/OAISIM_MME/oaisim_mme.c b/openair-cn/OAISIM_MME/oaisim_mme.c deleted file mode 100644 index 14a9871e58..0000000000 --- a/openair-cn/OAISIM_MME/oaisim_mme.c +++ /dev/null @@ -1,85 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include -#include -#include - -#if HAVE_CONFIG_H -# include "config.h" -#endif - -#include "assertions.h" -#include "mme_config.h" -#include "gtpv1u_sgw_defs.h" - -#include "intertask_interface_init.h" - -#include "sctp_primitives_server.h" -#include "udp_primitives_server.h" -#include "s1ap_mme.h" -#include "log.h" -#include "timer.h" -#include "sgw_lite_defs.h" -#include "mme_app_extern.h" -#include "nas_defs.h" -#include "s11_mme.h" - -/* FreeDiameter headers for support of S6A interface */ -#include -#include -#include "s6a_defs.h" - -#include "oaisim_mme.h" - -int main(int argc, char *argv[]) -{ - /* Parse the command line for options and set the mme_config accordingly. */ - CHECK_INIT_RETURN(config_parse_opt_line(argc, argv, &mme_config)); - - /* Calling each layer init function */ - CHECK_INIT_RETURN(log_init(&mme_config, oai_mme_log_specific)); - CHECK_INIT_RETURN(itti_init(TASK_MAX, THREAD_MAX, MESSAGES_ID_MAX, tasks_info, messages_info, messages_definition_xml, NULL)); - - CHECK_INIT_RETURN(nas_init(&mme_config)); - CHECK_INIT_RETURN(sctp_init(&mme_config)); - CHECK_INIT_RETURN(udp_init(&mme_config)); - CHECK_INIT_RETURN(s11_mme_init(&mme_config)); - CHECK_INIT_RETURN(s1ap_mme_init(&mme_config)); - // if (gtpv1u_init(&mme_config) < 0) return -1; - CHECK_INIT_RETURN(mme_app_init(&mme_config)); - - CHECK_INIT_RETURN(s6a_init(&mme_config)); - - /* Handle signals here */ - itti_wait_tasks_end(); - - return 0; -} diff --git a/openair-cn/OAISIM_MME/oaisim_mme.h b/openair-cn/OAISIM_MME/oaisim_mme.h deleted file mode 100644 index 5b389d75d1..0000000000 --- a/openair-cn/OAISIM_MME/oaisim_mme.h +++ /dev/null @@ -1,61 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/** @mainpage - - @section intro Introduction - - openair-mme project tends to provide an implementation of LTE core network. - - @section scope Scope - - - @section design Design Philosophy - - Included protocol stacks: - - SCTP RFC#### - - S1AP 3GPP TS 36.413 R10.5 - - S11 abstraction between MME and S-GW - - 3GPP TS 23.401 R10.5 - - nw-gtpv1u for s1-u (http://amitchawre.net/) - - freeDiameter project (http://www.freediameter.net/) 3GPP TS 29.272 R10.5 - - @section applications Applications and Usage - - Please use the script to start LTE epc in root src directory - - */ - -#ifndef OAISIM_MME_H_ -#define OAISIM_MME_H_ - -int main(int argc, char *argv[]); - -int oai_mme_log_specific(int log_level); - -#endif /* OAISIM_MME_H_ */ diff --git a/openair-cn/OAI_EPC/COPYING b/openair-cn/OAI_EPC/COPYING deleted file mode 100644 index 94a9ed024d..0000000000 --- a/openair-cn/OAI_EPC/COPYING +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program 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. - - This program 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 this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/openair-cn/OAI_EPC/Makefile.am b/openair-cn/OAI_EPC/Makefile.am deleted file mode 100644 index 1a192009d0..0000000000 --- a/openair-cn/OAI_EPC/Makefile.am +++ /dev/null @@ -1,78 +0,0 @@ -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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 . -# -# Contact Information -# OpenAirInterface Admin: openair_admin@eurecom.fr -# OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr -# -# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. -# -################################################################################ -if STANDALONE_EPC -AM_CFLAGS = @ADD_CFLAGS@ \ - -I$(top_srcdir)/COMMON \ - -I$(top_srcdir)/GTPV1-U \ - -I$(top_srcdir)/GTPV1-U/nw-gtpv1u/include \ - -I$(top_srcdir)/GTPV1-U/nw-gtpv1u/shared \ - -I$(top_srcdir)/SCTP \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/api/network \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/include \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/ies \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/emm/msg \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/esm/msg \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/util \ - -I$(top_srcdir)/INTERTASK_INTERFACE \ - -I$(top_srcdir)/SGI \ - -I$(top_srcdir)/MME_APP \ - -I$(top_srcdir)/NAS \ - -I$(top_builddir)/S1AP/MESSAGES \ - -I$(top_srcdir)/S1AP \ - -I$(top_srcdir)/S6A \ - -I$(top_srcdir)/SECU \ - -I$(top_srcdir)/SGW-LITE \ - -I$(top_srcdir)/UDP \ - -I$(top_srcdir)/UTILS \ - -I$(top_srcdir)/UTILS/HASHTABLE \ - -I$(top_srcdir)/UTILS/TIMER - -oai_epc_LDADD = \ - $(top_builddir)/GTPV1-U/libgtpv1u.la \ - $(top_builddir)/GTPV2-C/nwgtpv2c-0.11/src/libNwGtpv2c.a \ - $(top_builddir)/INTERTASK_INTERFACE/libitti.la \ - $(top_builddir)/SGI/libsgi.la \ - $(top_builddir)/NAS/libnas.la \ - $(top_builddir)/S6A/libs6a.la \ - $(top_builddir)/SGW-LITE/libsgw_lite.la \ - $(top_builddir)/SCTP/libsctpserver.la \ - $(top_builddir)/UTILS/HASHTABLE/libhashtable.la \ - $(top_builddir)/UDP/libudpserver.la \ - $(top_builddir)/MME_APP/libmmeapp.la \ - $(top_builddir)/SECU/libsecu.la \ - $(top_builddir)/UTILS/libutils.la \ - $(top_builddir)/S1AP/libs1ap.la \ - $(abs_top_builddir)/INTERTASK_INTERFACE/UTIL/LFDS/liblfds6.1.1/liblfds611/bin/liblfds611.a - -oai_epc_SOURCES = \ - oai_epc_log.c \ - oai_epc.c - -bin_PROGRAMS = oai_epc -endif diff --git a/openair-cn/OAI_EPC/oai_epc.c b/openair-cn/OAI_EPC/oai_epc.c deleted file mode 100644 index f2fe6776be..0000000000 --- a/openair-cn/OAI_EPC/oai_epc.c +++ /dev/null @@ -1,93 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -/*! @file oai_epc.c - * @brief Entry point for EPC environement gathering MME, S-GW and P-GW in - * a single executable - */ - -#include -#include -#include -#include -#include - -#if HAVE_CONFIG_H -# include "config.h" -#endif - -#include "mme_config.h" -#include "gtpv1u_sgw_defs.h" - -#include "assertions.h" - -#include "intertask_interface_init.h" - -#include "sctp_primitives_server.h" -#include "udp_primitives_server.h" -#include "s1ap_mme.h" -#include "log.h" -#include "timer.h" -#include "sgw_lite_defs.h" -#include "mme_app_extern.h" -#include "nas_defs.h" - -/* FreeDiameter headers for support of S6A interface */ -#include -#include -#include "s6a_defs.h" - -#include "oai_epc.h" -#include "msc.h" - -int main(int argc, char *argv[]) -{ - - CHECK_INIT_RETURN(itti_init(TASK_MAX, THREAD_MAX, MESSAGES_ID_MAX, - tasks_info, messages_info, messages_definition_xml, - mme_config.itti_config.log_file)); - /* Parse the command line for options and set the mme_config accordingly. */ - CHECK_INIT_RETURN(config_parse_opt_line(argc, argv, &mme_config) < 0); - MSC_INIT(MSC_MME_GW, THREAD_MAX+TASK_MAX); - - /* Calling each layer init function */ - CHECK_INIT_RETURN(log_init(&mme_config, oai_epc_log_specific)); - CHECK_INIT_RETURN(nas_init(&mme_config)); - CHECK_INIT_RETURN(sctp_init(&mme_config)); - CHECK_INIT_RETURN(udp_init(&mme_config)); - CHECK_INIT_RETURN(gtpv1u_init(&mme_config)); - CHECK_INIT_RETURN(s1ap_mme_init(&mme_config)); - CHECK_INIT_RETURN(mme_app_init(&mme_config)); - CHECK_INIT_RETURN(s6a_init(&mme_config)); - CHECK_INIT_RETURN(sgw_lite_init(mme_config.config_file)); - /* Handle signals here */ - itti_wait_tasks_end(); - - return 0; -} diff --git a/openair-cn/OAI_EPC/oai_epc.h b/openair-cn/OAI_EPC/oai_epc.h deleted file mode 100644 index ab378bf7d9..0000000000 --- a/openair-cn/OAI_EPC/oai_epc.h +++ /dev/null @@ -1,61 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/** @mainpage - - @section intro Introduction - - openair-mme project tends to provide an implementation of LTE core network. - - @section scope Scope - - - @section design Design Philosophy - - Included protocol stacks: - - SCTP RFC#### - - S1AP 3GPP TS 36.413 R10.5 - - S11 abstraction between MME and S-GW - - 3GPP TS 23.401 R10.5 - - nw-gtpv1u for s1-u (http://amitchawre.net/) - - freeDiameter project (http://www.freediameter.net/) 3GPP TS 29.272 R10.5 - - @section applications Applications and Usage - - Please use the script to start LTE epc in root src directory - - */ - -#ifndef OAI_EPC_H_ -#define OAI_EPC_H_ - -int oai_epc_log_specific(int log_level); - -int main(int argc, char *argv[]); - -#endif /* OAI_EPC_H_ */ diff --git a/openair-cn/OAI_EPC/oai_epc_log.c b/openair-cn/OAI_EPC/oai_epc_log.c deleted file mode 100644 index 9bcf3fcbf0..0000000000 --- a/openair-cn/OAI_EPC/oai_epc_log.c +++ /dev/null @@ -1,52 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include "oai_epc.h" -#include "log.h" - -#include -#include - -int oai_epc_log_specific(int log_level) -{ - if (log_level == 1) { - asn_debug = 0; - asn1_xer_print = 1; - fd_g_debug_lvl = INFO; - } else if (log_level == 2) { - asn_debug = 1; - asn1_xer_print = 1; - fd_g_debug_lvl = ANNOYING; - } else { - asn1_xer_print = 0; - asn_debug = 0; - fd_g_debug_lvl = NONE; - } - - return 0; -} diff --git a/openair-cn/OAI_SGW/COPYING b/openair-cn/OAI_SGW/COPYING deleted file mode 100644 index 94a9ed024d..0000000000 --- a/openair-cn/OAI_SGW/COPYING +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program 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. - - This program 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 this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/openair-cn/OAI_SGW/Makefile.am b/openair-cn/OAI_SGW/Makefile.am deleted file mode 100644 index 4190c1dc8e..0000000000 --- a/openair-cn/OAI_SGW/Makefile.am +++ /dev/null @@ -1,67 +0,0 @@ -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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 . -# -# Contact Information -# OpenAirInterface Admin: openair_admin@eurecom.fr -# OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr -# -# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. -# -################################################################################ -if !STANDALONE_EPC -AM_CFLAGS = @ADD_CFLAGS@ \ - -I$(top_srcdir)/COMMON \ - -I$(top_srcdir)/GTPV1-U \ - -I$(top_srcdir)/GTPV1-U/nw-gtpv1u/include \ - -I$(top_srcdir)/GTPV1-U/nw-gtpv1u/shared \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/api/network \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/include \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/ies \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/emm/msg \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/esm/msg \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/util \ - -I$(top_srcdir)/INTERTASK_INTERFACE \ - -I$(top_srcdir)/S11 \ - -I$(top_srcdir)/SGI \ - -I$(top_srcdir)/SGW-LITE \ - -I$(top_srcdir)/UDP \ - -I$(top_srcdir)/UTILS \ - -I$(top_srcdir)/UTILS/HASHTABLE - -oai_sgw_LDADD = \ - $(top_builddir)/GTPV1-U/libgtpv1u.la \ - $(top_builddir)/INTERTASK_INTERFACE/libitti.la \ - $(top_builddir)/S11/libs11.la \ - $(top_builddir)/GTPV2-C/nwgtpv2c-0.11/src/libNwGtpv2c.a \ - $(top_builddir)/SGI/libsgi.la \ - $(top_builddir)/SGW-LITE/libsgw_lite.la \ - $(top_builddir)/UTILS/HASHTABLE/libhashtable.la \ - $(top_builddir)/UDP/libudpserver.la \ - $(top_builddir)/SECU/libsecu.la \ - $(top_builddir)/UTILS/libutils.la \ - $(abs_top_builddir)/INTERTASK_INTERFACE/UTIL/LFDS/liblfds6.1.1/liblfds611/bin/liblfds611.a - -oai_sgw_SOURCES = \ - oai_sgw_log.c \ - oai_sgw.c - -bin_PROGRAMS = oai_sgw -endif diff --git a/openair-cn/OAI_SGW/oai_sgw.c b/openair-cn/OAI_SGW/oai_sgw.c deleted file mode 100644 index 902c4c24c1..0000000000 --- a/openair-cn/OAI_SGW/oai_sgw.c +++ /dev/null @@ -1,79 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/*! \file oai_sgw.c -* \brief -* \author Lionel Gauthier -* \company Eurecom -* \email: lionel.gauthier@eurecom.fr -*/ - -#include -#include -#include -#include -#include - -#if HAVE_CONFIG_H -# include "config.h" -#endif - -#include "assertions.h" -#include "mme_config.h" - -#include "intertask_interface_init.h" - -#include "udp_primitives_server.h" -#include "log.h" -#include "timer.h" -#include "s11_sgw.h" -#include "sgw_lite_defs.h" -#include "gtpv1u_sgw_defs.h" - -#include "oai_sgw.h" - -int main(int argc, char *argv[]) -{ - /* Parse the command line for options and set the mme_config accordingly. */ - CHECK_INIT_RETURN(config_parse_opt_line(argc, argv, &mme_config)); - - /* Calling each layer init function */ - CHECK_INIT_RETURN(log_init(&mme_config, oai_sgw_log_specific)); - CHECK_INIT_RETURN(itti_init(TASK_MAX, THREAD_MAX, MESSAGES_ID_MAX, tasks_info, messages_info, messages_definition_xml, NULL)); - - CHECK_INIT_RETURN(udp_init(&mme_config)); - CHECK_INIT_RETURN(s11_sgw_init(&mme_config)); - CHECK_INIT_RETURN(gtpv1u_init(&mme_config)); - - CHECK_INIT_RETURN(sgw_lite_init(mme_config.config_file)); - - /* Handle signals here */ - itti_wait_tasks_end(); - - return 0; -} diff --git a/openair-cn/OAI_SGW/oai_sgw.h b/openair-cn/OAI_SGW/oai_sgw.h deleted file mode 100644 index 5647b01790..0000000000 --- a/openair-cn/OAI_SGW/oai_sgw.h +++ /dev/null @@ -1,43 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/*! \file oai_sgw.h -* \brief -* \author Lionel Gauthier -* \company Eurecom -* \email: lionel.gauthier@eurecom.fr -*/ - -#ifndef OAI_SGW_H_ -#define OAI_SGW_H_ - -int main(int argc, char *argv[]); - -int oai_sgw_log_specific(int log_level); - -#endif /* OAI_SGW_H_ */ diff --git a/openair-cn/OAI_SGW/oai_sgw_log.c b/openair-cn/OAI_SGW/oai_sgw_log.c deleted file mode 100644 index 1cfb05b7c9..0000000000 --- a/openair-cn/OAI_SGW/oai_sgw_log.c +++ /dev/null @@ -1,41 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/*! \file oai_sgw_log.c -* \brief -* \author Lionel Gauthier -* \company Eurecom -* \email: lionel.gauthier@eurecom.fr -*/ -#include "oai_sgw.h" -#include "log.h" - -int oai_sgw_log_specific(int log_level) -{ - return 0; -} diff --git a/openair-cn/OPENAIRHSS/AUTHORS b/openair-cn/OPENAIRHSS/AUTHORS deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/openair-cn/OPENAIRHSS/ChangeLog b/openair-cn/OPENAIRHSS/ChangeLog deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/openair-cn/OPENAIRHSS/INSTALL b/openair-cn/OPENAIRHSS/INSTALL deleted file mode 100644 index 2099840756..0000000000 --- a/openair-cn/OPENAIRHSS/INSTALL +++ /dev/null @@ -1,370 +0,0 @@ -Installation Instructions -************************* - -Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation, -Inc. - - Copying and distribution of this file, with or without modification, -are permitted in any medium without royalty provided the copyright -notice and this notice are preserved. This file is offered as-is, -without warranty of any kind. - -Basic Installation -================== - - 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 -below. The lack of an optional feature in a given package is not -necessarily a bug. More recommendations for GNU packages can be found -in *note Makefile Conventions: (standards)Makefile Conventions. - - The `configure' shell script attempts to guess correct values for -various system-dependent variables used during compilation. It uses -those values to create a `Makefile' in each directory of the package. -It may also create one or more `.h' files containing system-dependent -definitions. Finally, it creates a shell script `config.status' that -you can run in the future to recreate the current configuration, and a -file `config.log' containing compiler output (useful mainly for -debugging `configure'). - - It can also use an optional file (typically called `config.cache' -and enabled with `--cache-file=config.cache' or simply `-C') that saves -the results of its tests to speed up reconfiguring. Caching is -disabled by default to prevent problems with accidental use of stale -cache files. - - If you need to do unusual things to compile the package, please try -to figure out how `configure' could check whether to do them, and mail -diffs or instructions to the address given in the `README' so they can -be considered for the next release. If you are using the cache, and at -some point `config.cache' contains results you don't want to keep, you -may remove or edit it. - - The file `configure.ac' (or `configure.in') is used to create -`configure' by a program called `autoconf'. You need `configure.ac' if -you want to change it or regenerate `configure' using a newer version -of `autoconf'. - - The simplest way to compile this package is: - - 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. - - Running `configure' might take a while. While running, it prints - some messages telling which features it is checking for. - - 2. Type `make' to compile the package. - - 3. Optionally, type `make check' to run any self-tests that come with - the package, generally using the just-built uninstalled binaries. - - 4. Type `make install' to install the programs and any data files and - documentation. When installing into a prefix owned by root, it is - recommended that the package be configured and built as a regular - user, and only the `make install' phase executed with root - privileges. - - 5. Optionally, type `make installcheck' to repeat any self-tests, but - this time using the binaries in their final installed location. - This target does not install anything. Running this target as a - regular user, particularly if the prior `make install' required - root privileges, verifies that the installation completed - correctly. - - 6. You can remove the program binaries and object files from the - source code directory by typing `make clean'. To also remove the - files that `configure' created (so you can compile the package for - a different kind of computer), type `make distclean'. There is - also a `make maintainer-clean' target, but that is intended mainly - for the package's developers. If you use it, you may have to get - all sorts of other programs in order to regenerate files that came - with the distribution. - - 7. Often, you can also type `make uninstall' to remove the installed - files again. In practice, not all packages have tested that - uninstallation works correctly, even though it is required by the - GNU Coding Standards. - - 8. Some packages, particularly those that use Automake, provide `make - distcheck', which can by used by developers to test that all other - targets like `make install' and `make uninstall' work correctly. - This target is generally not run by end users. - -Compilers and Options -===================== - - Some systems require unusual options for compilation or linking that -the `configure' script does not know about. Run `./configure --help' -for details on some of the pertinent environment variables. - - You can give `configure' initial values for configuration parameters -by setting variables in the command line or in the environment. Here -is an example: - - ./configure CC=c99 CFLAGS=-g LIBS=-lposix - - *Note Defining Variables::, for more details. - -Compiling For Multiple Architectures -==================================== - - You can compile the package for more than one kind of computer at the -same time, by placing the object files for each architecture in their -own directory. To do this, you can use GNU `make'. `cd' to the -directory where you want the object files and executables to go and run -the `configure' script. `configure' automatically checks for the -source code in the directory that `configure' is in and in `..'. This -is known as a "VPATH" build. - - With a non-GNU `make', it is safer to compile the package for one -architecture at a time in the source code directory. After you have -installed the package for one architecture, use `make distclean' before -reconfiguring for another architecture. - - On MacOS X 10.5 and later systems, you can create libraries and -executables that work on multiple system types--known as "fat" or -"universal" binaries--by specifying multiple `-arch' options to the -compiler but only a single `-arch' option to the preprocessor. Like -this: - - ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ - CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ - CPP="gcc -E" CXXCPP="g++ -E" - - This is not guaranteed to produce working output in all cases, you -may have to build one architecture at a time and combine the results -using the `lipo' tool if you have problems. - -Installation Names -================== - - By default, `make install' installs the package's commands under -`/usr/local/bin', include files under `/usr/local/include', etc. You -can specify an installation prefix other than `/usr/local' by giving -`configure' the option `--prefix=PREFIX', where PREFIX must be an -absolute file name. - - You can specify separate installation prefixes for -architecture-specific files and architecture-independent files. If you -pass the option `--exec-prefix=PREFIX' to `configure', the package uses -PREFIX as the prefix for installing programs and libraries. -Documentation and other data files still use the regular prefix. - - In addition, if you use an unusual directory layout you can give -options like `--bindir=DIR' to specify different values for particular -kinds of files. Run `configure --help' for a list of the directories -you can set and what kinds of files go in them. In general, the -default for these options is expressed in terms of `${prefix}', so that -specifying just `--prefix' will affect all of the other directory -specifications that were not explicitly provided. - - The most portable way to affect installation locations is to pass the -correct locations to `configure'; however, many packages provide one or -both of the following shortcuts of passing variable assignments to the -`make install' command line to change installation locations without -having to reconfigure or recompile. - - The first method involves providing an override variable for each -affected directory. For example, `make install -prefix=/alternate/directory' will choose an alternate location for all -directory configuration variables that were expressed in terms of -`${prefix}'. Any directories that were specified during `configure', -but not in terms of `${prefix}', must each be overridden at install -time for the entire installation to be relocated. The approach of -makefile variable overrides for each directory variable is required by -the GNU Coding Standards, and ideally causes no recompilation. -However, some platforms have known limitations with the semantics of -shared libraries that end up requiring recompilation when using this -method, particularly noticeable in packages that use GNU Libtool. - - The second method involves providing the `DESTDIR' variable. For -example, `make install DESTDIR=/alternate/directory' will prepend -`/alternate/directory' before all installation names. The approach of -`DESTDIR' overrides is not required by the GNU Coding Standards, and -does not work on platforms that have drive letters. On the other hand, -it does better at avoiding recompilation issues, and works well even -when some directory options were not specified in terms of `${prefix}' -at `configure' time. - -Optional Features -================= - - If the package supports it, you can cause programs to be installed -with an extra prefix or suffix on their names by giving `configure' the -option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. - - Some packages pay attention to `--enable-FEATURE' options to -`configure', where FEATURE indicates an optional part of the package. -They may also pay attention to `--with-PACKAGE' options, where PACKAGE -is something like `gnu-as' or `x' (for the X Window System). The -`README' should mention any `--enable-' and `--with-' options that the -package recognizes. - - For packages that use the X Window System, `configure' can usually -find the X include and library files automatically, but if it doesn't, -you can use the `configure' options `--x-includes=DIR' and -`--x-libraries=DIR' to specify their locations. - - Some packages offer the ability to configure how verbose the -execution of `make' will be. For these packages, running `./configure ---enable-silent-rules' sets the default to minimal output, which can be -overridden with `make V=1'; while running `./configure ---disable-silent-rules' sets the default to verbose, which can be -overridden with `make V=0'. - -Particular systems -================== - - On HP-UX, the default C compiler is not ANSI C compatible. If GNU -CC is not installed, it is recommended to use the following options in -order to use an ANSI C compiler: - - ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" - -and if that doesn't work, install pre-built binaries of GCC for HP-UX. - - HP-UX `make' updates targets which have the same time stamps as -their prerequisites, which makes it generally unusable when shipped -generated files such as `configure' are involved. Use GNU `make' -instead. - - On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot -parse its `' header file. The option `-nodtk' can be used as -a workaround. If GNU CC is not installed, it is therefore recommended -to try - - ./configure CC="cc" - -and if that doesn't work, try - - ./configure CC="cc -nodtk" - - On Solaris, don't put `/usr/ucb' early in your `PATH'. This -directory contains several dysfunctional programs; working variants of -these programs are available in `/usr/bin'. So, if you need `/usr/ucb' -in your `PATH', put it _after_ `/usr/bin'. - - On Haiku, software installed for all users goes in `/boot/common', -not `/usr/local'. It is recommended to use the following options: - - ./configure --prefix=/boot/common - -Specifying the System Type -========================== - - There may be some features `configure' cannot figure out -automatically, but needs to determine by the type of machine the package -will run on. Usually, assuming the package is built to be run on the -_same_ architectures, `configure' can figure that out, but if it prints -a message saying it cannot guess the machine type, give it the -`--build=TYPE' option. TYPE can either be a short name for the system -type, such as `sun4', or a canonical name which has the form: - - CPU-COMPANY-SYSTEM - -where SYSTEM can have one of these forms: - - OS - KERNEL-OS - - See the file `config.sub' for the possible values of each field. If -`config.sub' isn't included in this package, then this package doesn't -need to know the machine type. - - If you are _building_ compiler tools for cross-compiling, you should -use the option `--target=TYPE' to select the type of system they will -produce code for. - - If you want to _use_ a cross compiler, that generates code for a -platform different from the build platform, you should specify the -"host" platform (i.e., that on which the generated programs will -eventually be run) with `--host=TYPE'. - -Sharing Defaults -================ - - If you want to set default values for `configure' scripts to share, -you can create a site shell script called `config.site' that gives -default values for variables like `CC', `cache_file', and `prefix'. -`configure' looks for `PREFIX/share/config.site' if it exists, then -`PREFIX/etc/config.site' if it exists. Or, you can set the -`CONFIG_SITE' environment variable to the location of the site script. -A warning: not all `configure' scripts look for a site script. - -Defining Variables -================== - - Variables not defined in a site shell script can be set in the -environment passed to `configure'. However, some packages may run -configure again during the build, and the customized values of these -variables may be lost. In order to avoid this problem, you should set -them in the `configure' command line, using `VAR=value'. For example: - - ./configure CC=/usr/local2/bin/gcc - -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 limitation. Until the limitation is lifted, you can use -this workaround: - - CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash - -`configure' Invocation -====================== - - `configure' recognizes the following options to control how it -operates. - -`--help' -`-h' - Print a summary of all of the options to `configure', and exit. - -`--help=short' -`--help=recursive' - Print a summary of the options unique to this package's - `configure', and exit. The `short' variant lists options used - only in the top level, while the `recursive' variant lists options - also present in any nested packages. - -`--version' -`-V' - Print the version of Autoconf used to generate the `configure' - script, and exit. - -`--cache-file=FILE' - Enable the cache: use and save the results of the tests in FILE, - traditionally `config.cache'. FILE defaults to `/dev/null' to - disable caching. - -`--config-cache' -`-C' - Alias for `--cache-file=config.cache'. - -`--quiet' -`--silent' -`-q' - Do not print messages saying which checks are being made. To - suppress all normal output, redirect it to `/dev/null' (any error - messages will still be shown). - -`--srcdir=DIR' - Look for the package's source code in directory DIR. Usually - `configure' can determine that directory automatically. - -`--prefix=DIR' - Use DIR as the installation prefix. *note Installation Names:: - for more details, including other options available for fine-tuning - the installation locations. - -`--no-create' -`-n' - Run the configure checks, but stop before creating any output - files. - -`configure' also accepts some other, not widely useful, options. Run -`configure --help' for more details. diff --git a/openair-cn/OPENAIRHSS/Makefile.am b/openair-cn/OPENAIRHSS/Makefile.am deleted file mode 100644 index 327a0a00b9..0000000000 --- a/openair-cn/OPENAIRHSS/Makefile.am +++ /dev/null @@ -1,54 +0,0 @@ -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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 . -# -# Contact Information -# OpenAirInterface Admin: openair_admin@eurecom.fr -# OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr -# -# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. -# -################################################################################ -ACLOCAL_AMFLAGS = -I m4 - -SUBDIRS = access_restriction auc db s6a utils tests . - -AM_CFLAGS = @ADD_CFLAGS@ \ - -I$(top_srcdir)/access_restriction \ - -I$(top_srcdir)/auc \ - -I$(top_srcdir)/db \ - -I$(top_srcdir)/s6a \ - -I$(top_srcdir)/utils - -bin_PROGRAMS = openair-hss - -openair_hssdir=$(sysconfdir)/openair-hss -openair_hss_DATA = $(top_builddir)/conf/hss.conf $(top_srcdir)/conf/hss_fd.conf - -openair_hss_LDADD = \ - $(top_builddir)/s6a/libs6a.la \ - $(top_builddir)/db/libdb.la \ - $(top_builddir)/auc/libauc.la \ - $(top_builddir)/access_restriction/libaccess_restriction.la \ - $(top_builddir)/utils/libutils.la - -openair_hss_SOURCES = \ - hss_config.h \ - hss_main.c diff --git a/openair-cn/OPENAIRHSS/NEWS b/openair-cn/OPENAIRHSS/NEWS deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/openair-cn/OPENAIRHSS/README b/openair-cn/OPENAIRHSS/README deleted file mode 100644 index 3f48e97d5f..0000000000 --- a/openair-cn/OPENAIRHSS/README +++ /dev/null @@ -1,24 +0,0 @@ -Please follow the steps below to install hss: - -1) install the hss using the scripts/install_hss.sh -2) run autogen.sh -3) mkdir objs -4) cd objs; ../configure -5) make -j2 -6) make -7) sudo apt-get install mysql-client-core-5.5 mysql-server-core-5.5 mysql-server-5.5 phpmyadmin - set the password for mysql server - open a browser and connet to the phpmyadmin: localhost/phpmyadmin - create the oai_db database using database menu - select the oai_db and import db/oai_db.sql - select the users, and insert the data - or mannully use the cmd: sudo mysql -u root -p - update the oai_db tables for users,pgw, pdn, and mmeidentity - create a new phpmyadmin user, and name it hssadmin, with admin password, grant all the global privilages on DATA as well as create, alter, and index for the structure - mysql -u root -p and add the following cmd - grant all privileges ON *.* TO 'hssadmin'@'%' WITH GRANT OPTION; - flush privileges; -8) download and install php-myadmin or lampp from http://www.apachefriends.org/en/xampp-linux.html - copy the file in /opt - chmod 755 xampp-linux-1.8.2-0-installer.run - ./xampp-linux-1.8.2-0-installer.run diff --git a/openair-cn/OPENAIRHSS/access_restriction/COPYING b/openair-cn/OPENAIRHSS/access_restriction/COPYING deleted file mode 100644 index 94a9ed024d..0000000000 --- a/openair-cn/OPENAIRHSS/access_restriction/COPYING +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program 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. - - This program 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 this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/openair-cn/OPENAIRHSS/access_restriction/Makefile.am b/openair-cn/OPENAIRHSS/access_restriction/Makefile.am deleted file mode 100644 index 31d146bc61..0000000000 --- a/openair-cn/OPENAIRHSS/access_restriction/Makefile.am +++ /dev/null @@ -1,37 +0,0 @@ -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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 . -# -# Contact Information -# OpenAirInterface Admin: openair_admin@eurecom.fr -# OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr -# -# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. -# -################################################################################ -AM_CFLAGS = @ADD_CFLAGS@ \ - -I$(top_srcdir) \ - -I$(top_srcdir)/utils - -noinst_LTLIBRARIES = libaccess_restriction.la - -libaccess_restriction_la_LDFLAGS = -all-static -libaccess_restriction_la_SOURCES = \ - access_restriction.c access_restriction.h \ No newline at end of file diff --git a/openair-cn/OPENAIRHSS/access_restriction/access_restriction.c b/openair-cn/OPENAIRHSS/access_restriction/access_restriction.c deleted file mode 100644 index ec049b0c10..0000000000 --- a/openair-cn/OPENAIRHSS/access_restriction/access_restriction.c +++ /dev/null @@ -1,129 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include -#include - -#include "conversion.h" -#include "access_restriction.h" - -/* TODO: identification of MCC and MNC within an IMSI should be done according - * to a table that maps MCC to 2 or 3 digits expected... - * By default we will assume there is only 2 digits for our use. - */ - -/* Split a PLMN formed of to mcc and mnc. - * In case MNC is formed of only two digits a 0 is inserted at the most significant - * digit. - * When PLMN is represented using european convention it contains only two digits, - * while three digits are used in North American Standard. - * Encoding of PLMN is defined in ITU E.212. - * @param plmn string either 5 or 6 digits resulting of the concatenation of - * MCC and MNC. - */ -int split_plmn(uint8_t plmn[3], uint8_t mcc[3], uint8_t mnc[3]) -{ - if (plmn == NULL) { - return -1; - } - - mcc[0] = plmn[0] & 0x0F; - mcc[1] = (plmn[0] & 0xF0) >> 4; - mcc[2] = plmn[1] & 0x0F; - - if ((plmn[1] & 0xF0) == 0xF0) { - /* Only 2 digits case */ - mnc[1] = plmn[2] & 0x0F; - mnc[2] = (plmn[2] & 0xF0) >> 4; - mnc[0] = 0; - } else { - mnc[0] = plmn[2] & 0x0F; - mnc[1] = (plmn[2] & 0xF0) >> 4; - mnc[2] = ((plmn[1] & 0xF0) >> 4); - } - - return 0; -} - -/* Apply restriction (if any) to current 'visited' PLMN for this user. - * Criterias are based on ODB (operator determined barring), visited PLMN - * and user PLMN (obtain from IMSI). - * @param imsi is the user identity formed of MCC.MNC.MSIN (14 or 15 digits long) - * @param vplmn is the plmn of the cell the UE is currently attached to - */ -#define FORMAT_MCC(mCC) (mCC[0] * 100 + mCC[1] * 10 + mCC[2]) -#define FORMAT_MNC(mNC) (mNC[0] * 100 + mNC[1] * 10 + mNC[2]) - -int apply_access_restriction(char *imsi, uint8_t *vplmn) -{ - uint8_t vmcc[3], vmnc[3]; - uint8_t hmcc[3], hmnc[3]; - - uint8_t imsi_hex[15]; - - if (bcd_to_hex(imsi_hex, imsi, strlen(imsi)) != 0) { - fprintf(stderr, "Failed to convert imsi %s to hex representation\n", - imsi); - return -1; - } - - /* There is a problem while converting the PLMN... */ - if (split_plmn(vplmn, vmcc, vmnc) != 0) { - fprintf(stderr, "Fail to convert vplmn %02x%02x%02x to mcc/mnc for imsi %s\n", - vplmn[0], vplmn[1], vplmn[2], imsi); - return -1; - } - - fprintf(stderr, "Converted %02x%02x%02x to plmn %u.%u\n", vplmn[0], vplmn[1], vplmn[2], - FORMAT_MCC(vmcc), FORMAT_MNC(vmnc)); - - /* MCC is always 3 digits */ - memcpy(hmcc, &imsi_hex[0], 3); - - if (memcmp(vmcc, hmcc, 3) != 0) { - fprintf(stderr, "Only France MCC is handled for now, got imsi plmn %u.%u for a visited plmn %u.%u\n", - FORMAT_MCC(hmcc), FORMAT_MNC(hmnc), FORMAT_MCC(vmcc), FORMAT_MNC(vmnc)); - /* Reject the association */ - return -1; - } - - /* In France MNC is composed of 2 digits and thus imsi by 14 digit */ - hmnc[0] = 0; - memcpy(&hmnc[1], &imsi_hex[3], 2); - - if ((memcmp(vmcc, hmcc, 3) != 0) && (memcmp(vmnc, hmnc, 3) != 0)) { - fprintf(stderr, "UE is roaming from %u.%u to %u.%u which is not allowed" - " by the ODB\n", FORMAT_MCC(hmcc), FORMAT_MNC(hmnc), FORMAT_MCC(vmcc), FORMAT_MNC(vmnc)); - return -1; - } - - /* User has successfully passed all the checking -> accept the association */ - return 0; -} diff --git a/openair-cn/OPENAIRHSS/access_restriction/access_restriction.h b/openair-cn/OPENAIRHSS/access_restriction/access_restriction.h deleted file mode 100644 index bd9394416b..0000000000 --- a/openair-cn/OPENAIRHSS/access_restriction/access_restriction.h +++ /dev/null @@ -1,36 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#ifndef ACCESS_RESTRICTION_H_ -#define ACCESS_RESTRICTION_H_ - -int split_plmn(uint8_t *plmn, uint8_t mcc[3], uint8_t mnc[3]); - -int apply_access_restriction(char *imsi, uint8_t *vplmn); - -#endif /* ACCESS_RESTRICTION_H_ */ diff --git a/openair-cn/OPENAIRHSS/auc/COPYING b/openair-cn/OPENAIRHSS/auc/COPYING deleted file mode 100644 index 94a9ed024d..0000000000 --- a/openair-cn/OPENAIRHSS/auc/COPYING +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program 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. - - This program 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 this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/openair-cn/OPENAIRHSS/auc/Makefile.am b/openair-cn/OPENAIRHSS/auc/Makefile.am deleted file mode 100644 index 948cf4b1dc..0000000000 --- a/openair-cn/OPENAIRHSS/auc/Makefile.am +++ /dev/null @@ -1,42 +0,0 @@ -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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 . -# -# Contact Information -# OpenAirInterface Admin: openair_admin@eurecom.fr -# OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr -# -# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. -# -################################################################################ -AM_CFLAGS = @ADD_CFLAGS@ \ - -I$(top_srcdir) \ - -I$(top_srcdir)/utils - -noinst_LTLIBRARIES = libauc.la - -libauc_la_LDFLAGS = -all-static -libauc_la_SOURCES = \ - auc.h \ - fx.c \ - kdf.c \ - random.c \ - rijndael.c \ - sequence_number.c \ No newline at end of file diff --git a/openair-cn/OPENAIRHSS/auc/auc.h b/openair-cn/OPENAIRHSS/auc/auc.h deleted file mode 100644 index 00ca2b9dc7..0000000000 --- a/openair-cn/OPENAIRHSS/auc/auc.h +++ /dev/null @@ -1,118 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include -#include - -#ifndef AUC_H_ -#define AUC_H_ - -#define SQN_LENGTH_BITS (48) -#define SQN_LENGTH_OCTEST (SQN_LENGTH_BITS/8) -#define IK_LENGTH_BITS (128) -#define IK_LENGTH_OCTETS (IK_LENGTH_BITS/8) -#define RAND_LENGTH_OCTETS (16) -#define RAND_LENGTH_BITS (RAND_LENGTH_OCTETS*8) -#define XRES_LENGTH_OCTETS (8) -#define AUTN_LENGTH_OCTETS (16) -#define KASME_LENGTH_OCTETS (32) -#define MAC_S_LENGTH (8) - -extern uint8_t opc[16]; - -typedef mpz_t random_t; -typedef mpz_t sqn_t; - -typedef uint8_t uint8_t; - -typedef struct { - uint8_t rand[16]; - uint8_t rand_new; - uint8_t xres[8]; - uint8_t autn[16]; - uint8_t kasme[32]; -} auc_vector_t; - -void RijndaelKeySchedule(const uint8_t const key[16]); -void RijndaelEncrypt(const uint8_t const in[16], uint8_t out[16]); - -/* Sequence number functions */ -struct sqn_ue_s; -struct sqn_ue_s *sqn_exists(uint64_t imsi); -void sqn_insert(struct sqn_ue_s *item); -void sqn_init(struct sqn_ue_s *item); -struct sqn_ue_s *sqn_new(uint64_t imsi); -void sqn_list_init(void); -void sqn_get(uint64_t imsi, uint8_t sqn[6]); - -/* Random number functions */ -struct random_state_s; -void random_init(void); -void generate_random(uint8_t *random, ssize_t length); - -//void SetOP(char *opP); - -void ComputeOPc( const uint8_t const kP[16], const uint8_t const opP[16], uint8_t opcP[16] ); - -void f1 ( const uint8_t const kP[16],const uint8_t const k[16], const uint8_t const rand[16], const uint8_t const sqn[6], const uint8_t const amf[2], - uint8_t mac_a[8] ); -void f1star( const uint8_t const kP[16],const uint8_t const k[16], const uint8_t const rand[16], const uint8_t const sqn[6], const uint8_t const amf[2], - uint8_t mac_s[8] ); -void f2345 ( const uint8_t const kP[16],const uint8_t const k[16], const uint8_t const rand[16], - uint8_t res[8], uint8_t ck[16], uint8_t ik[16], uint8_t ak[6] ); -void f5star( const uint8_t const kP[16],const uint8_t const k[16], const uint8_t const rand[16], - uint8_t ak[6] ); - -void generate_autn(const uint8_t const sqn[6], const uint8_t const ak[6], const uint8_t const amf[2], const uint8_t const mac_a[8], uint8_t autn[16]); -int generate_vector(const uint8_t const opc[16], uint64_t imsi, uint8_t key[16], uint8_t plmn[3], - uint8_t sqn[6], auc_vector_t *vector); - -void kdf(uint8_t *key, uint16_t key_len, uint8_t *s, uint16_t s_len, uint8_t *out, - uint16_t out_len); - -void derive_kasme(uint8_t ck[16], uint8_t ik[16], uint8_t plmn[3], uint8_t sqn[6], - uint8_t ak[6], uint8_t kasme[32]); - -uint8_t *sqn_ms_derive(const uint8_t const opc[16], uint8_t *key, uint8_t *auts, uint8_t *rand); - -static inline void print_buffer(const char *prefix, uint8_t *buffer, int length) -{ - int i; - - fprintf(stdout, "%s", prefix); - - for (i = 0; i < length; i++) { - fprintf(stdout, "%02x.", buffer[i]); - } - - fprintf(stdout, "\n"); -} - -#endif /* AUC_H_ */ diff --git a/openair-cn/OPENAIRHSS/auc/fx.c b/openair-cn/OPENAIRHSS/auc/fx.c deleted file mode 100644 index 31d8d05b22..0000000000 --- a/openair-cn/OPENAIRHSS/auc/fx.c +++ /dev/null @@ -1,298 +0,0 @@ -/*------------------------------------------------------------------- - * Example algorithms f1, f1*, f2, f3, f4, f5, f5* - *------------------------------------------------------------------- - * - * A sample implementation of the example 3GPP authentication and - * key agreement functions f1, f1*, f2, f3, f4, f5 and f5*. This is - * a byte-oriented implementation of the functions, and of the block - * cipher kernel function Rijndael. - * - * This has been coded for clarity, not necessarily for efficiency. - * - * The functions f2, f3, f4 and f5 share the same inputs and have - * been coded together as a single function. f1, f1* and f5* are - * all coded separately. - * - *-----------------------------------------------------------------*/ - -#include -#include -#include -#include - -#include "auc.h" -#include "hss_config.h" - -extern hss_config_t hss_config; - -/*--------- Operator Variant Algorithm Configuration Field --------*/ - - -/*--------------------------- prototypes --------------------------*/ - - -/*------------------------------------------------------------------- - * - *------------------------------------------------------------------- - *-----------------------------------------------------------------*/ -void generate_autn(const uint8_t const sqn[6], const uint8_t const ak[6], const uint8_t const amf[2], const uint8_t const mac_a[8], uint8_t autn[16]) -{ - int i; - - for (i = 0; i < 6; i++) { - autn[i] = sqn[i] ^ ak[i]; - } - - memcpy(&autn[6], amf, 2); - memcpy(&autn[8], mac_a, 8); -} - -/*------------------------------------------------------------------- - * Algorithm f1 - *------------------------------------------------------------------- - * - * Computes network authentication code MAC-A from key K, random - * challenge RAND, sequence number SQN and authentication management - * field AMF. - * - *-----------------------------------------------------------------*/ -void f1 ( const uint8_t const opc[16], const uint8_t const k[16], const uint8_t const _rand[16], const uint8_t const sqn[6], const uint8_t const amf[2], - uint8_t mac_a[8] ) -{ - uint8_t temp[16]; - uint8_t in1[16]; - uint8_t out1[16]; - uint8_t rijndaelInput[16]; - uint8_t i; - RijndaelKeySchedule( k ); - - for (i=0; i<16; i++) - rijndaelInput[i] = _rand[i] ^ opc[i]; - - RijndaelEncrypt( rijndaelInput, temp ); - - for (i=0; i<6; i++) { - in1[i] = sqn[i]; - in1[i+8] = sqn[i]; - } - - for (i=0; i<2; i++) { - in1[i+6] = amf[i]; - in1[i+14] = amf[i]; - } - - /* XOR op_c and in1, rotate by r1=64, and XOR * - * on the constant c1 (which is all zeroes) */ - for (i=0; i<16; i++) - rijndaelInput[(i+8) % 16] = in1[i] ^ opc[i]; - - /* XOR on the value temp computed before */ - for (i=0; i<16; i++) - rijndaelInput[i] ^= temp[i]; - - RijndaelEncrypt( rijndaelInput, out1 ); - - for (i=0; i<16; i++) - out1[i] ^= opc[i]; - - for (i=0; i<8; i++) - mac_a[i] = out1[i]; - - return; -} /* end of function f1 */ - -/*------------------------------------------------------------------- - * Algorithms f2-f5 - *------------------------------------------------------------------- - * - * Takes key K and random challenge RAND, and returns response RES, - * confidentiality key CK, integrity key IK and anonymity key AK. - * - *-----------------------------------------------------------------*/ -void f2345 ( const uint8_t const opc[16], const uint8_t const k[16], const uint8_t const _rand[16], - uint8_t res[8], uint8_t ck[16], uint8_t ik[16], uint8_t ak[6] ) -{ - uint8_t temp[16]; - uint8_t out[16]; - uint8_t rijndaelInput[16]; - uint8_t i; - RijndaelKeySchedule( k ); - - for (i=0; i<16; i++) - rijndaelInput[i] = _rand[i] ^ opc[i]; - - RijndaelEncrypt( rijndaelInput, temp ); - - /* To obtain output block OUT2: XOR OPc and TEMP, * - * rotate by r2=0, and XOR on the constant c2 (which * - * is all zeroes except that the last bit is 1). */ - for (i=0; i<16; i++) - rijndaelInput[i] = temp[i] ^ opc[i]; - - rijndaelInput[15] ^= 1; - RijndaelEncrypt( rijndaelInput, out ); - - for (i=0; i<16; i++) - out[i] ^= opc[i]; - - for (i=0; i<8; i++) - res[i] = out[i+8]; - - for (i=0; i<6; i++) - ak[i] = out[i]; - - /* To obtain output block OUT3: XOR OPc and TEMP, * - * rotate by r3=32, and XOR on the constant c3 (which * - * is all zeroes except that the next to last bit is 1). */ - - for (i=0; i<16; i++) - rijndaelInput[(i+12) % 16] = temp[i] ^ opc[i]; - - rijndaelInput[15] ^= 2; - RijndaelEncrypt( rijndaelInput, out ); - - for (i=0; i<16; i++) - out[i] ^= opc[i]; - - for (i=0; i<16; i++) - ck[i] = out[i]; - - /* To obtain output block OUT4: XOR OPc and TEMP, * - * rotate by r4=64, and XOR on the constant c4 (which * - * is all zeroes except that the 2nd from last bit is 1). */ - for (i=0; i<16; i++) - rijndaelInput[(i+8) % 16] = temp[i] ^ opc[i]; - - rijndaelInput[15] ^= 4; - RijndaelEncrypt( rijndaelInput, out ); - - for (i=0; i<16; i++) - out[i] ^= opc[i]; - - for (i=0; i<16; i++) - ik[i] = out[i]; - - return; -} /* end of function f2345 */ - -/*------------------------------------------------------------------- - * Algorithm f1* - *------------------------------------------------------------------- - * - * Computes resynch authentication code MAC-S from key K, random - * challenge RAND, sequence number SQN and authentication management - * field AMF. - * - *-----------------------------------------------------------------*/ -void f1star( const uint8_t const opc[16], const uint8_t const k[16], const uint8_t const _rand[16], const uint8_t const sqn[6], const uint8_t const amf[2], - uint8_t mac_s[8] ) -{ - uint8_t temp[16]; - uint8_t in1[16]; - uint8_t out1[16]; - uint8_t rijndaelInput[16]; - uint8_t i; - RijndaelKeySchedule( k ); - - for (i=0; i<16; i++) - rijndaelInput[i] = _rand[i] ^ opc[i]; - - RijndaelEncrypt( rijndaelInput, temp ); - - for (i=0; i<6; i++) { - in1[i] = sqn[i]; - in1[i+8] = sqn[i]; - } - - for (i=0; i<2; i++) { - in1[i+6] = amf[i]; - in1[i+14] = amf[i]; - } - - /* XOR op_c and in1, rotate by r1=64, and XOR * - * on the constant c1 (which is all zeroes) */ - for (i=0; i<16; i++) - rijndaelInput[(i+8) % 16] = in1[i] ^ opc[i]; - - /* XOR on the value temp computed before */ - for (i=0; i<16; i++) - rijndaelInput[i] ^= temp[i]; - - RijndaelEncrypt( rijndaelInput, out1 ); - - for (i=0; i<16; i++) - out1[i] ^= opc[i]; - - for (i=0; i<8; i++) - mac_s[i] = out1[i+8]; - - return; -} /* end of function f1star */ - -/*------------------------------------------------------------------- - * Algorithm f5* - *------------------------------------------------------------------- - * - * Takes key K and random challenge RAND, and returns resynch - * anonymity key AK. - * - *-----------------------------------------------------------------*/ -void f5star( const uint8_t const opc[16], const uint8_t const k[16], const uint8_t const _rand[16], - uint8_t ak[6] ) -{ - uint8_t temp[16]; - uint8_t out[16]; - uint8_t rijndaelInput[16]; - uint8_t i; - - RijndaelKeySchedule( k ); - - for (i=0; i<16; i++) - rijndaelInput[i] = _rand[i] ^ opc[i]; - - RijndaelEncrypt( rijndaelInput, temp ); - - /* To obtain output block OUT5: XOR OPc and TEMP, * - * rotate by r5=96, and XOR on the constant c5 (which * - * is all zeroes except that the 3rd from last bit is 1). */ - for (i=0; i<16; i++) - rijndaelInput[(i+4) % 16] = temp[i] ^ opc[i]; - - rijndaelInput[15] ^= 8; - RijndaelEncrypt( rijndaelInput, out ); - - for (i=0; i<16; i++) - out[i] ^= opc[i]; - - for (i=0; i<6; i++) - ak[i] = out[i]; - - return; -} /* end of function f5star */ - -/*------------------------------------------------------------------- - * Function to compute OPc from OP and K. - *-----------------------------------------------------------------*/ -void ComputeOPc( const uint8_t const kP[16], const uint8_t const opP[16], uint8_t opcP[16] ) -{ - uint8_t i; - - RijndaelKeySchedule( kP ); - printf("Compute opc:\n\tK:\t%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X\n", - kP[0],kP[1],kP[2],kP[3],kP[4],kP[5],kP[6],kP[7], - kP[8],kP[9],kP[10],kP[11],kP[12],kP[13],kP[14],kP[15]); - RijndaelEncrypt( opP, opcP ); - printf("\tIn:\t%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X\n\tRinj:\t%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X\n", - opP[0],opP[1],opP[2],opP[3],opP[4],opP[5],opP[6],opP[7], - opP[8],opP[9],opP[10],opP[11],opP[12],opP[13],opP[14],opP[15], - opcP[0],opcP[1],opcP[2],opcP[3],opcP[4],opcP[5],opcP[6],opcP[7], - opcP[8],opcP[9],opcP[10],opcP[11],opcP[12],opcP[13],opcP[14],opcP[15] ); - - for (i=0; i<16; i++) - opcP[i] ^= opP[i]; - printf("\tOut:\t%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X\n", - opcP[0],opcP[1],opcP[2],opcP[3],opcP[4],opcP[5],opcP[6],opcP[7], - opcP[8],opcP[9],opcP[10],opcP[11],opcP[12],opcP[13],opcP[14],opcP[15] ); - - return; -} /* end of function ComputeOPc */ diff --git a/openair-cn/OPENAIRHSS/auc/kdf.c b/openair-cn/OPENAIRHSS/auc/kdf.c deleted file mode 100644 index a806513cbc..0000000000 --- a/openair-cn/OPENAIRHSS/auc/kdf.c +++ /dev/null @@ -1,174 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include -#include -#include - -#include -#include - -#include "auc.h" -#include "hss_config.h" - -#define DEBUG_AUC_KDF 1 -extern hss_config_t hss_config; - -/* - * @param key the input key - * @param key_len length of the key - * @param s string for key derivation as defined in 3GPP TS.33401 Annex A - * @param s_len length of s - * @param out buffer to place the output of kdf - * @param ou_len expected length for the output key - */ -inline -void kdf(uint8_t *key, uint16_t key_len, uint8_t *s, uint16_t s_len, uint8_t *out, - uint16_t out_len) -{ - struct hmac_sha256_ctx ctx; - - memset(&ctx, 0, sizeof(ctx)); - - hmac_sha256_set_key(&ctx, key_len, key); - hmac_sha256_update(&ctx, s_len, s); - hmac_sha256_digest(&ctx, out_len, out); -} - -/* - * Derive the Kasme using the KDF (key derive function). - * See 3GPP TS.33401 Annex A.2 - * The input String S to the KDF is composed of 14 bytes: - * FC = 0x10 - * P0 = SN id = PLMN - * L0 = length(SN id) = 0x00 0x03 - * P1 = SQN xor AK - * L1 = length(P1) = 0x00 0x06 - */ -inline -void derive_kasme(uint8_t ck[16], uint8_t ik[16], uint8_t plmn[3], uint8_t sqn[6], - uint8_t ak[6], uint8_t *kasme) -{ - uint8_t s[14]; - int i; - uint8_t key[32]; - - /* The input key is equal to the concatenation of CK and IK */ - memcpy(&key[0], ck, 16); - memcpy(&key[16], ik, 16); - - /*if (hss_config.valid_opc == 0) { - SetOP(hss_config.operator_key); - }*/ - - /* FC */ - s[0] = 0x10; - - /* SN id is composed of MCC and MNC - * Octets: - * 1 MCC digit 2 | MCC digit 1 - * 2 MNC digit 3 | MCC digit 3 - * 3 MNC digit 2 | MNC digit 1 - */ - memcpy(&s[1], plmn, 3); - - /* L0 */ - s[4] = 0x00; - s[5] = 0x03; - - /* P1 */ - for (i = 0; i < 6; i++) { - s[6 + i] = sqn[i] ^ ak[i]; - } - - /* L1 */ - s[12] = 0x00; - s[13] = 0x06; - -#if defined(DEBUG_AUC_KDF) - - for (i = 0; i < 32; i++) - printf("0x%02x ", key[i]); - - printf("\n"); - - for (i = 0; i < 14; i++) - printf("0x%02x ", s[i]); - - printf("\n"); -#endif - - kdf(key, 32, s, 14, kasme, 32); -} - -int generate_vector(const uint8_t const opc[16], uint64_t imsi, uint8_t key[16], uint8_t plmn[3], - uint8_t sqn[6], auc_vector_t *vector) -{ - /* in E-UTRAN an authentication vector is composed of: - * - RAND - * - XRES - * - AUTN - * - KASME - */ - - uint8_t amf[] = { 0x80, 0x00 }; - uint8_t mac_a[8]; - uint8_t ck[16]; - uint8_t ik[16]; - uint8_t ak[6]; - - if (vector == NULL) { - return EINVAL; - } - - /* Compute MAC */ - f1(opc, key, vector->rand, sqn, amf, mac_a); - - print_buffer("MAC_A : ", mac_a, 8); - print_buffer("SQN : ", sqn, 6); - print_buffer("RAND : ", vector->rand, 16); - - /* Compute XRES, CK, IK, AK */ - f2345(opc, key, vector->rand, vector->xres, ck, ik, ak); - print_buffer("AK : ", ak, 6); - print_buffer("CK : ", ck, 16); - print_buffer("IK : ", ik, 16); - print_buffer("XRES : ", vector->xres, 8); - - /* AUTN = SQN ^ AK || AMF || MAC */ - generate_autn(sqn, ak, amf, mac_a, vector->autn); - - print_buffer("AUTN : ", vector->autn, 16); - - derive_kasme(ck, ik, plmn, sqn, ak, vector->kasme); - print_buffer("KASME : ", vector->kasme, 32); - - return 0; -} diff --git a/openair-cn/OPENAIRHSS/auc/random.c b/openair-cn/OPENAIRHSS/auc/random.c deleted file mode 100644 index 5e71b32461..0000000000 --- a/openair-cn/OPENAIRHSS/auc/random.c +++ /dev/null @@ -1,89 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include -#include - -#include -#include - -#include "auc.h" -#include "hss_config.h" - -typedef struct random_state_s { - pthread_mutex_t lock; - gmp_randstate_t state; -} random_state_t; - -random_state_t random_state; -extern hss_config_t hss_config; - -void random_init(void) -{ - // mpz_t number; - // pthread_mutex_init(&random_state.lock, NULL); - // mpz_init(number); - // gmp_randinit_default(random_state.state); - // srand(time(NULL)); - struct timeval t1; - gettimeofday(&t1, NULL); - srand(t1.tv_usec * t1.tv_sec); -} - -/* Generate a random number between 0 and 2^length - 1 where length is expressed - * in bits. - */ -void generate_random(uint8_t *random_p, ssize_t length) -{ - // random_t random_nb; - - // mpz_init_set_ui(random_nb, 0); - - // pthread_mutex_lock(&random_state.lock); - // mpz_urandomb(random_nb, random_state.state, 8 * length); - // pthread_mutex_unlock(&random_state.lock); - - // mpz_export(random_p, NULL, 1, length, 0, 0, random_nb); - int i;//r = 0, mask = 0, shift; - if (hss_config.random_bool > 0) { - for (i = 0; i < length; i ++) { - // if ((i % sizeof(i)) == 0) - // r = rand(); - // shift = 8 * (i % sizeof(i)); - // mask = 0xFF << shift; - // random_p[i] = (r & mask) >> shift; - random_p[i] = rand(); - } - } else { - for (i = 0; i < length; i ++) { - random_p[i] = 0; - } - } -} diff --git a/openair-cn/OPENAIRHSS/auc/rijndael.c b/openair-cn/OPENAIRHSS/auc/rijndael.c deleted file mode 100644 index bbf1e57d30..0000000000 --- a/openair-cn/OPENAIRHSS/auc/rijndael.c +++ /dev/null @@ -1,225 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "auc.h" - -typedef uint8_t u8; -typedef uint32_t u32; - -/*-------------------- Rijndael round subkeys ---------------------*/ -u8 roundKeys[11][4][4]; -/*--------------------- Rijndael S box table ----------------------*/ -u8 S[256] = { - 99,124,119,123,242,107,111,197, 48, 1,103, 43,254,215,171,118, - 202,130,201,125,250, 89, 71,240,173,212,162,175,156,164,114,192, - 183,253,147, 38, 54, 63,247,204, 52,165,229,241,113,216, 49, 21, - 4,199, 35,195, 24,150, 5,154, 7, 18,128,226,235, 39,178,117, - 9,131, 44, 26, 27,110, 90,160, 82, 59,214,179, 41,227, 47,132, - 83,209, 0,237, 32,252,177, 91,106,203,190, 57, 74, 76, 88,207, - 208,239,170,251, 67, 77, 51,133, 69,249, 2,127, 80, 60,159,168, - 81,163, 64,143,146,157, 56,245,188,182,218, 33, 16,255,243,210, - 205, 12, 19,236, 95,151, 68, 23,196,167,126, 61,100, 93, 25,115, - 96,129, 79,220, 34, 42,144,136, 70,238,184, 20,222, 94, 11,219, - 224, 50, 58, 10, 73, 6, 36, 92,194,211,172, 98,145,149,228,121, - 231,200, 55,109,141,213, 78,169,108, 86,244,234,101,122,174, 8, - 186,120, 37, 46, 28,166,180,198,232,221,116, 31, 75,189,139,138, - 112, 62,181,102, 72, 3,246, 14, 97, 53, 87,185,134,193, 29,158, - 225,248,152, 17,105,217,142,148,155, 30,135,233,206, 85, 40,223, - 140,161,137, 13,191,230, 66,104, 65,153, 45, 15,176, 84,187, 22, -}; -/*------- This array does the multiplication by x in GF(2^8) ------*/ -u8 Xtime[256] = { - 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, - 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, - 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, - 96, 98,100,102,104,106,108,110,112,114,116,118,120,122,124,126, - 128,130,132,134,136,138,140,142,144,146,148,150,152,154,156,158, - 160,162,164,166,168,170,172,174,176,178,180,182,184,186,188,190, - 192,194,196,198,200,202,204,206,208,210,212,214,216,218,220,222, - 224,226,228,230,232,234,236,238,240,242,244,246,248,250,252,254, - 27, 25, 31, 29, 19, 17, 23, 21, 11, 9, 15, 13, 3, 1, 7, 5, - 59, 57, 63, 61, 51, 49, 55, 53, 43, 41, 47, 45, 35, 33, 39, 37, - 91, 89, 95, 93, 83, 81, 87, 85, 75, 73, 79, 77, 67, 65, 71, 69, - 123,121,127,125,115,113,119,117,107,105,111,109, 99, 97,103,101, - 155,153,159,157,147,145,151,149,139,137,143,141,131,129,135,133, - 187,185,191,189,179,177,183,181,171,169,175,173,163,161,167,165, - 219,217,223,221,211,209,215,213,203,201,207,205,195,193,199,197, - 251,249,255,253,243,241,247,245,235,233,239,237,227,225,231,229 -}; -/*------------------------------------------------------------------- - * Rijndael key schedule function. Takes 16-byte key and creates - * all Rijndael's internal subkeys ready for encryption. - *-----------------------------------------------------------------*/ -void RijndaelKeySchedule( const u8 const key[16] ) -{ - u8 roundConst; - int i, j; - - printf("RijndaelKeySchedule: K %02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X\n", - key[0],key[1],key[2],key[3],key[4],key[5],key[6],key[7], - key[8],key[9],key[10],key[11],key[12],key[13],key[14],key[15] ); - /* first round key equals key */ - for (i=0; i<16; i++) - roundKeys[0][i & 0x03][i>>2] = key[i]; - - roundConst = 1; - - /* now calculate round keys */ - for (i=1; i<11; i++) { - roundKeys[i][0][0] = S[roundKeys[i-1][1][3]] - ^ roundKeys[i-1][0][0] ^ roundConst; - roundKeys[i][1][0] = S[roundKeys[i-1][2][3]] - ^ roundKeys[i-1][1][0]; - roundKeys[i][2][0] = S[roundKeys[i-1][3][3]] - ^ roundKeys[i-1][2][0]; - roundKeys[i][3][0] = S[roundKeys[i-1][0][3]] - ^ roundKeys[i-1][3][0]; - - for (j=0; j<4; j++) { - roundKeys[i][j][1] = roundKeys[i-1][j][1] ^ roundKeys[i][j][0]; - roundKeys[i][j][2] = roundKeys[i-1][j][2] ^ roundKeys[i][j][1]; - roundKeys[i][j][3] = roundKeys[i-1][j][3] ^ roundKeys[i][j][2]; - } - - /* update round constant */ - roundConst = Xtime[roundConst]; - } - - return; -} /* end of function RijndaelKeySchedule */ -/* Round key addition function */ -void KeyAdd(u8 state[4][4], u8 roundKeys[11][4][4], int round) -{ - int i, j; - - for (i=0; i<4; i++) - for (j=0; j<4; j++) - state[i][j] ^= roundKeys[round][i][j]; - - return; -} -/* Byte substitution transformation */ -int ByteSub(u8 state[4][4]) -{ - int i, j; - - for (i=0; i<4; i++) - for (j=0; j<4; j++) - state[i][j] = S[state[i][j]]; - - return 0; -} -/* Row shift transformation */ -void ShiftRow(u8 state[4][4]) -{ - u8 temp; - /* left rotate row 1 by 1 */ - temp = state[1][0]; - state[1][0] = state[1][1]; - state[1][1] = state[1][2]; - state[1][2] = state[1][3]; - state[1][3] = temp; - /* left rotate row 2 by 2 */ - temp = state[2][0]; - state[2][0] = state[2][2]; - state[2][2] = temp; - temp = state[2][1]; - state[2][1] = state[2][3]; - state[2][3] = temp; - /* left rotate row 3 by 3 */ - temp = state[3][0]; - state[3][0] = state[3][3]; - state[3][3] = state[3][2]; - state[3][2] = state[3][1]; - state[3][1] = temp; - return; -} -/* MixColumn transformation*/ -void MixColumn(u8 state[4][4]) -{ - u8 temp, tmp, tmp0; - int i; - - /* do one column at a time */ - for (i=0; i<4; i++) { - temp = state[0][i] ^ state[1][i] ^ state[2][i] ^ state[3][i]; - tmp0 = state[0][i]; - /* Xtime array does multiply by x in GF2^8 */ - tmp = Xtime[state[0][i] ^ state[1][i]]; - state[0][i] ^= temp ^ tmp; - tmp = Xtime[state[1][i] ^ state[2][i]]; - state[1][i] ^= temp ^ tmp; - tmp = Xtime[state[2][i] ^ state[3][i]]; - state[2][i] ^= temp ^ tmp; - tmp = Xtime[state[3][i] ^ tmp0]; - state[3][i] ^= temp ^ tmp; - } - - return; -} -/*------------------------------------------------------------------- - * Rijndael encryption function. Takes 16-byte input and creates - * 16-byte output (using round keys already derived from 16-byte - * key). - *-----------------------------------------------------------------*/ -void RijndaelEncrypt( const u8 const input[16], u8 output[16] ) -{ - u8 state[4][4]; - int i, r; - - /* initialise state array from input byte string */ - for (i=0; i<16; i++) - state[i & 0x3][i>>2] = input[i]; - - /* add first round_key */ - KeyAdd(state, roundKeys, 0); - - /* do lots of full rounds */ - for (r=1; r<=9; r++) { - ByteSub(state); - ShiftRow(state); - MixColumn(state); - KeyAdd(state, roundKeys, r); - } - - /* final round */ - ByteSub(state); - ShiftRow(state); - KeyAdd(state, roundKeys, r); - - /* produce output byte string from state array */ - for (i=0; i<16; i++) { - output[i] = state[i & 0x3][i>>2]; - } - - return; -} /* end of function RijndaelEncrypt */ diff --git a/openair-cn/OPENAIRHSS/auc/sequence_number.c b/openair-cn/OPENAIRHSS/auc/sequence_number.c deleted file mode 100644 index 2f53b98be0..0000000000 --- a/openair-cn/OPENAIRHSS/auc/sequence_number.c +++ /dev/null @@ -1,88 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include -#include - -#include "auc.h" -#include "hss_config.h" - -extern hss_config_t hss_config; -extern uint8_t op[16]; - -uint8_t *sqn_ms_derive(const uint8_t const opc[16], uint8_t *key, uint8_t *auts, uint8_t *rand_p) -{ - /* AUTS = Conc(SQN MS ) || MAC-S - * Conc(SQN MS ) = SQN MS ^ f5* (RAND) - * MAC-S = f1* (SQN MS || RAND || AMF) - */ - uint8_t ak[6]; - uint8_t *conc_sqn_ms; - uint8_t *mac_s; - uint8_t mac_s_computed[MAC_S_LENGTH]; - uint8_t *sqn_ms; - uint8_t amf[2] = { 0, 0 }; - int i; - - conc_sqn_ms = auts; - mac_s = &auts[6]; - - sqn_ms = malloc(SQN_LENGTH_OCTEST); - - /*if (hss_config.valid_opc == 0) { - SetOP(hss_config.operator_key); - }*/ - - /* Derive AK from key and rand */ - f5star(opc, key, rand_p, ak); - - for (i = 0; i < 6; i++) { - sqn_ms[i] = ak[i] ^ conc_sqn_ms[i]; - } - - print_buffer("sqn_ms_derive() KEY : ", key, 16); - print_buffer("sqn_ms_derive() RAND : ", rand_p, 16); - print_buffer("sqn_ms_derive() AUTS : ", auts, 14); - print_buffer("sqn_ms_derive() AK : ", ak, 6); - print_buffer("sqn_ms_derive() SQN_MS : ", sqn_ms, 6); - print_buffer("sqn_ms_derive() MAC_S : ", mac_s, 8); - - f1star(opc, key, rand_p, sqn_ms, amf, mac_s_computed); - - print_buffer("MAC_S +: ", mac_s_computed, 8); - - if (memcmp(mac_s_computed, mac_s, 8) != 0) { - fprintf(stderr, "Failed to verify computed SQN_MS\n"); - free(sqn_ms); - return NULL; - } - - return sqn_ms; -} diff --git a/openair-cn/OPENAIRHSS/autogen.sh b/openair-cn/OPENAIRHSS/autogen.sh deleted file mode 100755 index fccf26a61e..0000000000 --- a/openair-cn/OPENAIRHSS/autogen.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -autoreconf --force --install -I m4 \ No newline at end of file diff --git a/openair-cn/OPENAIRHSS/conf/COPYING b/openair-cn/OPENAIRHSS/conf/COPYING deleted file mode 100644 index 94a9ed024d..0000000000 --- a/openair-cn/OPENAIRHSS/conf/COPYING +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program 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. - - This program 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 this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/openair-cn/OPENAIRHSS/conf/demoCA/COPYING b/openair-cn/OPENAIRHSS/conf/demoCA/COPYING deleted file mode 100644 index 94a9ed024d..0000000000 --- a/openair-cn/OPENAIRHSS/conf/demoCA/COPYING +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program 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. - - This program 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 this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/openair-cn/OPENAIRHSS/conf/hss.conf.in b/openair-cn/OPENAIRHSS/conf/hss.conf.in deleted file mode 100644 index 4c5e4c7d93..0000000000 --- a/openair-cn/OPENAIRHSS/conf/hss.conf.in +++ /dev/null @@ -1,11 +0,0 @@ -## MySQL mandatory options -MYSQL_server = "@MYSQL_server@"; -MYSQL_user = "@MYSQL_user@"; -MYSQL_pass = "@MYSQL_pass@"; -MYSQL_db = "@MYSQL_db@"; - -## HSS options -OPERATOR_key = "@OPERATOR_key@"; - -## Freediameter options -FD_conf = "@FREEDIAMETER_PATH@/../etc/freeDiameter/hss_fd.conf"; diff --git a/openair-cn/OPENAIRHSS/conf/make_certs.sh b/openair-cn/OPENAIRHSS/conf/make_certs.sh deleted file mode 100755 index 181c49912d..0000000000 --- a/openair-cn/OPENAIRHSS/conf/make_certs.sh +++ /dev/null @@ -1,75 +0,0 @@ -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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 . -# -# Contact Information -# OpenAirInterface Admin: openair_admin@eurecom.fr -# OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr -# -# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. -# -################################################################################ - -# ARG is REALM -# BY DEFAULT REALM IS "eur" - -DEFAULTREALMVALUE="eur" -REALM=${1:-$DEFAULTREALMVALUE} - -rm -rf demoCA -mkdir demoCA -echo 01 > demoCA/serial -touch demoCA/index.txt - -user=$(whoami) -HOSTNAME=$(hostname -f) - -echo "Creating HSS certificate for user '$HOSTNAME'.'$REALM'" -# -# # CA self certificate -# openssl req -new -batch -x509 -days 3650 -nodes -newkey rsa:1024 -out cacert.pem -keyout cakey.pem -subj /CN=test.fr/C=FR/ST=Biot/L=Aix/O=test.fr/OU=mobiles -# -# openssl genrsa -out hss.key.pem 1024 -# openssl req -new -batch -out hss.csr.pem -key hss.key.pem -subj /CN=hss.test.fr/C=FR/ST=Biot/L=Aix/O=test.fr/OU=mobiles -# openssl ca -cert cacert.pem -keyfile cakey.pem -in hss.csr.pem -out hss.cert.pem -outdir . -batch - -# Create a Root Certification Authority Certificate -openssl req -new -batch -x509 -days 3650 -nodes -newkey rsa:1024 -out hss.cacert.pem -keyout hss.cakey.pem -subj /CN=$REALM/C=FR/ST=PACA/L=Aix/O=Eurecom/OU=CM - -# Generate a Private Key -openssl genrsa -out hss.key.pem 1024 - -# Generate a CSR (Certificate Signing Request) that will be self-signed -openssl req -new -batch -out hss.csr.pem -key hss.key.pem -subj /CN=$HOSTNAME.$REALM/C=FR/ST=PACA/L=Aix/O=Eurecom/OU=CM - -# Certification authority -openssl ca -cert hss.cacert.pem -keyfile hss.cakey.pem -in hss.csr.pem -out hss.cert.pem -outdir . -batch - -if [ ! -d /usr/local/etc/freeDiameter ] -then - echo "Creating non existing directory: /usr/local/etc/freeDiameter/" - sudo mkdir /usr/local/etc/freeDiameter/ -fi - -sudo cp -upv hss.cakey.pem hss.cert.pem hss.cacert.pem hss.key.pem /usr/local/etc/freeDiameter/ - -# openssl genrsa -out $hss.key.pem 1024 -# openssl req -new -batch -out $hss.csr.pem -key $hss.key.pem -subj /CN=$hss.test.fr/C=FR/ST=Biot/L=Aix/O=test.fr/OU=mobiles -# openssl ca -cert cacert.pem -keyfile cakey.pem -in $hss.csr.pem -out $hss.cert.pem -outdir . -batch diff --git a/openair-cn/OPENAIRHSS/configure.ac b/openair-cn/OPENAIRHSS/configure.ac deleted file mode 100644 index 3aa0f11e8a..0000000000 --- a/openair-cn/OPENAIRHSS/configure.ac +++ /dev/null @@ -1,200 +0,0 @@ -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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 . -# -# Contact Information -# OpenAirInterface Admin: openair_admin@eurecom.fr -# OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr -# -# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. -# -################################################################################ -AC_PREREQ([2.65]) - -define([svnversion], esyscmd([sh -c "svnversion ..|tr -d '\n'"])) - -AC_DEFINE(SVN_REVISION, "svnversion", [SVN Revision]) - -AC_INIT([openair-hss], [1.0.0.svnversion], [openair_admin@eurecom.fr]) -AC_CANONICAL_BUILD -AC_CANONICAL_TARGET -AM_INIT_AUTOMAKE([1.11 silent-rules]) - -AC_CONFIG_MACRO_DIR([m4]) - -AC_CONFIG_HEADERS([config.h]) - -AM_MAINTAINER_MODE - -AM_SILENT_RULES([yes]) - -PKG_CHECK_MODULES(CHECK, [check >= 0.9.4], [HAVE_CHECK=true], [HAVE_CHECK=false]) -AM_CONDITIONAL(HAVE_CHECK, test x$HAVE_CHECK = xtrue) - -AM_PROG_LEX -AM_PROG_LIBTOOL - -AC_PROG_YACC -AC_PROG_CXX -AC_PROG_RANLIB - -AC_TYPE_INT8_T -AC_TYPE_INT16_T -AC_TYPE_INT32_T -AC_TYPE_UINT8_T -AC_TYPE_UINT16_T -AC_TYPE_UINT32_T -AC_TYPE_UINT64_T -AC_TYPE_SIZE_T -AC_TYPE_SSIZE_T - -AC_CHECK_HEADERS([libintl.h malloc.h netinet/in.h stddef.h]) - -AC_CHECK_FUNCS([memset strdup strerror]) -AC_C_INLINE - -AC_FUNC_ALLOCA -AC_FUNC_MALLOC -AC_FUNC_REALLOC - -dnl *** Autoconf support *** -AC_ARG_ENABLE(autoconf, - [ --disable-autoconf disable automatic generation of configure script ], - enable_autoconf=$enableval, enable_autoconf=yes -) -AC_PATH_PROG(AUTOCONF, autoconf, @echo autoconf not available) -AC_PATH_PROG(AUTOHEADER, autoheader, @echo autoheader not available) -if test -z "$AUTOCONF"; then enable_autoconf=no ; fi -if test -z "$AUTOHEADER"; then enable_autoconf=no ; fi -if test x$enable_autoconf = xyes; then - CONFIGURE_DEPENDS="configure.in" -fi -AC_SUBST(CONFIGURE_DEPENDS) - -AC_CHECK_LIB([mysqlclient], - [mysql_init], - [], - []) - -dnl ***freediameter support*** -AC_CHECK_LIB([fdcore], [fd_core_initialize], [], - [AC_MSG_ERROR(Free diameter lib not installed)]) -AC_CHECK_LIB([fdproto], [fd_core_initialize], [], - [AC_MSG_ERROR(Free diameter lib not installed)]) - -dnl *** Freediameter requirements *** -AC_CHECK_HEADERS([signalent.h]) -AC_CHECK_FUNCS([ntohll strndup]) -AC_DEFINE([HAVE_AI_ADDRCONFIG], [], - [Define to 1 if you have AI_ADDRCONFIG defined in netdb.h]) -AC_DEFINE([HAVE_CLOCK_GETTIME], [], - [Define to 1 if you have clock_gettime in librt]) -AC_DEFINE([HAVE_PTHREAD_BAR], [], - [Define to 1 if you have pthread_barrier_wait in libpthread]) -AC_DEFINE([SCTP_CONNECTX_4_ARGS], [], - [Define to 1 if sctp_connectx function accepts 4 arguments]) -AC_CHECK_LIB([rt], [clock_gettime], [AC_DEFINE(HAVE_CLOCK_GETTIME, 1)], []) -AC_CHECK_LIB([pthread], [pthread_barrier_wait], - [AC_DEFINE(HAVE_PTHREAD_BAR, 1)], []) -AC_CHECK_DECL([AI_ADDRCONFIG], - [AC_DEFINE(HAVE_AI_ADDRCONFIG, 1)], - [], [[#include ]]) -AC_MSG_CHECKING(if sctp_connectx accepts 4 arguments) -AC_LINK_IFELSE([ - AC_LANG_SOURCE( - [[int main() { return sctp_connectx(0, NULL, 0, NULL); }]]) -], [AC_DEFINE(SCTP_CONNECTX_4_ARGS, 1)]) -AC_CHECK_LIB([gnutls], - [gnutls_hash], - [AC_DEFINE(GNUTLS_VERSION_210, 1, - [Define to 1 if you have gnutls 2.10 installed])], - []) -AC_CHECK_LIB([gnutls], - [gnutls_x509_trust_list_verify_crt], - [AC_DEFINE(GNUTLS_VERSION_300, 1, - [Define to 1 if you have gnutls 3.0 installed])], - []) -AC_CHECK_LIB([gnutls], - [gnutls_handshake_set_timeout], - [AC_DEFINE(GNUTLS_VERSION_310, 1, - [Define to 1 if you have gnutls 3.1 installed])], - []) - -AC_DEFINE(FREE_DIAMETER_MINIMUM_VERSION, "1.1.5", [freeDiameter minimum version]) - -AC_CHECK_LIB(gmp, __gmpz_init, , - [AC_MSG_ERROR([GNU MP not found, see http://gmplib.org/])]) -AC_CHECK_LIB([nettle], - [nettle_hmac_sha256_set_key], - [], - [AC_MSG_ERROR(nettle is not installed)]) -AC_CHECK_LIB([pthread], - [pthread_getspecific], - [], - [AC_MSG_ERROR(lib pthread is not installed)]) - -AC_SUBST(ADD_CFLAGS) - -dnl Add these flags -CFLAGS="$CFLAGS -Wall" -CFLAGS="$CFLAGS -Wshadow" -CFLAGS="$CFLAGS -Wcast-align" -CFLAGS="$CFLAGS -Wchar-subscripts" -CFLAGS="$CFLAGS -Wmissing-prototypes" -CFLAGS="$CFLAGS -Wmissing-declarations" -CFLAGS="$CFLAGS -Werror=implicit-function-declaration" - -AC_C_BIGENDIAN -if test "x$ac_cv_c_bigendian" = "xyes"; then - CFLAGS="$CFLAGS -DBYTE_ORDER=BIG_ENDIAN" -else - CFLAGS="$CFLAGS -DBYTE_ORDER=LITTLE_ENDIAN" -fi - -AC_SUBST([AM_CFLAGS]) - -AC_ARG_ENABLE(dh_install, AS_HELP_STRING([--enable-dh-install], [Replace some variables for installation]), - [], - []) - -if test x$enable_dh_install == xyes; then - AC_SUBST(AM_CONF_DIR, $sysconfdir/openair-hss) -else - AC_SUBST(AM_CONF_DIR, $srcdir/conf) -fi - -AC_OUTPUT( \ - conf/hss.conf \ - access_restriction/Makefile \ - auc/Makefile \ - db/Makefile \ - s6a/Makefile \ - utils/Makefile \ - tests/Makefile \ - Makefile \ -) - -echo " -($PACKAGE_NAME) version $PACKAGE_VERSION -Prefix.........: $prefix -C Compiler.....: $CC $CFLAGS -Linker.........: $LD $LDFLAGS $LIBS -Tests..........: ${HAVE_CHECK} -" \ No newline at end of file diff --git a/openair-cn/OPENAIRHSS/db/COPYING b/openair-cn/OPENAIRHSS/db/COPYING deleted file mode 100644 index 94a9ed024d..0000000000 --- a/openair-cn/OPENAIRHSS/db/COPYING +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program 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. - - This program 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 this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/openair-cn/OPENAIRHSS/db/Makefile.am b/openair-cn/OPENAIRHSS/db/Makefile.am deleted file mode 100644 index cc97c37a20..0000000000 --- a/openair-cn/OPENAIRHSS/db/Makefile.am +++ /dev/null @@ -1,40 +0,0 @@ -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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 . -# -# Contact Information -# OpenAirInterface Admin: openair_admin@eurecom.fr -# OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr -# -# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. -# -################################################################################ -AM_CFLAGS = @ADD_CFLAGS@ \ - -I$(top_srcdir) \ - -I$(top_srcdir)/s6a \ - -I$(top_srcdir)/utils - -noinst_LTLIBRARIES = libdb.la - -libdb_la_LDFLAGS = -all-static -libdb_la_SOURCES = \ - db_proto.h db_connector.c \ - db_subscription_data.c \ - db_epc_equipment.c \ No newline at end of file diff --git a/openair-cn/OPENAIRHSS/db/db_connector.c b/openair-cn/OPENAIRHSS/db/db_connector.c deleted file mode 100644 index f96032896a..0000000000 --- a/openair-cn/OPENAIRHSS/db/db_connector.c +++ /dev/null @@ -1,702 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "hss_config.h" -#include "db_proto.h" - -extern void ComputeOPc( const uint8_t const kP[16], const uint8_t const opP[16], uint8_t opcP[16] ); - - -database_t *db_desc; - -static void print_buffer(const char *prefix, uint8_t *buffer, int length) -{ - int i; - - fprintf(stdout, "%s", prefix); - - for (i = 0; i < length; i++) { - fprintf(stdout, "%02x.", buffer[i]); - } - - fprintf(stdout, "\n"); -} - -int hss_mysql_connect(const hss_config_t *hss_config_p) -{ - const int mysql_reconnect_val = 1; - - if ((hss_config_p->mysql_server == NULL) || - (hss_config_p->mysql_user == NULL) || - (hss_config_p->mysql_password == NULL) || - (hss_config_p->mysql_database == NULL)) { - DB_ERROR("An empty name is not allowed\n"); - return EINVAL; - } - - DB_DEBUG("Initializing db layer\n"); - - db_desc = malloc(sizeof(database_t)); - - if (db_desc == NULL) { - DB_DEBUG("An error occured on MALLOC\n"); - return errno; - } - - pthread_mutex_init(&db_desc->db_cs_mutex, NULL); - - /* Copy database configuration from static hss config */ - db_desc->server = strdup(hss_config_p->mysql_server); - db_desc->user = strdup(hss_config_p->mysql_user); - db_desc->password = strdup(hss_config_p->mysql_password); - db_desc->database = strdup(hss_config_p->mysql_database); - - /* Init mySQL client */ - db_desc->db_conn = mysql_init(NULL); - - mysql_options(db_desc->db_conn, MYSQL_OPT_RECONNECT, &mysql_reconnect_val); - - /* Try to connect to database */ - if (!mysql_real_connect(db_desc->db_conn, db_desc->server, db_desc->user, - db_desc->password, db_desc->database, 0, NULL, 0)) { - DB_ERROR("An error occured while connecting to db: %s\n", - mysql_error(db_desc->db_conn)); - return -1; - } - - /* Set the multi statement ON */ - mysql_set_server_option(db_desc->db_conn, MYSQL_OPTION_MULTI_STATEMENTS_ON); - - DB_DEBUG("Initializing db layer: DONE\n"); - - return 0; -} - -void hss_mysql_disconnect(void) -{ - mysql_close(db_desc->db_conn); -} - -int hss_mysql_update_loc(const char *imsi, mysql_ul_ans_t *mysql_ul_ans) -{ - MYSQL_RES *res; - MYSQL_ROW row; - char query[1000]; - int ret = 0; - - if ((db_desc->db_conn == NULL) || (mysql_ul_ans == NULL)) { - return EINVAL; - } - - if (strlen(imsi) > 15) { - return EINVAL; - } - - sprintf(query, "SELECT `access_restriction`,`mmeidentity_idmmeidentity`," - "`msisdn`,`ue_ambr_ul`,`ue_ambr_dl`,`rau_tau_timer` " - "FROM `users` WHERE `users`.`imsi`='%s' ", imsi); - - memcpy(mysql_ul_ans->imsi, imsi, strlen(imsi) + 1); - - DB_DEBUG("Query: %s\n", query); - - pthread_mutex_lock(&db_desc->db_cs_mutex); - - if (mysql_query(db_desc->db_conn, query)) { - pthread_mutex_unlock(&db_desc->db_cs_mutex); - DB_ERROR("Query execution failed: %s\n", - mysql_error(db_desc->db_conn)); - mysql_thread_end(); - return EINVAL; - } - - res = mysql_store_result(db_desc->db_conn); - - pthread_mutex_unlock(&db_desc->db_cs_mutex); - - if ((row = mysql_fetch_row(res)) != NULL) { - int mme_id; - /* MSISDN may be NULL */ - mysql_ul_ans->access_restriction = atoi(row[0]); - - if ((mme_id = atoi(row[1])) > 0) { - ret = hss_mysql_query_mmeidentity(mme_id, &mysql_ul_ans->mme_identity); - } else { - mysql_ul_ans->mme_identity.mme_host[0] = '\0'; - mysql_ul_ans->mme_identity.mme_realm[0] = '\0'; - } - - if (row[2] != 0) { - memcpy(mysql_ul_ans->msisdn, row[2], strlen(row[2])); - } - - mysql_ul_ans->aggr_ul = atoi(row[3]); - mysql_ul_ans->aggr_dl = atoi(row[4]); - mysql_ul_ans->rau_tau = atoi(row[5]); - - mysql_free_result(res); - mysql_thread_end(); - return ret; - } - - mysql_free_result(res); - mysql_thread_end(); - return EINVAL; -} - -int hss_mysql_purge_ue(mysql_pu_req_t *mysql_pu_req, - mysql_pu_ans_t *mysql_pu_ans) -{ - MYSQL_RES *res; - MYSQL_ROW row; - char query[1000]; - int ret = 0; - - if ((db_desc->db_conn == NULL) || - (mysql_pu_req == NULL) || - (mysql_pu_ans == NULL)) { - return EINVAL; - } - - if (strlen(mysql_pu_req->imsi) > 15) { - return EINVAL; - } - - sprintf(query, "UPDATE `users` SET `users`.`ms_ps_status`=\"PURGED\" " - "WHERE `users`.`imsi`='%s'; " - "SELECT `users`.`mmeidentity_idmmeidentity` FROM `users` " - "WHERE `users`.`imsi`=%s ", - mysql_pu_req->imsi, mysql_pu_req->imsi); - - DB_DEBUG("Query: %s\n", query); - - pthread_mutex_lock(&db_desc->db_cs_mutex); - - if (mysql_query(db_desc->db_conn, query)) { - pthread_mutex_unlock(&db_desc->db_cs_mutex); - DB_ERROR("Query execution failed: %s\n", - mysql_error(db_desc->db_conn)); - mysql_thread_end(); - return EINVAL; - } - - res = mysql_store_result(db_desc->db_conn); - - pthread_mutex_unlock(&db_desc->db_cs_mutex); - - if ((row = mysql_fetch_row(res)) != NULL) { - int mme_id; - - if ((mme_id = atoi(row[0])) > 0) { - ret = hss_mysql_query_mmeidentity(mme_id, mysql_pu_ans); - } else { - mysql_pu_ans->mme_host[0] = '\0'; - mysql_pu_ans->mme_realm[0] = '\0'; - } - - mysql_free_result(res); - mysql_thread_end(); - return ret; - } - - mysql_free_result(res); - mysql_thread_end(); - return EINVAL; -} - -int hss_mysql_get_user(const char *imsi) -{ - MYSQL_RES *res; - MYSQL_ROW row; - char query[1000]; - - if (db_desc->db_conn == NULL) { - return EINVAL; - } - - sprintf(query, "SELECT `imsi` FROM `users` WHERE `users`.`imsi`=%s ", imsi); - - DB_DEBUG("Query: %s\n", query); - - pthread_mutex_lock(&db_desc->db_cs_mutex); - - if (mysql_query(db_desc->db_conn, query)) { - pthread_mutex_unlock(&db_desc->db_cs_mutex); - DB_ERROR("Query execution failed: %s\n", - mysql_error(db_desc->db_conn)); - mysql_thread_end(); - return EINVAL; - } - - res = mysql_store_result(db_desc->db_conn); - - pthread_mutex_unlock(&db_desc->db_cs_mutex); - - if ((row = mysql_fetch_row(res)) != NULL) { - mysql_free_result(res); - mysql_thread_end(); - return 0; - } - - mysql_free_result(res); - mysql_thread_end(); - - return EINVAL; -} - -int mysql_push_up_loc(mysql_ul_push_t *ul_push_p) -{ - MYSQL_RES *res; - char query[1000]; - int query_length = 0; - int status; - - if ((db_desc->db_conn == NULL) || (ul_push_p == NULL)) { - return EINVAL; - } - - // TODO: multi-statement check results - - if (ul_push_p->mme_identity_present == MME_IDENTITY_PRESENT) { - query_length += sprintf(&query[query_length], "INSERT INTO `mmeidentity`" - " (`mmehost`,`mmerealm`) SELECT '%s','%s' FROM `mmeidentity` WHERE NOT" - " EXISTS (SELECT * FROM `mmeidentity` WHERE `mmehost`='%s'" - " AND `mmerealm`='%s') LIMIT 1;", ul_push_p->mme_identity.mme_host, - ul_push_p->mme_identity.mme_realm, ul_push_p->mme_identity.mme_host, - ul_push_p->mme_identity.mme_realm); - } - - query_length += sprintf(&query[query_length], "UPDATE `users`%s SET ", - ul_push_p->mme_identity_present == MME_IDENTITY_PRESENT ? - ",`mmeidentity`" : ""); - - if (ul_push_p->imei_present == IMEI_PRESENT) { - query_length += sprintf(&query[query_length], "`imei`='%s',", - ul_push_p->imei); - } - - if (ul_push_p->sv_present == SV_PRESENT) { - query_length += sprintf(&query[query_length], "`imeisv`='%*s',", 2, - ul_push_p->software_version); - } - - if (ul_push_p->mme_identity_present == MME_IDENTITY_PRESENT) { - query_length += sprintf(&query[query_length], - "`users`.`mmeidentity_idmmeidentity`=`mmeidentity`.`idmmeidentity`, " - "`users`.`ms_ps_status`=\"NOT_PURGED\""); - } - - query_length += sprintf(&query[query_length], " WHERE `users`.`imsi`='%s'", - ul_push_p->imsi); - - if (ul_push_p->mme_identity_present == MME_IDENTITY_PRESENT) { - query_length += sprintf(&query[query_length], - " AND `mmeidentity`.`mmehost`='%s'" - " AND `mmeidentity`.`mmerealm`='%s'", - ul_push_p->mme_identity.mme_host, ul_push_p->mme_identity.mme_realm); - } - - DB_DEBUG("Query: %s\n", query); - - pthread_mutex_lock(&db_desc->db_cs_mutex); - - if (mysql_query(db_desc->db_conn, query)) { - pthread_mutex_unlock(&db_desc->db_cs_mutex); - fprintf(stderr, "Query execution failed: %s\n", - mysql_error(db_desc->db_conn)); - mysql_thread_end(); - return EINVAL; - } - - /* process each statement result */ - do { - /* did current statement return data? */ - res = mysql_store_result(db_desc->db_conn); - - if (res) { - /* yes; process rows and free the result set */ - mysql_free_result(res); - } else { /* no result set or error */ - if (mysql_field_count(db_desc->db_conn) == 0) { - DB_ERROR("%lld rows affected\n", - mysql_affected_rows(db_desc->db_conn)); - } else { /* some error occurred */ - DB_ERROR("Could not retrieve result set\n"); - break; - } - } - - /* more results? -1 = no, >0 = error, 0 = yes (keep looping) */ - if ((status = mysql_next_result(db_desc->db_conn)) > 0) - DB_ERROR("Could not execute statement\n"); - } while (status == 0); - - pthread_mutex_unlock(&db_desc->db_cs_mutex); - - mysql_free_result(res); - mysql_thread_end(); - - return 0; -} - -int hss_mysql_push_rand_sqn(const char *imsi, uint8_t *rand_p, uint8_t *sqn) -{ - int status = 0, i; - MYSQL_RES *res; - char query[1000]; - int query_length = 0; - uint64_t sqn_decimal = 0; - - if (db_desc->db_conn == NULL) { - return EINVAL; - } - - if (rand_p == NULL || sqn == NULL) { - return EINVAL; - } - - sqn_decimal = ((uint64_t)sqn[0] << 40) | ((uint64_t)sqn[1] << 32) | - ((uint64_t)sqn[2] << 24) | (sqn[3] << 16) | - (sqn[4] << 8) | sqn[5]; - - query_length = sprintf(query, "UPDATE `users` SET `rand`=UNHEX('"); - - for (i = 0; i < RAND_LENGTH; i ++) { - query_length += sprintf(&query[query_length], "%02x", rand_p[i]); - } - - query_length += sprintf(&query[query_length], "'),`sqn`=%"PRIu64, sqn_decimal); - query_length += sprintf(&query[query_length], " WHERE `users`.`imsi`='%s'", imsi); - - DB_DEBUG("Query: %s\n", query); - - pthread_mutex_lock(&db_desc->db_cs_mutex); - - if (mysql_query(db_desc->db_conn, query)) { - pthread_mutex_unlock(&db_desc->db_cs_mutex); - DB_ERROR("Query execution failed: %s\n", - mysql_error(db_desc->db_conn)); - mysql_thread_end(); - return EINVAL; - } - - /* process each statement result */ - do { - /* did current statement return data? */ - res = mysql_store_result(db_desc->db_conn); - - if (res) { - /* yes; process rows and free the result set */ - mysql_free_result(res); - } else { /* no result set or error */ - if (mysql_field_count(db_desc->db_conn) == 0) { - DB_ERROR("%lld rows affected\n", - mysql_affected_rows(db_desc->db_conn)); - } else { /* some error occurred */ - DB_ERROR("Could not retrieve result set\n"); - break; - } - } - - /* more results? -1 = no, >0 = error, 0 = yes (keep looping) */ - if ((status = mysql_next_result(db_desc->db_conn)) > 0) - DB_ERROR("Could not execute statement\n"); - } while (status == 0); - - pthread_mutex_unlock(&db_desc->db_cs_mutex); - - mysql_free_result(res); - mysql_thread_end(); - - return 0; -} - -int hss_mysql_increment_sqn(const char *imsi) -{ - int status; - MYSQL_RES *res; - char query[1000]; - - if (db_desc->db_conn == NULL) { - return EINVAL; - } - - if (imsi == NULL) { - return EINVAL; - } - - /* + 32 = 2 ^ sizeof(IND) (see 3GPP TS. 33.102) */ - sprintf(query, "UPDATE `users` SET `sqn` = `sqn` + 32 WHERE `users`.`imsi`=%s", imsi); - - DB_DEBUG("Query: %s\n", query); - - if (mysql_query(db_desc->db_conn, query)) { - pthread_mutex_unlock(&db_desc->db_cs_mutex); - DB_ERROR("Query execution failed: %s\n", - mysql_error(db_desc->db_conn)); - mysql_thread_end(); - return EINVAL; - } - - /* process each statement result */ - do { - /* did current statement return data? */ - res = mysql_store_result(db_desc->db_conn); - - if (res) { - /* yes; process rows and free the result set */ - mysql_free_result(res); - } else { /* no result set or error */ - if (mysql_field_count(db_desc->db_conn) == 0) { - DB_ERROR("%lld rows affected\n", - mysql_affected_rows(db_desc->db_conn)); - } else { /* some error occurred */ - DB_ERROR("Could not retrieve result set\n"); - break; - } - } - - /* more results? -1 = no, >0 = error, 0 = yes (keep looping) */ - if ((status = mysql_next_result(db_desc->db_conn)) > 0) - DB_ERROR("Could not execute statement\n"); - } while (status == 0); - - pthread_mutex_unlock(&db_desc->db_cs_mutex); - - mysql_free_result(res); - mysql_thread_end(); - - return 0; -} - -int hss_mysql_auth_info(mysql_auth_info_req_t *auth_info_req, - mysql_auth_info_resp_t *auth_info_resp) -{ - int ret = 0; - MYSQL_RES *res; - MYSQL_ROW row; - char query[1000]; - - if (db_desc->db_conn == NULL) { - return EINVAL; - } - - if ((auth_info_req == NULL) || (auth_info_resp == NULL)) { - return EINVAL; - } - - sprintf(query, "SELECT `key`,`sqn`,`rand`,`OPc` FROM `users` WHERE `users`.`imsi`=%s ", - auth_info_req->imsi); - - DB_DEBUG("Query: %s\n", query); - - pthread_mutex_lock(&db_desc->db_cs_mutex); - - if (mysql_query(db_desc->db_conn, query)) { - pthread_mutex_unlock(&db_desc->db_cs_mutex); - DB_ERROR("Query execution failed: %s\n", - mysql_error(db_desc->db_conn)); - mysql_thread_end(); - return EINVAL; - } - - res = mysql_store_result(db_desc->db_conn); - - pthread_mutex_unlock(&db_desc->db_cs_mutex); - - if ((row = mysql_fetch_row(res)) != NULL) { - if (row[0] == NULL || row[1] == NULL || row[2] == NULL || row[3] == NULL) { - ret = EINVAL; - } - - if (row[0] != NULL) { - print_buffer("Key: ", (uint8_t*)row[0], KEY_LENGTH); - memcpy(auth_info_resp->key, row[0], KEY_LENGTH); - } - - if (row[1] != NULL) { - uint64_t sqn = 0; - - sqn = atoll(row[1]); - printf("Received SQN %s converted to %"PRIu64"\n", row[1], sqn); - - auth_info_resp->sqn[0] = (sqn & (255UL << 40)) >> 40; - auth_info_resp->sqn[1] = (sqn & (255UL << 32)) >> 32; - auth_info_resp->sqn[2] = (sqn & (255UL << 24)) >> 24; - auth_info_resp->sqn[3] = (sqn & (255UL << 16)) >> 16; - auth_info_resp->sqn[4] = (sqn & (255UL << 8)) >> 8; - auth_info_resp->sqn[5] = (sqn & 0xFF); - - print_buffer("SQN: ", auth_info_resp->sqn, SQN_LENGTH); - } - - if (row[2] != NULL) { - print_buffer("RAND: ", (uint8_t*)row[2], RAND_LENGTH); - memcpy(auth_info_resp->rand, row[2], RAND_LENGTH); - } - - if (row[3] != NULL) { - print_buffer("OPc: ", (uint8_t*)row[3], KEY_LENGTH); - memcpy(auth_info_resp->opc, row[3], KEY_LENGTH); - } - - mysql_free_result(res); - mysql_thread_end(); - return ret; - } - - mysql_free_result(res); - mysql_thread_end(); - - return EINVAL; -} - -int hss_mysql_check_opc_keys(const uint8_t const opP[16]) -{ - int ret = 0; - MYSQL_RES *res = NULL; - MYSQL_RES *res2 = NULL; - MYSQL_ROW row; - char query[1000]; - char update[1000]; - uint8_t k[16]; - uint8_t opc[16]; - int update_length = 0; - int status = 0; - int i; - - if (db_desc->db_conn == NULL) { - return EINVAL; - } - - sprintf(query, "SELECT `imsi`,`key`,`OPc` FROM `users` "); - - DB_DEBUG("Query: %s\n", query); - - pthread_mutex_lock(&db_desc->db_cs_mutex); - - if (mysql_query(db_desc->db_conn, query)) { - pthread_mutex_unlock(&db_desc->db_cs_mutex); - DB_ERROR("Query execution failed: %s\n", - mysql_error(db_desc->db_conn)); - mysql_thread_end(); - return EINVAL; - } - - res = mysql_store_result(db_desc->db_conn); - - pthread_mutex_unlock(&db_desc->db_cs_mutex); - - - while ((row = mysql_fetch_row(res))) { - if (row[0] == NULL || row[1] == NULL ) { - DB_ERROR("Query execution failed: %s\n", - mysql_error(db_desc->db_conn)); - ret = EINVAL; - } else { - if (row[0] != NULL) { - printf("IMSI: %s", (uint8_t*)row[0]); - } - if (row[1] != NULL) { - print_buffer("Key: ", (uint8_t*)row[1], KEY_LENGTH); - memcpy(k, row[1], KEY_LENGTH); - } - //if (row[3] != NULL) - { - print_buffer("OPc: ", (uint8_t*)row[2], KEY_LENGTH); - //} else { - ComputeOPc( k, opP, opc); - update_length = sprintf(update, "UPDATE `users` SET `OPc`=UNHEX('"); - for (i = 0; i < KEY_LENGTH; i ++) { - update_length += sprintf(&update[update_length], "%02x", opc[i]); - } - update_length += sprintf(&update[update_length], "') WHERE `users`.`imsi`='%s'", (uint8_t*)row[0]); - DB_DEBUG("Query: %s\n", update); - - if (mysql_query(db_desc->db_conn, update)) { - DB_ERROR("Query execution failed: %s\n", - mysql_error(db_desc->db_conn)); - } else { - printf("IMSI %s Updated OPc ", (uint8_t*)row[0]); - for (i = 0; i < KEY_LENGTH; i ++) { - printf("%02x", (uint8_t)(row[2][i])); - } - printf(" -> "); - for (i = 0; i < KEY_LENGTH; i ++) { - printf("%02x", opc[i]); - } - printf("\n"); - - /* process each statement result */ - do { - /* did current statement return data? */ - res2 = mysql_store_result(db_desc->db_conn); - - if (res2) { - /* yes; process rows and free the result set */ - mysql_free_result(res2); - } else { /* no result set or error */ - if (mysql_field_count(db_desc->db_conn) == 0) { - DB_ERROR("%lld rows affected\n", - mysql_affected_rows(db_desc->db_conn)); - } else { /* some error occurred */ - DB_ERROR("Could not retrieve result set\n"); - break; - } - } - - /* more results? -1 = no, >0 = error, 0 = yes (keep looping) */ - if ((status = mysql_next_result(db_desc->db_conn)) > 0) - DB_ERROR("Could not execute statement\n"); - } while (status == 0); - } - } - } - } - - mysql_free_result(res); - mysql_thread_end(); - - return ret; - -} - - diff --git a/openair-cn/OPENAIRHSS/db/db_epc_equipment.c b/openair-cn/OPENAIRHSS/db/db_epc_equipment.c deleted file mode 100644 index 8b6c430e7c..0000000000 --- a/openair-cn/OPENAIRHSS/db/db_epc_equipment.c +++ /dev/null @@ -1,136 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "hss_config.h" -#include "db_proto.h" - -int hss_mysql_query_mmeidentity(const int id_mme_identity, - mysql_mme_identity_t *mme_identity_p) -{ - MYSQL_RES *res; - MYSQL_ROW row; - char query[1000]; - - if ((db_desc->db_conn == NULL) || (mme_identity_p == NULL)) { - return EINVAL; - } - - memset(mme_identity_p, 0, sizeof(mysql_mme_identity_t)); - - sprintf(query, "SELECT mmehost,mmerealm FROM mmeidentity WHERE " - "mmeidentity.idmmeidentity='%d' ", id_mme_identity); - - DB_DEBUG("Query: %s\n", query); - - pthread_mutex_lock(&db_desc->db_cs_mutex); - - if (mysql_query(db_desc->db_conn, query)) { - pthread_mutex_unlock(&db_desc->db_cs_mutex); - DB_ERROR("Query execution failed: %s\n", - mysql_error(db_desc->db_conn)); - mysql_thread_end(); - return EINVAL; - } - - res = mysql_store_result(db_desc->db_conn); - - pthread_mutex_unlock(&db_desc->db_cs_mutex); - - if ((row = mysql_fetch_row(res)) != NULL) { - if (row[0] != NULL) { - memcpy(mme_identity_p->mme_host, row[0], strlen(row[0])); - } else { - mme_identity_p->mme_host[0] = '\0'; - } - - if (row[1] != NULL) { - memcpy(mme_identity_p->mme_realm, row[1], strlen(row[1])); - } else { - mme_identity_p->mme_realm[0] = '\0'; - } - - mysql_free_result(res); - mysql_thread_end(); - return 0; - } - - mysql_free_result(res); - mysql_thread_end(); - return EINVAL; -} - -int hss_mysql_check_epc_equipment(mysql_mme_identity_t *mme_identity_p) -{ - MYSQL_RES *res; - MYSQL_ROW row; - char query[1000]; - - if ((db_desc->db_conn == NULL) || (mme_identity_p == NULL)) { - return EINVAL; - } - - sprintf(query, "SELECT idmmeidentity FROM mmeidentity WHERE mmeidentity.mmehost='%s' ", - mme_identity_p->mme_host); - - DB_DEBUG("Query: %s\n", query); - - pthread_mutex_lock(&db_desc->db_cs_mutex); - - if (mysql_query(db_desc->db_conn, query)) { - pthread_mutex_unlock(&db_desc->db_cs_mutex); - DB_ERROR("Query execution failed: %s\n", - mysql_error(db_desc->db_conn)); - mysql_thread_end(); - return EINVAL; - } - - res = mysql_store_result(db_desc->db_conn); - - pthread_mutex_unlock(&db_desc->db_cs_mutex); - - if ((row = mysql_fetch_row(res)) != NULL) { - mysql_free_result(res); - mysql_thread_end(); - return 0; - } - - mysql_free_result(res); - mysql_thread_end(); - return EINVAL; -} diff --git a/openair-cn/OPENAIRHSS/db/db_proto.h b/openair-cn/OPENAIRHSS/db/db_proto.h deleted file mode 100644 index d87ed461e5..0000000000 --- a/openair-cn/OPENAIRHSS/db/db_proto.h +++ /dev/null @@ -1,206 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -#include -#include -#include -#include - -#include /* To provide internet addresses strings helpers */ - -#ifndef DB_PROTO_H_ -#define DB_PROTO_H_ - -#define DB_DEBUG(fmt, args...) fprintf(stdout, "%s:%d: "fmt, __FILE__, __LINE__, ##args) -#define DB_ERROR(fmt, args...) fprintf(stderr, "%s:%d: "fmt, __FILE__, __LINE__, ##args) - -typedef struct { - /* The mysql reference connector object */ - MYSQL *db_conn; - char *server; - char *user; - char *password; - char *database; - - pthread_mutex_t db_cs_mutex; -} database_t; - -extern database_t *db_desc; - -typedef uint32_t pre_emp_vul_t; -typedef uint32_t pre_emp_cap_t; -typedef uint8_t access_restriction_t; -typedef uint32_t ambr_t; -typedef uint8_t qci_t; -typedef uint8_t prio_level_t; -typedef uint32_t rau_tau_t; - -#define IMSI_LENGTH_MAX (15) - -typedef struct { - char imsi[IMSI_LENGTH_MAX + 1]; -} mysql_auth_info_req_t; - -/* Expressed in bytes */ -#define KEY_LENGTH (16) -#define SQN_LENGTH (6) -#define RAND_LENGTH (16) - -typedef struct mysql_auth_info_resp_s{ - uint8_t key[KEY_LENGTH]; - uint8_t sqn[SQN_LENGTH]; - /* RAND should not be here... */ - uint8_t rand[RAND_LENGTH]; - uint8_t opc[KEY_LENGTH]; -} mysql_auth_info_resp_t; - -typedef struct mysql_opc_push_s{ - char imsi[IMSI_LENGTH_MAX + 1]; - /* New computed SQN that will be used on next auth info req */ - uint8_t sqn[SQN_LENGTH]; -} mysql_opc_push_t; - -typedef struct mysql_sqn_push_s{ - char imsi[IMSI_LENGTH_MAX + 1]; - /* New computed SQN that will be used on next auth info req */ - uint8_t sqn[SQN_LENGTH]; -} mysql_sqn_push_t; - -typedef struct mysql_mme_identity_s{ - /* An MME may have already been registered as serving the UE. */ - char mme_host[255]; - char mme_realm[200]; -} mysql_mme_identity_t; - -typedef struct mysql_ul_ans_s{ - char imsi[16]; - /* MSISDN this parameter may be NULL */ - char msisdn[16]; - - /* Maximum aggregated bitrates for the user */ - ambr_t aggr_ul; - ambr_t aggr_dl; - - /* Subscribed RAU-TAU timer */ - rau_tau_t rau_tau; - - access_restriction_t access_restriction; - mysql_mme_identity_t mme_identity; -} mysql_ul_ans_t; - -typedef struct mysql_ul_push_s{ - /* Bit masks indicating presence of optional fields */ -#define MME_IDENTITY_PRESENT (0x1) -#define MME_SUPPORTED_FEATURES_PRESENT (0x1) -#define IMEI_PRESENT (0x1) -#define SV_PRESENT (0x1) -#define UE_SRVCC_PRESENT (0x1) - - unsigned mme_identity_present:1; - unsigned mme_supported_features_present:1; - unsigned imei_present:1; - unsigned sv_present:1; - unsigned ue_srvcc_present:1; - - /* IMSI */ - char imsi[16]; - /* Origin host and realm */ - mysql_mme_identity_t mme_identity; - /* IMEISV */ - char imei[16]; - char software_version[2]; - - uint32_t ue_srvcc; - uint32_t mme_supported_features; -} mysql_ul_push_t; - -typedef enum { - IPV4 = 0, - IPV6 = 1, - IPV4V6 = 2, - IPV4_OR_IPV6 = 3, -} pdn_type_t; - -typedef struct pdn_address_s{ - char ipv4_address[INET_ADDRSTRLEN]; - char ipv6_address[INET6_ADDRSTRLEN]; -} pdn_address_t; - -typedef struct mysql_pdn_s{ - char apn[61]; - pdn_type_t pdn_type; - pdn_address_t pdn_address; - ambr_t aggr_ul; - ambr_t aggr_dl; - qci_t qci; - prio_level_t priority_level; - pre_emp_cap_t pre_emp_cap; - pre_emp_vul_t pre_emp_vul; -} mysql_pdn_t; - -typedef struct mysql_pu_req_s{ - /* IMSI */ - char imsi[16]; -} mysql_pu_req_t; - -typedef mysql_mme_identity_t mysql_pu_ans_t; - -int hss_mysql_connect(const hss_config_t *hss_config_p); - -void hss_mysql_disconnect(void); - -int hss_mysql_get_user(const char *imsi); - -int hss_mysql_update_loc(const char *imsi, mysql_ul_ans_t *mysql_ul_ans); - -int hss_mysql_query_mmeidentity(const int id_mme_identity, - mysql_mme_identity_t *mme_identity_p); - -int hss_mysql_check_epc_equipment(mysql_mme_identity_t *mme_identity_p); - -int mysql_push_up_loc(mysql_ul_push_t *ul_push_p); - -int hss_mysql_purge_ue(mysql_pu_req_t *mysql_pu_req, - mysql_pu_ans_t *mysql_pu_ans); - -int hss_mysql_query_pdns(const char *imsi, - mysql_pdn_t **pdns_p, - uint8_t *nb_pdns); - -int hss_mysql_auth_info(mysql_auth_info_req_t *auth_info_req, - mysql_auth_info_resp_t *auth_info_resp); - -int hss_mysql_push_rand_sqn(const char *imsi, uint8_t *rand_p, uint8_t *sqn); - -int hss_mysql_increment_sqn(const char *imsi); - -int hss_mysql_check_opc_keys(const uint8_t const opP[16]); - - -#endif /* DB_PROTO_H_ */ diff --git a/openair-cn/OPENAIRHSS/db/db_subscription_data.c b/openair-cn/OPENAIRHSS/db/db_subscription_data.c deleted file mode 100644 index dc06a011a8..0000000000 --- a/openair-cn/OPENAIRHSS/db/db_subscription_data.c +++ /dev/null @@ -1,171 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "hss_config.h" -#include "db_proto.h" - -int hss_mysql_query_pdns(const char *imsi, - mysql_pdn_t **pdns_p, - uint8_t *nb_pdns) -{ - int ret; - MYSQL_RES *res = NULL; - MYSQL_ROW row; - char query[1000]; - mysql_pdn_t *pdn_array = NULL; - - if (db_desc->db_conn == NULL) { - return EINVAL; - } - - if (nb_pdns == NULL || pdns_p == NULL) { - return EINVAL; - } - - sprintf(query, "SELECT * FROM `pdn` WHERE " - "`pdn`.`users_imsi`=%s LIMIT 10; ", imsi); - - printf("Query: %s\n", query); - - pthread_mutex_lock(&db_desc->db_cs_mutex); - - if (mysql_query(db_desc->db_conn, query)) { - pthread_mutex_unlock(&db_desc->db_cs_mutex); - fprintf(stderr, "Query execution failed: %s\n", - mysql_error(db_desc->db_conn)); - mysql_thread_end(); - return EINVAL; - } - - res = mysql_store_result(db_desc->db_conn); - - pthread_mutex_unlock(&db_desc->db_cs_mutex); - - *nb_pdns = 0; - - while ((row = mysql_fetch_row(res)) != NULL) { - mysql_pdn_t *pdn_elm; /* Local PDN element in array */ - unsigned long *lengths; - - lengths = mysql_fetch_lengths(res); - - *nb_pdns += 1; - - if (*nb_pdns == 1) { - /* First row, must malloc */ - pdn_array = malloc(sizeof(mysql_pdn_t)); - } else { - pdn_array = realloc(pdn_array, *nb_pdns * sizeof(mysql_pdn_t)); - } - - if (pdn_array == NULL) { - /* Error on malloc */ - ret = ENOMEM; - goto err; - } - - pdn_elm = &pdn_array[*nb_pdns - 1]; - /* Copying the APN */ - memset(pdn_elm, 0, sizeof(mysql_pdn_t)); - memcpy(pdn_elm->apn, row[1], lengths[1]); - - /* PDN Type + PDN address */ - if (strcmp(row[2], "IPv6") == 0) { - pdn_elm->pdn_type = IPV6; - memcpy(pdn_elm->pdn_address.ipv6_address, row[4], lengths[4]); - pdn_elm->pdn_address.ipv6_address[lengths[4]] = '\0'; - } else if (strcmp(row[2], "IPv4v6") == 0) { - pdn_elm->pdn_type = IPV4V6; - memcpy(pdn_elm->pdn_address.ipv4_address, row[3], lengths[3]); - pdn_elm->pdn_address.ipv4_address[lengths[3]] = '\0'; - memcpy(pdn_elm->pdn_address.ipv6_address, row[4], lengths[4]); - pdn_elm->pdn_address.ipv6_address[lengths[4]] = '\0'; - } else if (strcmp(row[2], "IPv4_or_IPv6") == 0) { - pdn_elm->pdn_type = IPV4_OR_IPV6; - memcpy(pdn_elm->pdn_address.ipv4_address, row[3], lengths[3]); - pdn_elm->pdn_address.ipv4_address[lengths[3]] = '\0'; - memcpy(pdn_elm->pdn_address.ipv6_address, row[4], lengths[4]); - pdn_elm->pdn_address.ipv6_address[lengths[4]] = '\0'; - } else { - pdn_elm->pdn_type = IPV4; - memcpy(pdn_elm->pdn_address.ipv4_address, row[3], lengths[3]); - pdn_elm->pdn_address.ipv4_address[lengths[3]] = '\0'; - } - - pdn_elm->aggr_ul = atoi(row[5]); - pdn_elm->aggr_dl = atoi(row[6]); - pdn_elm->qci = atoi(row[9]); - pdn_elm->priority_level = atoi(row[10]); - - if (strcmp(row[11], "ENABLED") == 0) { - pdn_elm->pre_emp_cap = 0; - } else { - pdn_elm->pre_emp_cap = 1; - } - - if (strcmp(row[12], "DISABLED") == 0) { - pdn_elm->pre_emp_vul = 1; - } else { - pdn_elm->pre_emp_vul = 0; - } - } - - mysql_free_result(res); - mysql_thread_end(); - - /* We did not find any APN for the requested IMSI */ - if (*nb_pdns == 0) { - return EINVAL; - } else { - *pdns_p = pdn_array; - return 0; - } - -err: - - if (pdn_array) { - free(pdn_array); - } - - pdn_array = NULL; - *pdns_p = pdn_array; - *nb_pdns = 0; - mysql_free_result(res); - mysql_thread_end(); - return ret; -} diff --git a/openair-cn/OPENAIRHSS/db/oai_db.sql b/openair-cn/OPENAIRHSS/db/oai_db.sql deleted file mode 100644 index c763ce4afb..0000000000 --- a/openair-cn/OPENAIRHSS/db/oai_db.sql +++ /dev/null @@ -1,175 +0,0 @@ --- phpMyAdmin SQL Dump --- version 4.0.10deb1 --- http://www.phpmyadmin.net --- --- Host: localhost --- Generation Time: May 28, 2015 at 02:32 PM --- Server version: 5.5.43-0ubuntu0.14.04.1 --- PHP Version: 5.5.9-1ubuntu4.9 - -SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; -SET time_zone = "+00:00"; - - -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; -/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; - --- --- Database: `oai_db` --- - --- -------------------------------------------------------- - --- --- Table structure for table `apn` --- - -CREATE TABLE IF NOT EXISTS `apn` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `apn-name` varchar(60) NOT NULL, - `pdn-type` enum('IPv4','IPv6','IPv4v6','IPv4_or_IPv6') NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `apn-name` (`apn-name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; - --- -------------------------------------------------------- - --- --- Table structure for table `mmeidentity` --- - -CREATE TABLE IF NOT EXISTS `mmeidentity` ( - `idmmeidentity` int(11) NOT NULL AUTO_INCREMENT, - `mmehost` varchar(255) DEFAULT NULL, - `mmerealm` varchar(200) DEFAULT NULL, - `UE-Reachability` tinyint(1) NOT NULL COMMENT 'Indicates whether the MME supports UE Reachability Notifcation', - PRIMARY KEY (`idmmeidentity`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=43 ; - --- --- Dumping data for table `mmeidentity` --- - -INSERT INTO `mmeidentity` (`idmmeidentity`, `mmehost`, `mmerealm`, `UE-Reachability`) VALUES -(2, 'yang.openair4G.eur', 'openair4G.eur', 0), -(1, 'ng40-erc.openair4G.eur', 'openair4G.eur', 0); - --- -------------------------------------------------------- - --- --- Table structure for table `pdn` --- - -CREATE TABLE IF NOT EXISTS `pdn` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `apn` varchar(60) NOT NULL, - `pdn_type` enum('IPv4','IPv6','IPv4v6','IPv4_or_IPv6') NOT NULL DEFAULT 'IPv4', - `pdn_ipv4` varchar(15) DEFAULT '0.0.0.0', - `pdn_ipv6` varchar(45) CHARACTER SET latin1 COLLATE latin1_general_ci DEFAULT '0:0:0:0:0:0:0:0', - `aggregate_ambr_ul` int(10) unsigned DEFAULT '50000000', - `aggregate_ambr_dl` int(10) unsigned DEFAULT '100000000', - `pgw_id` int(11) NOT NULL, - `users_imsi` varchar(15) NOT NULL, - `qci` tinyint(3) unsigned NOT NULL DEFAULT '9', - `priority_level` tinyint(3) unsigned NOT NULL DEFAULT '15', - `pre_emp_cap` enum('ENABLED','DISABLED') DEFAULT 'DISABLED', - `pre_emp_vul` enum('ENABLED','DISABLED') DEFAULT 'DISABLED', - `LIPA-Permissions` enum('LIPA-prohibited','LIPA-only','LIPA-conditional') NOT NULL DEFAULT 'LIPA-only', - PRIMARY KEY (`id`,`pgw_id`,`users_imsi`), - KEY `fk_pdn_pgw1_idx` (`pgw_id`), - KEY `fk_pdn_users1_idx` (`users_imsi`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=36 ; - --- --- Dumping data for table `pdn` --- - -INSERT INTO `pdn` (`id`, `apn`, `pdn_type`, `pdn_ipv4`, `pdn_ipv6`, `aggregate_ambr_ul`, `aggregate_ambr_dl`, `pgw_id`, `users_imsi`, `qci`, `priority_level`, `pre_emp_cap`, `pre_emp_vul`, `LIPA-Permissions`) VALUES -(1, 'oai.ipv4', 'IPv4', '0.0.0.0', '0:0:0:0:0:0:0:0', 50000000, 100000000, 3, '208930000000001', 9, 15, 'DISABLED', 'ENABLED', 'LIPA-only'), -(11, 'oai.ipv4', 'IPv4', '0.0.0.0', '0:0:0:0:0:0:0:0', 50000000, 100000000, 3, '20834123456789', 9, 15, 'DISABLED', 'ENABLED', 'LIPA-only'), -(10, 'oai.ipv4', 'IPv4', '0.0.0.0', '0:0:0:0:0:0:0:0', 50000000, 100000000, 3, '20810000001234', 9, 15, 'DISABLED', 'ENABLED', 'LIPA-only'), -(12, 'oai.ipv4', 'IPv4', '0.0.0.0', '0:0:0:0:0:0:0:0', 50000000, 100000000, 3, '31002890832150', 9, 15, 'DISABLED', 'ENABLED', 'LIPA-only'), -(2, 'oai.ipv4', 'IPv4', '0.0.0.0', '0:0:0:0:0:0:0:0', 50000000, 100000000, 3, '208950000000002', 9, 15, 'DISABLED', 'ENABLED', 'LIPA-only'), -(3, 'oai.ipv4', 'IPv4', '0.0.0.0', '0:0:0:0:0:0:0:0', 50000000, 100000000, 3, '001010123456789', 9, 15, 'DISABLED', 'ENABLED', 'LIPA-only'); - --- -------------------------------------------------------- - --- --- Table structure for table `pgw` --- - -CREATE TABLE IF NOT EXISTS `pgw` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `ipv4` varchar(15) NOT NULL, - `ipv6` varchar(39) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `ipv4` (`ipv4`), - UNIQUE KEY `ipv6` (`ipv6`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; - --- --- Dumping data for table `pgw` --- - -INSERT INTO `pgw` (`id`, `ipv4`, `ipv6`) VALUES -(1, '127.0.0.1', '0:0:0:0:0:0:0:1'), -(2, '192.168.56.101', ''), -(3, '10.0.0.2', '0'); - --- -------------------------------------------------------- - --- --- Table structure for table `terminal-info` --- - -CREATE TABLE IF NOT EXISTS `terminal-info` ( - `imei` varchar(15) NOT NULL, - `sv` varchar(2) NOT NULL, - UNIQUE KEY `imei` (`imei`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; - --- -------------------------------------------------------- - --- --- Table structure for table `users` --- - -CREATE TABLE IF NOT EXISTS `users` ( - `imsi` varchar(15) NOT NULL COMMENT 'IMSI is the main reference key.', - `msisdn` varchar(46) DEFAULT NULL COMMENT 'The basic MSISDN of the UE (Presence of MSISDN is optional).', - `imei` varchar(15) DEFAULT NULL COMMENT 'International Mobile Equipment Identity', - `imei_sv` varchar(2) DEFAULT NULL COMMENT 'International Mobile Equipment Identity Software Version Number', - `ms_ps_status` enum('PURGED','NOT_PURGED') DEFAULT 'PURGED' COMMENT 'Indicates that ESM and EMM status are purged from MME', - `rau_tau_timer` int(10) unsigned DEFAULT '120', - `ue_ambr_ul` bigint(20) unsigned DEFAULT '50000000' COMMENT 'The Maximum Aggregated uplink MBRs to be shared across all Non-GBR bearers according to the subscription of the user.', - `ue_ambr_dl` bigint(20) unsigned DEFAULT '100000000' COMMENT 'The Maximum Aggregated downlink MBRs to be shared across all Non-GBR bearers according to the subscription of the user.', - `access_restriction` int(10) unsigned DEFAULT '60' COMMENT 'Indicates the access restriction subscription information. 3GPP TS.29272 #7.3.31', - `mme_cap` int(10) unsigned zerofill DEFAULT NULL COMMENT 'Indicates the capabilities of the MME with respect to core functionality e.g. regional access restrictions.', - `mmeidentity_idmmeidentity` int(11) NOT NULL DEFAULT '0', - `key` varbinary(16) NOT NULL DEFAULT '0' COMMENT 'UE security key', - `RFSP-Index` smallint(5) unsigned NOT NULL DEFAULT '1' COMMENT 'An index to specific RRM configuration in the E-UTRAN. Possible values from 1 to 256', - `urrp_mme` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'UE Reachability Request Parameter indicating that UE activity notification from MME has been requested by the HSS.', - `sqn` bigint(20) unsigned zerofill NOT NULL, - `rand` varbinary(16) NOT NULL, - `OPc` varbinary(16) DEFAULT NULL COMMENT 'Can be computed by HSS', - PRIMARY KEY (`imsi`,`mmeidentity_idmmeidentity`), - KEY `fk_users_mmeidentity_idx1` (`mmeidentity_idmmeidentity`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - --- --- Dumping data for table `users` --- - -INSERT INTO `users` (`imsi`, `msisdn`, `imei`, `imei_sv`, `ms_ps_status`, `rau_tau_timer`, `ue_ambr_ul`, `ue_ambr_dl`, `access_restriction`, `mme_cap`, `mmeidentity_idmmeidentity`, `key`, `RFSP-Index`, `urrp_mme`, `sqn`, `rand`, `OPc`) VALUES -('20834123456789', '380561234567', '12345678', '23', 'PURGED', 50, 40000000, 100000000, 47, 0000000000, 2, '+ÖEŸ‚ų\0•,IH�ÿH', 0, 0, 00000000000000000096, 'Px¼X \Z1¡Éx™ß', 'gí��jS+Aq„‘§6Y'), -('20810000001234', '33611123456', NULL, NULL, 'PURGED', 120, 40000000, 100000000, 47, 0000000000, 2, '‹¯G?/�Д‡ÌË× |hb', 1, 0, 00000281454575616097, 'sËÚæ$r®C¹f‰=:¾xÞ', 'Ž''¶¯i.u2fz;`]'), -('31002890832150', '33638060059', '35611302209414', NULL, 'PURGED', 120, 40000000, 100000000, 47, 0000000000, 2, '‹¯G?/�Д‡ÌË× |hb', 1, 0, 00000000000000012416, '`ÏF®Ý†ôéD¢¼Ï›‰Á¼', 'Ž''¶¯i.u2fz;`]'), -('001010123456789', '33600101789', NULL, NULL, 'PURGED', 120, 50000000, 100000000, 47, 0000000000, 2, '\0 \n \r', 1, 0, 00000000000000000351, '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0', '$À_|/+6�á%/%öÏÂ'), -('208930000000001', '33638060008', NULL, NULL, 'PURGED', 120, 50000000, 100000000, 47, 0000000000, 2, '‹¯G?/�Д‡ÌË× |hb', 1, 0, 00000000000000006103, 'ëÐwq¬ègzW®Ð�²áZ]', 'Ž''¶¯i.u2fz;`]'), -('208950000000002', '33638060009', NULL, NULL, 'PURGED', 120, 50000000, 100000000, 47, 0000000000, 2, '‹¯G?/�Д‡ÌË× |hb', 1, 0, 00000000000000006391, 'U¶|Ç w±DÌü\Z…7', 'Ž''¶¯i.u2fz;`]'); - -/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; -/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; -/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; diff --git a/openair-cn/OPENAIRHSS/db/pft_db.sql b/openair-cn/OPENAIRHSS/db/pft_db.sql deleted file mode 100644 index e2eb8bfaa6..0000000000 --- a/openair-cn/OPENAIRHSS/db/pft_db.sql +++ /dev/null @@ -1,173 +0,0 @@ --- phpMyAdmin SQL Dump --- version 4.0.10deb1 --- http://www.phpmyadmin.net --- --- Host: localhost --- Generation Time: May 28, 2015 at 02:24 PM --- Server version: 5.5.43-0ubuntu0.14.04.1 --- PHP Version: 5.5.9-1ubuntu4.9 - -SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; -SET time_zone = "+00:00"; - - -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; -/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; - --- --- Database: `oai_db` --- - --- -------------------------------------------------------- - --- --- Table structure for table `apn` --- - -CREATE TABLE IF NOT EXISTS `apn` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `apn-name` varchar(60) NOT NULL, - `pdn-type` enum('IPv4','IPv6','IPv4v6','IPv4_or_IPv6') NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `apn-name` (`apn-name`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; - --- -------------------------------------------------------- - --- --- Table structure for table `mmeidentity` --- - -CREATE TABLE IF NOT EXISTS `mmeidentity` ( - `idmmeidentity` int(11) NOT NULL AUTO_INCREMENT, - `mmehost` varchar(255) DEFAULT NULL, - `mmerealm` varchar(200) DEFAULT NULL, - `UE-Reachability` tinyint(1) NOT NULL COMMENT 'Indicates whether the MME supports UE Reachability Notifcation', - PRIMARY KEY (`idmmeidentity`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=43 ; - --- --- Dumping data for table `mmeidentity` --- - -INSERT INTO `mmeidentity` (`idmmeidentity`, `mmehost`, `mmerealm`, `UE-Reachability`) VALUES -(2, 'yang.openair4G.eur', 'openair4G.eur', 0), -(1, 'ng40-erc.openair4G.eur', 'openair4G.eur', 0); - --- -------------------------------------------------------- - --- --- Table structure for table `pdn` --- - -CREATE TABLE IF NOT EXISTS `pdn` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `apn` varchar(60) NOT NULL, - `pdn_type` enum('IPv4','IPv6','IPv4v6','IPv4_or_IPv6') NOT NULL DEFAULT 'IPv4', - `pdn_ipv4` varchar(15) DEFAULT '0.0.0.0', - `pdn_ipv6` varchar(45) CHARACTER SET latin1 COLLATE latin1_general_ci DEFAULT '0:0:0:0:0:0:0:0', - `aggregate_ambr_ul` int(10) unsigned DEFAULT '50000000', - `aggregate_ambr_dl` int(10) unsigned DEFAULT '100000000', - `pgw_id` int(11) NOT NULL, - `users_imsi` varchar(15) NOT NULL, - `qci` tinyint(3) unsigned NOT NULL DEFAULT '9', - `priority_level` tinyint(3) unsigned NOT NULL DEFAULT '15', - `pre_emp_cap` enum('ENABLED','DISABLED') DEFAULT 'DISABLED', - `pre_emp_vul` enum('ENABLED','DISABLED') DEFAULT 'DISABLED', - `LIPA-Permissions` enum('LIPA-prohibited','LIPA-only','LIPA-conditional') NOT NULL DEFAULT 'LIPA-only', - PRIMARY KEY (`id`,`pgw_id`,`users_imsi`), - KEY `fk_pdn_pgw1_idx` (`pgw_id`), - KEY `fk_pdn_users1_idx` (`users_imsi`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=36 ; - --- --- Dumping data for table `pdn` --- - -INSERT INTO `pdn` (`id`, `apn`, `pdn_type`, `pdn_ipv4`, `pdn_ipv6`, `aggregate_ambr_ul`, `aggregate_ambr_dl`, `pgw_id`, `users_imsi`, `qci`, `priority_level`, `pre_emp_cap`, `pre_emp_vul`, `LIPA-Permissions`) VALUES -(8, 'oai.ipv4', 'IPv4', '0.0.0.0', '0:0:0:0:0:0:0:0', 50000000, 100000000, 3, '208920000000008', 9, 15, 'DISABLED', 'ENABLED', 'LIPA-only'), -(9, 'oai.ipv4', 'IPv4', '0.0.0.0', '0:0:0:0:0:0:0:0', 50000000, 100000000, 3, '208920000000009', 9, 15, 'DISABLED', 'ENABLED', 'LIPA-only'), -(11, 'oai.ipv4', 'IPv4', '0.0.0.0', '0:0:0:0:0:0:0:0', 50000000, 100000000, 3, '208920000000053', 9, 15, 'DISABLED', 'ENABLED', 'LIPA-only'), -(12, 'oai.ipv4', 'IPv4', '0.0.0.0', '0:0:0:0:0:0:0:0', 50000000, 100000000, 3, '208920000000055', 9, 15, 'DISABLED', 'ENABLED', 'LIPA-only'), -(16, 'oai.ipv4', 'IPv4', '0.0.0.0', '0:0:0:0:0:0:0:0', 50000000, 100000000, 3, '208920000000054', 9, 15, 'DISABLED', 'ENABLED', 'LIPA-only'); - --- -------------------------------------------------------- - --- --- Table structure for table `pgw` --- - -CREATE TABLE IF NOT EXISTS `pgw` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `ipv4` varchar(15) NOT NULL, - `ipv6` varchar(39) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `ipv4` (`ipv4`), - UNIQUE KEY `ipv6` (`ipv6`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; - --- --- Dumping data for table `pgw` --- - -INSERT INTO `pgw` (`id`, `ipv4`, `ipv6`) VALUES -(1, '127.0.0.1', '0:0:0:0:0:0:0:1'), -(2, '192.168.56.101', ''), -(3, '10.0.0.2', '0'); - --- -------------------------------------------------------- - --- --- Table structure for table `terminal-info` --- - -CREATE TABLE IF NOT EXISTS `terminal-info` ( - `imei` varchar(15) NOT NULL, - `sv` varchar(2) NOT NULL, - UNIQUE KEY `imei` (`imei`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; - --- -------------------------------------------------------- - --- --- Table structure for table `users` --- - -CREATE TABLE IF NOT EXISTS `users` ( - `imsi` varchar(15) NOT NULL COMMENT 'IMSI is the main reference key.', - `msisdn` varchar(46) DEFAULT NULL COMMENT 'The basic MSISDN of the UE (Presence of MSISDN is optional).', - `imei` varchar(15) DEFAULT NULL COMMENT 'International Mobile Equipment Identity', - `imei_sv` varchar(2) DEFAULT NULL COMMENT 'International Mobile Equipment Identity Software Version Number', - `ms_ps_status` enum('PURGED','NOT_PURGED') DEFAULT 'PURGED' COMMENT 'Indicates that ESM and EMM status are purged from MME', - `rau_tau_timer` int(10) unsigned DEFAULT '120', - `ue_ambr_ul` bigint(20) unsigned DEFAULT '50000000' COMMENT 'The Maximum Aggregated uplink MBRs to be shared across all Non-GBR bearers according to the subscription of the user.', - `ue_ambr_dl` bigint(20) unsigned DEFAULT '100000000' COMMENT 'The Maximum Aggregated downlink MBRs to be shared across all Non-GBR bearers according to the subscription of the user.', - `access_restriction` int(10) unsigned DEFAULT '60' COMMENT 'Indicates the access restriction subscription information. 3GPP TS.29272 #7.3.31', - `mme_cap` int(10) unsigned zerofill DEFAULT NULL COMMENT 'Indicates the capabilities of the MME with respect to core functionality e.g. regional access restrictions.', - `mmeidentity_idmmeidentity` int(11) NOT NULL DEFAULT '0', - `key` varbinary(16) NOT NULL DEFAULT '0' COMMENT 'UE security key', - `RFSP-Index` smallint(5) unsigned NOT NULL DEFAULT '1' COMMENT 'An index to specific RRM configuration in the E-UTRAN. Possible values from 1 to 256', - `urrp_mme` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'UE Reachability Request Parameter indicating that UE activity notification from MME has been requested by the HSS.', - `sqn` bigint(20) unsigned zerofill NOT NULL, - `rand` varbinary(16) NOT NULL, - `OPc` varbinary(16) DEFAULT NULL COMMENT 'Can be computed by HSS', - PRIMARY KEY (`imsi`,`mmeidentity_idmmeidentity`), - KEY `fk_users_mmeidentity_idx1` (`mmeidentity_idmmeidentity`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - --- --- Dumping data for table `users` --- - -INSERT INTO `users` (`imsi`, `msisdn`, `imei`, `imei_sv`, `ms_ps_status`, `rau_tau_timer`, `ue_ambr_ul`, `ue_ambr_dl`, `access_restriction`, `mme_cap`, `mmeidentity_idmmeidentity`, `key`, `RFSP-Index`, `urrp_mme`, `sqn`, `rand`, `OPc`) VALUES -('208920000000008', '33638060008', NULL, NULL, 'PURGED', 120, 40000000, 100000000, 47, 0000000000, 2, '‹¯G?/�Д‡ÌË× |hb', 1, 0, 00000000004294969388, '�™Iðj„�æ·>OƒO×K)', 'Ž''¶¯i.u2fz;`]'), -('208920000000009', '33638060009', NULL, NULL, 'PURGED', 120, 40000000, 100000000, 47, 0000000000, 2, '‹¯G?/�ДWdiHC×¾½', 1, 0, 00000000000000033361, '\ZM{™hÄÏ#‡\\*láà', '¾·¶¿xÈJ ø™ ÿ”'), -('208920000000053', '33638060053', '35611302209415', NULL, 'PURGED', 120, 40000000, 100000000, 47, 0000000000, 2, '‹¯G?/�Д6¦`FB&w', 1, 0, 00000000004294972622, 'o.Öq@Î#ë\0ï^�ñÌ4¿', 'O¢Ñ~¤ï çî˜ÀÉ­ÓÏ'), -('208920000000055', '33638060055', NULL, NULL, 'PURGED', 120, 40000000, 100000000, 47, 0000000000, 2, '‹¯G?/�ДM_^r v', 1, 0, 00000000004294969388, '�™Iðj„�æ·>OƒO×K)', 'NÓ0;ã­bCRÿÃòó_'), -('208920000000054', '33638060054', NULL, NULL, 'PURGED', 120, 40000000, 100000000, 47, 0000000000, 2, '‹¯G?/�ДM_^r v', 1, 0, 00000000000000039820, 'B@W®Ø´JUÙ°To½C', 'NÓ0;ã­bCRÿÃòó_'); - -/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; -/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; -/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; diff --git a/openair-cn/OPENAIRHSS/debian/changelog b/openair-cn/OPENAIRHSS/debian/changelog deleted file mode 100644 index 5ce3ffbc17..0000000000 --- a/openair-cn/OPENAIRHSS/debian/changelog +++ /dev/null @@ -1,5 +0,0 @@ -openair-hss (1.0.0-1) UNRELEASED; urgency=low - - * Initial release. (Closes: #XXXXXX) - - -- Sebastien Roux Wed, 10 Apr 2013 09:54:55 +0200 diff --git a/openair-cn/OPENAIRHSS/debian/compat b/openair-cn/OPENAIRHSS/debian/compat deleted file mode 100644 index c7930257df..0000000000 --- a/openair-cn/OPENAIRHSS/debian/compat +++ /dev/null @@ -1 +0,0 @@ -7 \ No newline at end of file diff --git a/openair-cn/OPENAIRHSS/debian/control b/openair-cn/OPENAIRHSS/debian/control deleted file mode 100644 index ff727b65fa..0000000000 --- a/openair-cn/OPENAIRHSS/debian/control +++ /dev/null @@ -1,15 +0,0 @@ -Source: openair-hss -Maintainer: Sebastien ROUX -Section: misc -Priority: optional -Standards-Version: 3.9.2 -Build-Depends: debhelper (>= 8), - make, gcc, bison, flex, autotools, - libmysqlclient-dev, libsctp-dev, - freediameter-dev, freediameter-dictionary-s6a, freediameter-dictionary-mip6, - libgmp-dev, libnettle-dev - -Package: openair-hss -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} -Description: Implementation of R10 HSS for 3GPP LTE core network \ No newline at end of file diff --git a/openair-cn/OPENAIRHSS/debian/copyright b/openair-cn/OPENAIRHSS/debian/copyright deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/openair-cn/OPENAIRHSS/debian/dirs b/openair-cn/OPENAIRHSS/debian/dirs deleted file mode 100644 index b01f7e5c00..0000000000 --- a/openair-cn/OPENAIRHSS/debian/dirs +++ /dev/null @@ -1 +0,0 @@ -etc/openair-hss/ \ No newline at end of file diff --git a/openair-cn/OPENAIRHSS/debian/files b/openair-cn/OPENAIRHSS/debian/files deleted file mode 100644 index 94dcd01645..0000000000 --- a/openair-cn/OPENAIRHSS/debian/files +++ /dev/null @@ -1 +0,0 @@ -openair-hss_1.0.0-1_i386.deb misc optional diff --git a/openair-cn/OPENAIRHSS/debian/openair-hss.install b/openair-cn/OPENAIRHSS/debian/openair-hss.install deleted file mode 100644 index 66a9d5fcb7..0000000000 --- a/openair-cn/OPENAIRHSS/debian/openair-hss.install +++ /dev/null @@ -1,3 +0,0 @@ -conf/hss.conf -conf/hss_fd.conf -db/oai_db.sql \ No newline at end of file diff --git a/openair-cn/OPENAIRHSS/debian/rules b/openair-cn/OPENAIRHSS/debian/rules deleted file mode 100755 index b6e44cb04d..0000000000 --- a/openair-cn/OPENAIRHSS/debian/rules +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/make -f - -export DH_OPTIONS - -%: - dh $@ - -override_dh_auto_configure: - dh_auto_configure -- --enable-dh-install LDFLAGS='-L/usr/local/lib' - -# Don't run tests: -override_dh_auto_test: \ No newline at end of file diff --git a/openair-cn/OPENAIRHSS/hss_main.c b/openair-cn/OPENAIRHSS/hss_main.c deleted file mode 100644 index 5a226bc0d9..0000000000 --- a/openair-cn/OPENAIRHSS/hss_main.c +++ /dev/null @@ -1,68 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -#include -#include - -#include "hss_config.h" -#include "db_proto.h" -#include "s6a_proto.h" -#include "auc.h" - -hss_config_t hss_config; - - -int main(int argc, char *argv[]) -{ - - memset(&hss_config, 0, sizeof(hss_config_t)); - - if (config_init(argc, argv, &hss_config) != 0) { - return -1; - } - - if (hss_mysql_connect(&hss_config) != 0) { - return -1; - } - - random_init(); - - if (hss_config.valid_op) { - hss_mysql_check_opc_keys((uint8_t*)hss_config.operator_key_bin); - } - - s6a_init(&hss_config); - - while(1) { - /* TODO: handle signals here */ - sleep(1); - } - - return 0; -} diff --git a/openair-cn/OPENAIRHSS/s6a/COPYING b/openair-cn/OPENAIRHSS/s6a/COPYING deleted file mode 100644 index 94a9ed024d..0000000000 --- a/openair-cn/OPENAIRHSS/s6a/COPYING +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program 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. - - This program 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 this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/openair-cn/OPENAIRHSS/s6a/Makefile.am b/openair-cn/OPENAIRHSS/s6a/Makefile.am deleted file mode 100644 index bfd6a27fe6..0000000000 --- a/openair-cn/OPENAIRHSS/s6a/Makefile.am +++ /dev/null @@ -1,49 +0,0 @@ -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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 . -# -# Contact Information -# OpenAirInterface Admin: openair_admin@eurecom.fr -# OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr -# -# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. -# -################################################################################ -AM_CFLAGS = @ADD_CFLAGS@ \ - -I$(top_srcdir) \ - -I$(top_srcdir)/access_restriction \ - -I$(top_srcdir)/auc \ - -I$(top_srcdir)/db \ - -I$(top_srcdir)/utils - -noinst_LTLIBRARIES = libs6a.la - -libs6a_la_LDFLAGS = -all-static -libs6a_la_SOURCES = \ - s6a_common.c \ - s6a_fd.c s6a_proto.h \ - s6a_auth_info.c \ - s6a_up_loc.c \ - s6a_purge_ue.c \ - s6a_error.c \ - s6a_subscription_data.c \ - s6a_in_addr.c \ - s6a_peers.c \ - s6a_supported_features.h s6a_supported_features.c \ No newline at end of file diff --git a/openair-cn/OPENAIRHSS/s6a/s6a_auth_info.c b/openair-cn/OPENAIRHSS/s6a/s6a_auth_info.c deleted file mode 100644 index 718e48cce4..0000000000 --- a/openair-cn/OPENAIRHSS/s6a/s6a_auth_info.c +++ /dev/null @@ -1,301 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -/*! \file s6a_auth_info.c - * \brief Handle an authentication information request procedure and generate the answer - * \author Sebastien ROUX - * \date 2013 - * \version 0.1 - */ - -#include -#include -#include -#include -#include -#include - -#include "hss_config.h" -#include "db_proto.h" -#include "s6a_proto.h" -#include "auc.h" -#include "access_restriction.h" - -int s6a_auth_info_cb(struct msg **msg, struct avp *paramavp, - struct session *sess, void *opaque, - enum disp_action *act) -{ - struct msg *ans, *qry; - struct avp *avp, *failed_avp = NULL; - - struct avp_hdr *hdr; - union avp_value value; - - /* Database queries */ - mysql_auth_info_req_t auth_info_req; - mysql_auth_info_resp_t auth_info_resp; - - /* Authentication vector */ - auc_vector_t vector; - - int ret = 0; - int result_code = ER_DIAMETER_SUCCESS; - int experimental = 0; - uint64_t imsi; - uint8_t *sqn = NULL, *auts = NULL; - - if (msg == NULL) { - return EINVAL; - } - - /* Create answer header */ - qry = *msg; - CHECK_FCT(fd_msg_new_answer_from_req(fd_g_config->cnf_dict, msg, 0)); - ans = *msg; - - /* Retrieving IMSI AVP: User-Name */ - CHECK_FCT(fd_msg_search_avp(qry, s6a_cnf.dataobj_s6a_imsi, &avp)); - - if (avp) { - CHECK_FCT(fd_msg_avp_hdr(avp, &hdr)); - - if (hdr->avp_value->os.len > IMSI_LENGTH_MAX) { - result_code = ER_DIAMETER_INVALID_AVP_VALUE; - goto out; - } - - sprintf(auth_info_req.imsi, "%*s", (int)hdr->avp_value->os.len, - hdr->avp_value->os.data); - sscanf(auth_info_req.imsi, "%"SCNu64, &imsi); - } else { - result_code = ER_DIAMETER_MISSING_AVP; - goto out; - } - - /* Retrieving Supported Features AVP. This is an optional AVP. */ - CHECK_FCT(fd_msg_search_avp(qry, s6a_cnf.dataobj_s6a_supported_features, &avp)); - - if (avp) { - CHECK_FCT(fd_msg_avp_hdr(avp, &hdr)); - } - - /* Retrieving the Requested-EUTRAN-Authentication-Info. - * If this AVP is not present, we have to check for - * Requested-GERAN-Authentication-Info AVP which will mean that the request - * comes from RAT other than E-UTRAN, case not handled by this HSS - * implementation. - */ - CHECK_FCT(fd_msg_search_avp(qry, s6a_cnf.dataobj_s6a_req_e_utran_auth_info, &avp)); - - if (avp) { - struct avp *child_avp; - - /* Walk through childs avp */ - CHECK_FCT(fd_msg_browse(avp, MSG_BRW_FIRST_CHILD, &child_avp, NULL)); - - while (child_avp) { - /* Retrieve the header of the child avp */ - CHECK_FCT(fd_msg_avp_hdr(child_avp, &hdr)); - - switch(hdr->avp_code) { - case AVP_CODE_NUMBER_OF_REQ_VECTORS: { - /* We allow only one vector request */ - if (hdr->avp_value->u32 != 1) { - result_code = ER_DIAMETER_INVALID_AVP_VALUE; - failed_avp = child_avp; - goto out; - } - } - break; - - case AVP_CODE_IMMEDIATE_RESP_PREF: - /* We always respond immediately to the request */ - break; - - case AVP_CODE_RE_SYNCHRONIZATION_INFO: - - /* The resynchronization-info AVP is present. - * AUTS = Conc(SQN MS ) || MAC-S - */ - if (avp) { - auts = hdr->avp_value->os.data; - } - - break; - - default: { - /* This AVP is not expected on s6a interface */ - result_code = ER_DIAMETER_AVP_UNSUPPORTED; - failed_avp = child_avp; - goto out; - } - } - - /* Go to next AVP in the grouped AVP */ - CHECK_FCT(fd_msg_browse(child_avp, MSG_BRW_NEXT, &child_avp, NULL)); - } - } else { - CHECK_FCT(fd_msg_search_avp(qry, s6a_cnf.dataobj_s6a_req_geran_auth_info, &avp)); - - if (avp) { - result_code = DIAMETER_ERROR_RAT_NOT_ALLOWED; - experimental = 1; - goto out; - } else { - result_code = ER_DIAMETER_INVALID_AVP_VALUE; - failed_avp = avp; - goto out; - } - } - - /* Retrieving the Visited-PLMN-Id AVP */ - CHECK_FCT(fd_msg_search_avp(qry, s6a_cnf.dataobj_s6a_visited_plmn_id, &avp)); - - if (avp) { - /* TODO: check PLMN and allow/reject connectivity depending on roaming */ - CHECK_FCT(fd_msg_avp_hdr(avp, &hdr)); - - if (hdr->avp_value->os.len == 3) { - if (apply_access_restriction(auth_info_req.imsi, hdr->avp_value->os.data) != 0) { - /* We found that user is roaming and has no right to do it -> - * reject the connection - */ - result_code = DIAMETER_ERROR_ROAMING_NOT_ALLOWED; - experimental = 1; - goto out; - } - } else { - result_code = ER_DIAMETER_INVALID_AVP_VALUE; - goto out; - } - } else { - /* Mandatory AVP, raise an error if not present */ - result_code = ER_DIAMETER_MISSING_AVP; - goto out; - } - - /* Fetch User data */ - if (hss_mysql_auth_info(&auth_info_req, &auth_info_resp) != 0) { - /* Database query failed... */ - result_code = DIAMETER_AUTHENTICATION_DATA_UNAVAILABLE; - experimental = 1; - goto out; - } - - if (auts != NULL) { - /* Try to derive SQN_MS from previous RAND */ - sqn = sqn_ms_derive(auth_info_resp.opc, auth_info_resp.key, auts, auth_info_resp.rand); - - if (sqn != NULL) { - /* We succeeded to verify SQN_MS... */ - - /* Pick a new RAND and store SQN_MS + RAND in the HSS */ - generate_random(vector.rand, RAND_LENGTH); - hss_mysql_push_rand_sqn(auth_info_req.imsi, auth_info_resp.rand, sqn); - - hss_mysql_increment_sqn(auth_info_req.imsi); - - free(sqn); - } - - /* Fetch new user data */ - if (hss_mysql_auth_info(&auth_info_req, &auth_info_resp) != 0) { - /* Database query failed... */ - result_code = DIAMETER_AUTHENTICATION_DATA_UNAVAILABLE; - experimental = 1; - goto out; - } - - sqn = auth_info_resp.sqn; - - memcpy(vector.rand, auth_info_resp.rand, RAND_LENGTH); - } else { - /* Pick a new RAND and store SQN_MS + RAND in the HSS */ - generate_random(vector.rand, RAND_LENGTH); - sqn = auth_info_resp.sqn; - hss_mysql_push_rand_sqn(auth_info_req.imsi, vector.rand, sqn); - } - - hss_mysql_increment_sqn(auth_info_req.imsi); - - /* Generate authentication vector */ - generate_vector(auth_info_resp.opc, imsi, auth_info_resp.key, - hdr->avp_value->os.data, sqn, &vector); - - /* We add the vector */ - { - struct avp *e_utran_vector, *child_avp; - CHECK_FCT(fd_msg_avp_new(s6a_cnf.dataobj_s6a_authentication_info, 0, &avp)); - - CHECK_FCT(fd_msg_avp_new(s6a_cnf.dataobj_s6a_e_utran_vector, 0, &e_utran_vector)); - - CHECK_FCT(fd_msg_avp_new(s6a_cnf.dataobj_s6a_rand, 0, &child_avp)); - value.os.data = vector.rand; - value.os.len = RAND_LENGTH_OCTETS; - CHECK_FCT(fd_msg_avp_setvalue(child_avp, &value)); - CHECK_FCT(fd_msg_avp_add(e_utran_vector, MSG_BRW_LAST_CHILD, child_avp)); - - CHECK_FCT(fd_msg_avp_new(s6a_cnf.dataobj_s6a_xres, 0, &child_avp)); - value.os.data = vector.xres; - value.os.len = XRES_LENGTH_OCTETS; - CHECK_FCT(fd_msg_avp_setvalue(child_avp, &value)); - CHECK_FCT(fd_msg_avp_add(e_utran_vector, MSG_BRW_LAST_CHILD, child_avp)); - - CHECK_FCT(fd_msg_avp_new(s6a_cnf.dataobj_s6a_autn, 0, &child_avp)); - value.os.data = vector.autn; - value.os.len = AUTN_LENGTH_OCTETS; - CHECK_FCT(fd_msg_avp_setvalue(child_avp, &value)); - CHECK_FCT(fd_msg_avp_add(e_utran_vector, MSG_BRW_LAST_CHILD, child_avp)); - - CHECK_FCT(fd_msg_avp_new(s6a_cnf.dataobj_s6a_kasme, 0, &child_avp)); - value.os.data = vector.kasme; - value.os.len = KASME_LENGTH_OCTETS; - CHECK_FCT(fd_msg_avp_setvalue(child_avp, &value)); - CHECK_FCT(fd_msg_avp_add(e_utran_vector, MSG_BRW_LAST_CHILD, child_avp)); - - CHECK_FCT(fd_msg_avp_add(avp, MSG_BRW_LAST_CHILD, e_utran_vector)); - - CHECK_FCT(fd_msg_avp_add(ans, MSG_BRW_LAST_CHILD, avp)); - } - -out: - /* Add the Auth-Session-State AVP */ - CHECK_FCT(fd_msg_search_avp(qry, s6a_cnf.dataobj_s6a_auth_session_state, &avp)); - CHECK_FCT(fd_msg_avp_hdr(avp, &hdr)); - - CHECK_FCT(fd_msg_avp_new(s6a_cnf.dataobj_s6a_auth_session_state, 0, &avp)); - CHECK_FCT(fd_msg_avp_setvalue(avp, hdr->avp_value)); - CHECK_FCT(fd_msg_avp_add(ans, MSG_BRW_LAST_CHILD, avp)); - - /* Append the result code to the answer */ - CHECK_FCT(s6a_add_result_code(ans, failed_avp, result_code, experimental)); - - CHECK_FCT(fd_msg_send(msg, NULL, NULL )); - return ret; -} diff --git a/openair-cn/OPENAIRHSS/s6a/s6a_common.c b/openair-cn/OPENAIRHSS/s6a/s6a_common.c deleted file mode 100644 index fa896dd8d4..0000000000 --- a/openair-cn/OPENAIRHSS/s6a/s6a_common.c +++ /dev/null @@ -1,66 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -#include "hss_config.h" -#include "db_proto.h" -#include "s6a_proto.h" - -int s6a_add_result_code(struct msg *ans, struct avp *failed_avp, int result_code, int experimental) -{ - struct avp *avp; - union avp_value value; - - if (DIAMETER_ERROR_IS_VENDOR(result_code) && experimental != 0) { - struct avp *experimental_result; - CHECK_FCT(fd_msg_avp_new(s6a_cnf.dataobj_s6a_experimental_result, - 0, &experimental_result)); - CHECK_FCT(fd_msg_avp_new(s6a_cnf.dataobj_s6a_vendor_id, - 0, &avp)); - value.u32 = VENDOR_3GPP; - CHECK_FCT(fd_msg_avp_setvalue(avp, &value)); - CHECK_FCT(fd_msg_avp_add(experimental_result, MSG_BRW_LAST_CHILD, avp)); - CHECK_FCT(fd_msg_avp_new(s6a_cnf.dataobj_s6a_experimental_result_code, - 0, &avp)); - value.u32 = result_code; - CHECK_FCT(fd_msg_avp_setvalue(avp, &value)); - CHECK_FCT(fd_msg_avp_add(experimental_result, MSG_BRW_LAST_CHILD, avp)); - CHECK_FCT(fd_msg_avp_add(ans, MSG_BRW_LAST_CHILD, experimental_result)); - - /* Add Origin_Host & Origin_Realm AVPs */ - CHECK_FCT(fd_msg_add_origin(ans, 0)); - } else { - /* This is a code defined in the base protocol: result-code AVP should - * be used. - */ - CHECK_FCT(fd_msg_rescode_set(ans, retcode_2_string(result_code), NULL, - failed_avp, 1)); - } - - return 0; -} diff --git a/openair-cn/OPENAIRHSS/s6a/s6a_error.c b/openair-cn/OPENAIRHSS/s6a/s6a_error.c deleted file mode 100644 index 92d2465695..0000000000 --- a/openair-cn/OPENAIRHSS/s6a/s6a_error.c +++ /dev/null @@ -1,84 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -#include "hss_config.h" -#include "db_proto.h" -#include "s6a_proto.h" - -char *experimental_retcode_2_string(int ret_code) -{ - switch(ret_code) { - /* Experimental-Result-Codes */ - case DIAMETER_ERROR_USER_UNKNOWN: - return "DIAMETER_ERROR_USER_UNKNOWN"; - - case DIAMETER_ERROR_ROAMING_NOT_ALLOWED: - return "DIAMETER_ERROR_ROAMING_NOT_ALLOWED"; - - case DIAMETER_ERROR_UNKNOWN_EPS_SUBSCRIPTION: - return "DIAMETER_ERROR_UNKNOWN_EPS_SUBSCRIPTION"; - - case DIAMETER_ERROR_RAT_NOT_ALLOWED: - return "DIAMETER_ERROR_RAT_NOT_ALLOWED"; - - case DIAMETER_ERROR_EQUIPMENT_UNKNOWN: - return "DIAMETER_ERROR_EQUIPMENT_UNKNOWN"; - - case DIAMETER_ERROR_UNKOWN_SERVING_NODE: - return "DIAMETER_ERROR_UNKOWN_SERVING_NODE"; - - case DIAMETER_AUTHENTICATION_DATA_UNAVAILABLE: - return "DIAMETER_AUTHENTICATION_DATA_UNAVAILABLE"; - - default: - break; - } - - return "DIAMETER_AVP_UNSUPPORTED"; -} - -char *retcode_2_string(int ret_code) -{ - switch(ret_code) { - case ER_DIAMETER_SUCCESS: - return "DIAMETER_SUCCESS"; - - case ER_DIAMETER_MISSING_AVP: - return "DIAMETER_MISSING_AVP"; - - case ER_DIAMETER_INVALID_AVP_VALUE: - return "DIAMETER_INVALID_AVP_VALUE"; - - default: - break; - } - - return "DIAMETER_AVP_UNSUPPORTED"; -} - diff --git a/openair-cn/OPENAIRHSS/s6a/s6a_fd.c b/openair-cn/OPENAIRHSS/s6a/s6a_fd.c deleted file mode 100644 index 8a8ea04812..0000000000 --- a/openair-cn/OPENAIRHSS/s6a/s6a_fd.c +++ /dev/null @@ -1,370 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -#include -#include -#include -#include -#include - -#if HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include - -#include "hss_config.h" -#include "db_proto.h" -#include "s6a_proto.h" - -/* session handler for s6a sessions state machine */ -static struct session_handler *s6a_reg = NULL; - -/* handler for s6a server callback */ -static struct disp_hdl *handle; -s6a_cnf_t s6a_cnf; - -#if FREEDIAMETER_VERSION < 120 -void s6a_cli_sess_cleanup(void * arg, char * sid, void * opaque); - -void s6a_cli_sess_cleanup(void * arg, char * sid, void * opaque) -{ - -} -#else -void s6a_cli_sess_cleanup(struct sess_state * state, os0_t sid, void * opaque); -void s6a_cli_sess_cleanup(struct sess_state * state, os0_t sid, void * opaque) -{ - -} - -#endif - - -static int s6a_init_objs(void) -{ - vendor_id_t vendor_3gpp = VENDOR_3GPP; - application_id_t app_s6a = APP_S6A; - - memset(&s6a_cnf, 0, sizeof(s6a_cnf)); - - /* Pre-loading vendor object */ - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_VENDOR, VENDOR_BY_ID, - (void*)&vendor_3gpp, &s6a_cnf.dataobj_s6a_vendor, ENOENT)); - /* Pre-loading application object */ - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_APPLICATION, - APPLICATION_BY_ID, (void*)&app_s6a, - &s6a_cnf.dataobj_s6a_app, ENOENT)); - - /* Pre-loading commands objects */ - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_COMMAND, - CMD_BY_NAME, "Authentication-Information-Request", - &s6a_cnf.dataobj_s6a_auth_cmd, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_COMMAND, - CMD_BY_NAME, "Update-Location-Request", - &s6a_cnf.dataobj_s6a_loc_up, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_COMMAND, - CMD_BY_NAME, "Purge-UE-Request", - &s6a_cnf.dataobj_s6a_purge_ue, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_COMMAND, - CMD_BY_NAME, "Cancel-Location-Request", - &s6a_cnf.dataobj_s6a_cancel_loc_req, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_COMMAND, - CMD_BY_NAME, "Cancel-Location-Answer", - &s6a_cnf.dataobj_s6a_cancel_loc_ans, ENOENT)); - - /* Pre-loading AVPs objects */ - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME, "Origin-Host", - &s6a_cnf.dataobj_s6a_origin_host, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME, "Origin-Realm", - &s6a_cnf.dataobj_s6a_origin_realm, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "User-Name", - &s6a_cnf.dataobj_s6a_imsi, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "IMEI", - &s6a_cnf.dataobj_s6a_imei, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "Software-Version", - &s6a_cnf.dataobj_s6a_software_version, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "Supported-Features", - &s6a_cnf.dataobj_s6a_supported_features, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "Requested-EUTRAN-Authentication-Info", - &s6a_cnf.dataobj_s6a_req_e_utran_auth_info, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "Number-Of-Requested-Vectors", - &s6a_cnf.dataobj_s6a_req_nb_of_req_vectors, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "Re-Synchronization-Info", - &s6a_cnf.dataobj_s6a_req_resync_info, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "Requested-UTRAN-GERAN-Authentication-Info", - &s6a_cnf.dataobj_s6a_req_geran_auth_info, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "Immediate-Response-Preferred", - &s6a_cnf.dataobj_s6a_immediate_response_pref, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "Visited-PLMN-Id", - &s6a_cnf.dataobj_s6a_visited_plmn_id, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME, "Result-Code", - &s6a_cnf.dataobj_s6a_result_code, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME, "Experimental-Result", - &s6a_cnf.dataobj_s6a_experimental_result, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME, "Vendor-Id", - &s6a_cnf.dataobj_s6a_vendor_id, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME, "Experimental-Result-Code", - &s6a_cnf.dataobj_s6a_experimental_result_code, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "Auth-Session-State", - &s6a_cnf.dataobj_s6a_auth_session_state, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "Authentication-Info", - &s6a_cnf.dataobj_s6a_authentication_info, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "E-UTRAN-Vector", - &s6a_cnf.dataobj_s6a_e_utran_vector, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "RAND", - &s6a_cnf.dataobj_s6a_rand, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "XRES", - &s6a_cnf.dataobj_s6a_xres, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "AUTN", - &s6a_cnf.dataobj_s6a_autn, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "KASME", - &s6a_cnf.dataobj_s6a_kasme, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "ULR-Flags", - &s6a_cnf.dataobj_s6a_ulr_flags, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "ULA-Flags", - &s6a_cnf.dataobj_s6a_ula_flags, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "PUR-Flags", - &s6a_cnf.dataobj_s6a_pur_flags, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "PUA-Flags", - &s6a_cnf.dataobj_s6a_pua_flags, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "RAT-Type", - &s6a_cnf.dataobj_s6a_rat_type, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "Terminal-Information", - &s6a_cnf.dataobj_s6a_terminal_info, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "UE-SRVCC-Capability", - &s6a_cnf.dataobj_s6a_ue_srvcc_cap, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "GMLC-Address", - &s6a_cnf.dataobj_s6a_gmlc_addr, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "Subscription-Data", - &s6a_cnf.dataobj_s6a_subscription_data, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "Subscriber-Status", - &s6a_cnf.dataobj_s6a_subscriber_status, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "MSISDN", - &s6a_cnf.dataobj_s6a_msisdn, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "AMBR", - &s6a_cnf.dataobj_s6a_ambr, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "Network-Access-Mode", - &s6a_cnf.dataobj_s6a_network_access_mode, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "Access-Restriction-Data", - &s6a_cnf.dataobj_s6a_access_restriction_data, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "APN-Configuration-Profile", - &s6a_cnf.dataobj_s6a_apn_configuration_profile, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "Subscribed-Periodic-RAU-TAU-Timer", - &s6a_cnf.dataobj_s6a_subscribed_rau_tau_timer, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "Context-Identifier", - &s6a_cnf.dataobj_s6a_context_identifier, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "All-APN-Configurations-Included-Indicator", - &s6a_cnf.dataobj_s6a_all_apn_conf_inc_ind, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "APN-Configuration", - &s6a_cnf.dataobj_s6a_apn_configuration, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "Max-Requested-Bandwidth-UL", - &s6a_cnf.dataobj_s6a_max_bandwidth_ul, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "Max-Requested-Bandwidth-DL", - &s6a_cnf.dataobj_s6a_max_bandwidth_dl, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "PDN-Type", - &s6a_cnf.dataobj_s6a_pdn_type, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "Service-Selection", - &s6a_cnf.dataobj_s6a_service_selection, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "EPS-Subscribed-QoS-Profile", - &s6a_cnf.dataobj_s6a_eps_subscribed_qos_profile, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "QoS-Class-Identifier", - &s6a_cnf.dataobj_s6a_qos_class_identifier, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "Allocation-Retention-Priority", - &s6a_cnf.dataobj_s6a_allocation_retention_priority, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "Priority-Level", - &s6a_cnf.dataobj_s6a_priority_level, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "Pre-emption-Capability", - &s6a_cnf.dataobj_s6a_pre_emption_capability, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "Pre-emption-Vulnerability", - &s6a_cnf.dataobj_s6a_pre_emption_vulnerability, ENOENT)); - CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "Served-Party-IP-Address", - &s6a_cnf.dataobj_s6a_served_party_ip_addr, ENOENT)); - - /* Advertise the support for the test application in the peer */ - CHECK_FCT(fd_disp_app_support(s6a_cnf.dataobj_s6a_app, - s6a_cnf.dataobj_s6a_vendor, 1, 0)); - - return 0; -} - -int s6a_init(hss_config_t *hss_config_p) -{ - int ret = 0; - struct disp_when when; - char why[100]; - - fprintf(stdout, "Initializing s6a layer\n"); - - ret = fd_core_initialize(); - - if (ret != 0) { - strcpy(why, "fd_core_initialize"); - goto err; - } - - /* Parse the external configuration file */ - ret = fd_core_parseconf(hss_config_p->freediameter_config); - - if (ret != 0) { - strcpy(why, "fd_core_parseconf"); - goto err; - } - - - ret = fd_core_start(); - - if (ret != 0) { - strcpy(why, "fd_core_start"); - goto err; - } - - - /* We wait till freediameter has completed loading extensions */ - fd_core_waitstartcomplete(); - - /* Register the peer acceptor/rejector */ - fd_peer_validate_register(s6a_peer_validate); - - /* Initialize useful objects */ - ret = s6a_init_objs(); - - if (ret != 0) { - strcpy(why, "s6a_init_objs"); - goto err; - } - - /* Create handler for sessions */ -#if FREEDIAMETER_VERSION < 120 - CHECK_FCT(fd_sess_handler_create(&s6a_reg, s6a_cli_sess_cleanup, NULL)); -#else - session_state_dump dumper; - CHECK_FCT(fd_sess_handler_create(&s6a_reg, s6a_cli_sess_cleanup, dumper, NULL)); -#endif - - /* Register the callback */ - memset(&when, 0, sizeof(when)); - when.command = s6a_cnf.dataobj_s6a_auth_cmd; - when.app = s6a_cnf.dataobj_s6a_app; - - /* Register the callbacks for S6A Application */ - CHECK_FCT(fd_disp_register(s6a_auth_info_cb, DISP_HOW_CC, &when, NULL, - &handle)); - - if (handle == NULL) { - strcpy(why, "cannot register authentication info req cb"); - goto err; - } - - when.command = s6a_cnf.dataobj_s6a_loc_up; - when.app = s6a_cnf.dataobj_s6a_app; - - /* Register the callbacks for S6A Application */ - CHECK_FCT(fd_disp_register(s6a_up_loc_cb, DISP_HOW_CC, &when, NULL, - &handle)); - - if (handle == NULL) { - strcpy(why, "cannot register update location req cb"); - goto err; - } - - when.command = s6a_cnf.dataobj_s6a_purge_ue; - when.app = s6a_cnf.dataobj_s6a_app; - - /* Register the callbacks for S6A Application */ - CHECK_FCT(fd_disp_register(s6a_purge_ue_cb, DISP_HOW_CC, &when, NULL, - &handle)); - - if (handle == NULL) { - strcpy(why, "cannot register purge ue req cb"); - goto err; - } - - fprintf(stdout, "Initializing s6a layer: DONE\n"); - - return 0; - -err: - fprintf(stdout, "Initializing s6a layer: FAILED (%s)\n", why); - return -1; -} diff --git a/openair-cn/OPENAIRHSS/s6a/s6a_in_addr.c b/openair-cn/OPENAIRHSS/s6a/s6a_in_addr.c deleted file mode 100644 index 8abefce778..0000000000 --- a/openair-cn/OPENAIRHSS/s6a/s6a_in_addr.c +++ /dev/null @@ -1,109 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -#include "hss_config.h" -#include "db_proto.h" -#include "s6a_proto.h" - -/* http://www.iana.org/assignments/address-family-numbers/address-family-numbers.xml*/ - -/* Perform a conversion between ipv4 in BCD to AVP served-party-ip-address */ -int s6a_add_ipv4_address(struct avp *avp, const char *ipv4_addr) -{ - struct avp *child_avp; - union avp_value value; - - uint8_t ipv4[6]; /* Converted IPv4 address with family */ - in_addr_t sin; - - if (ipv4_addr == NULL) { - return -1; - } - - /* This is an IPv4 family -> ipv4 buffer should start with 0x0001 */ - ipv4[0] = 0x00; - ipv4[1] = 0x01; - - sin = inet_addr(ipv4_addr); - - /* No need to add the address if it is an any address */ - if (sin != INADDR_ANY) { - memcpy(&ipv4[2], &sin, 4); - CHECK_FCT(fd_msg_avp_new(s6a_cnf.dataobj_s6a_served_party_ip_addr, 0, &child_avp)); - value.os.data = ipv4; - value.os.len = 6; - CHECK_FCT(fd_msg_avp_setvalue(child_avp, &value)); - CHECK_FCT(fd_msg_avp_add(avp, MSG_BRW_LAST_CHILD, child_avp)); - return 0; - } - - /* No IP address added to AVP */ - return -1; -} - -/* Perform a conversion between ipv6 in BCD to AVP served-party-ip-address */ -int s6a_add_ipv6_address(struct avp *avp, const char *ipv6_addr) -{ - struct avp *child_avp; - union avp_value value; - - uint8_t ipv6[18]; - struct in6_addr sin6; - - if (ipv6_addr == NULL) { - return -1; - } - - memset(&sin6, 0, sizeof(struct in6_addr)); - - /* This is an IPv6 family -> ipv6 buffer should start with 0x0002 */ - ipv6[0] = 0x00; - ipv6[1] = 0x02; - - if (inet_pton(AF_INET6, ipv6_addr, &sin6) == -1) { - fprintf(stderr, "INET6 address conversion has failed\n"); - return -1; - } - - /* If the IPV6 address is 0:0:0:0:0:0:0:0 then we don't add it to the - * served-party ip address and consider the ip address can be dynamically - * allocated. - */ - if (!IN6_IS_ADDR_UNSPECIFIED(sin6.s6_addr32)) { - memcpy(&ipv6[2], &sin6.s6_addr, 16); - CHECK_FCT(fd_msg_avp_new(s6a_cnf.dataobj_s6a_served_party_ip_addr, 0, &child_avp)); - value.os.data = ipv6; - value.os.len = 18; - CHECK_FCT(fd_msg_avp_setvalue(child_avp, &value)); - CHECK_FCT(fd_msg_avp_add(avp, MSG_BRW_LAST_CHILD, child_avp)); - return 0; - } - - return -1; -} diff --git a/openair-cn/OPENAIRHSS/s6a/s6a_peers.c b/openair-cn/OPENAIRHSS/s6a/s6a_peers.c deleted file mode 100644 index 0c3bcde915..0000000000 --- a/openair-cn/OPENAIRHSS/s6a/s6a_peers.c +++ /dev/null @@ -1,75 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -/*! \file s6a_peers.c - * \brief Authenticate a new peer connecting to the HSS by checking the database - * \author Sebastien ROUX - * \date 2013 - * \version 0.1 - */ - -#include -#include - -#include "hss_config.h" -#include "db_proto.h" -#include "s6a_proto.h" - -int s6a_peer_validate(struct peer_info *info, int *auth, int (**cb2)(struct peer_info *)) -{ - mysql_mme_identity_t mme_identity; - - if (info == NULL) { - return EINVAL; - } - - memset(&mme_identity, 0, sizeof(mysql_mme_identity_t)); - - /* We received a new connection. Check the database for allowed equipments - * on EPC - */ - - memcpy(mme_identity.mme_host, info->pi_diamid, info->pi_diamidlen); - - if (hss_mysql_check_epc_equipment(&mme_identity) != 0) { - /* The MME has not been found in list of known peers -> reject it */ - *auth = -1; - fprintf(stdout, "Rejecting %s: either db has no knowledge of this peer " - "or sql query failed\n", info->pi_diamid); - } else { - *auth = 1; - - /* For now we don't use security */ - info->config.pic_flags.sec = PI_SEC_NONE; - info->config.pic_flags.persist = PI_PRST_NONE; - fprintf(stdout, "Accepting %s peer\n", info->pi_diamid); - } - - return 0; -} diff --git a/openair-cn/OPENAIRHSS/s6a/s6a_proto.h b/openair-cn/OPENAIRHSS/s6a/s6a_proto.h deleted file mode 100644 index 2ea9221401..0000000000 --- a/openair-cn/OPENAIRHSS/s6a/s6a_proto.h +++ /dev/null @@ -1,238 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -#include -#include - -#include "hss_config.h" - -#ifndef S6A_PROTO_H_ -#define S6A_PROTO_H_ - -#define VENDOR_3GPP (10415) -#define APP_S6A (16777251) - -/* Errors that fall within the Permanent Failures category shall be used to - * inform the peer that the request has failed, and should not be attempted - * again. The Result-Code AVP values defined in Diameter Base Protocol RFC 3588 - * shall be applied. When one of the result codes defined here is included in a - * response, it shall be inside an Experimental-Result AVP and the Result-Code - * AVP shall be absent. - */ -#define DIAMETER_ERROR_USER_UNKNOWN (5001) -#define DIAMETER_ERROR_ROAMING_NOT_ALLOWED (5004) -#define DIAMETER_ERROR_UNKNOWN_EPS_SUBSCRIPTION (5420) -#define DIAMETER_ERROR_RAT_NOT_ALLOWED (5421) -#define DIAMETER_ERROR_EQUIPMENT_UNKNOWN (5422) -#define DIAMETER_ERROR_UNKOWN_SERVING_NODE (5423) - -/* Result codes that fall within the transient failures category shall be used - * to inform a peer that the request could not be satisfied at the time it was - * received, but may be able to satisfy the request in the future. The - * Result-Code AVP values defined in Diameter Base Protocol RFC 3588 shall be - * applied. When one of the result codes defined here is included in a response, - * it shall be inside an Experimental-Result AVP and the Result-Code AVP shall - * be absent. - */ -#define DIAMETER_AUTHENTICATION_DATA_UNAVAILABLE (4181) - -#define DIAMETER_ERROR_IS_VENDOR(x) \ - ((x == DIAMETER_ERROR_USER_UNKNOWN) || \ - (x == DIAMETER_ERROR_ROAMING_NOT_ALLOWED) || \ - (x == DIAMETER_ERROR_UNKNOWN_EPS_SUBSCRIPTION) || \ - (x == DIAMETER_ERROR_RAT_NOT_ALLOWED) || \ - (x == DIAMETER_ERROR_EQUIPMENT_UNKNOWN) || \ - (x == DIAMETER_AUTHENTICATION_DATA_UNAVAILABLE) || \ - (x == DIAMETER_ERROR_UNKOWN_SERVING_NODE)) - -#define AVP_CODE_IMEI (1402) -#define AVP_CODE_SOFTWARE_VERSION (1403) -#define AVP_CODE_NUMBER_OF_REQ_VECTORS (1410) -#define AVP_CODE_RE_SYNCHRONIZATION_INFO (1411) -#define AVP_CODE_IMMEDIATE_RESP_PREF (1412) -#define AVP_CODE_3GPP2_MEID (1471) -#define AVP_CODE_FEATURE_LIST (629) -#define AVP_CODE_VENDOR_ID (266) - -typedef struct { - struct dict_object *dataobj_s6a_vendor; /* s6a vendor object */ - struct dict_object *dataobj_s6a_app; /* s6a application object */ - /* Commands */ - struct dict_object *dataobj_s6a_auth_cmd; /* s6a authentication command */ - struct dict_object *dataobj_s6a_loc_up; /* s6a update location */ - struct dict_object *dataobj_s6a_purge_ue; /* s6a purge ue req */ - struct dict_object *dataobj_s6a_cancel_loc_req; /* s6a Cancel Location req */ - struct dict_object *dataobj_s6a_cancel_loc_ans; /* s6a Cancel Location ans */ - /* AVPs */ - struct dict_object *dataobj_s6a_origin_host; - struct dict_object *dataobj_s6a_origin_realm; - struct dict_object *dataobj_s6a_imsi; /* s6a imsi avp */ - struct dict_object *dataobj_s6a_imei; - struct dict_object *dataobj_s6a_software_version; - struct dict_object *dataobj_s6a_supported_features; - struct dict_object *dataobj_s6a_req_e_utran_auth_info; - struct dict_object *dataobj_s6a_req_resync_info; - struct dict_object *dataobj_s6a_req_nb_of_req_vectors; - struct dict_object *dataobj_s6a_req_geran_auth_info; - struct dict_object *dataobj_s6a_immediate_response_pref; - struct dict_object *dataobj_s6a_visited_plmn_id; - struct dict_object *dataobj_s6a_result_code; - struct dict_object *dataobj_s6a_experimental_result; - struct dict_object *dataobj_s6a_vendor_id; - struct dict_object *dataobj_s6a_experimental_result_code; - struct dict_object *dataobj_s6a_auth_session_state; - struct dict_object *dataobj_s6a_authentication_info; - struct dict_object *dataobj_s6a_e_utran_vector; - struct dict_object *dataobj_s6a_rand; - struct dict_object *dataobj_s6a_xres; - struct dict_object *dataobj_s6a_autn; - struct dict_object *dataobj_s6a_kasme; - struct dict_object *dataobj_s6a_ulr_flags; - struct dict_object *dataobj_s6a_ula_flags; - struct dict_object *dataobj_s6a_pur_flags; - struct dict_object *dataobj_s6a_pua_flags; - struct dict_object *dataobj_s6a_rat_type; - struct dict_object *dataobj_s6a_terminal_info; - struct dict_object *dataobj_s6a_ue_srvcc_cap; - struct dict_object *dataobj_s6a_gmlc_addr; - struct dict_object *dataobj_s6a_subscription_data; - struct dict_object *dataobj_s6a_subscriber_status; - struct dict_object *dataobj_s6a_msisdn; - struct dict_object *dataobj_s6a_ambr; - struct dict_object *dataobj_s6a_network_access_mode; - struct dict_object *dataobj_s6a_access_restriction_data; - struct dict_object *dataobj_s6a_apn_configuration_profile; - struct dict_object *dataobj_s6a_subscribed_rau_tau_timer; - struct dict_object *dataobj_s6a_context_identifier; - /* All-APN-Configurations-Included-Indicator */ - struct dict_object *dataobj_s6a_all_apn_conf_inc_ind; - struct dict_object *dataobj_s6a_apn_configuration; - /* Max-Requested-Bandwidth-UL */ - struct dict_object *dataobj_s6a_max_bandwidth_ul; - /* Max-Requested-Bandwidth-DL */ - struct dict_object *dataobj_s6a_max_bandwidth_dl; - struct dict_object *dataobj_s6a_pdn_type; - struct dict_object *dataobj_s6a_service_selection; - struct dict_object *dataobj_s6a_eps_subscribed_qos_profile; - struct dict_object *dataobj_s6a_qos_class_identifier; - struct dict_object *dataobj_s6a_allocation_retention_priority; - struct dict_object *dataobj_s6a_priority_level; - struct dict_object *dataobj_s6a_pre_emption_capability; - struct dict_object *dataobj_s6a_pre_emption_vulnerability; - struct dict_object *dataobj_s6a_served_party_ip_addr; -} s6a_cnf_t; - -/* External definition of the S6A decriptor */ -extern s6a_cnf_t s6a_cnf; - -/* Length of IMSI should not exceed 15 digits */ -#define IMSI_LENGTH (15) -#define IMEI_LENGTH (15) -#define SV_LENGTH (2) - -/* ULR-Flags meaning: */ -#define ULR_SINGLE_REGISTRATION_IND (1U) -#define ULR_S6A_S6D_INDICATOR (1U << 1) -#define ULR_SKIP_SUBSCRIBER_DATA (1U << 2) -#define ULR_GPRS_SUBSCRIPTION_DATA_IND (1U << 3) -#define ULR_NODE_TYPE_IND (1U << 4) -#define ULR_INITIAL_ATTACH_IND (1U << 5) -#define ULR_PS_LCS_SUPPORTED_BY_UE (1U << 6) -#define ULR_PAD_VALID(x) ((x & ~0x7f) == 0) - -/* ULA-Flags */ -#define ULA_SEPARATION_IND (1U) - -/* PUR-Flags */ -#define PUR_UE_PURGED_IN_MME (1U) -#define PUR_UE_PURGED_IN_SGSN (1U << 1) -#define PUR_PAD_VALID(x) ((x & ~0x3) == 0) - -/* PUA-FLAGS */ -#define PUA_FREEZE_M_TMSI (1U) -#define PUA_FREEZE_P_TMSI (1U << 1) - -/* Access-restriction-data bits */ -#define UTRAN_NOT_ALLOWED (1U) -#define GERAN_NOT_ALLOWED (1U << 1) -#define GAN_NOT_ALLOWED (1U << 2) -#define I_HSDPA_EVO_NOT_ALLOWED (1U << 3) -#define E_UTRAN_NOT_ALLOWED (1U << 4) -#define HO_TO_NON_3GPP_NOT_ALLOWED (1U << 5) -#define ARD_CHECK_PAD(x) ((x & ~0x3f) == 0) - -#define FLAG_IS_SET(x, flag) ((x) & (flag)) - -#define FLAGS_SET(x, flags) ((x) |= (flags)) - -#define FLAGS_CLEAR(x, flags) ((x) = (x) & ~(flags)) - -/** \brief Initialize the s6a layer using freeDiameter - * \param hss_config_p pointer the global HSS configuration - * @returns 0 if the init was successfull, != 0 in case of failure - */ -int s6a_init(hss_config_t *hss_config_p); - -/** \brief Callback function for new equipements connections to the HSS. See - * libfdproto from freeDiameter for more informations on the peer validate - * callback - * \param info Peer freeDiameter info - * \param auth Result of the peer authentication, possible values: - * * 1 = accept - * * 0 = unknown - * * -1 = reject - * \param cb2 possible second callback to validate the TLS authentication - * @return 0 if the init was successfull, != 0 in case of failure - */ -int s6a_peer_validate(struct peer_info *info, int *auth, int (**cb2)(struct peer_info *)); - -/* Callback called when corresponding request/answer is received */ -int s6a_auth_info_cb(struct msg **msg, struct avp *paramavp, - struct session *sess, void *opaque, - enum disp_action *act); - -int s6a_up_loc_cb(struct msg **msg, struct avp *paramavp, - struct session *sess, void *opaque, - enum disp_action *act); - -int s6a_purge_ue_cb(struct msg **msg, struct avp *paramavp, - struct session *sess, void *opaque, - enum disp_action *act); - -int s6a_add_subscription_data_avp(struct msg *message, mysql_ul_ans_t *msql_ans); - -int s6a_add_result_code(struct msg *ans, struct avp *failed_avp, - int result_code, int experimental); - -int s6a_add_ipv4_address(struct avp *avp, const char *ipv4_addr); -int s6a_add_ipv6_address(struct avp *avp, const char *ipv6_addr); -char *experimental_retcode_2_string(int ret_code); -char *retcode_2_string(int ret_code); - -#endif /* S6A_PROTO_H_ */ diff --git a/openair-cn/OPENAIRHSS/s6a/s6a_purge_ue.c b/openair-cn/OPENAIRHSS/s6a/s6a_purge_ue.c deleted file mode 100644 index c0bc0ee031..0000000000 --- a/openair-cn/OPENAIRHSS/s6a/s6a_purge_ue.c +++ /dev/null @@ -1,151 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -/*! \file s6a_purge_ue.c - * \brief Handle a purge UE request and generate the corresponding answer - * \author Sebastien ROUX - * \date 2013 - * \version 0.1 - */ - -#include -#include - -#include "hss_config.h" -#include "db_proto.h" -#include "s6a_proto.h" - -int s6a_purge_ue_cb(struct msg **msg, struct avp *paramavp, - struct session *sess, void *opaque, - enum disp_action *act) -{ - struct msg *ans, *qry; - struct avp *avp, *failed_avp = NULL; - struct avp_hdr *hdr; - - int ret = 0; - int result_code = ER_DIAMETER_SUCCESS; - int experimental = 0; - uint32_t pur_flags = 0; - - /* MySQL requests and asnwer data */ - mysql_pu_req_t pu_req; - mysql_pu_ans_t pu_ans; - - if (msg == NULL) { - return EINVAL; - } - - memset(&pu_req, 0, sizeof(mysql_pu_req_t)); - - qry = *msg; - /* Create the answer */ - CHECK_FCT(fd_msg_new_answer_from_req(fd_g_config->cnf_dict, msg, 0)); - ans = *msg; - - /* Retrieving IMSI AVP */ - CHECK_FCT(fd_msg_search_avp(qry, s6a_cnf.dataobj_s6a_imsi, &avp)); - - if (avp) { - CHECK_FCT(fd_msg_avp_hdr(avp, &hdr)); - - if (hdr->avp_value->os.len > IMSI_LENGTH) { - result_code = ER_DIAMETER_INVALID_AVP_VALUE; - goto out; - } - - sprintf(pu_req.imsi, "%*s", (int)hdr->avp_value->os.len, hdr->avp_value->os.data); - } else { - result_code = ER_DIAMETER_MISSING_AVP; - goto out; - } - - /* Retrieving the PUR-Flags if present */ - CHECK_FCT(fd_msg_search_avp(qry, s6a_cnf.dataobj_s6a_pur_flags, &avp)); - - if (avp) { - CHECK_FCT(fd_msg_avp_hdr(avp, &hdr)); - pur_flags = hdr->avp_value->u32; - - if (FLAG_IS_SET(pur_flags, PUR_UE_PURGED_IN_SGSN)) { - /* This bit shall not be set by a standalone MME. */ - result_code = ER_DIAMETER_INVALID_AVP_VALUE; - goto out; - } - } - - if ((ret = hss_mysql_purge_ue(&pu_req, &pu_ans)) != 0) { - /* We failed to find the IMSI in the database. Replying to the request - * with the user unknown cause. - */ - experimental = 1; - result_code = DIAMETER_ERROR_USER_UNKNOWN; - goto out; - } - - /* Retrieving Origin host AVP */ - CHECK_FCT(fd_msg_search_avp(qry, s6a_cnf.dataobj_s6a_origin_host, &avp)); - - if (!avp) { - result_code = ER_DIAMETER_MISSING_AVP; - goto out; - } - - /* Retrieve the header from origin host and realm avps */ - CHECK_FCT(fd_msg_avp_hdr(avp, &hdr)); - - if (strncmp(pu_ans.mme_host, (char *)hdr->avp_value->os.data, hdr->avp_value->os.len) != 0) { - result_code = DIAMETER_ERROR_UNKOWN_SERVING_NODE; - experimental = 1; - goto out; - } - - /* Retrieving Origin realm AVP */ - CHECK_FCT(fd_msg_search_avp(qry, s6a_cnf.dataobj_s6a_origin_realm, &avp)); - - if (!avp) { - result_code = ER_DIAMETER_MISSING_AVP; - goto out; - } - - CHECK_FCT(fd_msg_avp_hdr(avp, &hdr)); - - if (strncmp(pu_ans.mme_realm, (char *)hdr->avp_value->os.data, hdr->avp_value->os.len) != 0) { - result_code = DIAMETER_ERROR_UNKOWN_SERVING_NODE; - experimental = 1; - goto out; - } - -out: - /* Append the result code to the answer */ - CHECK_FCT(s6a_add_result_code(ans, failed_avp, result_code, experimental)); - - CHECK_FCT(fd_msg_send(msg, NULL, NULL )); - return 0; -} diff --git a/openair-cn/OPENAIRHSS/s6a/s6a_subscription_data.c b/openair-cn/OPENAIRHSS/s6a/s6a_subscription_data.c deleted file mode 100644 index 5bec27ac6b..0000000000 --- a/openair-cn/OPENAIRHSS/s6a/s6a_subscription_data.c +++ /dev/null @@ -1,274 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -#include "hss_config.h" -#include "db_proto.h" -#include "s6a_proto.h" - -/*! \file s6a_subscription_data.c - * \brief Add the subscription data to a message. Data are retrieved from database - * \author Sebastien ROUX - * \date 2013 - * \version 0.1 - */ - -int s6a_add_subscription_data_avp(struct msg *message, mysql_ul_ans_t *mysql_ans) -{ - int ret = -1, i = 0; - mysql_pdn_t *pdns = NULL; - uint8_t nb_pdns = 0; - struct avp *avp = NULL, *child_avp = NULL; - union avp_value value; - - if (mysql_ans == NULL) { - return -1; - } - - ret = hss_mysql_query_pdns(mysql_ans->imsi, &pdns, &nb_pdns); - - if (ret != 0) { - /* mysql query failed: - * - maybe no more memory - * - maybe user is not known (should have failed before) - * - maybe imsi has no EPS subscribed - */ - goto out; - } - - if (nb_pdns == 0) { - /* No PDN for this user -> DIAMETER_ERROR_UNKNOWN_EPS_SUBSCRIPTION */ - return -1; - } - - /* Create the Subscription-Data AVP */ - CHECK_FCT(fd_msg_avp_new(s6a_cnf.dataobj_s6a_subscription_data, 0, &avp)); - - { - uint8_t msisdn_len = strlen(mysql_ans->msisdn); - - /* The MSISDN is known in the HSS, add it to the subscription data */ - if (msisdn_len > 0) { - CHECK_FCT(fd_msg_avp_new(s6a_cnf.dataobj_s6a_msisdn, 0, &child_avp)); - value.os.data = (uint8_t *)mysql_ans->msisdn; - value.os.len = msisdn_len; - CHECK_FCT(fd_msg_avp_setvalue(child_avp, &value)); - CHECK_FCT(fd_msg_avp_add(avp, MSG_BRW_LAST_CHILD, child_avp)); - } - } - - /* We have to include the acess-restriction-data if the value stored in DB - * indicates that at least one restriction is applied to the USER. - */ - if (mysql_ans->access_restriction != 0) { - CHECK_FCT(fd_msg_avp_new(s6a_cnf.dataobj_s6a_access_restriction_data, 0, &child_avp)); - value.u32 = (uint32_t)mysql_ans->access_restriction; - CHECK_FCT(fd_msg_avp_setvalue(child_avp, &value)); - CHECK_FCT(fd_msg_avp_add(avp, MSG_BRW_LAST_CHILD, child_avp)); - } - - /* Add the Subscriber-Status to the list of AVP. - * It shall indicate if the service is barred or granted. - * TODO: normally this parameter comes from DB... - */ - CHECK_FCT(fd_msg_avp_new(s6a_cnf.dataobj_s6a_subscriber_status, 0, &child_avp)); - /* SERVICE_GRANTED */ - value.u32 = 0; - CHECK_FCT(fd_msg_avp_setvalue(child_avp, &value)); - CHECK_FCT(fd_msg_avp_add(avp, MSG_BRW_LAST_CHILD, child_avp)); - - /* Add the Network-Access-Mode to the list of AVP. - * LTE Standalone HSS/MME: ONLY_PACKET. - */ - CHECK_FCT(fd_msg_avp_new(s6a_cnf.dataobj_s6a_network_access_mode, 0, &child_avp)); - /* SERVICE_GRANTED */ - value.u32 = 2; - CHECK_FCT(fd_msg_avp_setvalue(child_avp, &value)); - CHECK_FCT(fd_msg_avp_add(avp, MSG_BRW_LAST_CHILD, child_avp)); - - /* Add the AMBR to list of AVPs */ - { - struct avp *bandwidth; - CHECK_FCT(fd_msg_avp_new(s6a_cnf.dataobj_s6a_ambr, 0, &child_avp)); - - /* Uplink bandwidth */ - CHECK_FCT(fd_msg_avp_new(s6a_cnf.dataobj_s6a_max_bandwidth_ul, 0, &bandwidth)); - value.u32 = mysql_ans->aggr_ul; - CHECK_FCT(fd_msg_avp_setvalue(bandwidth, &value)); - CHECK_FCT(fd_msg_avp_add(child_avp, MSG_BRW_LAST_CHILD, bandwidth)); - - /* Downlink bandwidth */ - CHECK_FCT(fd_msg_avp_new(s6a_cnf.dataobj_s6a_max_bandwidth_dl, 0, &bandwidth)); - value.u32 = mysql_ans->aggr_dl; - CHECK_FCT(fd_msg_avp_setvalue(bandwidth, &value)); - CHECK_FCT(fd_msg_avp_add(child_avp, MSG_BRW_LAST_CHILD, bandwidth)); - - CHECK_FCT(fd_msg_avp_add(avp, MSG_BRW_LAST_CHILD, child_avp)); - } - - /* Add the APN-Configuration-Profile only if at least one APN is subscribed */ - if (nb_pdns > 0) { - struct avp *apn_profile; - CHECK_FCT(fd_msg_avp_new(s6a_cnf.dataobj_s6a_apn_configuration_profile, - 0, &apn_profile)); - - /* Context-Identifier */ - CHECK_FCT(fd_msg_avp_new(s6a_cnf.dataobj_s6a_context_identifier, 0, &child_avp)); - value.u32 = 0; - /* TODO: this is the reference to the default APN... */ - CHECK_FCT(fd_msg_avp_setvalue(child_avp, &value)); - CHECK_FCT(fd_msg_avp_add(apn_profile, MSG_BRW_LAST_CHILD, child_avp)); - - /* All-APN-Configurations-Included-Indicator */ - CHECK_FCT(fd_msg_avp_new(s6a_cnf.dataobj_s6a_all_apn_conf_inc_ind, 0, &child_avp)); - value.u32 = 0; - CHECK_FCT(fd_msg_avp_setvalue(child_avp, &value)); - CHECK_FCT(fd_msg_avp_add(apn_profile, MSG_BRW_LAST_CHILD, child_avp)); - - for (i = 0; i < nb_pdns; i++) { - struct avp *apn_configuration; - mysql_pdn_t *pdn_elm; - - pdn_elm = &pdns[i]; - - /* APN-Configuration */ - CHECK_FCT(fd_msg_avp_new(s6a_cnf.dataobj_s6a_apn_configuration, 0, &apn_configuration)); - - /* Context-Identifier */ - CHECK_FCT(fd_msg_avp_new(s6a_cnf.dataobj_s6a_context_identifier, 0, &child_avp)); - value.u32 = i; - CHECK_FCT(fd_msg_avp_setvalue(child_avp, &value)); - CHECK_FCT(fd_msg_avp_add(apn_configuration, MSG_BRW_LAST_CHILD, child_avp)); - - /* PDN-Type */ - CHECK_FCT(fd_msg_avp_new(s6a_cnf.dataobj_s6a_pdn_type, 0, &child_avp)); - value.u32 = pdn_elm->pdn_type; - CHECK_FCT(fd_msg_avp_setvalue(child_avp, &value)); - CHECK_FCT(fd_msg_avp_add(apn_configuration, MSG_BRW_LAST_CHILD, child_avp)); - - if ((pdn_elm->pdn_type == IPV4) || - (pdn_elm->pdn_type == IPV4_OR_IPV6) || - (pdn_elm->pdn_type == IPV4V6)) { - s6a_add_ipv4_address(apn_configuration, pdn_elm->pdn_address.ipv4_address); - } - - if ((pdn_elm->pdn_type == IPV6) || - (pdn_elm->pdn_type == IPV4_OR_IPV6) || - (pdn_elm->pdn_type == IPV4V6)) { - s6a_add_ipv6_address(apn_configuration, pdn_elm->pdn_address.ipv6_address); - } - - /* Service-Selection */ - CHECK_FCT(fd_msg_avp_new(s6a_cnf.dataobj_s6a_service_selection, 0, &child_avp)); - value.os.data = (uint8_t*)pdn_elm->apn; - value.os.len = strlen(pdn_elm->apn); - CHECK_FCT(fd_msg_avp_setvalue(child_avp, &value)); - CHECK_FCT(fd_msg_avp_add(apn_configuration, MSG_BRW_LAST_CHILD, child_avp)); - - /* Add the eps subscribed qos profile */ - { - struct avp *qos_profile, *allocation_priority; - CHECK_FCT(fd_msg_avp_new(s6a_cnf.dataobj_s6a_eps_subscribed_qos_profile, 0, &qos_profile)); - - CHECK_FCT(fd_msg_avp_new(s6a_cnf.dataobj_s6a_qos_class_identifier, 0, &child_avp)); - /* For a QCI_1 */ - value.u32 = (uint32_t)pdn_elm->qci; - CHECK_FCT(fd_msg_avp_setvalue(child_avp, &value)); - CHECK_FCT(fd_msg_avp_add(qos_profile, MSG_BRW_LAST_CHILD, child_avp)); - - /* Allocation retention priority */ - { - CHECK_FCT(fd_msg_avp_new(s6a_cnf.dataobj_s6a_allocation_retention_priority, 0, &allocation_priority)); - - /* Priority level */ - CHECK_FCT(fd_msg_avp_new(s6a_cnf.dataobj_s6a_priority_level, 0, &child_avp)); - value.u32 = (uint32_t)pdn_elm->priority_level; - CHECK_FCT(fd_msg_avp_setvalue(child_avp, &value)); - CHECK_FCT(fd_msg_avp_add(allocation_priority, MSG_BRW_LAST_CHILD, child_avp)); - - /* Pre-emption-capability */ - CHECK_FCT(fd_msg_avp_new(s6a_cnf.dataobj_s6a_pre_emption_capability, 0, &child_avp)); - value.u32 = (uint32_t)pdn_elm->pre_emp_cap; - CHECK_FCT(fd_msg_avp_setvalue(child_avp, &value)); - CHECK_FCT(fd_msg_avp_add(allocation_priority, MSG_BRW_LAST_CHILD, child_avp)); - - /* Pre-emption-vulnerability */ - CHECK_FCT(fd_msg_avp_new(s6a_cnf.dataobj_s6a_pre_emption_vulnerability, 0, &child_avp)); - value.u32 = (uint32_t)pdn_elm->pre_emp_vul; - CHECK_FCT(fd_msg_avp_setvalue(child_avp, &value)); - CHECK_FCT(fd_msg_avp_add(allocation_priority, MSG_BRW_LAST_CHILD, child_avp)); - - CHECK_FCT(fd_msg_avp_add(qos_profile, MSG_BRW_LAST_CHILD, allocation_priority)); - } - CHECK_FCT(fd_msg_avp_add(apn_configuration, MSG_BRW_LAST_CHILD, qos_profile)); - } - - /* Add the AMBR to list of AVPs */ - { - struct avp *bandwidth; - CHECK_FCT(fd_msg_avp_new(s6a_cnf.dataobj_s6a_ambr, 0, &bandwidth)); - - /* Uplink bandwidth */ - CHECK_FCT(fd_msg_avp_new(s6a_cnf.dataobj_s6a_max_bandwidth_ul, 0, &child_avp)); - value.u32 = (uint32_t)pdn_elm->aggr_ul; - CHECK_FCT(fd_msg_avp_setvalue(child_avp, &value)); - CHECK_FCT(fd_msg_avp_add(bandwidth, MSG_BRW_LAST_CHILD, child_avp)); - - /* Downlink bandwidth */ - CHECK_FCT(fd_msg_avp_new(s6a_cnf.dataobj_s6a_max_bandwidth_dl, 0, &child_avp)); - value.u32 = (uint32_t)pdn_elm->aggr_dl; - CHECK_FCT(fd_msg_avp_setvalue(child_avp, &value)); - CHECK_FCT(fd_msg_avp_add(bandwidth, MSG_BRW_LAST_CHILD, child_avp)); - - CHECK_FCT(fd_msg_avp_add(apn_configuration, MSG_BRW_LAST_CHILD, bandwidth)); - } - - CHECK_FCT(fd_msg_avp_add(apn_profile, MSG_BRW_LAST_CHILD, apn_configuration)); - } - - CHECK_FCT(fd_msg_avp_add(avp, MSG_BRW_LAST_CHILD, apn_profile)); - } - - /* Subscribed-Periodic-RAU-TAU-Timer */ - CHECK_FCT(fd_msg_avp_new(s6a_cnf.dataobj_s6a_subscribed_rau_tau_timer, 0, &child_avp)); - /* Request an RAU/TAU update every x seconds */ - value.u32 = (uint32_t)mysql_ans->rau_tau; - CHECK_FCT(fd_msg_avp_setvalue(child_avp, &value)); - CHECK_FCT(fd_msg_avp_add(avp, MSG_BRW_LAST_CHILD, child_avp)); - - /* Add the AVP to the message */ - CHECK_FCT(fd_msg_avp_add(message, MSG_BRW_LAST_CHILD, avp)); - -out: - - if (pdns) { - free(pdns); - } - - return ret; -} diff --git a/openair-cn/OPENAIRHSS/s6a/s6a_supported_features.c b/openair-cn/OPENAIRHSS/s6a/s6a_supported_features.c deleted file mode 100644 index a2d0dd7791..0000000000 --- a/openair-cn/OPENAIRHSS/s6a/s6a_supported_features.c +++ /dev/null @@ -1,40 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -/*! \file s6a_supported_features.c - * \brief - * \author Sebastien ROUX - * \date 2013 - * \version 0.1 - */ - -#include "hss_config.h" -#include "db_proto.h" -#include "s6a_proto.h" - diff --git a/openair-cn/OPENAIRHSS/s6a/s6a_supported_features.h b/openair-cn/OPENAIRHSS/s6a/s6a_supported_features.h deleted file mode 100644 index 5fc278a732..0000000000 --- a/openair-cn/OPENAIRHSS/s6a/s6a_supported_features.h +++ /dev/null @@ -1,141 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -#include "hss_config.h" - -#ifndef S6A_SUPPORTED_FEATURES_H_ -#define S6A_SUPPORTED_FEATURES_H_ - -/* Operator Determined Barring of all Packet Oriented Services. */ -#define ODB_ALL_APN(x) (x & 0x1) - -/* Operator Determined Barring of Packet Oriented Services from access points - * that are within the HPLMN whilst the subscriber is roaming in a VPLMN. - */ -#define ODB_HPLMN_APN(x) ((x & 0x2) >> 1) - -/* Operator Determined Barring of Packet Oriented Services from access points - * that are within the roamed to VPLMN - */ -#define ODB_VPLMN_APN(x) ((x & 0x4) >> 2) - -/* Operator Determined Barring of all outgoing calls */ -#define ODB_ALL_OG(x) ((x & 0x8) >> 3) - -/* Operator Determined Barring of all outgoing international calls */ -#define ODB_ALL_INT_OG ((x & 0x10) >> 4) - -/* Operator Determined Barring of all outgoing international calls except those - * directed to the home PLMN country - */ -#define ODB_ALL_INT_NOT_TO_HPLMN(x) ((x & 0x20) >> 5) - -/* Operator Determined Barring of all outgoing inter-zonal calls */ -#define ODB_ALL_INT_ZONE_OG(x) ((x & 0x40) >> 6) - -/* Operator Determined Barring of all outgoing inter-zonal calls except those - * directed to the home PLMN country - */ -#define ODB_ALL_INT_ZONE_OG_NOT_TO_HPLMN(x) ((x & 0x80) >> 7) - -/* Operator Determined Barring of all outgoing international calls except those - * directed to the home PLMN country and Barring of all outgoing inter-zonal calls - */ -#define ODB_ALL_INT_ZONE_OG_AND_INT_OG_NOT_TO_HPLMN(x) ((x & 0x100) >> 8) - -/* Regional Subscription */ -#define REG_SUB(x) ((x & 0x200) >> 9) - -/* Trace Function */ -#define TRACE(x) ((x & 0x400) >> 10) - -/* All LCS Privacy Exception Classes */ -#define LCS_ALL_PRIV_EXCEP(x) ((x & 0x800) >> 11) - -/* Allow location by any LCS client */ -#define LCS_UNIVERSAL(x) ((x & 0x1000) >> 12) - -/* Allow location by any value added LCS client to which a call/session is - * established from the target UE - */ -#define LCS_CALL_SESS_RELATED(x) ((x & 0x2000) >> 13) - -/* Allow location by designated external value added LCS clients */ -#define LCS_CALL_SESS_UNRELATED(x) ((x & 0x4000) >> 14) - -/* Allow location by designated PLMN operator LCS clients */ -#define LCS_PLMN_OPERATOR(x) ((x & 0x8000) >> 15) - -/* Allow location by LCS clients of a designated LCS service type */ -#define LCS_SERVICE_TYPE(x) ((x & 0x10000) >> 16) - -/* All Mobile Originating Location Request Classes */ -#define LCS_ALL_MOLR_SS(x) ((x & 0x20000) >> 17) - -/* Allow an MS to request its own location */ -#define LCS_BASIC_SELF_LOCATION(x) ((x & 0x40000) >> 18) - -/* Allow an MS to perform self location without interaction with the PLMN */ -#define LCS_AUTO_SELF_LOCATION(x) ((x & 0x80000) >> 19) - -/* Allow an MS to request transfer of its location to another LCS client */ -#define LCS_TRANSFER_TO_THIRD_PARTY(x) ((x & 0x100000) >> 20) - -/* Short Message MO-PP */ -#define SM_MO_PP(x) ((x & 0x200000) >> 21) - -/* Barring of Outgoing Calls */ -#define BARRING_OUTGOING_CALLS(x) ((x & 0x400000) >> 22) - -/* Barring of all outgoing calls */ -#define BAOC(x) ((x & 0x800000) >> 23) - -/* Barring of outgoing international calls */ -#define BOIC(x) ((x & 0x1000000) >> 24) - -/* Barring of outgoing international calls except those directed to the home PLMN - * Country - */ -#define BOIC_EXCEPT_HC(x) ((x & 0x2000000) >> 25) - -/* UE Reachability Notifcation */ -#define UE_REACH_NOTIF(x) ((x & 0x4000000) >> 26) - -/* Terminating Access Domain Selection Data Retrieval */ -#define T_ADS_DATA_RETR(x) ((x & 0x8000000) >> 27) - -/* State/Location Information Retrieval */ -#define STATE_LOCATION_INFO_RETR(x) ((x & 0x10000000) >> 28) - -/* Partial Purge from a Combined MME/SGSN */ -#define PARTIAL_PURGE(x) ((x & 0x20000000) >> 29) - -#define SUPP_FEAT_PAD_VALID(x) ((x & 0xfc000000) == 0) - -#endif /* S6A_SUPPORTED_FEATURES_H_ */ diff --git a/openair-cn/OPENAIRHSS/s6a/s6a_up_loc.c b/openair-cn/OPENAIRHSS/s6a/s6a_up_loc.c deleted file mode 100644 index 3c3b8519a8..0000000000 --- a/openair-cn/OPENAIRHSS/s6a/s6a_up_loc.c +++ /dev/null @@ -1,432 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -/*! \file s6a_up_loc.c - * \brief Handle an update location message and create the answer. - * \author Sebastien ROUX - * \date 2013 - * \version 0.1 - */ - -#include -#include -#include "hss_config.h" -#include "db_proto.h" -#include "s6a_proto.h" -#include "access_restriction.h" - -int s6a_up_loc_cb(struct msg **msg, struct avp *paramavp, - struct session *sess, void *opaque, - enum disp_action *act) -{ - struct msg *ans, *qry; - struct avp *avp, *origin_host, *origin_realm; - struct avp *failed_avp = NULL; - - struct avp_hdr *origin_host_hdr, *origin_realm_hdr; - struct avp_hdr *hdr; - - union avp_value value; - - int ret = 0; - int result_code = ER_DIAMETER_SUCCESS; - int experimental = 0; - uint32_t ulr_flags = 0; - - mysql_ul_ans_t mysql_ans; - mysql_ul_push_t mysql_push; - - if (msg == NULL) { - return EINVAL; - } - - memset(&mysql_push, 0, sizeof(mysql_ul_push_t)); - memset(&mysql_ans, 0, sizeof(mysql_ul_ans_t)); - - fprintf(stdout, "Received new update location request\n"); - - qry = *msg; - /* Create the answer */ - CHECK_FCT(fd_msg_new_answer_from_req(fd_g_config->cnf_dict, msg, 0)); - ans = *msg; - - /* Retrieving IMSI AVP */ - CHECK_FCT(fd_msg_search_avp(qry, s6a_cnf.dataobj_s6a_imsi, &avp)); - - if (avp) { - CHECK_FCT(fd_msg_avp_hdr(avp, &hdr)); - - if (hdr->avp_value->os.len > IMSI_LENGTH) { - fprintf(stdout, "IMSI_LENGTH ER_DIAMETER_INVALID_AVP_VALUE\n"); - result_code = ER_DIAMETER_INVALID_AVP_VALUE; - goto out; - } - - // 3GPP TS 29.272-910 / 5.2.1.1.3 Detailed behaviour of the HSS - // When receiving an Update Location request the HSS shall check whether the IMSI is known. - // If it is not known, a Result Code of DIAMETER_ERROR_USER_UNKNOWN shall be returned. - // If it is known, but the subscriber has no EPS subscription, the HSS may (as an operator option) - // return a Result Code of DIAMETER_ERROR_UNKNOWN_EPS_SUBSCRIPTION. - // If the Update Location Request is received over the S6a interface, and the subscriber has not - // any APN configuration, the HSS shall return a Result Code of DIAMETER_ERROR_UNKNOWN_EPS_SUBSCRIPTION. - // The HSS shall check whether the RAT type the UE is using is allowed. If it is not, - // a Result Code of DIAMETER_ERROR_RAT_NOT_ALLOWED shall be returned. - // ... - sprintf(mysql_push.imsi, "%*s", (int)hdr->avp_value->os.len, - (char*)hdr->avp_value->os.data); - - if ((ret = hss_mysql_update_loc(mysql_push.imsi, &mysql_ans)) != 0) { - /* We failed to find the IMSI in the database. Replying to the request - * with the user unknown cause. - */ - experimental = 1; - fprintf(stdout, "IMSI %s DIAMETER_ERROR_USER_UNKNOWN\n", mysql_push.imsi); - result_code = DIAMETER_ERROR_USER_UNKNOWN; - goto out; - } - } else { - fprintf(stderr, "Cannot get IMSI AVP which is mandatory\n"); - result_code = ER_DIAMETER_MISSING_AVP; - goto out; - } - - /* Retrieving Origin host AVP */ - CHECK_FCT(fd_msg_search_avp(qry, s6a_cnf.dataobj_s6a_origin_host, &origin_host)); - - if (!origin_host) { - fprintf(stderr, "origin_host ER_DIAMETER_MISSING_AVP\n"); - result_code = ER_DIAMETER_MISSING_AVP; - goto out; - } - - /* Retrieving Origin realm AVP */ - CHECK_FCT(fd_msg_search_avp(qry, s6a_cnf.dataobj_s6a_origin_realm, &origin_realm)); - - if (!origin_realm) { - fprintf(stderr, "origin_realm ER_DIAMETER_MISSING_AVP\n"); - result_code = ER_DIAMETER_MISSING_AVP; - goto out; - } - - /* Retrieve the header from origin host and realm avps */ - CHECK_FCT(fd_msg_avp_hdr(origin_host, &origin_host_hdr)); - CHECK_FCT(fd_msg_avp_hdr(origin_realm, &origin_realm_hdr)); - - sprintf(mysql_push.mme_identity.mme_host, "%*s", - (int)origin_host_hdr->avp_value->os.len, - (char*)origin_host_hdr->avp_value->os.data); - - sprintf(mysql_push.mme_identity.mme_realm, "%*s", - (int)origin_realm_hdr->avp_value->os.len, - (char*)origin_realm_hdr->avp_value->os.data); - - /* Retrieving RAT type AVP */ - CHECK_FCT(fd_msg_search_avp(qry, s6a_cnf.dataobj_s6a_rat_type, &avp)); - - if (avp) { - CHECK_FCT(fd_msg_avp_hdr(avp, &hdr)); - - /* As we are in E-UTRAN stand-alone HSS, we have to reject incoming - * location request with a RAT-Type != than E-UTRAN. - * The user may be disallowed to use the specified RAT, check the access - * restriction bit mask received from DB. - */ - if ((hdr->avp_value->u32 != 1004) || - (FLAG_IS_SET(mysql_ans.access_restriction, E_UTRAN_NOT_ALLOWED))) { - experimental = 1; - fprintf(stderr, "access_restriction DIAMETER_ERROR_RAT_NOT_ALLOWED\n"); - result_code = DIAMETER_ERROR_RAT_NOT_ALLOWED; - goto out; - } - } else { - fprintf(stderr, "rat_type ER_DIAMETER_MISSING_AVP\n"); - result_code = ER_DIAMETER_MISSING_AVP; - goto out; - } - - /* Retrieving ULR Flags AVP */ - CHECK_FCT(fd_msg_search_avp(qry, s6a_cnf.dataobj_s6a_ulr_flags, &avp)); - - if (avp) { - CHECK_FCT(fd_msg_avp_hdr(avp, &hdr)); - ulr_flags = hdr->avp_value->u32; - - /* Check the flags received */ - if (FLAG_IS_SET(ulr_flags, ULR_SINGLE_REGISTRATION_IND)) { - /* We don't handle cases where we have to inform SGSN */ - result_code = ER_DIAMETER_INVALID_AVP_VALUE; - - fprintf(stderr, "ULR single registration bit set (SGSN to MME): " - "not handled by standalone E-UTRAN HSS\n"); - goto out; - } - - if (!FLAG_IS_SET(ulr_flags, ULR_S6A_S6D_INDICATOR)) { - /* The request is coming from s6d interface (SGSN). */ - result_code = ER_DIAMETER_INVALID_AVP_VALUE; - - fprintf(stderr, "ULR S6D bit set: " - "not handled by standalone E-UTRAN HSS\n"); - goto out; - } - - if (FLAG_IS_SET(ulr_flags, ULR_NODE_TYPE_IND)) { - /* Request coming from combined SGSN/MME. */ - result_code = ER_DIAMETER_INVALID_AVP_VALUE; - fprintf(stderr, "ULR conbined SGSN/MME bit set: " - "not handled by standalone E-UTRAN HSS\n"); - goto out; - } - - if (FLAG_IS_SET(ulr_flags, ULR_INITIAL_ATTACH_IND)) { - /* This bit, when set, indicates that the HSS shall send Cancel - * Location to the MME or SGSN if there is the MME or SGSN - * registration. - */ - // TODO: check if an MME is already registered, serving the UE. - // If so, it should be informed. - - /* The identity of the MME will be added to db */ - mysql_push.mme_identity_present = MME_IDENTITY_PRESENT; - } else { - /* The bit is not set, we are expecting that the mme contained in db - * matches the original MME. - */ - if ((mysql_ans.mme_identity.mme_host != NULL) && - (mysql_ans.mme_identity.mme_realm != NULL)) { - /* Compare if values match expected */ - if (memcmp(mysql_ans.mme_identity.mme_host, origin_host_hdr->avp_value->os.data, - origin_host_hdr->avp_value->os.len > strlen(mysql_ans.mme_identity.mme_host) ? - strlen(mysql_ans.mme_identity.mme_host) : origin_host_hdr->avp_value->os.len) != 0) { - experimental = 1; - fprintf(stderr, "DIAMETER_ERROR_UNKOWN_SERVING_NODE (host)\n"); - result_code = DIAMETER_ERROR_UNKOWN_SERVING_NODE; - goto out; - } - - if (memcmp(mysql_ans.mme_identity.mme_realm, origin_realm_hdr->avp_value->os.data, - origin_realm_hdr->avp_value->os.len > strlen(mysql_ans.mme_identity.mme_realm) ? - strlen(mysql_ans.mme_identity.mme_realm) : origin_realm_hdr->avp_value->os.len) != 0) { - experimental = 1; - fprintf(stderr, "DIAMETER_ERROR_UNKOWN_SERVING_NODE (realm)\n"); - result_code = DIAMETER_ERROR_UNKOWN_SERVING_NODE; - goto out; - } - } else { - /* Failed to retrieve current serving MME and the ULR is not - * marked as an initial attach indication... - */ - experimental = 1; - fprintf(stderr, "DIAMETER_ERROR_UNKOWN_SERVING_NODE\n"); - result_code = DIAMETER_ERROR_UNKOWN_SERVING_NODE; - goto out; - } - } - - if (!ULR_PAD_VALID(ulr_flags)) { - /* Padding is not zero'ed, may be the MME/SGSN supports newer - * release. Inform it. - */ - fprintf(stderr, "ULR flags ER_DIAMETER_INVALID_AVP_VALUE\n"); - result_code = ER_DIAMETER_INVALID_AVP_VALUE; - goto out; - } - } else { - fprintf(stderr, "ULR flags ER_DIAMETER_MISSING_AVP\n"); - result_code = ER_DIAMETER_MISSING_AVP; - goto out; - } - - /* Retrieving Visited-PLMN-Id AVP */ - CHECK_FCT(fd_msg_search_avp(qry, s6a_cnf.dataobj_s6a_visited_plmn_id, &avp)); - - if (avp) { - CHECK_FCT(fd_msg_avp_hdr(avp, &hdr)); - - /* Roaming cases are not allowed for now. - * Reject the connectivity if PLMN visited and IMSI PLMN disagree. - */ - /* TODO */ - if (hdr->avp_value->os.len == 3) { - // if (apply_access_restriction(mysql_push.imsi, hdr->avp_value->os.data) != 0) { - // /* We found that user is roaming and has no right to do it -> - // * reject the connection - // */ - // result_code = DIAMETER_ERROR_ROAMING_NOT_ALLOWED; - // experimental = 1; - // goto out; - // } - } else { - fprintf(stderr, "PLMN ID ER_DIAMETER_INVALID_AVP_VALUE\n"); - result_code = ER_DIAMETER_INVALID_AVP_VALUE; - goto out; - } - } else { - fprintf(stderr, "PLMN ID ER_DIAMETER_MISSING_AVP\n"); - result_code = ER_DIAMETER_MISSING_AVP; - goto out; - } - - /* Retrieving Terminal-Information AVP */ - CHECK_FCT(fd_msg_search_avp(qry, s6a_cnf.dataobj_s6a_terminal_info, &avp)); - - if (avp) { - struct avp *child_avp; - - /* Walk through childs avp */ - CHECK_FCT(fd_msg_browse(avp, MSG_BRW_FIRST_CHILD, &child_avp, NULL)); - - while (child_avp) { - /* Retrieve the header of the child avp */ - CHECK_FCT(fd_msg_avp_hdr(child_avp, &hdr)); - - switch(hdr->avp_code) { - case AVP_CODE_IMEI: { - /* Check that we do not exceed the maximum size for IMEI */ - if (hdr->avp_value->os.len > IMEI_LENGTH) { - fprintf(stderr, "terminal info ER_DIAMETER_INVALID_AVP_VALUE\n"); - result_code = ER_DIAMETER_INVALID_AVP_VALUE; - failed_avp = child_avp; - goto out; - } - - sprintf(mysql_push.imei, "%*s", (int)hdr->avp_value->os.len, - hdr->avp_value->os.data); - mysql_push.imei_present = IMEI_PRESENT; - } - break; - - case AVP_CODE_SOFTWARE_VERSION: { - /* Check the size for SV */ - if (hdr->avp_value->os.len != SV_LENGTH) { - fprintf(stderr, "software version ER_DIAMETER_INVALID_AVP_VALUE\n"); - result_code = ER_DIAMETER_INVALID_AVP_VALUE; - failed_avp = child_avp; - goto out; - } - - mysql_push.software_version[0] = hdr->avp_value->os.data[0]; - mysql_push.software_version[1] = hdr->avp_value->os.data[1]; - mysql_push.sv_present = SV_PRESENT; - } - break; - - default: /* Fall through */ - case AVP_CODE_3GPP2_MEID: { - /* This AVP is not expected on s6a interface */ - fprintf(stderr, "AVP_CODE_3GPP2_MEID ER_DIAMETER_AVP_UNSUPPORTED\n"); - result_code = ER_DIAMETER_AVP_UNSUPPORTED; - failed_avp = child_avp; - goto out; - } - } - - /* Go to next AVP in the grouped AVP */ - CHECK_FCT(fd_msg_browse(child_avp, MSG_BRW_NEXT, &child_avp, NULL)); - } - } - - /* Retrieving UE-SRVCC AVP */ - CHECK_FCT(fd_msg_search_avp(qry, s6a_cnf.dataobj_s6a_ue_srvcc_cap, &avp)); - - if (avp) { - CHECK_FCT(fd_msg_avp_hdr(avp, &hdr)); - mysql_push.ue_srvcc_present = UE_SRVCC_PRESENT; - mysql_push.ue_srvcc = hdr->avp_value->u32; - } - - /* Retrieving Supported features list AVP */ - CHECK_FCT(fd_msg_search_avp(qry, s6a_cnf.dataobj_s6a_supported_features, &avp)); - - if (avp) { - struct avp *child_avp; - - /* Walk through childs avp */ - CHECK_FCT(fd_msg_browse(avp, MSG_BRW_FIRST_CHILD, &child_avp, NULL)); - - while (child_avp) { - /* Retrieve the header of the child avp */ - CHECK_FCT(fd_msg_avp_hdr(child_avp, &hdr)); - - switch(hdr->avp_code) { - case AVP_CODE_VENDOR_ID: { - if (hdr->avp_value->u32 != VENDOR_3GPP) { - /* features from a vendor other than 3GPP is not supported */ - fprintf(stderr, "Cannot interpret features list with vendor id " - "different than 3GPP(%d)\n", VENDOR_3GPP); - continue; - } - } - break; - - case AVP_CODE_FEATURE_LIST: { - mysql_push.mme_supported_features_present = MME_SUPPORTED_FEATURES_PRESENT; - mysql_push.mme_supported_features = hdr->avp_value->u32; - } - break; - } - - /* Go to next AVP in the grouped AVP */ - CHECK_FCT(fd_msg_browse(child_avp, MSG_BRW_NEXT, &child_avp, NULL)); - } - } - - mysql_push_up_loc(&mysql_push); - - /* ULA flags */ - CHECK_FCT(fd_msg_avp_new(s6a_cnf.dataobj_s6a_ula_flags, 0, &avp)); - value.u32 = 1; - CHECK_FCT(fd_msg_avp_setvalue(avp, &value)); - CHECK_FCT(fd_msg_avp_add(ans, MSG_BRW_LAST_CHILD, avp)); - - /* Only add the subscriber data if not marked as skipped by MME */ - if (!FLAG_IS_SET(ulr_flags, ULR_SKIP_SUBSCRIBER_DATA)) { - if (s6a_add_subscription_data_avp(ans, &mysql_ans) != 0) { - fprintf(stderr, "ULR_SKIP_SUBSCRIBER_DATA DIAMETER_ERROR_UNKNOWN_EPS_SUBSCRIPTION\n"); - result_code = DIAMETER_ERROR_UNKNOWN_EPS_SUBSCRIPTION; - experimental = 1; - goto out; - } - } - -out: - /* Add the Auth-Session-State AVP */ - CHECK_FCT(fd_msg_search_avp(qry, s6a_cnf.dataobj_s6a_auth_session_state, &avp)); - CHECK_FCT(fd_msg_avp_hdr(avp, &hdr)); - - CHECK_FCT(fd_msg_avp_new(s6a_cnf.dataobj_s6a_auth_session_state, 0, &avp)); - CHECK_FCT(fd_msg_avp_setvalue(avp, hdr->avp_value)); - CHECK_FCT(fd_msg_avp_add(ans, MSG_BRW_LAST_CHILD, avp)); - - /* Append the result code to the answer */ - CHECK_FCT(s6a_add_result_code(ans, failed_avp, result_code, experimental)); - - CHECK_FCT(fd_msg_send(msg, NULL, NULL )); - return 0; -} diff --git a/openair-cn/OPENAIRHSS/scripts/COPYING b/openair-cn/OPENAIRHSS/scripts/COPYING deleted file mode 100644 index 94a9ed024d..0000000000 --- a/openair-cn/OPENAIRHSS/scripts/COPYING +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program 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. - - This program 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 this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/openair-cn/OPENAIRHSS/scripts/install_hss.sh b/openair-cn/OPENAIRHSS/scripts/install_hss.sh deleted file mode 100644 index c1b02c6315..0000000000 --- a/openair-cn/OPENAIRHSS/scripts/install_hss.sh +++ /dev/null @@ -1,145 +0,0 @@ -# !/bin/sh -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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 . -# -# Contact Information -# OpenAirInterface Admin: openair_admin@eurecom.fr -# OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr -# -# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. -# -################################################################################ - -CURRENT_PATH=`pwd` - -sudo apt-get install autoconf automake gawk cmake make gcc flex bison libsctp1 libsctp-dev libidn2-0-dev \ -libidn11-dev libmysqlclient-dev libxml2-dev swig python-dev cmake-curses-gui \ -valgrind guile-2.0-dev libgmp-dev libgcrypt11-dev gdb unzip libtasn1-3-dev g++ \ -linux-headers-`uname -r` build-essential -y - - -if [ -f install_log.txt ] - then - rm -f install_log.txt -fi - -if [ ! -d /usr/local/src/ ] - then - echo "/usr/local/src/ doesn't exist please create one" - exit -1 -fi - -if [ ! -w /usr/local/src/ ] - then - echo "You don't have permissions to write to /usr/local/src/" - exit -1 -fi - -cd /usr/local/src/ -echo "Downloading nettle archive" - -if [ -f nettle-2.5.tar.gz ] - then - rm -f nettle-2.5.tar.gz -fi -if [ -f nettle-2.5.tar ] - then - rm -f nettle-2.5.tar -fi -if [ -d nettle-2.5 ] - then - rm -rf nettle-2.5/ -fi - -wget ftp://ftp.lysator.liu.se/pub/security/lsh/nettle-2.5.tar.gz > install_log.txt -gunzip nettle-2.5.tar.gz > install_log.txt -echo "Uncompressing nettle archive" -tar -xf nettle-2.5.tar -cd nettle-2.5/ -./configure --disable-openssl --enable-shared --prefix=/usr > install_log.txt -if [ $? -ne 0 ] -then - exit -1 -fi -echo "Compiling nettle" -make -j2 > install_log.txt 2>&1 -make check > install_log.txt -sudo make install > install_log.txt -cd ../ - -echo "Downloading gnutls archive" - -if [ -f gnutls-3.1.0.tar.xz ] - then - rm -f gnutls-3.1.0.tar.xz -fi -if [ -d gnutls-3.1.0/ ] - then - rm -rf gnutls-3.1.0/ -fi - -wget ftp://ftp.gnutls.org/gcrypt/gnutls/v3.1/gnutls-3.1.0.tar.xz > install_log.txt -tar -xf gnutls-3.1.0.tar.xz -echo "Uncompressing gnutls archive" -cd gnutls-3.1.0/ -./configure --prefix=/usr -if [ $? -ne 0 ] -then - exit -1 -fi -echo "Compiling gnutls" -make -j2 > install_log.txt 2>&1 -sudo make install > install_log.txt -cd ../ - -echo "Downloading freeDiameter archive" - -if [ -f 1.1.5.tar.gz ] - then - rm -f 1.1.5.tar.gz -fi -if [ -d freeDiameter-1.1.5/ ] - then - rm -rf freeDiameter-1.1.5/ -fi - -wget http://www.freediameter.net/hg/freeDiameter/archive/1.1.5.tar.gz > install_log.txt -tar -xzf 1.1.5.tar.gz > install_log.txt -echo "Uncompressing freeDiameter archive" -cd freeDiameter-1.1.5 -echo "Patching freeDiameter" -patch -p1 < $OPENAIRCN_DIR/S6A/freediameter/freediameter-1.1.5.patch > install_log.txt -mkdir build -cd build -# optionaly if needed add -DCMAKE_BUILD_TYPE=debug -cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr ../ > install_log.txt -if [ $? -ne 0 ] -then - exit -1 -fi -echo "Compiling freeDiameter" -make -j2 > install_log.txt 2>&1 -#make help -make test > install_log.txt -sudo make install > install_log.txt - -cd $OPENAIRCN_DIR/OPENAIRHSS/conf -./make_certs.sh diff --git a/openair-cn/OPENAIRHSS/tests/COPYING b/openair-cn/OPENAIRHSS/tests/COPYING deleted file mode 100644 index 94a9ed024d..0000000000 --- a/openair-cn/OPENAIRHSS/tests/COPYING +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program 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. - - This program 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 this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/openair-cn/OPENAIRHSS/tests/Makefile.am b/openair-cn/OPENAIRHSS/tests/Makefile.am deleted file mode 100644 index b149c8058c..0000000000 --- a/openair-cn/OPENAIRHSS/tests/Makefile.am +++ /dev/null @@ -1,88 +0,0 @@ -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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 . -# -# Contact Information -# OpenAirInterface Admin: openair_admin@eurecom.fr -# OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr -# -# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. -# -################################################################################ -# if HAVE_CHECK -# TESTS = up_loc_test -# else -# TESTS = -# endif -AM_CFLAGS = @CHECK_CFLAGS@ \ - -I$(top_srcdir)/auc - -if HAVE_CHECK -TESTS = up_loc_test test_security_f1 \ - test_security_f2_f3_f5 \ - test_security_f4_f5star \ - test_kdf \ - test_security_kasme -else -TESTS = -endif - -test_common = \ - $(top_builddir)/auc/libauc.la \ - libtest_utils.la \ - @CHECK_LIBS@ - -up_loc_test_LDADD = \ - libtest_utils.la \ - @CHECK_LIBS@ - -test_security_f1_LDADD = \ - $(test_common) - -test_security_f2_f3_f5_LDADD = \ - $(test_common) - -test_security_f4_f5star_LDADD = \ - $(test_common) - -test_security_kasme_LDADD = \ - $(test_common) - -test_kdf_LDADD = \ - $(test_common) - -noinst_LTLIBRARIES = libtest_utils.la -libtest_utils_la_SOURCES = \ - test_utils.h test_utils.c \ - test_fd.h test_fd.c - -check_PROGRAMS = \ - up_loc_test test_security_f1 \ - test_security_f2_f3_f5 \ - test_security_f4_f5star \ - test_security_kasme \ - test_kdf - -up_loc_test_SOURCES = up_loc_test.c -test_security_f1_SOURCE = test_security_f1.c -test_security_f2_f3_f5_SOURCE = test_security_f2_f3_f5.c -test_security_f4_f5star_SOURCE = test_security_f4_f5star.c -test_security_kasme_SOURCE = test_security_kasme.c -test_kdf_SOURCE = test_kdf.c \ No newline at end of file diff --git a/openair-cn/OPENAIRHSS/tests/test_fd.c b/openair-cn/OPENAIRHSS/tests/test_fd.c deleted file mode 100644 index e4961d6aa9..0000000000 --- a/openair-cn/OPENAIRHSS/tests/test_fd.c +++ /dev/null @@ -1,87 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include "config.h" - -#include -#include - -#include "test_utils.h" -#include "test_fd.h" - -extern int fd_ext_add( char * filename, char * conffile ); - -void s6a_fd_init(void) -{ - struct peer_info peer; - - fd_g_debug_lvl = NONE; - - memset(&peer, 0, sizeof(struct peer_info)); - - peer.pi_diamid = "hss.test.fr"; - peer.pi_diamidlen = strlen(peer.pi_diamid); - - /* Only SCTP */ - peer.config.pic_flags.pro4 = PI_P4_SCTP; - peer.config.pic_flags.sec = PI_SEC_NONE; - peer.config.pic_flags.exp = PI_EXP_NONE; - - peer.config.pic_port = 18678; - - if (fd_core_initialize() != 0) { - fail("fd_core_initialize failed"); - } - - if (fd_core_start() != 0) { - fail("fd_core_start failed"); - } - - if (fd_core_parseconf("../../conf/hss_fd.conf") != 0) { - fail("fd_core_waitstartcomplete failed"); - } - - if (fd_core_waitstartcomplete() != 0) { - fail("fd_core_waitstartcomplete failed"); - } - - // if (fd_peer_add(&peer, NULL, NULL, NULL) != 0) { - // fail("fd_peer_add failed"); - // } -} - -void s6a_fd_stop(void) -{ - if (fd_core_shutdown() != 0) { - fail("fd_core_shutdown failed"); - } - - if (fd_core_wait_shutdown_complete() != 0) { - fail("fd_core_shutdown failed"); - } -} diff --git a/openair-cn/OPENAIRHSS/tests/test_fd.h b/openair-cn/OPENAIRHSS/tests/test_fd.h deleted file mode 100644 index fd38767995..0000000000 --- a/openair-cn/OPENAIRHSS/tests/test_fd.h +++ /dev/null @@ -1,36 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#ifndef TEST_FD_H_ -#define TEST_FD_H_ - -void s6a_fd_init(void); - -void s6a_fd_stop(void); - -#endif /* TEST_FD_H_ */ diff --git a/openair-cn/OPENAIRHSS/tests/test_kdf.c b/openair-cn/OPENAIRHSS/tests/test_kdf.c deleted file mode 100644 index fbaa536431..0000000000 --- a/openair-cn/OPENAIRHSS/tests/test_kdf.c +++ /dev/null @@ -1,132 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include -#include - -#include "config.h" -#include "test_utils.h" -#include "test_fd.h" - -#include "auc.h" - -static -void do_kdf(uint8_t *key, unsigned key_length, uint8_t *data, unsigned data_length, - uint8_t *exp, unsigned exp_length) -{ - uint8_t result[32]; - - kdf(key, key_length, data, data_length, result, 32); - - if (compare_buffer(result, exp_length, exp, exp_length) != 0) { - fail("Fail: kdf\n"); - } -} - -void -doit (void) -{ - /* RFC 4231 */ - - /* Test case 1 #4.2 */ - do_kdf(HL("0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b" - "0b0b0b0b"), - HL("4869205468657265"), - HL("b0344c61d8db38535ca8afceaf0bf12b" - "881dc200c9833da726e9376c2e32cff7")); - /* Test case 2 #4.3 */ - do_kdf(HL("4a656665"), - HL("7768617420646f2079612077616e7420" - "666f72206e6f7468696e673f"), - HL("5bdcc146bf60754e6a042426089575c7" - "5a003f089d2739839dec58b964ec3843")); - /* Test case 3 #4.4 */ - do_kdf(HL("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" - "aaaaaaaa"), - HL("dddddddddddddddddddddddddddddddd" - "dddddddddddddddddddddddddddddddd" - "dddddddddddddddddddddddddddddddd" - "dddd"), - HL("773ea91e36800e46854db8ebd09181a7" - "2959098b3ef8c122d9635514ced565fe")); - /* Test case 4 #4.5 */ - do_kdf(HL("0102030405060708090a0b0c0d0e0f10" - "111213141516171819"), - HL("cdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd" - "cdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd" - "cdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd" - "cdcd"), - HL("82558a389a443c0ea4cc819899f2083a" - "85f0faa3e578f8077a2e3ff46729665b")); - /* Test case 5 #4.6 */ - do_kdf(HL("0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c" - "0c0c0c0c"), - HL("546573742057697468205472756e6361" - "74696f6e"), - HL("a3b6167473100ee06e0c796c2955552b")); - /* Test case 6 #4.7 */ - do_kdf(HL("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" - "aaaaaa"), - HL("54657374205573696e67204c61726765" - "72205468616e20426c6f636b2d53697a" - "65204b6579202d2048617368204b6579" - "204669727374"), - HL("60e431591ee0b67f0d8a26aacbf5b77f" - "8e0bc6213728c5140546040f0ee37f54")); - /* Test case 6 #4.7 */ - do_kdf(HL("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" - "aaaaaa"), - HL("54686973206973206120746573742075" - "73696e672061206c6172676572207468" - "616e20626c6f636b2d73697a65206b65" - "7920616e642061206c61726765722074" - "68616e20626c6f636b2d73697a652064" - "6174612e20546865206b6579206e6565" - "647320746f2062652068617368656420" - "6265666f7265206265696e6720757365" - "642062792074686520484d414320616c" - "676f726974686d2e"), - HL("9b09ffa71b942fcb27635fbcd5b0e944" - "bfdc63644f0713938a7f51535c3a35e2")); -} diff --git a/openair-cn/OPENAIRHSS/tests/test_security.c b/openair-cn/OPENAIRHSS/tests/test_security.c deleted file mode 100644 index f319ae1f73..0000000000 --- a/openair-cn/OPENAIRHSS/tests/test_security.c +++ /dev/null @@ -1,119 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include -#include - -#include "config.h" -#include "test_utils.h" -#include "test_fd.h" - -#include "auc.h" - -typedef struct { - uint8_t key[16]; - uint8_t rand[16]; - uint8_t sqn[6]; - uint8_t amf[2]; - uint8_t op[16]; - uint8_t f1_exp[8]; - uint8_t f1_star_exp[8]; -} test_set_t; - -test_set_t test_set[] = { - /* 35.207 #4.3 */ - { - .key = { - 0x46, 0x5b, 0x5c, 0xe8, 0xb1, 0x99, 0xb4, 0x9f, 0xaa, 0x5f, 0x0a, - 0x2e, 0xe2, 0x38, 0xa6, 0xbc - }, - .rand = { - 0x23, 0x55, 0x3c, 0xbe, 0x96, 0x37, 0xa8, 0x9d, 0x21, 0x8a, 0xe6, - 0x4d, 0xae, 0x47, 0xbf, 0x35 - }, - .sqn = { 0xff, 0x9b, 0xb4, 0xd0, 0xb6, 0x07 }, - .amf = { 0xb9, 0xb9 }, - .op = { - 0xcd, 0xc2, 0x02, 0xd5, 0x12, 0x3e, 0x20, 0xf6, 0x2b, 0x6d, 0x67, - 0x6a, 0xc7, 0x2c, 0xb3, 0x18 - }, - .f1_exp = { 0x4a, 0x9f, 0xfa, 0xc3, 0x54, 0xdf, 0xaf, 0xb3 }, - .f1_star_exp = { 0x01, 0xcf, 0xaf, 0x9e, 0xc4, 0xe8, 0x71, 0xe9 }, - }, - { - .key = { - 0x03, 0x96, 0xeb, 0x31, 0x7b, 0x6d, 0x1c, 0x36, 0xf1, 0x9c, 0x1c, - 0x84, 0xcd, 0x6f, 0xfd, 0x16 - }, - .rand = { - 0xc0, 0x0d, 0x60, 0x31, 0x03, 0xdc, 0xee, 0x52, 0xc4, 0x47, 0x81, - 0x19, 0x49, 0x42, 0x02, 0xe8, - }, - .sqn = { 0xfd, 0x8e, 0xef, 0x40, 0xdf, 0x7d }, - .amf = { 0xaf, 0x17 }, - .op = { - 0xff, 0x53, 0xba, 0xde, 0x17, 0xdf, 0x5d, 0x4e, 0x79, 0x30, 0x73, - 0xce, 0x9d, 0x75, 0x79, 0xfa - }, - .f1_exp = { 0x5d, 0xf5, 0xb3, 0x18, 0x07, 0xe2, 0x58, 0xb0 }, - .f1_star_exp = { 0xa8, 0xc0, 0x16, 0xe5, 0x1e, 0xf4, 0xa3, 0x43 } - }, -}; - -void -doit (void) -{ - int i; - - for (i = 0; i < sizeof(test_set) / sizeof(test_set_t); i++) { - uint8_t res[8]; - - SetOPc(test_set[i].op); - f1(test_set[i].key, test_set[i].rand, test_set[i].sqn, test_set[i].amf, res); - - // printf("%02x%02x%02x%02x%02x%02x%02x%02x\n", res[0], res[1], res[2], - // res[3], res[4], res[5], res[6], res[7]); - if (memcmp(res, test_set[i].f1_exp, 8) != 0) { - fail("Test set %d (f1) : failed\n", i); - } else { - success("Test set %d (f1) : success\n", i); - } - - f1star(test_set[i].key, test_set[i].rand, test_set[i].sqn, test_set[i].amf, res); - - // printf("%02x%02x%02x%02x%02x%02x%02x%02x\n", res[0], res[1], res[2], - // res[3], res[4], res[5], res[6], res[7]); - if (memcmp(res, test_set[i].f1_star_exp, 8) != 0) { - fail("Test set %d (f1*): failed\n", i); - } else { - success("Test set %d (f1*): success\n", i); - } - } -} diff --git a/openair-cn/OPENAIRHSS/tests/test_security_f1.c b/openair-cn/OPENAIRHSS/tests/test_security_f1.c deleted file mode 100644 index 96527da7cf..0000000000 --- a/openair-cn/OPENAIRHSS/tests/test_security_f1.c +++ /dev/null @@ -1,121 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include -#include - -#include "config.h" -#include "test_utils.h" -#include "test_fd.h" - -#include "auc.h" - -static -void do_f1_f1star(uint8_t *key, uint8_t *rand, uint8_t *sqn, - uint8_t *amf, uint8_t *op, uint8_t *f1_exp, - uint8_t *f1star_exp) -{ - uint8_t res[8]; - - SetOPc(op); - - f1(key, rand, sqn, amf, res); - - if (compare_buffer(res, 8, f1_exp, 8) != 0) { - fail("Fail: f1"); - } - - f1star(key, rand, sqn, amf, res); - - if (compare_buffer(res, 8, f1star_exp, 8) != 0) { - fail("Fail: f1*"); - } -} - -void -doit (void) -{ - /* Test suite taken from 3GPP TS 35.207 */ - - /* Test set 1 #4.3 */ - do_f1_f1star( - H("465b5ce8 b199b49f aa5f0a2e e238a6bc"), - H("23553cbe 9637a89d 218ae64d ae47bf35"), - H("ff9bb4d0 b607"), - H("b9b9"), - H("cdc202d5 123e20f6 2b6d676a c72cb318"), - H("4a9ffac3 54dfafb3"), - H("01cfaf9e c4e871e9")); - /* Test set 2 #4.4 */ - do_f1_f1star( - H("0396eb31 7b6d1c36 f19c1c84 cd6ffd16"), - H("c00d6031 03dcee52 c4478119 494202e8"), - H("fd8eef40 df7d"), - H("af17"), - H("ff53bade 17df5d4e 793073ce 9d7579fa"), - H("5df5b318 07e258b0"), - H("a8c016e5 1ef4a343")); - /* Test set 3 #4.5 */ - do_f1_f1star( - H("fec86ba6 eb707ed0 8905757b 1bb44b8f"), - H("9f7c8d02 1accf4db 213ccff0 c7f71a6a"), - H("9d027759 5ffc"), - H("725c"), - H("dbc59adc b6f9a0ef 735477b7 fadf8374"), - H("9cabc3e9 9baf7281"), - H("95814ba2 b3044324")); - /* Test set 4 #4.5 */ - do_f1_f1star( - H("9e5944ae a94b8116 5c82fbf9 f32db751"), - H("ce83dbc5 4ac0274a 157c17f8 0d017bd6"), - H("0b604a81 eca8"), - H("9e09"), - H("223014c5 806694c0 07ca1eee f57f004f"), - H("74a58220 cba84c49"), - H("ac2cc74a 96871837")); - /* Test set 5 #4.6 */ - do_f1_f1star( - H("4ab1deb0 5ca6ceb0 51fc98e7 7d026a84"), - H("74b0cd60 31a1c833 9b2b6ce2 b8c4a186"), - H("e880a1b5 80b6"), - H("9f07"), - H("2d16c5cd 1fdf6b22 383584e3 bef2a8d8"), - H("49e785dd 12626ef2"), - H("9e857903 36bb3fa2")); - /* Test set 6 #4.7 */ - do_f1_f1star( - H("6c38a116 ac280c45 4f59332e e35c8c4f"), - H("ee6466bc 96202c5a 557abbef f8babf63"), - H("414b9822 2181"), - H("4464"), - H("1ba00a1a 7c6700ac 8c3ff3e9 6ad08725"), - H("078adfb4 88241a57"), - H("80246b8d 0186bcf1")); -} diff --git a/openair-cn/OPENAIRHSS/tests/test_security_f2_f3_f5.c b/openair-cn/OPENAIRHSS/tests/test_security_f2_f3_f5.c deleted file mode 100644 index 339e5602c4..0000000000 --- a/openair-cn/OPENAIRHSS/tests/test_security_f2_f3_f5.c +++ /dev/null @@ -1,110 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include -#include - -#include "config.h" -#include "test_utils.h" -#include "test_fd.h" - -#include "auc.h" - -static -void do_f2f3f5(uint8_t *key, uint8_t *rand, uint8_t *op, uint8_t *f2_exp, - uint8_t *f5_exp, uint8_t *f3_exp) -{ - uint8_t res_f2[8]; - uint8_t res_f5[6]; - uint8_t res_f3[16]; - uint8_t res_f4[16]; - - SetOPc(op); - - f2345(key, rand, res_f2, res_f3, res_f4, res_f5); - - if (compare_buffer(res_f2, 8, f2_exp, 8) != 0) { - fail("Fail: f2"); - } - - if (compare_buffer(res_f5, 6, f5_exp, 6) != 0) { - fail("Fail: f5"); - } - - if (compare_buffer(res_f3, 16, f3_exp, 16) != 0) { - fail("Fail: f3"); - } -} - -void -doit (void) -{ - /* Test set 1 #5.3 */ - do_f2f3f5(H("465b5ce8 b199b49f aa5f0a2e e238a6bc"), - H("23553cbe 9637a89d 218ae64d ae47bf35"), - H("cdc202d5 123e20f6 2b6d676a c72cb318"), - H("a54211d5 e3ba50bf"), H("aa689c64 8370"), - H("b40ba9a3 c58b2a05 bbf0d987 b21bf8cb")); - - /* Test set 2 #5.4 */ - do_f2f3f5(H("0396eb31 7b6d1c36 f19c1c84 cd6ffd16"), - H("c00d6031 03dcee52 c4478119 494202e8"), - H("ff53bade 17df5d4e 793073ce 9d7579fa"), - H("d3a628ed 988620f0"), H("c4778399 5f72"), - H("58c433ff 7a7082ac d424220f 2b67c556")); - - /* Test set 3 #5.5 */ - do_f2f3f5(H("fec86ba6 eb707ed0 8905757b 1bb44b8f"), - H("9f7c8d02 1accf4db 213ccff0 c7f71a6a"), - H("dbc59adc b6f9a0ef 735477b7 fadf8374"), - H("8011c48c 0c214ed2"), H("33484dc2 136b"), - H("5dbdbb29 54e8f3cd e665b046 179a5098")); - - /* Test set 4 #5.6 */ - do_f2f3f5(H("9e5944ae a94b8116 5c82fbf9 f32db751"), - H("ce83dbc5 4ac0274a 157c17f8 0d017bd6"), - H("223014c5 806694c0 07ca1eee f57f004f"), - H("f365cd68 3cd92e96"), H("f0b9c08a d02e"), - H("e203edb3 971574f5 a94b0d61 b816345d")); - - /* Test set 5 #5.7 */ - do_f2f3f5(H("4ab1deb0 5ca6ceb0 51fc98e7 7d026a84"), - H("74b0cd60 31a1c833 9b2b6ce2 b8c4a186"), - H("2d16c5cd 1fdf6b22 383584e3 bef2a8d8"), - H("5860fc1b ce351e7e"), H("31e11a60 9118"), - H("7657766b 373d1c21 38f307e3 de9242f9")); - - /* Test set 6 #5.8 */ - do_f2f3f5(H("6c38a116 ac280c45 4f59332e e35c8c4f"), - H("ee6466bc 96202c5a 557abbef f8babf63"), - H("1ba00a1a 7c6700ac 8c3ff3e9 6ad08725"), - H("16c8233f 05a0ac28"), H("45b0f69a b06c"), - H("3f8c7587 fe8e4b23 3af676ae de30ba3b")); -} diff --git a/openair-cn/OPENAIRHSS/tests/test_security_f4_f5star.c b/openair-cn/OPENAIRHSS/tests/test_security_f4_f5star.c deleted file mode 100644 index 26b43d7ffe..0000000000 --- a/openair-cn/OPENAIRHSS/tests/test_security_f4_f5star.c +++ /dev/null @@ -1,104 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include -#include - -#include "config.h" -#include "test_utils.h" -#include "test_fd.h" - -#include "auc.h" - -static -void do_f4f5star(uint8_t *key, uint8_t *rand, uint8_t *op, uint8_t *f4_exp, - uint8_t *f5star_exp) -{ - uint8_t res_f2[8]; - uint8_t res_f5[6]; - uint8_t res_f3[16]; - uint8_t res_f4[16]; - uint8_t res_f5star[6]; - - SetOPc(op); - - f2345(key, rand, res_f2, res_f3, res_f4, res_f5); - - if (compare_buffer(res_f4, 16, f4_exp, 16) != 0) { - fail("Fail: f4"); - } - - f5star(key, rand, res_f5star); - - if (compare_buffer(res_f5star, 6, f5star_exp, 6) != 0) { - fail("Fail: f5star"); - } -} - -void -doit (void) -{ - /* Test set 1 #6.3 */ - do_f4f5star(H("465b5ce8 b199b49f aa5f0a2e e238a6bc"), - H("23553cbe 9637a89d 218ae64d ae47bf35"), - H("cdc202d5 123e20f6 2b6d676a c72cb318"), - H("f769bcd7 51044604 12767271 1c6d3441"), - H("451e8bec a43b")); - /* Test set 2 #6.4 */ - do_f4f5star(H("0396eb31 7b6d1c36 f19c1c84 cd6ffd16"), - H("c00d6031 03dcee52 c4478119 494202e8"), - H("ff53bade 17df5d4e 793073ce 9d7579fa"), - H("21a8c1f9 29702adb 3e738488 b9f5c5da"), - H("30f11970 61c1")); - /* Test set 3 #6.5 */ - do_f4f5star(H("fec86ba6 eb707ed0 8905757b 1bb44b8f"), - H("9f7c8d02 1accf4db 213ccff0 c7f71a6a"), - H("dbc59adc b6f9a0ef 735477b7 fadf8374"), - H("59a92d3b 476a0443 487055cf 88b2307b"), - H("deacdd84 8cc6")); - /* Test set 4 #6.5 */ - do_f4f5star(H("9e5944ae a94b8116 5c82fbf9 f32db751"), - H("ce83dbc5 4ac0274a 157c17f8 0d017bd6"), - H("223014c5 806694c0 07ca1eee f57f004f"), - H("0c4524ad eac041c4 dd830d20 854fc46b"), - H("6085a86c 6f63")); - /* Test set 5 #6.6 */ - do_f4f5star(H("4ab1deb0 5ca6ceb0 51fc98e7 7d026a84"), - H("74b0cd60 31a1c833 9b2b6ce2 b8c4a186"), - H("2d16c5cd 1fdf6b22 383584e3 bef2a8d8"), - H("1c42e960 d89b8fa9 9f2744e0 708ccb53"), - H("fe2555e5 4aa9")); - /* Test set 6 #6.7 */ - do_f4f5star(H("6c38a116 ac280c45 4f59332e e35c8c4f"), - H("ee6466bc 96202c5a 557abbef f8babf63"), - H("1ba00a1a 7c6700ac 8c3ff3e9 6ad08725"), - H("a7466cc1 e6b2a133 7d49d3b6 6e95d7b4"), - H("1f53cd2b 1113")); -} diff --git a/openair-cn/OPENAIRHSS/tests/test_security_kasme.c b/openair-cn/OPENAIRHSS/tests/test_security_kasme.c deleted file mode 100644 index 7ab68b67a0..0000000000 --- a/openair-cn/OPENAIRHSS/tests/test_security_kasme.c +++ /dev/null @@ -1,87 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include -#include -#include - -#include "config.h" -#include "test_utils.h" -#include "test_fd.h" - -#include "auc.h" - -static -void do_derive_kasme(uint8_t *sn_id, uint8_t *sqn, uint8_t *ak, - uint8_t *ck, uint8_t *ik, uint8_t *kasme_exp) -{ - uint8_t kasme[32]; - derive_kasme(ck, ik, sn_id, sqn, ak, kasme); - - if (compare_buffer(kasme, 32, kasme_exp, 32) != 0) { - fail("Fail: derive_kasme\n"); - } -} - -void -doit (void) -{ - /* 20834 -> 024830 SNid */ - do_derive_kasme(H("024830"), H("FD8EEF40DF7D"), H("AA689C648370"), - H("B40BA9A3C58B2A05BBF0D987B21BF8CB"), - H("F769BCD751044604127672711C6D3441"), - H("238E457E0F758BADBCA8D34BB2612C10" - "428D426757CB5553B2B184FA64BFC549")); - do_derive_kasme(H("02F843"), H("FD8EEF40DF7D"), H("AA689C648370"), - H("B40BA9A3C58B2A05BBF0D987B21BF8CB"), - H("F769BCD751044604127672711C6D3441"), - H("BD7A0903A7D0F68767EE2F5C90CB7D7D" - "835998D940AFDBF73173E63567C5B894")); - do_derive_kasme(H("21F354"), H("FD8EEF40DF7D"), H("AA689C648370"), - H("B40BA9A3C58B2A05BBF0D987B21BF8CB"), - H("F769BCD751044604127672711C6D3441"), - H("546A79BC6D1613A72A4D631EE0351D66" - "036B2A0C44A3831BE6D365E24F023013")); - do_derive_kasme(H("024830"), H("FF9BB4D0B607"), H("AA689C648370"), - H("B40BA9A3C58B2A05BBF0D987B21BF8CB"), - H("F769BCD751044604127672711C6D3441"), - H("564CB4D2007E4F293B67D9B29392A64A" - "DD4C776B133D895AF6499AA6882AAB62")); - do_derive_kasme(H("02F843"), H("FF9BB4D0B607"), H("AA689C648370"), - H("B40BA9A3C58B2A05BBF0D987B21BF8CB"), - H("F769BCD751044604127672711C6D3441"), - H("34865EB0DC9A6D788A905C0514529BF5" - "88485DA817FFBE92E9A9B4D033B8CC6F")); - do_derive_kasme(H("21F354"), H("FF9BB4D0B607"), H("AA689C648370"), - H("B40BA9A3C58B2A05BBF0D987B21BF8CB"), - H("F769BCD751044604127672711C6D3441"), - H("9EA141DA4B24CDEBC8F5FB3F61A05112" - "16681F121199B23EBCFACC75B358BE43")); -} diff --git a/openair-cn/OPENAIRHSS/tests/test_utils.c b/openair-cn/OPENAIRHSS/tests/test_utils.c deleted file mode 100644 index a44aeb5c69..0000000000 --- a/openair-cn/OPENAIRHSS/tests/test_utils.c +++ /dev/null @@ -1,287 +0,0 @@ -/* - * Copyright (C) 2004-2012 Free Software Foundation, Inc. - * - * Author: Simon Josefsson - * - * This file is part of GnuTLS. - * - * GnuTLS 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. - * - * GnuTLS 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 GnuTLS; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include -#include -#include -#include - -#include "test_utils.h" - -int debug = 0; -int error_count = 0; -int break_on_error = 0; - -/* -1 means invalid */ -static const signed char hex_digits[0x100] = { - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,-1,-1,-1,-1,-1,-1, - -1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, - -1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 -}; - -unsigned -decode_hex_length(const char *h) -{ - const unsigned char *hex = (const unsigned char *) h; - unsigned count; - unsigned i; - - for (count = i = 0; hex[i]; i++) { - if (isspace(hex[i])) - continue; - - if (hex_digits[hex[i]] < 0) - abort(); - - count++; - } - - if (count % 2) - abort(); - - return count / 2; -} - -int -decode_hex(uint8_t *dst, const char *h) -{ - const unsigned char *hex = (const unsigned char *) h; - unsigned i = 0; - - for (;;) { - int high, low; - - while (*hex && isspace(*hex)) - hex++; - - if (!*hex) - return 1; - - high = hex_digits[*hex++]; - - if (high < 0) - return 0; - - while (*hex && isspace(*hex)) - hex++; - - if (!*hex) - return 0; - - low = hex_digits[*hex++]; - - if (low < 0) - return 0; - - dst[i++] = (high << 4) | low; - } -} - -uint8_t * -decode_hex_dup(const char *hex) -{ - uint8_t *p; - unsigned length = decode_hex_length(hex); - - p = malloc(length * sizeof(uint8_t)); - - if (decode_hex(p, hex)) - return p; - else { - free(p); - return NULL; - } -} - -void -fail (const char *format, ...) -{ - char str[1024]; - va_list arg_ptr; - - va_start (arg_ptr, format); - vsnprintf ( str, sizeof(str), format, arg_ptr); - va_end (arg_ptr); - fputs(str, stderr); - error_count++; - - if (break_on_error) - exit (1); -} - -void -success (const char *format, ...) -{ - char str[1024]; - va_list arg_ptr; - - va_start (arg_ptr, format); - vsnprintf ( str, sizeof(str), format, arg_ptr); - va_end (arg_ptr); - fputs(str, stderr); -} - -void -escapeprint (const char *str, size_t len) -{ - size_t i; - - printf (" (length %d bytes):\n\t", (int) len); - - for (i = 0; i < len; i++) { - if (((str[i] & 0xFF) >= 'A' && (str[i] & 0xFF) <= 'Z') || - ((str[i] & 0xFF) >= 'a' && (str[i] & 0xFF) <= 'z') || - ((str[i] & 0xFF) >= '0' && (str[i] & 0xFF) <= '9') - || (str[i] & 0xFF) == ' ' || (str[i] & 0xFF) == '.') - printf ("%c", (str[i] & 0xFF)); - else - printf ("\\x%02X", (str[i] & 0xFF)); - - if ((i + 1) % 16 == 0 && (i + 1) < len) - printf ("'\n\t'"); - } - - printf ("\n"); -} - -void -hexprint (const void *_str, size_t len) -{ - size_t i; - const char* str = _str; - - printf ("\t;; "); - - for (i = 0; i < len; i++) { - printf ("%02x ", (str[i] & 0xFF)); - - if ((i + 1) % 8 == 0) - printf (" "); - - if ((i + 1) % 16 == 0 && i + 1 < len) - printf ("\n\t;; "); - } - - printf ("\n"); -} - -void -binprint (const void *_str, size_t len) -{ - size_t i; - const char* str = _str; - - printf ("\t;; "); - - for (i = 0; i < len; i++) { - printf ("%d%d%d%d%d%d%d%d ", - (str[i] & 0xFF) & 0x80 ? 1 : 0, - (str[i] & 0xFF) & 0x40 ? 1 : 0, - (str[i] & 0xFF) & 0x20 ? 1 : 0, - (str[i] & 0xFF) & 0x10 ? 1 : 0, - (str[i] & 0xFF) & 0x08 ? 1 : 0, - (str[i] & 0xFF) & 0x04 ? 1 : 0, - (str[i] & 0xFF) & 0x02 ? 1 : 0, (str[i] & 0xFF) & 0x01 ? 1 : 0); - - if ((i + 1) % 3 == 0) - printf (" "); - - if ((i + 1) % 6 == 0 && i + 1 < len) - printf ("\n\t;; "); - } - - printf ("\n"); -} - -int -compare_buffer(uint8_t *buffer, uint32_t length_buffer, - uint8_t *pattern, uint32_t length_pattern) -{ - int i; - - if (length_buffer != length_pattern) { - printf("Length mismatch, expecting %d bytes, got %d bytes\n", length_pattern, - length_buffer); - hexprint(buffer, length_buffer); - return -1; - } - - for (i = 0; i < length_buffer; i++) { - if (pattern[i] != buffer[i]) { - printf("Expecting:\n"); - hexprint(pattern, length_pattern); - printf("Received:\n"); - hexprint(buffer, length_buffer); - printf("Mismatch fount in byte %d\nExpecting 0x%02x, got 0x%02x\n", - i, pattern[i], buffer[i]); - return -1; - } - } - - return 0; -} - -int -main (int argc, char *argv[]) -{ - do - if (strcmp (argv[argc - 1], "-v") == 0 || - strcmp (argv[argc - 1], "--verbose") == 0) - debug = 1; - else if (strcmp (argv[argc - 1], "-b") == 0 || - strcmp (argv[argc - 1], "--break-on-error") == 0) - break_on_error = 1; - else if (strcmp (argv[argc - 1], "-h") == 0 || - strcmp (argv[argc - 1], "-?") == 0 || - strcmp (argv[argc - 1], "--help") == 0) { - printf ("Usage: %s [-vbh?] [--verbose] [--break-on-error] [--help]\n", - argv[0]); - return 1; - } - - while (argc-- > 1); - - doit (); - - if (debug || error_count > 0) - printf ("Self test `%s' finished with %d errors\n", argv[0], error_count); - - return error_count ? 1 : 0; -} diff --git a/openair-cn/OPENAIRHSS/tests/test_utils.h b/openair-cn/OPENAIRHSS/tests/test_utils.h deleted file mode 100644 index 19e6caab66..0000000000 --- a/openair-cn/OPENAIRHSS/tests/test_utils.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (C) 2004-2012 Free Software Foundation, Inc. - * - * Author: Simon Josefsson - * - * This file is part of GnuTLS. - * - * GnuTLS 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. - * - * GnuTLS 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 GnuTLS; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#ifndef UTILS_H -#define UTILS_H - -#include -#include - -#ifndef __attribute__ -#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) -#define __attribute__(Spec) /* empty */ -#endif -#endif - -extern int debug; -extern int error_count; -extern int break_on_error; - -extern uint8_t * decode_hex_dup(const char *hex); -extern int decode_hex(uint8_t *dst, const char *h); -extern unsigned decode_hex_length(const char *h); - -#define H(x) decode_hex_dup(x) -#define HL(x) decode_hex_dup(x), decode_hex_length(x) - -extern void fail (const char *format, ...) -__attribute__ ((format (printf, 1, 2))); -extern void success (const char *format, ...) -__attribute__ ((format (printf, 1, 2))); - -extern void escapeprint (const char *str, size_t len); -extern void hexprint (const void *str, size_t len); -extern void binprint (const void *str, size_t len); - -extern int -compare_buffer(uint8_t *buffer, uint32_t length_buffer, - uint8_t *pattern, uint32_t length_pattern); - -/* This must be implemented elsewhere. */ -extern void doit (void); - -#endif /* UTILS_H */ diff --git a/openair-cn/OPENAIRHSS/tests/up_loc_test.c b/openair-cn/OPENAIRHSS/tests/up_loc_test.c deleted file mode 100644 index 83a56db738..0000000000 --- a/openair-cn/OPENAIRHSS/tests/up_loc_test.c +++ /dev/null @@ -1,47 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -#include -#include - -#include "config.h" -#include "test_utils.h" -#include "test_fd.h" - -void -doit (void) -{ - s6a_fd_init(); - - sleep(1); - - s6a_fd_stop(); - - success ("freediameter start/stop ok\n"); -} diff --git a/openair-cn/OPENAIRHSS/utils/COPYING b/openair-cn/OPENAIRHSS/utils/COPYING deleted file mode 100644 index 94a9ed024d..0000000000 --- a/openair-cn/OPENAIRHSS/utils/COPYING +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program 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. - - This program 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 this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/openair-cn/OPENAIRHSS/utils/Makefile.am b/openair-cn/OPENAIRHSS/utils/Makefile.am deleted file mode 100644 index 42c9a412ef..0000000000 --- a/openair-cn/OPENAIRHSS/utils/Makefile.am +++ /dev/null @@ -1,40 +0,0 @@ -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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 . -# -# Contact Information -# OpenAirInterface Admin: openair_admin@eurecom.fr -# OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr -# -# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. -# -################################################################################ -AM_CFLAGS = @ADD_CFLAGS@ -AM_YFLAGS = -d -AM_LFLAGS = -o$(LEX_OUTPUT_ROOT).c - -BUILT_SOURCE = hss_parser.h - -noinst_LTLIBRARIES = libutils.la -libutils_la_LDFLAGS = -all-static -libutils_la_SOURCES = \ - hss_parser.y hss_scanner.l \ - hss_config.h hss_config.c \ - conversion.h conversion.c diff --git a/openair-cn/OPENAIRHSS/utils/conversion.c b/openair-cn/OPENAIRHSS/utils/conversion.c deleted file mode 100644 index 19347fc117..0000000000 --- a/openair-cn/OPENAIRHSS/utils/conversion.c +++ /dev/null @@ -1,144 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "conversion.h" - -static const char hex_to_ascii_table[16] = { - '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', -}; - -static const signed char ascii_to_hex_table[0x100] = { - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,-1,-1,-1,-1,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 -}; - -static const signed char ascii_to_dec_table[0x100] = { - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,-1,-1,-1,-1,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 -}; - -void hexa_to_ascii(uint8_t *from, char *to, size_t length) -{ - int i; - - for(i = 0; i < length; i++) { - uint8_t upper = (from[i] & 0xf0) >> 4; - uint8_t lower = from[i] & 0x0f; - to[2 * i] = hex_to_ascii_table[upper]; - to[2 * i + 1] = hex_to_ascii_table[lower]; - } -} - -int ascii_to_hex(uint8_t *dst, const char *h) -{ - const unsigned char *hex = (const unsigned char *) h; - unsigned i = 0; - - for (;;) { - int high, low; - - while (*hex && isspace(*hex)) { - hex++; - } - - if (!*hex) { - return 1; - } - - high = ascii_to_hex_table[*hex++]; - - if (high < 0) { - return 0; - } - - while (*hex && isspace(*hex)) { - hex++; - } - - if (!*hex) { - return 0; - } - - low = ascii_to_hex_table[*hex++]; - - if (low < 0) { - return 0; - } - - dst[i++] = (high << 4) | low; - } -} - -int bcd_to_hex(uint8_t *dst, const char *h, int h_length) -{ - const unsigned char *hex = (const unsigned char *) h; - unsigned i = 0; - - for (i = 0; i < h_length; i++) { - int value = ascii_to_dec_table[*hex++]; - - if (value < 0) - return -1; - - dst[i] = value; - } - - return 0; -} diff --git a/openair-cn/OPENAIRHSS/utils/conversion.h b/openair-cn/OPENAIRHSS/utils/conversion.h deleted file mode 100644 index c587020c98..0000000000 --- a/openair-cn/OPENAIRHSS/utils/conversion.h +++ /dev/null @@ -1,36 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#ifndef CONVERSION_H_ -#define CONVERSION_H_ - -void hexa_to_ascii(uint8_t *from, char *to, size_t length); -int ascii_to_hex(uint8_t *dst, const char *h); -int bcd_to_hex(uint8_t *dst, const char *h, int h_length); - -#endif /* CONVERSION_H_ */ diff --git a/openair-cn/OPENAIRHSS/utils/hss_config.c b/openair-cn/OPENAIRHSS/utils/hss_config.c deleted file mode 100644 index 415504fc75..0000000000 --- a/openair-cn/OPENAIRHSS/utils/hss_config.c +++ /dev/null @@ -1,260 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -/*! \file hss_config.c - * \brief Base configuration for the HSS. Parse command line and configuration file - * \author Sebastien ROUX - * \date 2013 - * \version 0.1 - */ - -#if HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include -#include -#include -#include -#include - -#include "hss_config.h" -#include "hss_parser.h" - - -#ifndef PACKAGE_NAME -#define PACKAGE_NAME "OPENAIR-HSS" -#endif -#ifndef PACKAGE_VERSION -#define PACKAGE_VERSION "UNKNOWN-EXPERIMENTAL" -#endif -#ifndef PACKAGE_BUGREPORT -#define PACKAGE_BUGREPORT "openair4G-devel@eurecom.fr" -#endif - -// LG TODO fd_g_debug_lvl -int fd_g_debug_lvl = 1; - -/* YACC forward declarations */ -extern int yyparse (struct hss_config_s *hss_config_p); -static int config_parse_command_line(int argc, char *argv[], - hss_config_t *hss_config_p); -static int config_parse_file(hss_config_t *hss_config_p); -static void display_banner(void); -static void config_display(hss_config_t *hss_config_p); - -static struct option long_options[] = { - { "config", 1, 0, 'c' }, - { "help", 0, 0, 'h' }, - { "version", 0, 0, 'v' }, - { 0, 0, 0, 0 }, -}; - -static const char option_string[] = "c:vh"; - -int config_init(int argc, char *argv[], hss_config_t *hss_config_p) -{ - int ret = 0; - - if (hss_config_p == NULL) { - return EINVAL; - } - - hss_config_p->valid_op = 0; - - if ((ret = config_parse_command_line(argc, argv, hss_config_p)) != 0) { - return ret; - } - - display_banner(); - - if ((ret = config_parse_file(hss_config_p)) != 0) { - /* Parsing of the file failed. -> abort */ - abort(); - } - if (hss_config_p->random) { - if (strcasecmp(hss_config_p->random, "false") == 0) { - hss_config_p->random_bool = 0; - } else if (strcasecmp(hss_config_p->random, "true") == 0) { - hss_config_p->random_bool = 1; - } else { - fprintf(stderr, - "Error in configuration file: random: %s (allowed values {true,false})\n", - hss_config_p->random); - abort(); - } - } else { - hss_config_p->random = "true"; - hss_config_p->random_bool = 1; - fprintf(stderr, - "Default values for random: %s (allowed values {true,false})\n", - hss_config_p->random); - } - - // post processing for op key - if (hss_config_p->operator_key) { - if (strlen(hss_config_p->operator_key) == 32) { - ret = sscanf(hss_config_p->operator_key, - "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", - (unsigned int*)&hss_config_p->operator_key_bin[0],(unsigned int*)&hss_config_p->operator_key_bin[1], - (unsigned int*)&hss_config_p->operator_key_bin[2],(unsigned int*)&hss_config_p->operator_key_bin[3], - (unsigned int*)&hss_config_p->operator_key_bin[4],(unsigned int*)&hss_config_p->operator_key_bin[5], - (unsigned int*)&hss_config_p->operator_key_bin[6],(unsigned int*)&hss_config_p->operator_key_bin[7], - (unsigned int*)&hss_config_p->operator_key_bin[8],(unsigned int*)&hss_config_p->operator_key_bin[9], - (unsigned int*)&hss_config_p->operator_key_bin[10],(unsigned int*)&hss_config_p->operator_key_bin[11], - (unsigned int*)&hss_config_p->operator_key_bin[12],(unsigned int*)&hss_config_p->operator_key_bin[13], - (unsigned int*)&hss_config_p->operator_key_bin[14],(unsigned int*)&hss_config_p->operator_key_bin[15]); - - if (ret != 16) { - fprintf(stderr, - "Error in configuration file: operator key: %s\n", - hss_config_p->operator_key); - abort(); - } - hss_config_p->valid_op = 1; - } - } - config_display(hss_config_p); - - - return 0; -} - -static void display_banner(void) -{ - fprintf(stdout, "==== EURECOM %s v%s ====\n", PACKAGE_NAME, PACKAGE_VERSION); - fprintf(stdout, "Please report any bug to: %s\n\n", PACKAGE_BUGREPORT); -} - -static void usage(void) -{ - display_banner(); - fprintf(stdout, "Usage: openair_hss [options]\n\n"); - fprintf(stdout, "Available options:\n"); - fprintf(stdout, "\t--help\n\t-h\n"); - fprintf(stdout, "\t\tPrint this help and return\n\n"); - fprintf(stdout, "\t--config=\n\t-c\n"); - fprintf(stdout, "\t\tSet the configuration file for hss\n"); - fprintf(stdout, "\t\tSee template in conf dir\n\n"); - fprintf(stdout, "\t--version\n\t-v\n"); - fprintf(stdout, "\t\tPrint %s version and return\n", PACKAGE_NAME); -} - -static void config_display(hss_config_t *hss_config_p) -{ - fprintf(stdout, "Configuration\n"); - fprintf(stdout, "* Global:\n"); - fprintf(stdout, "\t- File .............: %s\n", hss_config_p->config); - fprintf(stdout, "* MYSQL:\n"); - fprintf(stdout, "\t- Server ...........: %s\n", hss_config_p->mysql_server); - fprintf(stdout, "\t- Database .........: %s\n", hss_config_p->mysql_database); - fprintf(stdout, "\t- User .............: %s\n", hss_config_p->mysql_user); - fprintf(stdout, "\t- Password .........: %s\n", - (hss_config_p->mysql_password == NULL) ? "None" : "*****"); - fprintf(stdout, "* FreeDiameter:\n"); - fprintf(stdout, "\t- Conf file ........: %s\n", - hss_config_p->freediameter_config); - fprintf(stdout, "* Security:\n"); - fprintf(stdout, "\t- Operator key......: %s\n", - hss_config_p->operator_key); - fprintf(stdout, "\t- Random ......: %s\n", - hss_config_p->random); -} - -static int config_parse_command_line(int argc, char *argv[], - hss_config_t *hss_config_p) -{ - int c; - int option_index = 0; - - while ((c = getopt_long (argc, argv, option_string, long_options, - &option_index)) != -1) { - switch(c) { - case 'c': { - hss_config_p->config = strdup(optarg); - } - break; - - case 'v': { - /* We display version and return immediately */ - display_banner(); - exit(0); - } - break; - - default: - case 'h': { - usage(); - exit(0); - } - break; - } - } - - return 0; -} - -static int config_parse_file(hss_config_t *hss_config_p) -{ - extern FILE *yyin; - int ret = -1; - - if (hss_config_p == NULL) { - return ret; - } - - if (hss_config_p->config == NULL) { - return ret; - } - - printf("Parsing configuration file: %s\n", hss_config_p->config); - - yyin = fopen(hss_config_p->config, "r"); - - if (!yyin) { - /* We failed to open the file */ - fprintf(stderr, "Unable to open the configuration file: %s (%d:%s)\n", - hss_config_p->config, errno, strerror(errno)); - return errno; - } - - /* Call the yacc parser */ - ret = yyparse(hss_config_p); - - /* Close the file descriptor */ - if (fclose(yyin) != 0) { - fprintf(stderr, "Unable to close the configuration file: %s (%d:%s)\n", - hss_config_p->config, errno, strerror(errno)); - return errno; - } - - return ret; -} diff --git a/openair-cn/OPENAIRHSS/utils/hss_config.h b/openair-cn/OPENAIRHSS/utils/hss_config.h deleted file mode 100644 index 6f3425c6d0..0000000000 --- a/openair-cn/OPENAIRHSS/utils/hss_config.h +++ /dev/null @@ -1,55 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#ifndef HSS_CONFIG_H_ -#define HSS_CONFIG_H_ - -typedef struct hss_config_s { - char *mysql_server; - char *mysql_user; - char *mysql_password; - char *mysql_database; - - - char *operator_key; - unsigned char operator_key_bin[16]; - int valid_op; - - /* The freediameter configuration file */ - char *freediameter_config; - - /* THe HSS global configuration file */ - char *config; - - char *random; - char random_bool; -} hss_config_t; - -int config_init(int argc, char *argv[], hss_config_t *hss_config_p); - -#endif /* HSS_CONFIG_H_ */ diff --git a/openair-cn/OPENAIRHSS/utils/hss_parser.y b/openair-cn/OPENAIRHSS/utils/hss_parser.y deleted file mode 100644 index 5fb532dcdf..0000000000 --- a/openair-cn/OPENAIRHSS/utils/hss_parser.y +++ /dev/null @@ -1,144 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -/* For development only : */ -%debug -%error-verbose - -%parse-param {struct hss_config_s *hss_config_p} - -/* Keep track of location */ -%locations -%defines -%pure-parser - -%{ -#include -#include - -#include "hss_config.h" -#include "hss_parser.h" - -void yyerror (YYLTYPE *llocp, struct hss_config_s *hss_config_p, const char *s); - -extern int yywrap(); -extern int yylex(); - -/* The Lex parser prototype */ -int fddlex(YYSTYPE *lvalp, YYLTYPE *llocp); -%} - -/* Values returned by lex for token */ -%union { - char *string; /* The string is allocated by strdup in lex.*/ - int integer; /* Store integer values */ -} - -%token QSTRING -%token INTEGER - -%token LEX_ERROR -%token FDCONF -%token MYSQL_USER -%token MYSQL_SERVER -%token MYSQL_PASS -%token MYSQL_DB -%token OPERATOR_KEY -%token RANDOM - -%% -conffile: /* Empty is OK -- for simplicity here, we reject in daemon later */ - | conffile mysql_db - | conffile mysql_server - | conffile mysql_user - | conffile mysql_pass - | conffile operator_key - | conffile random - | conffile fdconf - | conffile errors - { - yyerror(&yylloc, hss_config_p, "An error occurred while parsing the configuration file"); - return EINVAL; - } - ; - -mysql_db: MYSQL_DB '=' QSTRING ';' - { - hss_config_p->mysql_database = $3; - } - ; - -mysql_pass: MYSQL_PASS '=' QSTRING ';' - { - hss_config_p->mysql_password = $3; - } - ; - -mysql_user: MYSQL_USER '=' QSTRING ';' - { - hss_config_p->mysql_user = $3; - } - ; - -mysql_server: MYSQL_SERVER '=' QSTRING ';' - { - hss_config_p->mysql_server = $3; - } - ; - -operator_key: OPERATOR_KEY '=' QSTRING ';' - { - hss_config_p->operator_key = $3; - } - ; - -random: RANDOM '=' QSTRING ';' - { - hss_config_p->random = $3; - } - ; - -fdconf: FDCONF '=' QSTRING ';' - { - hss_config_p->freediameter_config = $3; - } - ; - - /* Lexical or syntax error */ -errors: LEX_ERROR - | error - ; -%% - -void yyerror(YYLTYPE *llocp, struct hss_config_s *hss_config_p, const char *str) -{ - fprintf(stderr, "Error in %s ( on line %i column %i -> line %i column %i) : %s\n", - hss_config_p->freediameter_config, llocp->first_line, llocp->first_column, - llocp->last_line, llocp->last_column, str); -} diff --git a/openair-cn/OPENAIRHSS/utils/hss_scanner.l b/openair-cn/OPENAIRHSS/utils/hss_scanner.l deleted file mode 100644 index e9c43c9a2b..0000000000 --- a/openair-cn/OPENAIRHSS/utils/hss_scanner.l +++ /dev/null @@ -1,130 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -/* Lex configuration parser. - * - * This file defines the token for parsing the configuration file - * - * Note : This module is NOT thread-safe. All processing must be done from one thread only. - */ -%{ -#include - -#include "hss_config.h" -/* Include yacc tokens definitions */ -#include "hss_parser.h" - -/* Update the column information */ -#ifdef DEBUG_LEX -#define YY_USER_ACTION { \ - yylloc->first_column = yylloc->last_column + 1; \ - yylloc->last_column = yylloc->first_column + yyleng - 1; \ - TRACE_DEBUG(FULL, \ - "(%d:%d-%d:%d) matched rule %d, length=%d, txt='%s'\n", \ - yylloc->first_line, yylloc->first_column, \ - yylloc->last_line, yylloc->last_column, \ - yy_act, yyleng, yytext); \ -} -#else /* DEBUG_LEX */ -#define YY_USER_ACTION { \ - yylloc->first_column = yylloc->last_column + 1; \ - yylloc->last_column = yylloc->first_column + yyleng - 1; \ -} -#endif - -#define YY_NO_INPUT -%} - -%option bison-bridge -%option bison-locations -%option noyywrap -%option nounput - -/* Quoted string. Multilines do not match. */ -qstring \"[^\"\n]*\" - -%% - - /* List of patterns and actions */ - -<*>\n { - /* Update the line count */ - yylloc->first_line++; - yylloc->last_line++; - yylloc->last_column=0; -} - -<*>([[:space:]]{-}[\n])+ ; /* Eat all spaces, not new lines */ -<*>#.*$ ; /* Eat all comments */ - -{qstring} { - /* First copy the string without the quotes for use in the yacc parser */ - if ((yylval->string = strdup(yytext+1)) == NULL) { /* This allocates one useless tail char but... it's easier :D */ - return LEX_ERROR;/* on error, trig an error in yacc parser */ - } - yylval->string[yyleng-2] = '\0'; - - /* the yacc parser will check the string is valid */ - return QSTRING; -} - -[[:digit:]]+ { - /* Convert this to an integer value */ - int ret = sscanf(yytext, "%i", &yylval->integer); - if (ret != 1) { - /* No matching: an error occurred */ - fprintf(stderr, "Unable to convert the value '%s' to a valid number: %s\n", - yytext, strerror(errno)); - return LEX_ERROR; /* trig an error in yacc parser */ - /* Maybe we could REJECT instead of failing here? */ - } - return INTEGER; -} - - /* Full words tokens (keywords) */ -(?i:"FD_conf") { return FDCONF; } -(?i:"MYSQL_server") { return MYSQL_SERVER; } -(?i:"MYSQL_user") { return MYSQL_USER; } -(?i:"MYSQL_pass") { return MYSQL_PASS; } -(?i:"MYSQL_db") { return MYSQL_DB; } -(?i:"OPERATOR_key") { return OPERATOR_KEY; } -(?i:"RANDOM") { return RANDOM; } - - /* Valid single characters for yyparse */ -<*>[=,:;{}] { return yytext[0]; } - -<*>[[:alnum:]]+ | /* This rule is only useful to print a complete token in error messages */ - /* Unrecognized character */ -<*>. { - fprintf(stderr, "Unrecognized text on line %d col %d: '%s'.\n", - yylloc->first_line, yylloc->first_column, yytext); - return LEX_ERROR; -} - -%% diff --git a/openair-cn/OPENAIRHSS/utils/queue.h b/openair-cn/OPENAIRHSS/utils/queue.h deleted file mode 100644 index 47f638b57c..0000000000 --- a/openair-cn/OPENAIRHSS/utils/queue.h +++ /dev/null @@ -1,592 +0,0 @@ -/* - * Copyright (c) 1991, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)queue.h 8.5 (Berkeley) 8/20/94 - */ - -#ifndef _SYS_QUEUE_H_ -#define _SYS_QUEUE_H_ - -/* - * This file defines five types of data structures: singly-linked lists, - * lists, simple queues, tail queues, and circular queues. - * - * A singly-linked list is headed by a single forward pointer. The - * elements are singly linked for minimum space and pointer manipulation - * overhead at the expense of O(n) removal for arbitrary elements. New - * elements can be added to the list after an existing element or at the - * head of the list. Elements being removed from the head of the list - * should use the explicit macro for this purpose for optimum - * efficiency. A singly-linked list may only be traversed in the forward - * direction. Singly-linked lists are ideal for applications with large - * datasets and few or no removals or for implementing a LIFO queue. - * - * A list is headed by a single forward pointer (or an array of forward - * pointers for a hash table header). The elements are doubly linked - * so that an arbitrary element can be removed without a need to - * traverse the list. New elements can be added to the list before - * or after an existing element or at the head of the list. A list - * may only be traversed in the forward direction. - * - * A simple queue is headed by a pair of pointers, one the head of the - * list and the other to the tail of the list. The elements are singly - * linked to save space, so elements can only be removed from the - * head of the list. New elements can be added to the list after - * an existing element, at the head of the list, or at the end of the - * list. A simple queue may only be traversed in the forward direction. - * - * A tail queue is headed by a pair of pointers, one to the head of the - * list and the other to the tail of the list. The elements are doubly - * linked so that an arbitrary element can be removed without a need to - * traverse the list. New elements can be added to the list before or - * after an existing element, at the head of the list, or at the end of - * the list. A tail queue may be traversed in either direction. - * - * A circle queue is headed by a pair of pointers, one to the head of the - * list and the other to the tail of the list. The elements are doubly - * linked so that an arbitrary element can be removed without a need to - * traverse the list. New elements can be added to the list before or after - * an existing element, at the head of the list, or at the end of the list. - * A circle queue may be traversed in either direction, but has a more - * complex end of list detection. - * - * For details on the use of these macros, see the queue(3) manual page. - * SLIST LIST STAILQ TAILQ CIRCLEQ - * _HEAD + + + + + - * _HEAD_INITIALIZER + + + + + - * _ENTRY + + + + + - * _INIT + + + + + - * _EMPTY + + + + + - * _FIRST + + + + + - * _NEXT + + + + + - * _PREV - - - + + - * _LAST - - + + + - * _FOREACH + + + + + - * _FOREACH_REVERSE - - - + + - * _INSERT_HEAD + + + + + - * _INSERT_BEFORE - + - + + - * _INSERT_AFTER + + + + + - * _INSERT_TAIL - - + + + - * _REMOVE_HEAD + - + - - - * _REMOVE + + + + + - */ - -/* - * List definitions. - */ -#define LIST_HEAD(name, type) \ - struct name { \ - struct type *lh_first; /* first element */ \ - } - -#define LIST_HEAD_INITIALIZER(head) \ - { NULL } - -#define LIST_ENTRY(type) \ - struct { \ - struct type *le_next; /* next element */ \ - struct type **le_prev; /* address of previous next element */ \ - } - -/* - * List functions. - */ -#define LIST_INIT(head) do { \ - (head)->lh_first = NULL; \ - } while (/*CONSTCOND*/0) - -#define LIST_INSERT_AFTER(listelm, elm, field) do { \ - if (((elm)->field.le_next = (listelm)->field.le_next) != NULL) \ - (listelm)->field.le_next->field.le_prev = \ - &(elm)->field.le_next; \ - (listelm)->field.le_next = (elm); \ - (elm)->field.le_prev = &(listelm)->field.le_next; \ - } while (/*CONSTCOND*/0) - -#define LIST_INSERT_BEFORE(listelm, elm, field) do { \ - (elm)->field.le_prev = (listelm)->field.le_prev; \ - (elm)->field.le_next = (listelm); \ - *(listelm)->field.le_prev = (elm); \ - (listelm)->field.le_prev = &(elm)->field.le_next; \ - } while (/*CONSTCOND*/0) - -#define LIST_INSERT_HEAD(head, elm, field) do { \ - if (((elm)->field.le_next = (head)->lh_first) != NULL) \ - (head)->lh_first->field.le_prev = &(elm)->field.le_next;\ - (head)->lh_first = (elm); \ - (elm)->field.le_prev = &(head)->lh_first; \ - } while (/*CONSTCOND*/0) - -#define LIST_REMOVE(elm, field) do { \ - if ((elm)->field.le_next != NULL) \ - (elm)->field.le_next->field.le_prev = \ - (elm)->field.le_prev; \ - *(elm)->field.le_prev = (elm)->field.le_next; \ - } while (/*CONSTCOND*/0) - -#define LIST_FOREACH(var, head, field) \ - for ((var) = ((head)->lh_first); \ - (var); \ - (var) = ((var)->field.le_next)) - -/* - * List access methods. - */ -#define LIST_EMPTY(head) ((head)->lh_first == NULL) -#define LIST_FIRST(head) ((head)->lh_first) -#define LIST_NEXT(elm, field) ((elm)->field.le_next) - - -/* - * Singly-linked List definitions. - */ -#define SLIST_HEAD(name, type) \ - struct name { \ - struct type *slh_first; /* first element */ \ - } - -#define SLIST_HEAD_INITIALIZER(head) \ - { NULL } - -#define SLIST_ENTRY(type) \ - struct { \ - struct type *sle_next; /* next element */ \ - } - -/* - * Singly-linked List functions. - */ -#define SLIST_INIT(head) do { \ - (head)->slh_first = NULL; \ - } while (/*CONSTCOND*/0) - -#define SLIST_INSERT_AFTER(slistelm, elm, field) do { \ - (elm)->field.sle_next = (slistelm)->field.sle_next; \ - (slistelm)->field.sle_next = (elm); \ - } while (/*CONSTCOND*/0) - -#define SLIST_INSERT_HEAD(head, elm, field) do { \ - (elm)->field.sle_next = (head)->slh_first; \ - (head)->slh_first = (elm); \ - } while (/*CONSTCOND*/0) - -#define SLIST_REMOVE_HEAD(head, field) do { \ - (head)->slh_first = (head)->slh_first->field.sle_next; \ - } while (/*CONSTCOND*/0) - -#define SLIST_REMOVE(head, elm, type, field) do { \ - if ((head)->slh_first == (elm)) { \ - SLIST_REMOVE_HEAD((head), field); \ - } \ - else { \ - struct type *curelm = (head)->slh_first; \ - while(curelm->field.sle_next != (elm)) \ - curelm = curelm->field.sle_next; \ - curelm->field.sle_next = \ - curelm->field.sle_next->field.sle_next; \ - } \ - } while (/*CONSTCOND*/0) - -#define SLIST_FOREACH(var, head, field) \ - for((var) = (head)->slh_first; (var); (var) = (var)->field.sle_next) - -/* - * Singly-linked List access methods. - */ -#define SLIST_EMPTY(head) ((head)->slh_first == NULL) -#define SLIST_FIRST(head) ((head)->slh_first) -#define SLIST_NEXT(elm, field) ((elm)->field.sle_next) - - -/* - * Singly-linked Tail queue declarations. - */ -#define STAILQ_HEAD(name, type) \ - struct name { \ - struct type *stqh_first; /* first element */ \ - struct type **stqh_last; /* addr of last next element */ \ - } - -#define STAILQ_HEAD_INITIALIZER(head) \ - { NULL, &(head).stqh_first } - -#define STAILQ_ENTRY(type) \ - struct { \ - struct type *stqe_next; /* next element */ \ - } - -/* - * Singly-linked Tail queue functions. - */ -#define STAILQ_INIT(head) do { \ - (head)->stqh_first = NULL; \ - (head)->stqh_last = &(head)->stqh_first; \ - } while (/*CONSTCOND*/0) - -#define STAILQ_INSERT_HEAD(head, elm, field) do { \ - if (((elm)->field.stqe_next = (head)->stqh_first) == NULL) \ - (head)->stqh_last = &(elm)->field.stqe_next; \ - (head)->stqh_first = (elm); \ - } while (/*CONSTCOND*/0) - -#define STAILQ_INSERT_TAIL(head, elm, field) do { \ - (elm)->field.stqe_next = NULL; \ - *(head)->stqh_last = (elm); \ - (head)->stqh_last = &(elm)->field.stqe_next; \ - } while (/*CONSTCOND*/0) - -#define STAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ - if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL)\ - (head)->stqh_last = &(elm)->field.stqe_next; \ - (listelm)->field.stqe_next = (elm); \ - } while (/*CONSTCOND*/0) - -#define STAILQ_REMOVE_HEAD(head, field) do { \ - if (((head)->stqh_first = (head)->stqh_first->field.stqe_next) == NULL) \ - (head)->stqh_last = &(head)->stqh_first; \ - } while (/*CONSTCOND*/0) - -#define STAILQ_REMOVE(head, elm, type, field) do { \ - if ((head)->stqh_first == (elm)) { \ - STAILQ_REMOVE_HEAD((head), field); \ - } else { \ - struct type *curelm = (head)->stqh_first; \ - while (curelm->field.stqe_next != (elm)) \ - curelm = curelm->field.stqe_next; \ - if ((curelm->field.stqe_next = \ - curelm->field.stqe_next->field.stqe_next) == NULL) \ - (head)->stqh_last = &(curelm)->field.stqe_next; \ - } \ - } while (/*CONSTCOND*/0) - -#define STAILQ_FOREACH(var, head, field) \ - for ((var) = ((head)->stqh_first); \ - (var); \ - (var) = ((var)->field.stqe_next)) - -#define STAILQ_CONCAT(head1, head2) do { \ - if (!STAILQ_EMPTY((head2))) { \ - *(head1)->stqh_last = (head2)->stqh_first; \ - (head1)->stqh_last = (head2)->stqh_last; \ - STAILQ_INIT((head2)); \ - } \ - } while (/*CONSTCOND*/0) - -/* - * Singly-linked Tail queue access methods. - */ -#define STAILQ_EMPTY(head) ((head)->stqh_first == NULL) -#define STAILQ_FIRST(head) ((head)->stqh_first) -#define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next) - - -/* - * Simple queue definitions. - */ -#define SIMPLEQ_HEAD(name, type) \ - struct name { \ - struct type *sqh_first; /* first element */ \ - struct type **sqh_last; /* addr of last next element */ \ - } - -#define SIMPLEQ_HEAD_INITIALIZER(head) \ - { NULL, &(head).sqh_first } - -#define SIMPLEQ_ENTRY(type) \ - struct { \ - struct type *sqe_next; /* next element */ \ - } - -/* - * Simple queue functions. - */ -#define SIMPLEQ_INIT(head) do { \ - (head)->sqh_first = NULL; \ - (head)->sqh_last = &(head)->sqh_first; \ - } while (/*CONSTCOND*/0) - -#define SIMPLEQ_INSERT_HEAD(head, elm, field) do { \ - if (((elm)->field.sqe_next = (head)->sqh_first) == NULL) \ - (head)->sqh_last = &(elm)->field.sqe_next; \ - (head)->sqh_first = (elm); \ - } while (/*CONSTCOND*/0) - -#define SIMPLEQ_INSERT_TAIL(head, elm, field) do { \ - (elm)->field.sqe_next = NULL; \ - *(head)->sqh_last = (elm); \ - (head)->sqh_last = &(elm)->field.sqe_next; \ - } while (/*CONSTCOND*/0) - -#define SIMPLEQ_INSERT_AFTER(head, listelm, elm, field) do { \ - if (((elm)->field.sqe_next = (listelm)->field.sqe_next) == NULL)\ - (head)->sqh_last = &(elm)->field.sqe_next; \ - (listelm)->field.sqe_next = (elm); \ - } while (/*CONSTCOND*/0) - -#define SIMPLEQ_REMOVE_HEAD(head, field) do { \ - if (((head)->sqh_first = (head)->sqh_first->field.sqe_next) == NULL) \ - (head)->sqh_last = &(head)->sqh_first; \ - } while (/*CONSTCOND*/0) - -#define SIMPLEQ_REMOVE(head, elm, type, field) do { \ - if ((head)->sqh_first == (elm)) { \ - SIMPLEQ_REMOVE_HEAD((head), field); \ - } else { \ - struct type *curelm = (head)->sqh_first; \ - while (curelm->field.sqe_next != (elm)) \ - curelm = curelm->field.sqe_next; \ - if ((curelm->field.sqe_next = \ - curelm->field.sqe_next->field.sqe_next) == NULL) \ - (head)->sqh_last = &(curelm)->field.sqe_next; \ - } \ - } while (/*CONSTCOND*/0) - -#define SIMPLEQ_FOREACH(var, head, field) \ - for ((var) = ((head)->sqh_first); \ - (var); \ - (var) = ((var)->field.sqe_next)) - -/* - * Simple queue access methods. - */ -#define SIMPLEQ_EMPTY(head) ((head)->sqh_first == NULL) -#define SIMPLEQ_FIRST(head) ((head)->sqh_first) -#define SIMPLEQ_NEXT(elm, field) ((elm)->field.sqe_next) - - -/* - * Tail queue definitions. - */ -#define _TAILQ_HEAD(name, type, qual) \ - struct name { \ - qual type *tqh_first; /* first element */ \ - qual type *qual *tqh_last; /* addr of last next element */ \ - } -#define TAILQ_HEAD(name, type) _TAILQ_HEAD(name, struct type,) - -#define TAILQ_HEAD_INITIALIZER(head) \ - { NULL, &(head).tqh_first } - -#define _TAILQ_ENTRY(type, qual) \ - struct { \ - qual type *tqe_next; /* next element */ \ - qual type *qual *tqe_prev; /* address of previous next element */\ - } -#define TAILQ_ENTRY(type) _TAILQ_ENTRY(struct type,) - -/* - * Tail queue functions. - */ -#define TAILQ_INIT(head) do { \ - (head)->tqh_first = NULL; \ - (head)->tqh_last = &(head)->tqh_first; \ - } while (/*CONSTCOND*/0) - -#define TAILQ_INSERT_HEAD(head, elm, field) do { \ - if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \ - (head)->tqh_first->field.tqe_prev = \ - &(elm)->field.tqe_next; \ - else \ - (head)->tqh_last = &(elm)->field.tqe_next; \ - (head)->tqh_first = (elm); \ - (elm)->field.tqe_prev = &(head)->tqh_first; \ - } while (/*CONSTCOND*/0) - -#define TAILQ_INSERT_TAIL(head, elm, field) do { \ - (elm)->field.tqe_next = NULL; \ - (elm)->field.tqe_prev = (head)->tqh_last; \ - *(head)->tqh_last = (elm); \ - (head)->tqh_last = &(elm)->field.tqe_next; \ - } while (/*CONSTCOND*/0) - -#define TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ - if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\ - (elm)->field.tqe_next->field.tqe_prev = \ - &(elm)->field.tqe_next; \ - else \ - (head)->tqh_last = &(elm)->field.tqe_next; \ - (listelm)->field.tqe_next = (elm); \ - (elm)->field.tqe_prev = &(listelm)->field.tqe_next; \ - } while (/*CONSTCOND*/0) - -#define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \ - (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \ - (elm)->field.tqe_next = (listelm); \ - *(listelm)->field.tqe_prev = (elm); \ - (listelm)->field.tqe_prev = &(elm)->field.tqe_next; \ - } while (/*CONSTCOND*/0) - -#define TAILQ_REMOVE(head, elm, field) do { \ - if (((elm)->field.tqe_next) != NULL) \ - (elm)->field.tqe_next->field.tqe_prev = \ - (elm)->field.tqe_prev; \ - else \ - (head)->tqh_last = (elm)->field.tqe_prev; \ - *(elm)->field.tqe_prev = (elm)->field.tqe_next; \ - } while (/*CONSTCOND*/0) - -#define TAILQ_FOREACH(var, head, field) \ - for ((var) = ((head)->tqh_first); \ - (var); \ - (var) = ((var)->field.tqe_next)) - -#define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ - for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last)); \ - (var); \ - (var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last))) - -#define TAILQ_CONCAT(head1, head2, field) do { \ - if (!TAILQ_EMPTY(head2)) { \ - *(head1)->tqh_last = (head2)->tqh_first; \ - (head2)->tqh_first->field.tqe_prev = (head1)->tqh_last; \ - (head1)->tqh_last = (head2)->tqh_last; \ - TAILQ_INIT((head2)); \ - } \ - } while (/*CONSTCOND*/0) - -/* - * Tail queue access methods. - */ -#define TAILQ_EMPTY(head) ((head)->tqh_first == NULL) -#define TAILQ_FIRST(head) ((head)->tqh_first) -#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next) - -#define TAILQ_LAST(head, headname) \ - (*(((struct headname *)((head)->tqh_last))->tqh_last)) -#define TAILQ_PREV(elm, headname, field) \ - (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last)) - - -/* - * Circular queue definitions. - */ -#define CIRCLEQ_HEAD(name, type) \ - struct name { \ - struct type *cqh_first; /* first element */ \ - struct type *cqh_last; /* last element */ \ - } - -#define CIRCLEQ_HEAD_INITIALIZER(head) \ - { (void *)&head, (void *)&head } - -#define CIRCLEQ_ENTRY(type) \ - struct { \ - struct type *cqe_next; /* next element */ \ - struct type *cqe_prev; /* previous element */ \ - } - -/* - * Circular queue functions. - */ -#define CIRCLEQ_INIT(head) do { \ - (head)->cqh_first = (void *)(head); \ - (head)->cqh_last = (void *)(head); \ - } while (/*CONSTCOND*/0) - -#define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) do { \ - (elm)->field.cqe_next = (listelm)->field.cqe_next; \ - (elm)->field.cqe_prev = (listelm); \ - if ((listelm)->field.cqe_next == (void *)(head)) \ - (head)->cqh_last = (elm); \ - else \ - (listelm)->field.cqe_next->field.cqe_prev = (elm); \ - (listelm)->field.cqe_next = (elm); \ - } while (/*CONSTCOND*/0) - -#define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) do { \ - (elm)->field.cqe_next = (listelm); \ - (elm)->field.cqe_prev = (listelm)->field.cqe_prev; \ - if ((listelm)->field.cqe_prev == (void *)(head)) \ - (head)->cqh_first = (elm); \ - else \ - (listelm)->field.cqe_prev->field.cqe_next = (elm); \ - (listelm)->field.cqe_prev = (elm); \ - } while (/*CONSTCOND*/0) - -#define CIRCLEQ_INSERT_HEAD(head, elm, field) do { \ - (elm)->field.cqe_next = (head)->cqh_first; \ - (elm)->field.cqe_prev = (void *)(head); \ - if ((head)->cqh_last == (void *)(head)) \ - (head)->cqh_last = (elm); \ - else \ - (head)->cqh_first->field.cqe_prev = (elm); \ - (head)->cqh_first = (elm); \ - } while (/*CONSTCOND*/0) - -#define CIRCLEQ_INSERT_TAIL(head, elm, field) do { \ - (elm)->field.cqe_next = (void *)(head); \ - (elm)->field.cqe_prev = (head)->cqh_last; \ - if ((head)->cqh_first == (void *)(head)) \ - (head)->cqh_first = (elm); \ - else \ - (head)->cqh_last->field.cqe_next = (elm); \ - (head)->cqh_last = (elm); \ - } while (/*CONSTCOND*/0) - -#define CIRCLEQ_REMOVE(head, elm, field) do { \ - if ((elm)->field.cqe_next == (void *)(head)) \ - (head)->cqh_last = (elm)->field.cqe_prev; \ - else \ - (elm)->field.cqe_next->field.cqe_prev = \ - (elm)->field.cqe_prev; \ - if ((elm)->field.cqe_prev == (void *)(head)) \ - (head)->cqh_first = (elm)->field.cqe_next; \ - else \ - (elm)->field.cqe_prev->field.cqe_next = \ - (elm)->field.cqe_next; \ - } while (/*CONSTCOND*/0) - -#define CIRCLEQ_FOREACH(var, head, field) \ - for ((var) = ((head)->cqh_first); \ - (var) != (const void *)(head); \ - (var) = ((var)->field.cqe_next)) - -#define CIRCLEQ_FOREACH_REVERSE(var, head, field) \ - for ((var) = ((head)->cqh_last); \ - (var) != (const void *)(head); \ - (var) = ((var)->field.cqe_prev)) - -/* - * Circular queue access methods. - */ -#define CIRCLEQ_EMPTY(head) ((head)->cqh_first == (void *)(head)) -#define CIRCLEQ_FIRST(head) ((head)->cqh_first) -#define CIRCLEQ_LAST(head) ((head)->cqh_last) -#define CIRCLEQ_NEXT(elm, field) ((elm)->field.cqe_next) -#define CIRCLEQ_PREV(elm, field) ((elm)->field.cqe_prev) - -#define CIRCLEQ_LOOP_NEXT(head, elm, field) \ - (((elm)->field.cqe_next == (void *)(head)) \ - ? ((head)->cqh_first) \ - : (elm->field.cqe_next)) -#define CIRCLEQ_LOOP_PREV(head, elm, field) \ - (((elm)->field.cqe_prev == (void *)(head)) \ - ? ((head)->cqh_last) \ - : (elm->field.cqe_prev)) - -#endif /* sys/queue.h */ diff --git a/openair-cn/README b/openair-cn/README deleted file mode 100644 index 11ae2e631e..0000000000 --- a/openair-cn/README +++ /dev/null @@ -1,128 +0,0 @@ -=============================================================================== -***************************** OAISIM_MME v0.3 ********************************* -=============================================================================== - -MME + P-GW + S-GW implementation of 3GPP standard. - -|-----| |------| -| MME | ----- | eNBs | -|-----| |------| - -Controle plane: - - eNB MME HSS - - |----------------------------| - | MME Application layer | - |----------------------------| - |------------| |-------------| |-------------| |--------------| - | NAS | | AUC |--| Mysql | --- | Database | - |------------| |-------------| |-------------| |--------------| -|------------| |------------| |------------| |--------------| |------------------------------| -| RRC | - | S1AP layer | ------ | S1AP layer | | S6A/Diameter | ------ | S6A/Diameter | -|------------| |------------| |------------| |--------------| |------------------------------| - |------------| |------------------------------| |------------------------------| - | SCTP layer | ------ | SCTP layer | ------ | SCTP layer | - |------------| |------------------------------| |------------------------------| - - -Non-UE associated control plane goes directly from S1AP to MME application layer. - -User plane: - - eNB MME - -|------------| |------------| -| PDCP | | MAL | -|------------| |------------| -|------------| |------------| -| S1-U | ------ | S1-U | -|------------| |------------| -|------------| |------------| -| GTPV1-U | ------ | GTPV1-U | -|------------| |------------| -|------------| |------------| -| UDP layer | ------ | UDP layer | -|------------| |------------| - -Current development: - -- NAS layer: under development -- S1AP layer: compliant with 3GPP TS36.413-8a0 and TS36.413-980 and TS35.413-a50 -- SCTP layer: SEQ_PACKET socket types - -For now the MME is able to register new eNBs on SCTP layer, -and handles S1 Setup request, Initial UE message, UplinkNASTransport on -S1AP layer. - -The MME needs some libraries and tools: -- libsctp-dev (SCTP support) -- libpthread-dev -- asn1c utility (patched with Aligned PER support, see README in -S1AP/MESSAGES/ASN1) -- flex -- bison -To install the dependencies: -sudo apt-get install libsctp-dev libpthread-dev flex bison g++ gcc make -y - -A script is present in S6A/freediameter to install required packages for -S6A interface over diameter. Run it as a sudoer. - -install_openvswitch1.9.0.bash -cd S6A/freediameter/README - -Compilations steps for use with oaisim 4G emulation environment: -./autogen.sh or autoreconf -i --force --install -mkdir objs && cd objs -../configure [options] -make - -Compilations steps for oaisim_mme use alone: -./autogen.sh -./configure [options] -make - -Current options supported for configure: ---enable-r8: disable R9 and R10 S1AP messages updates ---enable-r9: disable R10 updates -code build switch: UPDATE_RELEASE_9 and UPDATE_RELEASE_10 -NOTE: Release 10 is enabled by default ---enable-standalone-epc: all-in-one package, MME, S-GW and P-GW are compiled in a single -executable and S11 interface is not used; messages are exchanged internally, -linking MME applicative layer to S+P-GW applicative layer - -How to run EPC environnement ? - -If you avec enabled the standalone option -the package is called oai_epc in the OAI_EPC directory. - -If you have decided to use the S11 interface, -two executables should be run on different machines - -* oai_sgw in OAI_SGW -* oaisim_mme in OAISIM_MME - -For example to rum mme: -./OAISIM_MME/oaisim_mme [options] -Avalaible options: --h: print help --v: enable verbosity level [1-2] --V: print current executable version and return - -Before any commit: -make maintainer-clean - -MME SCTP port for S1AP messages is 36412 -SGW and eNB GTP-u port is 2152 -SGW and MME GTP-c port is 2123 - --------- Adding new files to build system -------- -1) When adding a new file to compile, edit the Makefile.am of the corresponding - directory. -2) Execute ./autogen.sh -3) make -WARNING: do not edit directly Makefiles and Makefile.in, they are re-generated by - autoconf/automake. - -Bugs: -report any bug to openair_admin@eurecom.fr diff --git a/openair-cn/S11/COPYING b/openair-cn/S11/COPYING deleted file mode 100644 index 94a9ed024d..0000000000 --- a/openair-cn/S11/COPYING +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program 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. - - This program 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 this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/openair-cn/S11/Makefile.am b/openair-cn/S11/Makefile.am deleted file mode 100644 index 7878e76f6a..0000000000 --- a/openair-cn/S11/Makefile.am +++ /dev/null @@ -1,54 +0,0 @@ -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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 . -# -# Contact Information -# OpenAirInterface Admin: openair_admin@eurecom.fr -# OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr -# -# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. -# -################################################################################ -noinst_LTLIBRARIES = libs11.la - -libs11_la_LDFLAGS = -all-static - -AM_CFLAGS = \ - @ADD_CFLAGS@ \ - -I$(top_srcdir)/COMMON \ - -I$(top_srcdir)/GTPV2-C/nwgtpv2c-0.11/shared \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/api/network \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/include \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/ies \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/emm/msg \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/esm/msg \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/util \ - -I$(top_srcdir)/INTERTASK_INTERFACE \ - -I$(top_srcdir)/SGW-LITE \ - -I$(top_srcdir)/UTILS - -libs11_la_SOURCES = \ - s11_common.c s11_common.h \ - s11_ie_formatter.c s11_ie_formatter.h \ - s11_mme_task.c s11_mme.h \ - s11_sgw.c s11_sgw.h \ - s11_mme_session_manager.c s11_mme_session_manager.h \ - s11_sgw_session_manager.c s11_sgw_session_manager.h \ - s11_sgw_bearer_manager.c s11_sgw_bearer_manager.h \ No newline at end of file diff --git a/openair-cn/S11/s11_common.c b/openair-cn/S11/s11_common.c deleted file mode 100644 index b24e82b586..0000000000 --- a/openair-cn/S11/s11_common.c +++ /dev/null @@ -1,46 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "NwGtpv2c.h" - -#include "s11_common.h" - -NwRcT s11_ie_indication_generic(uint8_t ieType, - uint8_t ieLength, - uint8_t ieInstance, - uint8_t *ieValue, - void *arg) -{ - S11_DEBUG("Received IE Parse Indication for of type %u, length %u, " - "instance %u!\n", ieType, ieLength, ieInstance); - return NW_OK; -} diff --git a/openair-cn/S11/s11_common.h b/openair-cn/S11/s11_common.h deleted file mode 100644 index a1f59006b2..0000000000 --- a/openair-cn/S11/s11_common.h +++ /dev/null @@ -1,43 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#ifndef S11_COMMON_H_ -#define S11_COMMON_H_ - -#define S11_DEBUG(x, args...) fprintf(stdout, "[S11] [D]"x, ##args) -#define S11_INFO(x, args...) fprintf(stdout, "[S11] [I]"x, ##args) -#define S11_WARN(x, args...) fprintf(stdout, "[S11] [W]"x, ##args) -#define S11_ERROR(x, args...) fprintf(stderr, "[S11] [E]"x, ##args) - -NwRcT s11_ie_indication_generic(uint8_t ieType, - uint8_t ieLength, - uint8_t ieInstance, - uint8_t *ieValue, - void *arg); - -#endif /* S11_COMMON_H_ */ diff --git a/openair-cn/S11/s11_ie_formatter.c b/openair-cn/S11/s11_ie_formatter.c deleted file mode 100644 index 1b3f85acf4..0000000000 --- a/openair-cn/S11/s11_ie_formatter.c +++ /dev/null @@ -1,1164 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -#include -#include -#include - -#include "assertions.h" -#include "conversions.h" - -#include "sgw_lite_messages_types.h" - -#include "NwGtpv2c.h" -#include "NwGtpv2cIe.h" -#include "NwGtpv2cMsg.h" -#include "NwGtpv2cMsgParser.h" - -#include "s11_common.h" -#include "s11_ie_formatter.h" - -NwRcT s11_imsi_ie_get( - uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg) -{ - Imsi_t *imsi; - uint8_t i; - uint8_t mask = 0x0F; - uint8_t imsi_length = 2 * ieLength; - - DevAssert(arg != NULL); - imsi = (Imsi_t *)arg; - - for (i = 0; i < ieLength * 2; i++) { - if (mask == 0x0F) { - imsi->digit[i] = (ieValue[i / 2] & (mask)); - } else { - imsi->digit[i] = (ieValue[i / 2] & (mask)) >> 4; - } - - imsi->digit[i] += '0'; - mask = ~mask; - } - - if (imsi->digit[imsi_length - 1] == (0x0f + '0')) { - imsi->digit[imsi_length - 1] = 0; - imsi_length--; - } - - imsi->length = imsi_length; - - S11_DEBUG("\t- IMSI length %d\n", imsi->length); - S11_DEBUG("\t- value %*s\n", imsi->length, imsi->digit); - - return NW_OK; -} - -int s11_imsi_ie_set(NwGtpv2cMsgHandleT *msg, const Imsi_t *imsi) -{ - uint8_t *temp = NULL; - uint8_t imsi_length, i; - NwRcT rc; - - DevAssert(msg != NULL); - DevAssert(imsi != NULL); - - /* In case of odd/even imsi */ - imsi_length = imsi->length % 2 == 0 ? imsi->length / 2 : imsi->length / 2 + 1; - - temp = calloc(imsi_length, sizeof(uint8_t)); - - DevAssert(temp != NULL); - - for (i = 0; i < imsi->length; i++) { - temp[i / 2] |= ((imsi->digit[i] - '0') & 0x0F) << (i % 2 ? 4 : 0); - } - - rc = nwGtpv2cMsgAddIe(*msg, NW_GTPV2C_IE_IMSI, imsi_length, 0, temp); - DevAssert(NW_OK == rc); - - free(temp); - - return 0; -} - -NwRcT s11_msisdn_ie_get( - uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg) -{ - Msisdn_t *msisdn; - uint8_t i; - uint8_t mask = 0x0F; - uint8_t msisdn_length = 2 * ieLength; - - DevAssert(arg != NULL); - msisdn = (Msisdn_t *)arg; - - for (i = 0; i < ieLength * 2; i++) { - if (mask == 0x0F) { - msisdn->digit[i] = (ieValue[i / 2] & (mask)); - } else { - msisdn->digit[i] = (ieValue[i / 2] & (mask)) >> 4; - } - - msisdn->digit[i] += '0'; - mask = ~mask; - } - - if (msisdn->digit[msisdn_length - 1] == (0x0f + '0')) { - msisdn->digit[msisdn_length - 1] = 0; - msisdn_length--; - } - - msisdn->length = msisdn_length; - - S11_DEBUG("\t- MSISDN length %d\n", msisdn->length); - S11_DEBUG("\t- value %*s\n", msisdn->length, (char *)msisdn->digit); - - return NW_OK; -} - -NwRcT s11_mei_ie_get( - uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg) -{ - Mei_t *mei = (Mei_t *)arg; - - DevAssert(mei != NULL); - - - - return NW_OK; -} - -NwRcT s11_pdn_type_ie_get( - uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg) -{ - pdn_type_t *pdn_type = (pdn_type_t *)arg; - - DevAssert(pdn_type != NULL); - - if (*ieValue == 1) { - /* Only IPv4 */ - *pdn_type = IPv4; - } else if (*ieValue == 2) { - /* Only IPv6 */ - *pdn_type = IPv6; - } else if (*ieValue == 3) { - /* IPv4 and/or IPv6 */ - *pdn_type = IPv4_AND_v6; - } else { - S11_ERROR("Received unknown value for PDN Type: %u\n", *ieValue); - return NW_GTPV2C_IE_INCORRECT; - } - - S11_DEBUG("\t- PDN type %u\n", *pdn_type); - - return NW_OK; -} - -int s11_pdn_type_ie_set(NwGtpv2cMsgHandleT *msg, const pdn_type_t *pdn_type) -{ - NwRcT rc; - uint8_t value; - - DevAssert(pdn_type != NULL); - DevAssert(msg != NULL); - - switch (*pdn_type) { - case IPv4: - value = 1; - break; - - case IPv6: - value = 2; - break; - - case IPv4_AND_v6: - case IPv4_OR_v6: - value = 3; - break; - - default: - S11_ERROR("Invalid PDN type received: %d\n", *pdn_type); - return -1; - } - - rc = nwGtpv2cMsgAddIe(*msg, NW_GTPV2C_IE_PDN_TYPE, 1, 0, (uint8_t*)&value); - DevAssert(NW_OK == rc); - - return 0; -} - -NwRcT s11_rat_type_ie_get( - uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg) -{ - rat_type_t *rat_type = (rat_type_t *)arg; - - DevAssert(rat_type != NULL); - - switch (*ieValue) { - case 1: - *rat_type = RAT_UTRAN; - break; - - case 2: - *rat_type = RAT_GERAN; - break; - - case 3: - *rat_type = RAT_WLAN; - break; - - case 4: - *rat_type = RAT_GAN; - break; - - case 5: - *rat_type = RAT_HSPA_EVOLUTION; - break; - - case 6: - *rat_type = RAT_EUTRAN; - break; - - default: - S11_ERROR("Can't map GTP RAT type %u to EPC definition\n" - "\tCheck TS.29.274 #8.17 for possible values\n", *ieValue); - return NW_GTPV2C_IE_INCORRECT; - } - - S11_DEBUG("\t- RAT type (%d): %d\n", *ieValue, *rat_type); - - return NW_OK; -} - -int s11_rat_type_ie_set(NwGtpv2cMsgHandleT *msg, const rat_type_t *rat_type) -{ - NwRcT rc; - uint8_t value; - - DevAssert(rat_type != NULL); - DevAssert(msg != NULL); - - switch (*rat_type) { - case RAT_UTRAN: - value = 1; - break; - - case RAT_GERAN: - value = 2; - break; - - case RAT_WLAN: - value = 3; - break; - - case RAT_GAN: - value = 4; - break; - - case RAT_HSPA_EVOLUTION: - value = 5; - break; - - case RAT_EUTRAN: - value = 6; - break; - - default: - S11_ERROR("Can't map RAT type %d to GTP RAT type\n" - "\tCheck TS.29.274 #8.17 for possible values\n", *rat_type); - return -1; - } - - rc = nwGtpv2cMsgAddIe(*msg, NW_GTPV2C_IE_RAT_TYPE, 1, 0, (uint8_t*)&value); - DevAssert(NW_OK == rc); - - return 0; -} - -int s11_ebi_ie_set(NwGtpv2cMsgHandleT *msg, const unsigned ebi) -{ - NwRcT rc; - uint8_t value = 0; - - value = ebi & 0x0F; - - rc = nwGtpv2cMsgAddIe(*msg, NW_GTPV2C_IE_EBI, 1, 0, - &value); - DevAssert(NW_OK == rc); - - return 0; -} - -NwRcT s11_ebi_ie_get( - uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg) -{ - uint8_t *ebi = (uint8_t *)arg; - - DevAssert(ebi != NULL); - - *ebi = ieValue[0] & 0x0F; - - S11_DEBUG("\t- EBI %u\n", *ebi); - - return NW_OK; -} - -NwRcT s11_cause_ie_get( - uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg) -{ - SGWCause_t *cause = (SGWCause_t *)arg; - - DevAssert(cause != NULL); - - *cause = ieValue[0]; - - S11_DEBUG("\t- Cause %u\n", *cause); - - return NW_OK; -} - -int s11_cause_ie_set(NwGtpv2cMsgHandleT *msg, - const gtp_cause_t *cause) -{ - NwRcT rc; - uint8_t value[6]; - - DevAssert(msg != NULL); - DevAssert(cause != NULL); - - value[0] = cause->cause_value; - value[1] = ((cause->pce & 0x1) << 2) | ((cause->bce & 0x1) << 1) | (cause->cs & 0x1); - - if (cause->offending_ie_type != 0) { - value[2] = cause->offending_ie_type; - value[3] = (cause->offending_ie_length & 0xFF00) >> 8; - value[4] = cause->offending_ie_length & 0x00FF; - value[5] = cause->offending_ie_instance & 0x0F; - rc = nwGtpv2cMsgAddIe(*msg, NW_GTPV2C_IE_CAUSE, 6, 0, value); - } else { - rc = nwGtpv2cMsgAddIe(*msg, NW_GTPV2C_IE_CAUSE, 2, 0, value); - } - - DevAssert(NW_OK == rc); - - return rc == NW_OK ? 0 : -1; -} - -NwRcT s11_bearer_context_ie_get( - uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg) -{ - bearer_to_create_t *bearer_to_create = (bearer_to_create_t *)arg; - uint8_t read = 0; - NwRcT rc; - - DevAssert(bearer_to_create != NULL); - - while (ieLength > read) { - NwGtpv2cIeTlvT *ie_p; - - ie_p = (NwGtpv2cIeTlvT*)&ieValue[read]; - - switch (ie_p->t) { - case NW_GTPV2C_IE_EBI: - rc = s11_ebi_ie_get(ie_p->t, ie_p->l, ie_p->i, - &ieValue[read + sizeof(NwGtpv2cIeTlvT)], - &bearer_to_create->eps_bearer_id); - DevAssert(NW_OK == rc); - break; - - case NW_GTPV2C_IE_BEARER_LEVEL_QOS: - break; - - default: - S11_ERROR("Received unexpected IE %u\n", ie_p->t); - return NW_GTPV2C_IE_INCORRECT; - } - - read += (ntohs(ie_p->l) + sizeof(NwGtpv2cIeTlvT)); - } - - return NW_OK; -} - -int s11_bearer_context_to_create_ie_set( - NwGtpv2cMsgHandleT *msg, const bearer_to_create_t *bearer_to_create) -{ - NwRcT rc; - - DevAssert(msg != NULL); - DevAssert(bearer_to_create != NULL); - - /* Start section for grouped IE: bearer context to create */ - rc = nwGtpv2cMsgGroupedIeStart(*msg, NW_GTPV2C_IE_BEARER_CONTEXT, - NW_GTPV2C_IE_INSTANCE_ZERO); - DevAssert(NW_OK == rc); - - s11_ebi_ie_set(msg, bearer_to_create->eps_bearer_id); - - /* End section for grouped IE: bearer context to create */ - rc = nwGtpv2cMsgGroupedIeEnd(*msg); - DevAssert(NW_OK == rc); - return 0; -} - -NwRcT s11_bearer_context_to_modifiy_ie_get( - uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg) -{ - bearer_context_to_modify_t *bearer_to_modify = (bearer_context_to_modify_t *)arg; - uint8_t read = 0; - NwRcT rc; - - DevAssert(bearer_to_modify != NULL); - - while (ieLength > read) { - NwGtpv2cIeTlvT *ie_p; - - ie_p = (NwGtpv2cIeTlvT*)&ieValue[read]; - - switch (ie_p->t) { - case NW_GTPV2C_IE_EBI: - rc = s11_ebi_ie_get(ie_p->t, ie_p->l, ie_p->i, - &ieValue[read + sizeof(NwGtpv2cIeTlvT)], - &bearer_to_modify->eps_bearer_id); - DevAssert(NW_OK == rc); - break; - - case NW_GTPV2C_IE_FTEID: - rc = s11_fteid_ie_get(ie_p->t, ie_p->l, ie_p->i, - &ieValue[read + sizeof(NwGtpv2cIeTlvT)], - &bearer_to_modify->s1_eNB_fteid); - break; - - default: - S11_ERROR("Received unexpected IE %u\n", ie_p->t); - return NW_GTPV2C_IE_INCORRECT; - } - - read += (ntohs(ie_p->l) + sizeof(NwGtpv2cIeTlvT)); - } - - return NW_OK; -} - -NwRcT s11_bearer_context_created_ie_get( - uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg) -{ - bearer_context_created_t *bearer_created = (bearer_context_created_t *)arg; - uint8_t read = 0; - NwRcT rc; - - DevAssert(bearer_created != NULL); - - while (ieLength > read) { - NwGtpv2cIeTlvT *ie_p; - - ie_p = (NwGtpv2cIeTlvT*)&ieValue[read]; - - switch (ie_p->t) { - case NW_GTPV2C_IE_EBI: - rc = s11_ebi_ie_get(ie_p->t, ie_p->l, ie_p->i, - &ieValue[read + sizeof(NwGtpv2cIeTlvT)], - &bearer_created->eps_bearer_id); - DevAssert(NW_OK == rc); - break; - - case NW_GTPV2C_IE_FTEID: - rc = s11_fteid_ie_get(ie_p->t, ie_p->l, ie_p->i, - &ieValue[read + sizeof(NwGtpv2cIeTlvT)], - &bearer_created->s1u_sgw_fteid); - break; - - case NW_GTPV2C_IE_CAUSE: - rc = s11_cause_ie_get(ie_p->t, ie_p->l, ie_p->i, - &ieValue[read + sizeof(NwGtpv2cIeTlvT)], - &bearer_created->cause); - break; - - default: - S11_ERROR("Received unexpected IE %u\n", ie_p->t); - return NW_GTPV2C_IE_INCORRECT; - } - - read += (ntohs(ie_p->l) + sizeof(NwGtpv2cIeTlvT)); - } - - return NW_OK; -} - -int s11_bearer_context_created_ie_set( - NwGtpv2cMsgHandleT *msg, const bearer_context_created_t *bearer) -{ - NwRcT rc; - - DevAssert(msg != NULL); - DevAssert(bearer != NULL); - - /* Start section for grouped IE: bearer context created */ - rc = nwGtpv2cMsgGroupedIeStart(*msg, NW_GTPV2C_IE_BEARER_CONTEXT, - NW_GTPV2C_IE_INSTANCE_ZERO); - DevAssert(NW_OK == rc); - - s11_ebi_ie_set(msg, bearer->eps_bearer_id); - - rc = nwGtpv2cMsgAddIeCause(*msg, NW_GTPV2C_IE_INSTANCE_ZERO, bearer->cause, - 0, 0, 0); - DevAssert(NW_OK == rc); - - rc = nwGtpv2cMsgAddIeFteid(*msg, NW_GTPV2C_IE_INSTANCE_ZERO, - bearer->s1u_sgw_fteid.interface_type, - bearer->s1u_sgw_fteid.teid, - bearer->s1u_sgw_fteid.ipv4 ? htonl(bearer->s1u_sgw_fteid.ipv4_address) : 0, - bearer->s1u_sgw_fteid.ipv6 ? (uint8_t*)bearer->s1u_sgw_fteid.ipv6_address : NULL); - DevAssert(NW_OK == rc); - - /* End section for grouped IE: bearer context created */ - rc = nwGtpv2cMsgGroupedIeEnd(*msg); - DevAssert(NW_OK == rc); - - return 0; -} - -/* This IE shall be included in the E-UTRAN initial attach, - * PDP Context Activation and UE Requested PDN connectivity procedures. - * This IE denotes the most stringent restriction as required - * by any already active bearer context. If there are no already active bearer - * contexts, this value is set to the least restrictive type. - */ -int s11_apn_restriction_ie_set( - NwGtpv2cMsgHandleT *msg, const uint8_t apn_restriction) -{ - NwRcT rc; - - DevAssert(msg != NULL); - - rc = nwGtpv2cMsgAddIe(*msg, NW_GTPV2C_IE_APN_RESTRICTION, 1, 0, - (uint8_t *)&apn_restriction); - DevAssert(NW_OK == rc); - - return 0; -} - -NwRcT s11_serving_network_ie_get( - uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg) -{ - ServingNetwork_t *serving_net = (ServingNetwork_t *)arg; - - DevAssert(serving_net != NULL); - - serving_net->mcc[1] = (ieValue[0] & 0xF0) >> 4; - serving_net->mcc[0] = (ieValue[0] & 0x0F); - serving_net->mcc[2] = (ieValue[1] & 0x0F); - - if ((ieValue[1] & 0xF0) == 0xF0) { - /* Two digits MNC */ - serving_net->mnc[0] = 0; - serving_net->mnc[2] = (ieValue[2] & 0xF0) >> 4; - serving_net->mnc[1] = (ieValue[2] & 0x0F); - } else { - serving_net->mnc[0] = (ieValue[1] & 0xF0) >> 4; - serving_net->mnc[2] = (ieValue[2] & 0xF0) >> 4; - serving_net->mnc[1] = (ieValue[2] & 0x0F); - } - - S11_DEBUG("\t- Serving network %d.%d\n", - serving_net->mcc[0] * 100 + serving_net->mcc[1] * 10 - + serving_net->mcc[2], - serving_net->mnc[0] * 100 + serving_net->mnc[1] * 10 - + serving_net->mnc[2]); - - return NW_OK; -} - -int s11_serving_network_ie_set( - NwGtpv2cMsgHandleT *msg, - const ServingNetwork_t *serving_network) -{ - NwRcT rc; - uint8_t value[3]; - - DevAssert(msg != NULL); - DevAssert(serving_network != NULL); - - /* MCC Decimal | MCC Hundreds */ - value[0] = ((serving_network->mcc[1] & 0x0F) << 4) | - (serving_network->mcc[2] & 0x0F); - value[1] = serving_network->mcc[0] & 0x0F; - - if ((serving_network->mnc[0] & 0xF) == 0xF) { - /* Only two digits */ - value[1] |= 0xF0; - value[2] = ((serving_network->mnc[2] & 0x0F) << 4) | - (serving_network->mnc[1] & 0x0F); - } else { - value[1] |= (serving_network->mnc[2] & 0x0F) << 4; - value[2] = ((serving_network->mnc[1] & 0x0F) << 4) | - (serving_network->mnc[0] & 0x0F); - } - - rc = nwGtpv2cMsgAddIe(*msg, NW_GTPV2C_IE_SERVING_NETWORK, 3, 0, value); - DevAssert(NW_OK == rc); - - return 0; -} - -NwRcT s11_fteid_ie_get( - uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg) -{ - uint8_t offset = 0; - FTeid_t *fteid = (FTeid_t *)arg; - - DevAssert(fteid != NULL); - - fteid->ipv4 = (ieValue[0] & 0x80) >> 7; - fteid->ipv6 = (ieValue[0] & 0x40) >> 6; - - fteid->interface_type = ieValue[0] & 0x1F; - S11_DEBUG("\t- F-TEID type %d\n", fteid->interface_type); - - /* Copy the TEID or GRE key */ - fteid->teid = ntoh_int32_buf(&ieValue[1]); - - S11_DEBUG("\t- TEID/GRE %08x\n", fteid->teid); - - if (fteid->ipv4 == 1) { - /* IPv4 present: copy the 4 bytes */ - memcpy(&fteid->ipv4_address, &ieValue[5], 4); - offset = 4; - - S11_DEBUG("\t- IPv4 addr "IPV4_ADDR"\n", - IPV4_ADDR_FORMAT(fteid->ipv4_address)); - } - - if (fteid->ipv6 == 1) { - char ipv6_ascii[40]; - /* IPv6 present: copy the 16 bytes - * WARNING: if Ipv4 is present, 4 bytes of offset should be applied - */ - memcpy(fteid->ipv6_address, &ieValue[5 + offset], 16); - - inet_ntop(AF_INET6, fteid->ipv6_address, ipv6_ascii, 40); - S11_DEBUG("\t- IPv6 addr %s\n", ipv6_ascii); - } - - return NW_OK; -} - -NwRcT s11_paa_ie_get( - uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg) -{ - uint8_t offset = 0; - PAA_t *paa = (PAA_t *)arg; - - DevAssert(paa != NULL); - - paa->pdn_type = ieValue[0] & 0x07; - S11_DEBUG("\t- PAA type %d\n", paa->pdn_type); - - if (paa->pdn_type & 0x2) { - char ipv6_ascii[40]; - /* IPv6 present: copy the 16 bytes - * WARNING: if both ipv4 and ipv6 are present, - * 17 bytes of offset should be applied for ipv4 - * NOTE: an ipv6 prefix length is prepend - * NOTE: in Rel.8 the prefix length has a default value of /64 - */ - paa->ipv6_prefix_length = ieValue[1]; - memcpy(paa->ipv6_address, &ieValue[2], 16); - - inet_ntop(AF_INET6, paa->ipv6_address, ipv6_ascii, 40); - S11_DEBUG("\t- IPv6 addr %s/%u\n", ipv6_ascii, paa->ipv6_prefix_length); - } - - if (paa->pdn_type == 3) { - offset = 17; - } - - if (paa->pdn_type & 0x1) { - memcpy(paa->ipv4_address, &ieValue[1 + offset], 4); - - S11_DEBUG("\t- IPv4 addr "IPV4_ADDR"\n", - paa->ipv4_address[0], paa->ipv4_address[1], - paa->ipv4_address[2], paa->ipv4_address[3]); - } - - paa->pdn_type -= 1; - return NW_OK; -} - -int s11_paa_ie_set(NwGtpv2cMsgHandleT *msg, const PAA_t *paa) -{ - /* ipv4 address = 4 + ipv6 address = 16 + ipv6 prefix length = 1 - * + pdn_type = 1 - * = maximum of 22 bytes - */ - uint8_t temp[22]; - uint8_t pdn_type; - uint8_t offset = 0; - NwRcT rc; - - DevAssert(paa != NULL); - - pdn_type = paa->pdn_type + 1; - - temp[offset] = pdn_type; - offset++; - - if (pdn_type & 0x2) { - /* If ipv6 or ipv4v6 present */ - temp[1] = paa->ipv6_prefix_length; - memcpy(&temp[2], paa->ipv6_address, 16); - offset += 17; - } - - if (pdn_type & 0x1) { - memcpy(&temp[offset], paa->ipv4_address, 4); - offset += 4; - } - - rc = nwGtpv2cMsgAddIe(*msg, NW_GTPV2C_IE_PAA, offset, 0, - temp); - DevAssert(NW_OK == rc); - - return 0; -} - -/* The encoding of the APN shall follow the Name Syntax defined in RFC 2181, - * RFC 1035 and RFC 1123. The APN consists of one or more labels. Each label - * is coded as a one octet length field followed by that number of octets - * coded as 8 bit ASCII characters. Following RFC 1035 the labels shall consist - * only of the alphabetic characters (A-Z and a-z), digits (0-9) - * and the hyphen (-). - */ -NwRcT s11_apn_ie_get( - uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg) -{ - uint8_t read = 1; - uint8_t word_length; - char *apn = (char *)arg; - - DevAssert(apn != NULL); - - DevCheck(ieLength <= APN_MAX_LENGTH, ieLength, APN_MAX_LENGTH, 0); - - word_length = ieValue[0]; - - while (read < ieLength) { - if (word_length > 0) { - apn[read - 1] = ieValue[read]; - word_length--; - } else { - /* This is not an alphanumeric character */ - word_length = ieValue[read]; - /* Replace the length attribute by '.' */ - apn[read - 1] = '.'; - } - - read ++; - } - - apn[read - 1] = '\0'; - - S11_DEBUG("\t- APN %s\n", apn); - - return NW_OK; -} - -int s11_apn_ie_set(NwGtpv2cMsgHandleT *msg, const char *apn) -{ - NwRcT rc; - uint8_t *value; - uint8_t apn_length; - uint8_t offset = 0; - uint8_t *last_size; - uint8_t word_length = 0; - - DevAssert(apn != NULL); - DevAssert(msg != NULL); - - apn_length = strlen(apn); - - value = calloc(apn_length + 1, sizeof(uint8_t)); - last_size = &value[0]; - - while (apn[offset]) { - /* We replace the . by the length of the word */ - if (apn[offset] == '.') { - *last_size = word_length; - word_length = 0; - last_size = &value[offset + 1]; - } else { - word_length++; - value[offset + 1] = apn[offset]; - } - - offset++; - } - - *last_size = word_length; - - rc = nwGtpv2cMsgAddIe(*msg, NW_GTPV2C_IE_APN, apn_length + 1, 0, value); - DevAssert(NW_OK == rc); - - free(value); - - return 0; -} - -NwRcT s11_ambr_ie_get( - uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg) -{ - ambr_t *ambr = (ambr_t *)arg; - - DevAssert(ambr != NULL); - - ambr->br_ul = ntoh_int32_buf(&ieValue[0]); - ambr->br_dl = ntoh_int32_buf(&ieValue[4]); - - S11_DEBUG("\t- AMBR UL %"PRIu64"\n", ambr->br_ul); - S11_DEBUG("\t- AMBR DL %"PRIu64"\n", ambr->br_dl); - - return NW_OK; -} - -NwRcT s11_uli_ie_get( - uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg) -{ - Uli_t *uli = (Uli_t *)arg; - - DevAssert(uli != NULL); - - uli->present = ieValue[0]; - - if (uli->present & ULI_CGI) { - - } - - return NW_OK; -} - -int s11_bearer_qos_ie_set(NwGtpv2cMsgHandleT *msg, const BearerQOS_t *bearer_qos) -{ - NwRcT rc; - uint8_t value[18]; - - DevAssert(msg != NULL); - DevAssert(bearer_qos != NULL); - - value[0] = (bearer_qos->pci << 6) | (bearer_qos->pl << 2) | (bearer_qos->pvi); - value[1] = bearer_qos->qci; - - /* TODO: check endianness */ - memcpy(&value[2], &bearer_qos->mbr.br_ul, 4); - memcpy(&value[6], &bearer_qos->mbr.br_dl, 4); - memcpy(&value[10], &bearer_qos->gbr.br_ul, 4); - memcpy(&value[14], &bearer_qos->gbr.br_dl, 4); - - rc = nwGtpv2cMsgAddIe(*msg, NW_GTPV2C_IE_BEARER_LEVEL_QOS, 18, 0, value); - DevAssert(NW_OK == rc); - - return 0; -} - -NwRcT s11_ip_address_ie_get( - uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg) -{ - gtp_ip_address_t *ip_address = (gtp_ip_address_t *)arg; - - DevAssert(ip_address != NULL); - - if (ieLength == 4) { - /* This is an IPv4 Address */ - ip_address->present = GTP_IP_ADDR_v4; - memcpy(ip_address->address.v4, ieValue, 4); - } else if (ieLength == 16) { - /* This is an IPv6 Address */ - ip_address->present = GTP_IP_ADDR_v6; - memcpy(ip_address->address.v6, ieValue, 16); - } else { - /* Length doesn't lie in possible values */ - return NW_GTPV2C_IE_INCORRECT; - } - - return NW_OK; -} - -int s11_ip_address_ie_set(NwGtpv2cMsgHandleT *msg, - const gtp_ip_address_t *ip_address) -{ - return 0; -} - -NwRcT s11_delay_value_ie_get( - uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg) -{ - DelayValue_t *delay_value = (DelayValue_t *)arg; - - DevAssert(arg != NULL); - - if (ieLength != 1) { - return NW_GTPV2C_IE_INCORRECT; - } - - *delay_value = ieValue[0]; - - S11_DEBUG("\t - Delay Value %u\n", *delay_value); - - return NW_OK; -} - -int s11_delay_value_ie_set(NwGtpv2cMsgHandleT *msg, - const DelayValue_t *delay_value) -{ - uint8_t value; - NwRcT rc; - - DevAssert(msg != NULL); - DevAssert(delay_value != NULL); - - value = *delay_value; - - rc = nwGtpv2cMsgAddIe(*msg, NW_GTPV2C_IE_DELAY_VALUE, 1, 0, (uint8_t*)&value); - DevAssert(NW_OK == rc); - - return 0; -} - -NwRcT s11_ue_time_zone_ie_get( - uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg) -{ - UETimeZone_t *ue_time_zone = (UETimeZone_t *)arg; - - DevAssert(ue_time_zone != NULL); - - if (ieLength != 2) { - return NW_GTPV2C_IE_INCORRECT; - } - - ue_time_zone->time_zone = ieValue[0]; - ue_time_zone->daylight_saving_time = ieValue[1] & 0x03; - - S11_DEBUG("\t - Time Zone %u\n", ue_time_zone->time_zone); - S11_DEBUG("\t - Daylight SVT %u\n", ue_time_zone->daylight_saving_time); - - return NW_OK; -} - -int s11_ue_time_zone_ie_set(NwGtpv2cMsgHandleT *msg, - const UETimeZone_t *ue_time_zone) -{ - uint8_t value[2]; - NwRcT rc; - - DevAssert(msg != NULL); - DevAssert(ue_time_zone != NULL); - - value[0] = ue_time_zone->time_zone; - value[1] = ue_time_zone->daylight_saving_time; - - rc = nwGtpv2cMsgAddIe(*msg, NW_GTPV2C_IE_UE_TIME_ZONE, 2, 0, value); - DevAssert(NW_OK == rc); - - return 0; -} - -NwRcT s11_target_identification_ie_get( - uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg) -{ - target_identification_t *target_identification = (target_identification_t *)arg; - - DevAssert(target_identification != NULL); - - target_identification->target_type = ieValue[0]; - - switch (target_identification->target_type) { - case TARGET_ID_RNC_ID: { - target_identification->target_id.rnc_id.lac = (ieValue[4] << 8) | - ieValue[5]; - target_identification->target_id.rnc_id.rac = ieValue[6]; - - if (ieLength == 11) { - /* Extended RNC id */ - target_identification->target_id.rnc_id.rnc_id = (ieValue[7] << 24) | - (ieValue[8] << 16) | (ieValue[9] << 8) | (ieValue[10]); - } else if (ieLength == 9) { - /* Normal RNC id */ - target_identification->target_id.rnc_id.rnc_id = (ieValue[7] << 8) | - ieValue[8]; - } else { - /* This case is not possible */ - return NW_GTPV2C_IE_INCORRECT; - } - - S11_DEBUG("\t\t- LAC 0x%04x\n", target_identification->target_id.rnc_id.lac); - S11_DEBUG("\t\t- RAC 0x%02x\n", target_identification->target_id.rnc_id.rac); - S11_DEBUG("\t\t- RNC 0x%08x\n", target_identification->target_id.rnc_id.rnc_id); - } - break; - - case TARGET_ID_MACRO_ENB_ID: { - if (ieLength != 9) { - return NW_GTPV2C_IE_INCORRECT; - } - - target_identification->target_id.macro_enb_id.enb_id = ((ieValue[4] & 0x0F) << 16) | - (ieValue[5] << 8) | ieValue[6]; - target_identification->target_id.macro_enb_id.tac = (ieValue[7] << 8) | ieValue[8]; - S11_DEBUG("\t\t- ENB Id 0x%06x\n", target_identification->target_id.macro_enb_id.enb_id); - S11_DEBUG("\t\t- TAC 0x%04x\n", target_identification->target_id.macro_enb_id.tac); - } - break; - - case TARGET_ID_HOME_ENB_ID: { - if (ieLength != 10) { - return NW_GTPV2C_IE_INCORRECT; - } - - target_identification->target_id.home_enb_id.enb_id = ((ieValue[4] & 0x0F) << 14) | - (ieValue[5] << 16) | (ieValue[6] << 8) | ieValue[7]; - target_identification->target_id.home_enb_id.tac = (ieValue[8] << 8) | ieValue[9]; - S11_DEBUG("\t\t- ENB Id 0x%07x\n", target_identification->target_id.home_enb_id.enb_id); - S11_DEBUG("\t\t- TAC 0x%04x\n", target_identification->target_id.home_enb_id.tac); - } - break; - - default: - return NW_GTPV2C_IE_INCORRECT; - } - - return NW_OK; -} - -NwRcT s11_bearer_flags_ie_get( - uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg) -{ - bearer_flags_t *bearer_flags = (bearer_flags_t *)arg; - - DevAssert(arg != NULL); - - if (ieLength != 1) { - return NW_GTPV2C_IE_INCORRECT; - } - - bearer_flags->ppc = ieValue[0] & 0x01; - bearer_flags->vb = ieValue[0] & 0x02; - - return NW_OK; -} - -int s11_bearer_flags_ie_set(NwGtpv2cMsgHandleT *msg, - const bearer_flags_t *bearer_flags) -{ - NwRcT rc; - uint8_t value; - - DevAssert(msg != NULL); - DevAssert(bearer_flags != NULL); - - value = (bearer_flags->vb << 1) | bearer_flags->ppc; - - rc = nwGtpv2cMsgAddIe(*msg, NW_GTPV2C_IE_BEARER_FLAGS, 1, 0, (uint8_t*)&value); - DevAssert(NW_OK == rc); - - return 0; -} - -NwRcT s11_indication_flags_ie_get( - uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg) -{ - indication_flags_t *indication_flags = (indication_flags_t*)arg; - - DevAssert(indication_flags != NULL); - - if (ieLength < 3) { - return NW_GTPV2C_IE_INCORRECT; - } - - *indication_flags = ieValue[0] | (ieValue[1] << 8) | (ieValue[2] << 16); - - S11_DEBUG("\t- Indication Flags %06x\n", *indication_flags); - - return NW_OK; -} - -NwRcT s11_fqcsid_ie_get( - uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg) -{ - FQ_CSID_t *fq_csid = (FQ_CSID_t *)arg; - - DevAssert(fq_csid != NULL); - - fq_csid->node_id_type = (ieValue[0] & 0xF0) >> 4; - S11_DEBUG("\t- FQ-CSID type %u\n", fq_csid->node_id_type); - - /* NOTE: Values of Number of CSID other than 1 are only employed in the - * Delete PDN Connection Set Request and Response. - */ - if ((ieValue[0] & 0x0F) != 1) { - return NW_GTPV2C_IE_INCORRECT; - } - - switch (fq_csid->node_id_type) { - case GLOBAL_UNICAST_IPv4: { - if (ieLength != 7) { - return NW_GTPV2C_IE_INCORRECT; - } - - fq_csid->node_id.unicast_ipv4 = (ieValue[1] << 24) | - (ieValue[2] << 16) | (ieValue[3] << 8) | (ieValue[4]); - fq_csid->csid = (ieValue[5] << 8) | ieValue[6]; - - S11_DEBUG("\t- v4 address ["IPV4_ADDR"]\n", - IPV4_ADDR_FORMAT(fq_csid->node_id.unicast_ipv4)); - } - break; - - case GLOBAL_UNICAST_IPv6: { - char ipv6[40]; - - if (ieLength != 19) { - return NW_GTPV2C_IE_INCORRECT; - } - - memcpy(fq_csid->node_id.unicast_ipv6, &ieValue[1], 16); - fq_csid->csid = (ieValue[17] << 8) | ieValue[18]; - - /* Convert the ipv6 to printable string */ - inet_ntop(AF_INET6, fq_csid->node_id.unicast_ipv6, ipv6, 40); - - S11_DEBUG("\t- v6 address [%s]\n", fq_csid->node_id.unicast_ipv6); - } - break; - - default: - return NW_GTPV2C_IE_INCORRECT; - } - - S11_DEBUG("\t- CSID 0x%04x\n", fq_csid->csid); - return NW_OK; -} diff --git a/openair-cn/S11/s11_ie_formatter.h b/openair-cn/S11/s11_ie_formatter.h deleted file mode 100644 index 0d820b3462..0000000000 --- a/openair-cn/S11/s11_ie_formatter.h +++ /dev/null @@ -1,208 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -#ifndef S11_IE_FORMATTER_H_ -#define S11_IE_FORMATTER_H_ - -/* Imsi Information Element - * 3GPP TS.29.274 #8.3 - * NOTE: Imsi is TBCD coded - * octet 5 | Number digit 2 | Number digit 1 | - * octet n+4 | Number digit m | Number digit m-1 | - */ -NwRcT s11_imsi_ie_get( - uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg); - -int s11_imsi_ie_set(NwGtpv2cMsgHandleT *msg, const Imsi_t *imsi); - -NwRcT s11_msisdn_ie_get( - uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg); - -/* PDN Type Information Element - * 3GPP TS 29.274 #8.34 - * PDN type: - * * 1 = IPv4 - * * 2 = IPv6 - * * 3 = IPv4v6 - */ -NwRcT s11_pdn_type_ie_get( - uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg); - -int s11_pdn_type_ie_set(NwGtpv2cMsgHandleT *msg, const pdn_type_t *pdn_type); - -/* RAT type Information Element - * WARNING: the RAT type used in MME and S/P-GW is not the same as the one - * for S11 interface defined in 3GPP TS 29.274 #8.17. - */ -NwRcT s11_rat_type_ie_get( - uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg); - -int s11_rat_type_ie_set(NwGtpv2cMsgHandleT *msg, const rat_type_t *rat_type); - -/* EPS Bearer Id Information Element - * 3GPP TS 29.274 #8.8 - */ -NwRcT s11_ebi_ie_get( - uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg); - -int s11_ebi_ie_set(NwGtpv2cMsgHandleT *msg, const unsigned ebi); - -/* Bearer Contexts to Create Information Element as part of Create Session Request - * 3GPP TS 29.274 Table 7.2.1-2. - */ -NwRcT s11_bearer_context_ie_get( - uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg); - -int s11_bearer_context_to_create_ie_set( - NwGtpv2cMsgHandleT *msg, const bearer_to_create_t *bearer_to_create); - -NwRcT s11_bearer_context_to_modifiy_ie_get( - uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg); - -/* EPS Bearer Id Information Element - * 3GPP TS 29.274 #8.8 - * ebi is 4 bits long - */ -int s11_ebi_ie_set(NwGtpv2cMsgHandleT *msg, const unsigned ebi); - -/* Cause Information Element */ -NwRcT s11_cause_ie_get( - uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg); - -int s11_cause_ie_set(NwGtpv2cMsgHandleT *msg, - const gtp_cause_t *cause); - -/* Bearer Context Created grouped Information Element */ -NwRcT s11_bearer_context_created_ie_get( - uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg); - -int s11_bearer_context_created_ie_set( - NwGtpv2cMsgHandleT *msg, const bearer_context_created_t *bearer); - -/* Serving Network Information Element - * 3GPP TS 29.274 #8.18 - */ -NwRcT s11_serving_network_ie_get( - uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg); - -int s11_serving_network_ie_set( - NwGtpv2cMsgHandleT *msg, - const ServingNetwork_t *serving_network); - -NwRcT s11_fteid_ie_get( - uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg); - -/* PDN Address Allocation Information Element */ -NwRcT s11_paa_ie_get( - uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg); - -int s11_paa_ie_set(NwGtpv2cMsgHandleT *msg, const PAA_t *paa); - -/* Access Point Name Information Element - * 3GPP TS 29.274 #8.6 - * NOTE: The APN field is not encoded as a dotted string as commonly used in - * documentation. - * The encoding of the APN field follows 3GPP TS 23.003 subclause 9.1 - */ -NwRcT s11_apn_ie_get( - uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg); - -int s11_apn_ie_set(NwGtpv2cMsgHandleT *msg, const char *apn); - -NwRcT s11_ambr_ie_get( - uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg); - -NwRcT s11_mei_ie_get( - uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg); - -NwRcT s11_uli_ie_get( - uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg); - -/* APN restrtiction Information Element */ -int s11_apn_restriction_ie_set( - NwGtpv2cMsgHandleT *msg, const uint8_t apn_restriction); - -/* Bearer level Qos Information Element - * 3GPP TS 29.274 #8.15 - */ -int s11_bearer_qos_ie_set(NwGtpv2cMsgHandleT *msg, const BearerQOS_t *bearer_qos); - -/* IP address Information Element - * 3GPP TS 29.274 #8.9 - */ -NwRcT s11_ip_address_ie_get( - uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg); - -int s11_ip_address_ie_set(NwGtpv2cMsgHandleT *msg, - const gtp_ip_address_t *ip_address); - -/* Delay Value Information Element - * 3GPP TS 29.274 #8.27 - */ -NwRcT s11_delay_value_ie_get( - uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg); - -int s11_delay_value_ie_set(NwGtpv2cMsgHandleT *msg, - const DelayValue_t *delay_value); - -/* UE Time Zone Information Element - * 3GPP TS 29.274 #8.44 - */ -NwRcT s11_ue_time_zone_ie_get( - uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg); - -int s11_ue_time_zone_ie_set(NwGtpv2cMsgHandleT *msg, - const UETimeZone_t *ue_time_zone); - -/* Target Identification Information Element - * 3GPP TS 29.274 #8.51 - */ -NwRcT s11_target_identification_ie_get( - uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg); - -/* Bearer Flags Information Element - * 3GPP TS 29.274 #8.32 - */ -NwRcT s11_bearer_flags_ie_get( - uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg); - -int s11_bearer_flags_ie_set(NwGtpv2cMsgHandleT *msg, - const bearer_flags_t *bearer_flags); - -NwRcT s11_indication_flags_ie_get( - uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg); - -/* FQ-CSID Information Element - * 3GPP TS 29.274 #8.62 - */ - -NwRcT s11_fqcsid_ie_get( - uint8_t ieType, uint8_t ieLength, uint8_t ieInstance, uint8_t *ieValue, void *arg); - -#endif /* S11_IE_FORMATTER_H_ */ diff --git a/openair-cn/S11/s11_mme.h b/openair-cn/S11/s11_mme.h deleted file mode 100644 index 0d5f817fae..0000000000 --- a/openair-cn/S11/s11_mme.h +++ /dev/null @@ -1,34 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#ifndef S11_MME_H_ -#define S11_MME_H_ - -int s11_mme_init(const mme_config_t *mme_config); - -#endif /* S11_MME_H_ */ diff --git a/openair-cn/S11/s11_mme_peer_manager.c b/openair-cn/S11/s11_mme_peer_manager.c deleted file mode 100644 index 5355a8adbf..0000000000 --- a/openair-cn/S11/s11_mme_peer_manager.c +++ /dev/null @@ -1,32 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include - - diff --git a/openair-cn/S11/s11_mme_session_manager.c b/openair-cn/S11/s11_mme_session_manager.c deleted file mode 100644 index 5adf2c492b..0000000000 --- a/openair-cn/S11/s11_mme_session_manager.c +++ /dev/null @@ -1,223 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "assertions.h" -#include "intertask_interface.h" - -#include "NwGtpv2c.h" -#include "NwGtpv2cIe.h" -#include "NwGtpv2cMsg.h" -#include "NwGtpv2cMsgParser.h" - -#include "s11_common.h" -#include "s11_mme_session_manager.h" -#include "s11_ie_formatter.h" - -int s11_mme_create_session_request(NwGtpv2cStackHandleT *stack_p, - SgwCreateSessionRequest *create_session_p) -{ - NwGtpv2cUlpApiT ulp_req; - - NwRcT rc; - uint8_t restart_counter = 0; - - DevAssert(stack_p != NULL); - DevAssert(create_session_p != NULL); - - memset(&ulp_req, 0, sizeof(NwGtpv2cUlpApiT)); - - ulp_req.apiType = NW_GTPV2C_ULP_API_INITIAL_REQ; - - /* Prepare a new Create Session Request msg */ - rc = nwGtpv2cMsgNew(*stack_p, - NW_TRUE, - NW_GTP_CREATE_SESSION_REQ, - create_session_p->teid, - 0, - &(ulp_req.hMsg)); - - ulp_req.apiInfo.initialReqInfo.peerIp = create_session_p->peer_ip; - ulp_req.apiInfo.initialReqInfo.teidLocal = create_session_p->sender_fteid_for_cp.teid; - - /* Add recovery if contacting the peer for the first time */ - rc = nwGtpv2cMsgAddIe((ulp_req.hMsg), NW_GTPV2C_IE_RECOVERY, 1, 0, - (uint8_t*)&restart_counter); - DevAssert(NW_OK == rc); - - /* Putting the information Elements */ - s11_imsi_ie_set(&(ulp_req.hMsg), &create_session_p->imsi); - s11_rat_type_ie_set(&(ulp_req.hMsg), &create_session_p->rat_type); - s11_pdn_type_ie_set(&(ulp_req.hMsg), &create_session_p->pdn_type); - - /* Sender F-TEID for Control Plane (MME S11) */ - rc = nwGtpv2cMsgAddIeFteid((ulp_req.hMsg), NW_GTPV2C_IE_INSTANCE_ZERO, - S11_MME_GTP_C, - create_session_p->sender_fteid_for_cp.teid, - create_session_p->sender_fteid_for_cp.ipv4 ? - create_session_p->sender_fteid_for_cp.ipv4_address : 0, - create_session_p->sender_fteid_for_cp.ipv6 ? - create_session_p->sender_fteid_for_cp.ipv6_address : NULL); - /* The P-GW TEID should be present on the S11 interface. - * In case of an initial attach it should be set to 0... - */ - rc = nwGtpv2cMsgAddIeFteid((ulp_req.hMsg), NW_GTPV2C_IE_INSTANCE_ONE, - S5_S8_PGW_GTP_C, - create_session_p->pgw_address_for_cp.teid, - create_session_p->pgw_address_for_cp.ipv4 ? - create_session_p->pgw_address_for_cp.ipv4_address : 0, - create_session_p->pgw_address_for_cp.ipv6 ? - create_session_p->pgw_address_for_cp.ipv6_address : NULL); - - s11_apn_ie_set(&(ulp_req.hMsg), create_session_p->apn); - - s11_serving_network_ie_set(&(ulp_req.hMsg), &create_session_p->serving_network); - - s11_bearer_context_to_create_ie_set( - &(ulp_req.hMsg), &create_session_p->bearer_to_create); - - rc = nwGtpv2cProcessUlpReq(*stack_p, &ulp_req); - DevAssert(NW_OK == rc); - - return 0; -} - -int s11_mme_handle_create_session_response(NwGtpv2cStackHandleT *stack_p, - NwGtpv2cUlpApiT *pUlpApi) -{ - NwRcT rc = NW_OK; - uint8_t offendingIeType, offendingIeInstance; - uint16_t offendingIeLength; - - SgwCreateSessionResponse *create_session_resp_p; - MessageDef *message_p; - - NwGtpv2cMsgParserT *pMsgParser; - - DevAssert(stack_p != NULL); - - message_p = itti_alloc_new_message(TASK_S11, SGW_CREATE_SESSION_RESPONSE); - - create_session_resp_p = &message_p->ittiMsg.sgwCreateSessionResponse; - - /* Create a new message parser */ - rc = nwGtpv2cMsgParserNew(*stack_p, NW_GTP_CREATE_SESSION_RSP, - s11_ie_indication_generic, - NULL, &pMsgParser); - DevAssert(NW_OK == rc); - - /* Cause IE */ - rc = nwGtpv2cMsgParserAddIe(pMsgParser, - NW_GTPV2C_IE_CAUSE, - NW_GTPV2C_IE_INSTANCE_ZERO, - NW_GTPV2C_IE_PRESENCE_MANDATORY, - s11_cause_ie_get, - &create_session_resp_p->cause); - DevAssert(NW_OK == rc); - - /* Sender FTEID for CP IE */ - rc = nwGtpv2cMsgParserAddIe(pMsgParser, NW_GTPV2C_IE_FTEID, - NW_GTPV2C_IE_INSTANCE_ZERO, - NW_GTPV2C_IE_PRESENCE_CONDITIONAL, - s11_fteid_ie_get, - &create_session_resp_p->s11_sgw_teid); - DevAssert(NW_OK == rc); - - /* Sender FTEID for PGW S5/S8 IE */ - rc = nwGtpv2cMsgParserAddIe(pMsgParser, NW_GTPV2C_IE_FTEID, - NW_GTPV2C_IE_INSTANCE_ONE, - NW_GTPV2C_IE_PRESENCE_CONDITIONAL, - s11_fteid_ie_get, - &create_session_resp_p->s5_s8_pgw_teid); - DevAssert(NW_OK == rc); - - /* PAA IE */ - rc = nwGtpv2cMsgParserAddIe(pMsgParser, NW_GTPV2C_IE_PAA, - NW_GTPV2C_IE_INSTANCE_ZERO, - NW_GTPV2C_IE_PRESENCE_CONDITIONAL, - s11_paa_ie_get, - &create_session_resp_p->paa); - DevAssert(NW_OK == rc); - - /* Bearer Contexts Created IE */ - rc = nwGtpv2cMsgParserAddIe(pMsgParser, NW_GTPV2C_IE_BEARER_CONTEXT, - NW_GTPV2C_IE_INSTANCE_ZERO, - NW_GTPV2C_IE_PRESENCE_CONDITIONAL, - s11_bearer_context_created_ie_get, - &create_session_resp_p->bearer_context_created); - DevAssert(NW_OK == rc); - - /* Run the parser */ - rc = nwGtpv2cMsgParserRun(pMsgParser, - (pUlpApi->hMsg), - &offendingIeType, - &offendingIeInstance, - &offendingIeLength); - - if (rc != NW_OK) { - /* TODO: handle this case */ - itti_free(ITTI_MSG_ORIGIN_ID(message_p), message_p); - message_p = NULL; - - rc = nwGtpv2cMsgParserDelete(*stack_p, pMsgParser); - DevAssert(NW_OK == rc); - - rc = nwGtpv2cMsgDelete(*stack_p, (pUlpApi->hMsg)); - DevAssert(NW_OK == rc); - - return -1; - } - - rc = nwGtpv2cMsgParserDelete(*stack_p, pMsgParser); - DevAssert(NW_OK == rc); - - rc = nwGtpv2cMsgDelete(*stack_p, (pUlpApi->hMsg)); - DevAssert(NW_OK == rc); - - return itti_send_msg_to_task(TASK_MME_APP, INSTANCE_DEFAULT, message_p); -} - - -int s11_mme_release_access_bearers_request(NwGtpv2cStackHandleT *stack_p, - SgwReleaseAccessBearersRequest *release_access_bearers_p) -{ - NwGtpv2cUlpApiT ulp_req; - - NwRcT rc; - uint8_t restart_counter = 0; - - DevAssert(stack_p != NULL); - DevAssert(release_access_bearers_p != NULL); - - memset(&ulp_req, 0, sizeof(NwGtpv2cUlpApiT)); - - AssertFatal(0 == 1, "TODO s11_mme_release_access_bearers_request()"); -} diff --git a/openair-cn/S11/s11_mme_session_manager.h b/openair-cn/S11/s11_mme_session_manager.h deleted file mode 100644 index dd11f859bc..0000000000 --- a/openair-cn/S11/s11_mme_session_manager.h +++ /dev/null @@ -1,49 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -#ifndef S11_MME_SESSION_MANAGER_H_ -#define S11_MME_SESSION_MANAGER_H_ - -/* @brief Create a new Create Session Request and send it to provided S-GW. - */ -int s11_mme_create_session_request(NwGtpv2cStackHandleT *stack_p, - SgwCreateSessionRequest *create_session_p); - - -/* @brief Create a new Release Access Bearers Request and send it to provided S-GW. - */ -int s11_mme_release_access_bearers_request(NwGtpv2cStackHandleT *stack_p, - SgwReleaseAccessBearersRequest *release_access_bearers_p); - -/* @brief Handle a Create Session Response received from S-GW. - */ -int s11_mme_handle_create_session_response(NwGtpv2cStackHandleT *stack_p, - NwGtpv2cUlpApiT *pUlpApi); - -#endif /* S11_MME_SESSION_MANAGER_H_ */ diff --git a/openair-cn/S11/s11_mme_task.c b/openair-cn/S11/s11_mme_task.c deleted file mode 100644 index d2a52aff96..0000000000 --- a/openair-cn/S11/s11_mme_task.c +++ /dev/null @@ -1,322 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include -#include -#include - -#include "assertions.h" - -#include "mme_config.h" -#include "intertask_interface.h" - -#include "timer.h" - -#include "NwLog.h" -#include "NwGtpv2c.h" -#include "NwGtpv2cMsg.h" - -#include "s11_mme.h" -#include "s11_mme_session_manager.h" - -#define S11_DEBUG(x, args...) fprintf(stdout, "[S11] [D]"x, ##args) -#define S11_INFO(x, args...) fprintf(stdout, "[S11] [I]"x, ##args) -#define S11_WARN(x, args...) fprintf(stdout, "[S11] [W]"x, ##args) -#define S11_ERROR(x, args...) fprintf(stderr, "[S11] [E]"x, ##args) - -static NwGtpv2cStackHandleT s11_mme_stack_handle; - -static -NwRcT s11_mme_log_wrapper(NwGtpv2cLogMgrHandleT hLogMgr, - uint32_t logLevel, - NwCharT* file, - uint32_t line, - NwCharT* logStr) -{ - S11_DEBUG("%s\n", logStr); - return NW_OK; -} - -static -NwRcT s11_mme_ulp_process_stack_req_cb( - NwGtpv2cUlpHandleT hUlp, NwGtpv2cUlpApiT *pUlpApi) -{ - // NwRcT rc = NW_OK; - int ret = 0; - - DevAssert(pUlpApi != NULL); - - switch(pUlpApi->apiType) { - case NW_GTPV2C_ULP_API_TRIGGERED_RSP_IND: - S11_DEBUG("Received triggered response indication\n"); - - switch (pUlpApi->apiInfo.triggeredRspIndInfo.msgType) { - case NW_GTP_CREATE_SESSION_RSP: - ret = s11_mme_handle_create_session_response( - &s11_mme_stack_handle, pUlpApi); - break; - - default: - S11_WARN("Received unhandled message type %d\n", - pUlpApi->apiInfo.triggeredRspIndInfo.msgType); - break; - } - - break; - - default: - break; - } - - return ret == 0 ? NW_OK : NW_FAILURE; -} - -static -NwRcT s11_mme_send_udp_msg( - NwGtpv2cUdpHandleT udpHandle, - uint8_t *buffer, - uint32_t buffer_len, - uint32_t peerIpAddr, - uint32_t peerPort) -{ - // Create and alloc new message - MessageDef *message_p; - udp_data_req_t *udp_data_req_p; - int ret = 0; - - message_p = itti_alloc_new_message(TASK_S11, UDP_DATA_REQ); - - udp_data_req_p = &message_p->ittiMsg.udp_data_req; - - udp_data_req_p->peer_address = peerIpAddr; - udp_data_req_p->peer_port = peerPort; - udp_data_req_p->buffer = buffer; - udp_data_req_p->buffer_length = buffer_len; - - ret = itti_send_msg_to_task(TASK_UDP, INSTANCE_DEFAULT, message_p); - - return ((ret == 0) ? NW_OK : NW_FAILURE); -} - -static -NwRcT s11_mme_start_timer_wrapper( - NwGtpv2cTimerMgrHandleT tmrMgrHandle, - uint32_t timeoutSec, - uint32_t timeoutUsec, - uint32_t tmrType, - void *timeoutArg, - NwGtpv2cTimerHandleT *hTmr) -{ - long timer_id; - int ret = 0; - - if (tmrType == NW_GTPV2C_TMR_TYPE_REPETITIVE) { - ret = timer_setup(timeoutSec, - timeoutUsec, - TASK_S11, - INSTANCE_DEFAULT, - TIMER_PERIODIC, - timeoutArg, - &timer_id); - } else { - ret = timer_setup(timeoutSec, - timeoutUsec, - TASK_S11, - INSTANCE_DEFAULT, - TIMER_ONE_SHOT, - timeoutArg, - &timer_id); - } - - *hTmr = (NwGtpv2cTimerHandleT)timer_id; - - return ((ret == 0) ? NW_OK : NW_FAILURE); -} - -static -NwRcT s11_mme_stop_timer_wrapper( - NwGtpv2cTimerMgrHandleT tmrMgrHandle, - NwGtpv2cTimerHandleT tmrHandle) -{ - long timer_id; - - timer_id = (long)tmrHandle; - - return ((timer_remove(timer_id) == 0) ? NW_OK : NW_FAILURE); -} - -static void *s11_mme_thread(void *args) -{ - itti_mark_task_ready(TASK_S11); - - while(1) { - MessageDef *received_message_p = NULL; - itti_receive_msg(TASK_S11, &received_message_p); - assert(received_message_p != NULL); - - switch (ITTI_MSG_ID(received_message_p)) { - case SGW_CREATE_SESSION_REQUEST: { - s11_mme_create_session_request( - &s11_mme_stack_handle, - &received_message_p->ittiMsg.sgwCreateSessionRequest); - } - break; - - case SGW_RELEASE_ACCESS_BEARERS_REQUEST: { - s11_mme_release_access_bearers_request( - &s11_mme_stack_handle, - &received_message_p->ittiMsg.sgwReleaseAccessBearersRequest); - } - break; - - case UDP_DATA_IND: { - /* We received new data to handle from the UDP layer */ - NwRcT rc; - udp_data_ind_t *udp_data_ind; - - udp_data_ind = &received_message_p->ittiMsg.udp_data_ind; - - rc = nwGtpv2cProcessUdpReq(s11_mme_stack_handle, - udp_data_ind->buffer, - udp_data_ind->buffer_length, - udp_data_ind->peer_port, - udp_data_ind->peer_address); - - DevAssert(rc == NW_OK); - } - break; - - case TIMER_HAS_EXPIRED: { - S11_DEBUG("Processing timeout for timer_id 0x%lx and arg %p\n", - received_message_p->ittiMsg.timer_has_expired.timer_id, - received_message_p->ittiMsg.timer_has_expired.arg); - DevAssert(nwGtpv2cProcessTimeout( - received_message_p->ittiMsg.timer_has_expired.arg) == NW_OK); - } - break; - - default: { - S11_ERROR("Unkwnon message ID %d:%s\n", - ITTI_MSG_ID(received_message_p), - ITTI_MSG_NAME(received_message_p)); - } - break; - } - - itti_free(ITTI_MSG_ORIGIN_ID(received_message_p), received_message_p); - received_message_p = NULL; - } - - return NULL; -} - -static int s11_send_init_udp(char *address, uint16_t port_number) -{ - MessageDef *message_p; - - message_p = itti_alloc_new_message(TASK_S11, UDP_INIT); - - if (message_p == NULL) { - return -1; - } - - message_p->ittiMsg.udp_init.port = port_number; - //LG message_p->ittiMsg.udpInit.address = "0.0.0.0"; //ANY address - message_p->ittiMsg.udp_init.address = address; - - S11_DEBUG("Tx UDP_INIT IP addr %s\n", message_p->ittiMsg.udp_init.address); - - return itti_send_msg_to_task(TASK_UDP, INSTANCE_DEFAULT, message_p); -} - -int s11_mme_init(const mme_config_t *mme_config_p) -{ - int ret = 0; - NwGtpv2cUlpEntityT ulp; - NwGtpv2cUdpEntityT udp; - NwGtpv2cTimerMgrEntityT tmrMgr; - NwGtpv2cLogMgrEntityT logMgr; - - struct in_addr addr; - char *s11_address_str = NULL; - - S11_DEBUG("Initializing S11 interface\n"); - - if (nwGtpv2cInitialize(&s11_mme_stack_handle) != NW_OK) { - S11_ERROR("Failed to initialize gtpv2-c stack\n"); - goto fail; - } - - /* Set ULP entity */ - ulp.hUlp = (NwGtpv2cUlpHandleT)NULL; - ulp.ulpReqCallback = s11_mme_ulp_process_stack_req_cb; - DevAssert(NW_OK == nwGtpv2cSetUlpEntity(s11_mme_stack_handle, &ulp)); - - /* Set UDP entity */ - udp.hUdp = (NwGtpv2cUdpHandleT)NULL; - udp.udpDataReqCallback = s11_mme_send_udp_msg; - DevAssert(NW_OK == nwGtpv2cSetUdpEntity(s11_mme_stack_handle, &udp)); - - /* Set Timer entity */ - tmrMgr.tmrMgrHandle = (NwGtpv2cTimerMgrHandleT)NULL; - tmrMgr.tmrStartCallback = s11_mme_start_timer_wrapper; - tmrMgr.tmrStopCallback = s11_mme_stop_timer_wrapper; - DevAssert(NW_OK == nwGtpv2cSetTimerMgrEntity(s11_mme_stack_handle, &tmrMgr)); - - logMgr.logMgrHandle = 0; - logMgr.logReqCallback = s11_mme_log_wrapper; - DevAssert(NW_OK == nwGtpv2cSetLogMgrEntity(s11_mme_stack_handle, &logMgr)); - - if (itti_create_task(TASK_S11, &s11_mme_thread, NULL) < 0) { - S11_ERROR("gtpv1u phtread_create: %s\n", strerror(errno)); - goto fail; - } - - DevAssert(NW_OK == nwGtpv2cSetLogLevel(s11_mme_stack_handle, - NW_LOG_LEVEL_DEBG)); - - config_read_lock(&mme_config); - addr.s_addr = mme_config.ipv4.mme_ip_address_for_S11; - config_unlock(&mme_config); - - s11_address_str = inet_ntoa(addr); - - DevAssert(s11_address_str != NULL); - - s11_send_init_udp(s11_address_str, 2123); - - S11_DEBUG("Initializing S11 interface: DONE\n"); - - return ret; - -fail: - S11_DEBUG("Initializing S11 interface: FAILURE\n"); - return -1; -} diff --git a/openair-cn/S11/s11_sgw.c b/openair-cn/S11/s11_sgw.c deleted file mode 100644 index ae62a1334a..0000000000 --- a/openair-cn/S11/s11_sgw.c +++ /dev/null @@ -1,347 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -#include -#include -#include -#include -#include - -#include "assertions.h" -#include "queue.h" - -#include "mme_config.h" -#include "intertask_interface.h" - -#include "timer.h" - -#include "NwLog.h" -#include "NwGtpv2c.h" -#include "NwGtpv2cIe.h" -#include "NwGtpv2cMsg.h" - -#include "sgw_lite_ie_defs.h" - -#include "s11_common.h" -#include "s11_sgw.h" -#include "s11_sgw_bearer_manager.h" -#include "s11_sgw_session_manager.h" - -static NwGtpv2cStackHandleT s11_sgw_stack_handle; - -/* ULP callback for the GTPv2-C stack */ -static -NwRcT s11_sgw_ulp_process_stack_req_cb( - NwGtpv2cUlpHandleT hUlp, NwGtpv2cUlpApiT *pUlpApi) -{ - int ret = 0; - - DevAssert(pUlpApi != NULL); - - switch (pUlpApi->apiType) { - case NW_GTPV2C_ULP_API_INITIAL_REQ_IND: - S11_DEBUG("Received initial req indication\n"); - - switch (pUlpApi->apiInfo.initialReqIndInfo.msgType) { - case NW_GTP_CREATE_SESSION_REQ: - ret = s11_sgw_handle_create_session_request( - &s11_sgw_stack_handle, pUlpApi); - break; - - case NW_GTP_MODIFY_BEARER_REQ: - ret = s11_sgw_handle_modify_bearer_request( - &s11_sgw_stack_handle, pUlpApi); - break; - - case NW_GTP_DELETE_SESSION_REQ: - ret = s11_sgw_handle_delete_session_request( - &s11_sgw_stack_handle, pUlpApi); - break; - - default: - S11_WARN("Received unhandled message type %d\n", - pUlpApi->apiInfo.initialReqIndInfo.msgType); - break; - } - - break; - - default: - S11_ERROR("Received unknown stack req message %d\n", - pUlpApi->apiType); - break; - } - - return ret == -1 ? NW_FAILURE : NW_OK; -} - -static -NwRcT s11_sgw_send_udp_msg( - NwGtpv2cUdpHandleT udpHandle, - uint8_t *buffer, - uint32_t buffer_len, - uint32_t peerIpAddr, - uint32_t peerPort) -{ - // Create and alloc new message - MessageDef *message_p; - udp_data_req_t *udp_data_req_p; - int ret = 0; - - message_p = itti_alloc_new_message(TASK_S11, UDP_DATA_REQ); - - udp_data_req_p = &message_p->ittiMsg.udp_data_req; - - udp_data_req_p->peer_address = peerIpAddr; - udp_data_req_p->peer_port = peerPort; - udp_data_req_p->buffer = buffer; - udp_data_req_p->buffer_length = buffer_len; - - ret = itti_send_msg_to_task(TASK_UDP, INSTANCE_DEFAULT, message_p); - - return ret == 0 ? NW_OK : NW_FAILURE; -} - -static -NwRcT s11_sgw_log_wrapper(NwGtpv2cLogMgrHandleT hLogMgr, - uint32_t logLevel, - NwCharT* file, - uint32_t line, - NwCharT* logStr) -{ - S11_DEBUG("%s\n", logStr); - return NW_OK; -} - -static -NwRcT s11_sgw_start_timer_wrapper( - NwGtpv2cTimerMgrHandleT tmrMgrHandle, - uint32_t timeoutSec, - uint32_t timeoutUsec, - uint32_t tmrType, - void *timeoutArg, - NwGtpv2cTimerHandleT *hTmr) -{ - long timer_id; - int ret = 0; - - if (tmrType == NW_GTPV2C_TMR_TYPE_REPETITIVE) { - ret = timer_setup(timeoutSec, - timeoutUsec, - TASK_S11, - INSTANCE_DEFAULT, - TIMER_PERIODIC, - timeoutArg, - &timer_id); - } else { - ret = timer_setup(timeoutSec, - timeoutUsec, - TASK_S11, - INSTANCE_DEFAULT, - TIMER_ONE_SHOT, - timeoutArg, - &timer_id); - } - - return ret == 0 ? NW_OK : NW_FAILURE; -} - -static -NwRcT s11_sgw_stop_timer_wrapper( - NwGtpv2cTimerMgrHandleT tmrMgrHandle, - NwGtpv2cTimerHandleT tmrHandle) -{ - int ret; - long timer_id; - - timer_id = (long)tmrHandle; - - ret = timer_remove(timer_id); //TODO - - return ret == 0 ? NW_OK : NW_FAILURE; -} - -static void *s11_sgw_thread(void *args) -{ - itti_mark_task_ready(TASK_S11); - - while(1) { - MessageDef *received_message_p = NULL; - itti_receive_msg(TASK_S11, &received_message_p); - assert(received_message_p != NULL); - - switch (ITTI_MSG_ID(received_message_p)) { - case UDP_DATA_IND: { - /* We received new data to handle from the UDP layer */ - NwRcT rc; - udp_data_ind_t *udp_data_ind; - - udp_data_ind = &received_message_p->ittiMsg.udp_data_ind; - - S11_DEBUG("Processing new data indication from UDP\n"); - - rc = nwGtpv2cProcessUdpReq(s11_sgw_stack_handle, - udp_data_ind->buffer, - udp_data_ind->buffer_length, - udp_data_ind->peer_port, - udp_data_ind->peer_address); - - DevAssert(rc == NW_OK); - } - break; - - case SGW_CREATE_SESSION_RESPONSE: { - S11_DEBUG("Received create session response from S-PGW APP\n"); - s11_sgw_handle_create_session_response( - &s11_sgw_stack_handle, - &received_message_p->ittiMsg.sgwCreateSessionResponse); - } - break; - - case SGW_MODIFY_BEARER_RESPONSE: { - S11_DEBUG("Received modify bearer response from S-PGW APP\n"); - s11_sgw_handle_modify_bearer_response( - &s11_sgw_stack_handle, - &received_message_p->ittiMsg.sgwModifyBearerResponse); - } - break; - - case SGW_DELETE_SESSION_RESPONSE: { - S11_DEBUG("Received delete session response from S-PGW APP\n"); - s11_sgw_handle_delete_session_response( - &s11_sgw_stack_handle, - &received_message_p->ittiMsg.sgwDeleteSessionResponse); - } - break; - - case TIMER_HAS_EXPIRED: { - S11_DEBUG("Processing timeout for timer_id 0x%lx and arg %p\n", - received_message_p->ittiMsg.timer_has_expired.timer_id, - received_message_p->ittiMsg.timer_has_expired.arg); - DevAssert(nwGtpv2cProcessTimeout(received_message_p->ittiMsg.timer_has_expired.arg) == NW_OK); - } - break; - - default: { - S11_ERROR("Unkwnon message ID %d:%s\n", - ITTI_MSG_ID(received_message_p), ITTI_MSG_NAME(received_message_p)); - } - break; - } - - itti_free(ITTI_MSG_ORIGIN_ID(received_message_p), received_message_p); - received_message_p = NULL; - } - - return NULL; -} - -static int s11_send_init_udp(char *address, uint16_t port_number) -{ - MessageDef *message_p; - - message_p = itti_alloc_new_message(TASK_S11, UDP_INIT); - - if (message_p == NULL) { - return -1; - } - - message_p->ittiMsg.udp_init.port = port_number; - //LG message_p->ittiMsg.udpInit.address = "0.0.0.0"; //ANY address - message_p->ittiMsg.udp_init.address = address; - - S11_DEBUG("Tx UDP_INIT IP addr %s\n", message_p->ittiMsg.udp_init.address); - - return itti_send_msg_to_task(TASK_UDP, INSTANCE_DEFAULT, message_p); -} - -int s11_sgw_init(const mme_config_t *mme_config_p) -{ - int ret = 0; - NwGtpv2cUlpEntityT ulp; - NwGtpv2cUdpEntityT udp; - NwGtpv2cTimerMgrEntityT tmrMgr; - NwGtpv2cLogMgrEntityT logMgr; - struct in_addr addr; - char *s11_address_str = NULL; - - S11_DEBUG("Initializing S11 interface\n"); - - if (nwGtpv2cInitialize(&s11_sgw_stack_handle) != NW_OK) { - S11_ERROR("Failed to initialize gtpv2-c stack\n"); - goto fail; - } - - /* Set ULP entity */ - ulp.hUlp = (NwGtpv2cUlpHandleT)NULL; - ulp.ulpReqCallback = s11_sgw_ulp_process_stack_req_cb; - DevAssert(NW_OK == nwGtpv2cSetUlpEntity(s11_sgw_stack_handle, &ulp)); - - /* Set UDP entity */ - udp.hUdp = (NwGtpv2cUdpHandleT)NULL; - udp.udpDataReqCallback = s11_sgw_send_udp_msg; - DevAssert(NW_OK == nwGtpv2cSetUdpEntity(s11_sgw_stack_handle, &udp)); - - /* Set Timer entity */ - tmrMgr.tmrMgrHandle = (NwGtpv2cTimerMgrHandleT)NULL; - tmrMgr.tmrStartCallback = s11_sgw_start_timer_wrapper; - tmrMgr.tmrStopCallback = s11_sgw_stop_timer_wrapper; - DevAssert(NW_OK == nwGtpv2cSetTimerMgrEntity(s11_sgw_stack_handle, &tmrMgr)); - - logMgr.logMgrHandle = 0; - logMgr.logReqCallback = s11_sgw_log_wrapper; - - DevAssert(NW_OK == nwGtpv2cSetLogMgrEntity(s11_sgw_stack_handle, &logMgr)); - - if (itti_create_task(TASK_S11, &s11_sgw_thread, NULL) < 0) { - S11_ERROR("gtpv1u phtread_create: %s\n", strerror(errno)); - goto fail; - } - - DevAssert(NW_OK == nwGtpv2cSetLogLevel(s11_sgw_stack_handle, - NW_LOG_LEVEL_DEBG)); - - config_read_lock(&mme_config); - addr.s_addr = mme_config.ipv4.sgw_ip_address_for_S11; - config_unlock(&mme_config); - - s11_address_str = inet_ntoa(addr); - - DevAssert(s11_address_str != NULL); - - s11_send_init_udp(s11_address_str, 2123); - - S11_DEBUG("Initializing S11 interface: DONE\n"); - - return ret; - -fail: - S11_DEBUG("Initializing S11 interface: FAILURE\n"); - return -1; -} diff --git a/openair-cn/S11/s11_sgw.h b/openair-cn/S11/s11_sgw.h deleted file mode 100644 index ed98169f8b..0000000000 --- a/openair-cn/S11/s11_sgw.h +++ /dev/null @@ -1,34 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#ifndef S11_SGW_H_ -#define S11_SGW_H_ - -int s11_sgw_init(const mme_config_t *mme_config); - -#endif /* S11_SGW_H_ */ diff --git a/openair-cn/S11/s11_sgw_bearer_manager.c b/openair-cn/S11/s11_sgw_bearer_manager.c deleted file mode 100644 index 27337a25f3..0000000000 --- a/openair-cn/S11/s11_sgw_bearer_manager.c +++ /dev/null @@ -1,237 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "assertions.h" -#include "intertask_interface.h" -#include "queue.h" - -#include "NwLog.h" -#include "NwGtpv2c.h" -#include "NwGtpv2cIe.h" -#include "NwGtpv2cMsg.h" -#include "NwGtpv2cMsgParser.h" - -#include "sgw_lite_ie_defs.h" - -#include "s11_common.h" -#include "s11_sgw_bearer_manager.h" -#include "s11_ie_formatter.h" - -int s11_sgw_handle_modify_bearer_request(NwGtpv2cStackHandleT *stack_p, - NwGtpv2cUlpApiT *pUlpApi) -{ - NwRcT rc = NW_OK; - uint8_t offendingIeType, offendingIeInstance; - uint16_t offendingIeLength; - - SgwModifyBearerRequest *modify_bearer_request_p; - MessageDef *message_p; - - NwGtpv2cMsgParserT *pMsgParser; - - DevAssert(stack_p != NULL); - - message_p = itti_alloc_new_message(TASK_S11, SGW_MODIFY_BEARER_REQUEST); - - modify_bearer_request_p = &message_p->ittiMsg.sgwModifyBearerRequest; - - modify_bearer_request_p->trxn = (void *)pUlpApi->apiInfo.initialReqIndInfo.hTrxn; - modify_bearer_request_p->teid = nwGtpv2cMsgGetTeid(pUlpApi->hMsg); - - /* Create a new message parser */ - rc = nwGtpv2cMsgParserNew(*stack_p, - NW_GTP_MODIFY_BEARER_REQ, - s11_ie_indication_generic, - NULL, - &pMsgParser); - DevAssert(NW_OK == rc); - - /* Indication Flags IE */ - rc = nwGtpv2cMsgParserAddIe(pMsgParser, - NW_GTPV2C_IE_INDICATION, - NW_GTPV2C_IE_INSTANCE_ZERO, - NW_GTPV2C_IE_PRESENCE_CONDITIONAL, - s11_indication_flags_ie_get, - &modify_bearer_request_p->indication_flags); - DevAssert(NW_OK == rc); - - /* MME-FQ-CSID IE */ - rc = nwGtpv2cMsgParserAddIe(pMsgParser, - NW_GTPV2C_IE_FQ_CSID, - NW_GTPV2C_IE_INSTANCE_ZERO, - NW_GTPV2C_IE_PRESENCE_CONDITIONAL, - s11_fqcsid_ie_get, - &modify_bearer_request_p->mme_fq_csid); - DevAssert(NW_OK == rc); - - /* RAT Type IE */ - rc = nwGtpv2cMsgParserAddIe(pMsgParser, - NW_GTPV2C_IE_RAT_TYPE, - NW_GTPV2C_IE_INSTANCE_ZERO, - NW_GTPV2C_IE_PRESENCE_CONDITIONAL, - s11_rat_type_ie_get, - &modify_bearer_request_p->rat_type); - DevAssert(NW_OK == rc); - - /* Delay Value IE */ - rc = nwGtpv2cMsgParserAddIe(pMsgParser, - NW_GTPV2C_IE_DELAY_VALUE, - NW_GTPV2C_IE_INSTANCE_ZERO, - NW_GTPV2C_IE_PRESENCE_CONDITIONAL, - s11_delay_value_ie_get, - &modify_bearer_request_p->delay_dl_packet_notif_req); - DevAssert(NW_OK == rc); - - /* Bearer Context to be modified IE */ - rc = nwGtpv2cMsgParserAddIe(pMsgParser, - NW_GTPV2C_IE_BEARER_CONTEXT, - NW_GTPV2C_IE_INSTANCE_ZERO, - NW_GTPV2C_IE_PRESENCE_CONDITIONAL, - s11_bearer_context_to_modifiy_ie_get, - &modify_bearer_request_p->bearer_context_to_modify); - DevAssert(NW_OK == rc); - - rc = nwGtpv2cMsgParserRun(pMsgParser, - pUlpApi->hMsg, - &offendingIeType, - &offendingIeInstance, - &offendingIeLength); - - if (rc != NW_OK) { - gtp_cause_t cause; - NwGtpv2cUlpApiT ulp_req; - - memset(&ulp_req, 0, sizeof(NwGtpv2cUlpApiT)); - memset(&cause , 0, sizeof(gtp_cause_t)); - - cause.offending_ie_type = offendingIeType; - cause.offending_ie_length = offendingIeLength; - cause.offending_ie_instance = offendingIeInstance; - - switch (rc) { - case NW_GTPV2C_MANDATORY_IE_MISSING: - S11_DEBUG("Mandatory IE type '%u' of instance '%u' missing!\n", - offendingIeType, offendingIeLength); - cause.cause_value = NW_GTPV2C_CAUSE_MANDATORY_IE_MISSING; - break; - - default: - S11_DEBUG("Unknown message parse error!\n"); - cause.cause_value = 0; - break; - } - - /* - * Send Create session response with failure to Gtpv2c Stack Instance - */ - ulp_req.apiType = NW_GTPV2C_ULP_API_TRIGGERED_RSP; - - ulp_req.apiInfo.triggeredRspInfo.hTrxn = pUlpApi->apiInfo.initialReqIndInfo.hTrxn; - - rc = nwGtpv2cMsgNew(*stack_p, - NW_TRUE, - NW_GTP_CREATE_SESSION_RSP, - 0, - nwGtpv2cMsgGetSeqNumber(pUlpApi->hMsg), - &(ulp_req.hMsg)); - - s11_cause_ie_set(&(ulp_req.hMsg), &cause); - - S11_DEBUG("Received NW_GTP_CREATE_SESSION_REQ, Sending NW_GTP_CREATE_SESSION_RSP!\n"); - rc = nwGtpv2cProcessUlpReq(*stack_p, &ulp_req); - DevAssert(NW_OK == rc); - - itti_free(ITTI_MSG_ORIGIN_ID(message_p), message_p); - message_p = NULL; - - rc = nwGtpv2cMsgParserDelete(*stack_p, pMsgParser); - DevAssert(NW_OK == rc); - - rc = nwGtpv2cMsgDelete(*stack_p, (pUlpApi->hMsg)); - DevAssert(NW_OK == rc); - - return 0; - } - - rc = nwGtpv2cMsgParserDelete(*stack_p, pMsgParser); - DevAssert(NW_OK == rc); - - rc = nwGtpv2cMsgDelete(*stack_p, (pUlpApi->hMsg)); - DevAssert(NW_OK == rc); - - return itti_send_msg_to_task(TASK_SPGW_APP, INSTANCE_DEFAULT, message_p); -} - -int s11_sgw_handle_modify_bearer_response( - NwGtpv2cStackHandleT *stack_p, - SgwModifyBearerResponse *modify_bearer_response_p) -{ - gtp_cause_t cause; - NwRcT rc; - NwGtpv2cUlpApiT ulp_req; - NwGtpv2cTrxnHandleT trxn; - - DevAssert(stack_p != NULL); - DevAssert(modify_bearer_response_p != NULL); - - trxn = (NwGtpv2cTrxnHandleT)modify_bearer_response_p->trxn; - - /* Prepare a modify bearer response to send to MME. - */ - memset(&ulp_req, 0, sizeof(NwGtpv2cUlpApiT)); - memset(&cause , 0, sizeof(gtp_cause_t)); - - ulp_req.apiType = NW_GTPV2C_ULP_API_TRIGGERED_RSP; - - ulp_req.apiInfo.triggeredRspInfo.hTrxn = trxn; - - rc = nwGtpv2cMsgNew(*stack_p, - NW_TRUE, - NW_GTP_MODIFY_BEARER_RSP, - 0, - 0, - &(ulp_req.hMsg)); - DevAssert(NW_OK == rc); - - /* Set the remote TEID */ - rc = nwGtpv2cMsgSetTeid(ulp_req.hMsg, modify_bearer_response_p->teid); - DevAssert(NW_OK == rc); - - cause.cause_value = (uint8_t)modify_bearer_response_p->cause; - - s11_cause_ie_set(&(ulp_req.hMsg), &cause); - - rc = nwGtpv2cProcessUlpReq(*stack_p, &ulp_req); - DevAssert(NW_OK == rc); - - return 0; -} diff --git a/openair-cn/S11/s11_sgw_bearer_manager.h b/openair-cn/S11/s11_sgw_bearer_manager.h deleted file mode 100644 index cfbbd389fc..0000000000 --- a/openair-cn/S11/s11_sgw_bearer_manager.h +++ /dev/null @@ -1,40 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#ifndef S11_SGW_BEARER_MANAGER_H_ -#define S11_SGW_BEARER_MANAGER_H_ - -int s11_sgw_handle_modify_bearer_request( - NwGtpv2cStackHandleT *stack_p, - NwGtpv2cUlpApiT *pUlpApi); - -int s11_sgw_handle_modify_bearer_response( - NwGtpv2cStackHandleT *stack_p, - SgwModifyBearerResponse *modify_bearer_response_p); - -#endif /* S11_SGW_BEARER_MANAGER_H_ */ diff --git a/openair-cn/S11/s11_sgw_session_manager.c b/openair-cn/S11/s11_sgw_session_manager.c deleted file mode 100644 index dc313c7935..0000000000 --- a/openair-cn/S11/s11_sgw_session_manager.c +++ /dev/null @@ -1,526 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include -#include -#include - -#include "assertions.h" -#include "intertask_interface.h" -#include "queue.h" - -#include "NwLog.h" -#include "NwGtpv2c.h" -#include "NwGtpv2cIe.h" -#include "NwGtpv2cMsg.h" -#include "NwGtpv2cMsgParser.h" - -#include "sgw_lite_ie_defs.h" - -#include "s11_common.h" -#include "s11_sgw_session_manager.h" -#include "s11_ie_formatter.h" - -int s11_sgw_handle_create_session_request(NwGtpv2cStackHandleT *stack_p, - NwGtpv2cUlpApiT *pUlpApi) -{ - NwRcT rc = NW_OK; - uint8_t offendingIeType, offendingIeInstance; - uint16_t offendingIeLength; - - SgwCreateSessionRequest *create_session_request_p; - MessageDef *message_p; - - NwGtpv2cMsgParserT *pMsgParser; - - DevAssert(stack_p != NULL); - - message_p = itti_alloc_new_message(TASK_S11, SGW_CREATE_SESSION_REQUEST); - - create_session_request_p = &message_p->ittiMsg.sgwCreateSessionRequest; - - /* Create a new message parser */ - rc = nwGtpv2cMsgParserNew(*stack_p, NW_GTP_CREATE_SESSION_REQ, - s11_ie_indication_generic, - NULL, &pMsgParser); - DevAssert(NW_OK == rc); - - /* Imsi IE */ - rc = nwGtpv2cMsgParserAddIe(pMsgParser, NW_GTPV2C_IE_IMSI, - NW_GTPV2C_IE_INSTANCE_ZERO, - NW_GTPV2C_IE_PRESENCE_CONDITIONAL, - s11_imsi_ie_get, - &create_session_request_p->imsi); - DevAssert(NW_OK == rc); - - /* MSISDN IE */ - rc = nwGtpv2cMsgParserAddIe(pMsgParser, NW_GTPV2C_IE_MSISDN, - NW_GTPV2C_IE_INSTANCE_ZERO, - NW_GTPV2C_IE_PRESENCE_CONDITIONAL, - s11_msisdn_ie_get, - &create_session_request_p->msisdn); - DevAssert(NW_OK == rc); - - /* MEI IE */ - rc = nwGtpv2cMsgParserAddIe(pMsgParser, NW_GTPV2C_IE_MEI, - NW_GTPV2C_IE_INSTANCE_ZERO, - NW_GTPV2C_IE_PRESENCE_CONDITIONAL, - s11_mei_ie_get, - &create_session_request_p->mei); - DevAssert(NW_OK == rc); - - /* ULI IE */ - rc = nwGtpv2cMsgParserAddIe(pMsgParser, NW_GTPV2C_IE_ULI, - NW_GTPV2C_IE_INSTANCE_ZERO, - NW_GTPV2C_IE_PRESENCE_CONDITIONAL, - s11_uli_ie_get, - &create_session_request_p->uli); - DevAssert(NW_OK == rc); - - /* Serving Network IE */ - rc = nwGtpv2cMsgParserAddIe(pMsgParser, NW_GTPV2C_IE_SERVING_NETWORK, - NW_GTPV2C_IE_INSTANCE_ZERO, - NW_GTPV2C_IE_PRESENCE_CONDITIONAL, - s11_serving_network_ie_get, - &create_session_request_p->serving_network); - DevAssert(NW_OK == rc); - - /* RAT Type IE */ - rc = nwGtpv2cMsgParserAddIe(pMsgParser, NW_GTPV2C_IE_RAT_TYPE, - NW_GTPV2C_IE_INSTANCE_ZERO, - NW_GTPV2C_IE_PRESENCE_MANDATORY, - s11_rat_type_ie_get, - &create_session_request_p->rat_type); - DevAssert(NW_OK == rc); - - /* Indication Flags IE */ - rc = nwGtpv2cMsgParserAddIe(pMsgParser, NW_GTPV2C_IE_INDICATION, - NW_GTPV2C_IE_INSTANCE_ZERO, - NW_GTPV2C_IE_PRESENCE_CONDITIONAL, - s11_indication_flags_ie_get, - &create_session_request_p->indication_flags); - DevAssert(NW_OK == rc); - - /* APN IE */ - rc = nwGtpv2cMsgParserAddIe(pMsgParser, NW_GTPV2C_IE_APN, - NW_GTPV2C_IE_INSTANCE_ZERO, - NW_GTPV2C_IE_PRESENCE_MANDATORY, - s11_apn_ie_get, &create_session_request_p->apn); - DevAssert(NW_OK == rc); - - /* Selection Mode IE */ - rc = nwGtpv2cMsgParserAddIe(pMsgParser, NW_GTPV2C_IE_SELECTION_MODE, - NW_GTPV2C_IE_INSTANCE_ZERO, - NW_GTPV2C_IE_PRESENCE_CONDITIONAL, - s11_ie_indication_generic, NULL); - DevAssert(NW_OK == rc); - - /* PDN Type IE */ - rc = nwGtpv2cMsgParserAddIe(pMsgParser, NW_GTPV2C_IE_PDN_TYPE, - NW_GTPV2C_IE_INSTANCE_ZERO, - NW_GTPV2C_IE_PRESENCE_CONDITIONAL, - s11_pdn_type_ie_get, &create_session_request_p->pdn_type); - DevAssert(NW_OK == rc); - - /* PAA IE */ - rc = nwGtpv2cMsgParserAddIe(pMsgParser, NW_GTPV2C_IE_PAA, - NW_GTPV2C_IE_INSTANCE_ZERO, - NW_GTPV2C_IE_PRESENCE_CONDITIONAL, - s11_paa_ie_get, &create_session_request_p->paa); - DevAssert(NW_OK == rc); - - /* Sender FTEID for CP IE */ - rc = nwGtpv2cMsgParserAddIe(pMsgParser, NW_GTPV2C_IE_FTEID, - NW_GTPV2C_IE_INSTANCE_ZERO, - NW_GTPV2C_IE_PRESENCE_MANDATORY, - s11_fteid_ie_get, - &create_session_request_p->sender_fteid_for_cp); - DevAssert(NW_OK == rc); - - /* PGW FTEID for CP IE */ - rc = nwGtpv2cMsgParserAddIe(pMsgParser, NW_GTPV2C_IE_FTEID, - NW_GTPV2C_IE_INSTANCE_ONE, - NW_GTPV2C_IE_PRESENCE_CONDITIONAL, - s11_fteid_ie_get, - &create_session_request_p->pgw_address_for_cp); - DevAssert(NW_OK == rc); - - /* APN Restriction IE */ - rc = nwGtpv2cMsgParserAddIe(pMsgParser, NW_GTPV2C_IE_APN_RESTRICTION, - NW_GTPV2C_IE_INSTANCE_ZERO, - NW_GTPV2C_IE_PRESENCE_CONDITIONAL, - s11_ie_indication_generic, NULL); - DevAssert(NW_OK == rc); - - /* Bearer Context IE */ - rc = nwGtpv2cMsgParserAddIe(pMsgParser, NW_GTPV2C_IE_BEARER_CONTEXT, - NW_GTPV2C_IE_INSTANCE_ZERO, - NW_GTPV2C_IE_PRESENCE_MANDATORY, - s11_bearer_context_ie_get, - &create_session_request_p->bearer_to_create); - DevAssert(NW_OK == rc); - - /* AMBR IE */ - rc = nwGtpv2cMsgParserAddIe(pMsgParser, NW_GTPV2C_IE_AMBR, - NW_GTPV2C_IE_INSTANCE_ZERO, - NW_GTPV2C_IE_PRESENCE_CONDITIONAL, - s11_ambr_ie_get, - &create_session_request_p->ambr); - DevAssert(NW_OK == rc); - - /* Recovery IE */ - rc = nwGtpv2cMsgParserAddIe(pMsgParser, NW_GTPV2C_IE_RECOVERY, - NW_GTPV2C_IE_INSTANCE_ZERO, - NW_GTPV2C_IE_PRESENCE_MANDATORY, - s11_ie_indication_generic, NULL); - DevAssert(NW_OK == rc); - - create_session_request_p->teid = nwGtpv2cMsgGetTeid(pUlpApi->hMsg); - create_session_request_p->trxn = (void*)pUlpApi->apiInfo.initialReqIndInfo.hTrxn; - create_session_request_p->peer_ip = pUlpApi->apiInfo.initialReqIndInfo.peerIp; - - rc = nwGtpv2cMsgParserRun(pMsgParser, - pUlpApi->hMsg, - &offendingIeType, - &offendingIeInstance, - &offendingIeLength); - - if (rc != NW_OK) { - gtp_cause_t cause; - - NwGtpv2cUlpApiT ulp_req; - - memset(&ulp_req, 0, sizeof(NwGtpv2cUlpApiT)); - memset(&cause , 0, sizeof(gtp_cause_t)); - - cause.offending_ie_type = offendingIeType; - cause.offending_ie_length = offendingIeLength; - cause.offending_ie_instance = offendingIeInstance; - - switch (rc) { - case NW_GTPV2C_MANDATORY_IE_MISSING: - S11_DEBUG("Mandatory IE type '%u' of instance '%u' missing!\n", - offendingIeType, offendingIeLength); - cause.cause_value = NW_GTPV2C_CAUSE_MANDATORY_IE_MISSING; - break; - - default: - S11_DEBUG("Unknown message parse error!\n"); - cause.cause_value = 0; - break; - } - - /* - * Send Create session response with failure to Gtpv2c Stack Instance - */ - ulp_req.apiType = NW_GTPV2C_ULP_API_TRIGGERED_RSP; - - ulp_req.apiInfo.triggeredRspInfo.hTrxn = pUlpApi->apiInfo.initialReqIndInfo.hTrxn; - - rc = nwGtpv2cMsgNew(*stack_p, - NW_TRUE, - NW_GTP_CREATE_SESSION_RSP, - 0, - nwGtpv2cMsgGetSeqNumber(pUlpApi->hMsg), - &(ulp_req.hMsg)); - - s11_cause_ie_set(&(ulp_req.hMsg), &cause); - - S11_DEBUG("Received NW_GTP_CREATE_SESSION_REQ, Sending NW_GTP_CREATE_SESSION_RSP!\n"); - rc = nwGtpv2cProcessUlpReq(*stack_p, &ulp_req); - DevAssert(NW_OK == rc); - - itti_free(ITTI_MSG_ORIGIN_ID(message_p), message_p); - message_p = NULL; - - rc = nwGtpv2cMsgParserDelete(*stack_p, pMsgParser); - DevAssert(NW_OK == rc); - - rc = nwGtpv2cMsgDelete(*stack_p, (pUlpApi->hMsg)); - DevAssert(NW_OK == rc); - - return 0; - } - - rc = nwGtpv2cMsgParserDelete(*stack_p, pMsgParser); - DevAssert(NW_OK == rc); - - rc = nwGtpv2cMsgDelete(*stack_p, (pUlpApi->hMsg)); - DevAssert(NW_OK == rc); - - return itti_send_msg_to_task(TASK_SPGW_APP, INSTANCE_DEFAULT, message_p); -} - -int s11_sgw_handle_create_session_response( - NwGtpv2cStackHandleT *stack_p, - SgwCreateSessionResponse *create_session_response_p) -{ - NwRcT rc; - NwGtpv2cUlpApiT ulp_req; - NwGtpv2cTrxnHandleT trxn; - - gtp_cause_t cause; - - DevAssert(create_session_response_p != NULL); - DevAssert(stack_p != NULL); - - trxn = (NwGtpv2cTrxnHandleT)create_session_response_p->trxn; - - DevAssert(trxn != 0); - - /* Create a tunnel for the GTPv2-C stack */ - memset(&ulp_req, 0, sizeof(NwGtpv2cUlpApiT)); - - ulp_req.apiType = NW_GTPV2C_ULP_CREATE_LOCAL_TUNNEL; - ulp_req.apiInfo.createLocalTunnelInfo.teidLocal = create_session_response_p->s11_sgw_teid.teid; - ulp_req.apiInfo.createLocalTunnelInfo.peerIp = create_session_response_p->peer_ip; - - rc = nwGtpv2cProcessUlpReq(*stack_p, &ulp_req); - DevAssert(NW_OK == rc); - - /* Prepare a create session response to send to MME. - */ - memset(&ulp_req, 0, sizeof(NwGtpv2cUlpApiT)); - memset(&cause , 0, sizeof(gtp_cause_t)); - - ulp_req.apiType = NW_GTPV2C_ULP_API_TRIGGERED_RSP; - - ulp_req.apiInfo.triggeredRspInfo.hTrxn = trxn; - - rc = nwGtpv2cMsgNew(*stack_p, - NW_TRUE, - NW_GTP_CREATE_SESSION_RSP, - 0, - 0, - &(ulp_req.hMsg)); - DevAssert(NW_OK == rc); - - /* Set the remote TEID */ - rc = nwGtpv2cMsgSetTeid(ulp_req.hMsg, create_session_response_p->teid); - DevAssert(NW_OK == rc); - - cause.cause_value = (uint8_t)create_session_response_p->cause; - - s11_cause_ie_set(&(ulp_req.hMsg), &cause); - - rc = nwGtpv2cMsgAddIeFteid((ulp_req.hMsg), - NW_GTPV2C_IE_INSTANCE_ZERO, - S1_U_SGW_GTP_U, - create_session_response_p->s11_sgw_teid.teid, - 0xC0A80EA2, - NULL); - - s11_paa_ie_set(&(ulp_req.hMsg), &create_session_response_p->paa); - /* Put 0 for now i.e. no existing context or restriction */ - s11_apn_restriction_ie_set(&(ulp_req.hMsg), 0); - s11_bearer_context_created_ie_set( - &(ulp_req.hMsg), - &create_session_response_p->bearer_context_created); - - rc = nwGtpv2cProcessUlpReq(*stack_p, &ulp_req); - DevAssert(NW_OK == rc); - - return 0; -} - -int s11_sgw_handle_delete_session_request(NwGtpv2cStackHandleT *stack_p, - NwGtpv2cUlpApiT *pUlpApi) -{ - NwRcT rc = NW_OK; - uint8_t offendingIeType, offendingIeInstance; - uint16_t offendingIeLength; - - SgwDeleteSessionRequest *delete_session_request_p; - MessageDef *message_p; - - NwGtpv2cMsgParserT *pMsgParser; - - DevAssert(stack_p != NULL); - - message_p = itti_alloc_new_message(TASK_S11, SGW_DELETE_SESSION_REQUEST); - - delete_session_request_p = &message_p->ittiMsg.sgwDeleteSessionRequest; - - /* Create a new message parser */ - rc = nwGtpv2cMsgParserNew(*stack_p, NW_GTP_DELETE_SESSION_REQ, - s11_ie_indication_generic, - NULL, &pMsgParser); - DevAssert(NW_OK == rc); - - /* MME FTEID for CP IE */ - rc = nwGtpv2cMsgParserAddIe(pMsgParser, NW_GTPV2C_IE_FTEID, - NW_GTPV2C_IE_INSTANCE_ZERO, - NW_GTPV2C_IE_PRESENCE_OPTIONAL, - s11_fteid_ie_get, - &delete_session_request_p->sender_fteid_for_cp); - DevAssert(NW_OK == rc); - - /* Linked EPS Bearer Id IE - * This information element shall not be present for TAU/RAU/Handover with - * S-GW relocation procedures. - */ - rc = nwGtpv2cMsgParserAddIe(pMsgParser, NW_GTPV2C_IE_EBI, - NW_GTPV2C_IE_INSTANCE_ZERO, - NW_GTPV2C_IE_PRESENCE_OPTIONAL, - s11_ebi_ie_get, - &delete_session_request_p->lbi); - DevAssert(NW_OK == rc); - - /* Indication Flags IE - * For a Delete Session Request on S11 interface, - * only the Operation Indication flag might be present. - */ - rc = nwGtpv2cMsgParserAddIe(pMsgParser, NW_GTPV2C_IE_INDICATION, - NW_GTPV2C_IE_INSTANCE_ZERO, - NW_GTPV2C_IE_PRESENCE_CONDITIONAL, - s11_indication_flags_ie_get, - &delete_session_request_p->indication_flags); - DevAssert(NW_OK == rc); - - delete_session_request_p->teid = nwGtpv2cMsgGetTeid(pUlpApi->hMsg); - delete_session_request_p->trxn = (void*)pUlpApi->apiInfo.initialReqIndInfo.hTrxn; - delete_session_request_p->peer_ip = pUlpApi->apiInfo.initialReqIndInfo.peerIp; - - rc = nwGtpv2cMsgParserRun(pMsgParser, - pUlpApi->hMsg, - &offendingIeType, - &offendingIeInstance, - &offendingIeLength); - - if (rc != NW_OK) { - NwGtpv2cUlpApiT ulp_req; - gtp_cause_t cause; - - memset(&ulp_req, 0, sizeof(NwGtpv2cUlpApiT)); - memset(&cause , 0, sizeof(gtp_cause_t)); - - cause.offending_ie_type = offendingIeType; - cause.offending_ie_length = offendingIeLength; - cause.offending_ie_instance = offendingIeInstance; - - switch (rc) { - case NW_GTPV2C_MANDATORY_IE_MISSING: - S11_DEBUG("Mandatory IE type '%u' of instance '%u' missing!\n", - offendingIeType, offendingIeLength); - cause.cause_value = NW_GTPV2C_CAUSE_MANDATORY_IE_MISSING; - break; - - default: - S11_DEBUG("Unknown message parse error!\n"); - cause.cause_value = 0; - break; - } - - /* - * Send Create session response with failure to Gtpv2c Stack Instance - */ - ulp_req.apiType = NW_GTPV2C_ULP_API_TRIGGERED_RSP; - - ulp_req.apiInfo.triggeredRspInfo.hTrxn = pUlpApi->apiInfo.initialReqIndInfo.hTrxn; - - rc = nwGtpv2cMsgNew(*stack_p, - NW_TRUE, - NW_GTP_DELETE_SESSION_RSP, - 0, - nwGtpv2cMsgGetSeqNumber(pUlpApi->hMsg), - &(ulp_req.hMsg)); - - /* Adding the cause */ - s11_cause_ie_set(&(ulp_req.hMsg), &cause); - - S11_DEBUG("Received NW_GTP_DELETE_SESSION_REQ, Sending NW_GTP_DELETE_SESSION_RSP!\n"); - rc = nwGtpv2cProcessUlpReq(*stack_p, &ulp_req); - DevAssert(NW_OK == rc); - - itti_free(ITTI_MSG_ORIGIN_ID(message_p), message_p); - message_p = NULL; - - rc = nwGtpv2cMsgParserDelete(*stack_p, pMsgParser); - DevAssert(NW_OK == rc); - - rc = nwGtpv2cMsgDelete(*stack_p, (pUlpApi->hMsg)); - DevAssert(NW_OK == rc); - - return 0; - } - - rc = nwGtpv2cMsgParserDelete(*stack_p, pMsgParser); - DevAssert(NW_OK == rc); - - rc = nwGtpv2cMsgDelete(*stack_p, (pUlpApi->hMsg)); - DevAssert(NW_OK == rc); - - return itti_send_msg_to_task(TASK_SPGW_APP, INSTANCE_DEFAULT, message_p); -} - -int s11_sgw_handle_delete_session_response( - NwGtpv2cStackHandleT *stack_p, - SgwDeleteSessionResponse *delete_session_response_p) -{ - NwRcT rc; - NwGtpv2cUlpApiT ulp_req; - NwGtpv2cTrxnHandleT trxn; - gtp_cause_t cause; - - DevAssert(delete_session_response_p != NULL); - DevAssert(stack_p != NULL); - - trxn = (NwGtpv2cTrxnHandleT)delete_session_response_p->trxn; - - DevAssert(trxn != 0); - - /* Prepare a create session response to send to MME. - */ - memset(&ulp_req, 0, sizeof(NwGtpv2cUlpApiT)); - memset(&cause, 0, sizeof(gtp_cause_t)); - - ulp_req.apiType = NW_GTPV2C_ULP_API_TRIGGERED_RSP; - - ulp_req.apiInfo.triggeredRspInfo.hTrxn = trxn; - - rc = nwGtpv2cMsgNew(*stack_p, - NW_TRUE, - NW_GTP_DELETE_SESSION_RSP, - 0, - 0, - &(ulp_req.hMsg)); - DevAssert(NW_OK == rc); - - /* Set the remote TEID */ - rc = nwGtpv2cMsgSetTeid(ulp_req.hMsg, delete_session_response_p->teid); - DevAssert(NW_OK == rc); - - cause.cause_value = delete_session_response_p->cause; - - s11_cause_ie_set(&(ulp_req.hMsg), &cause); - - rc = nwGtpv2cProcessUlpReq(*stack_p, &ulp_req); - DevAssert(NW_OK == rc); - - return 0; -} diff --git a/openair-cn/S11/s11_sgw_session_manager.h b/openair-cn/S11/s11_sgw_session_manager.h deleted file mode 100644 index 2c920fb75e..0000000000 --- a/openair-cn/S11/s11_sgw_session_manager.h +++ /dev/null @@ -1,48 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#ifndef S11_SGW_SESSION_MANAGER_H_ -#define S11_SGW_SESSION_MANAGER_H_ - -int s11_sgw_handle_create_session_request( - NwGtpv2cStackHandleT *stack_p, - NwGtpv2cUlpApiT *pUlpApi); - -int s11_sgw_handle_create_session_response( - NwGtpv2cStackHandleT *stack_p, - SgwCreateSessionResponse *create_session_response_p); - -int s11_sgw_handle_delete_session_request( - NwGtpv2cStackHandleT *stack_p, - NwGtpv2cUlpApiT *pUlpApi); - -int s11_sgw_handle_delete_session_response( - NwGtpv2cStackHandleT *stack_p, - SgwDeleteSessionResponse *delete_session_response_p); - -#endif /* S11_SGW_SESSION_MANAGER_H_ */ diff --git a/openair-cn/S1AP/COPYING b/openair-cn/S1AP/COPYING deleted file mode 100644 index 94a9ed024d..0000000000 --- a/openair-cn/S1AP/COPYING +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program 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. - - This program 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 this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/openair-cn/S1AP/MESSAGES/ASN1/COPYING b/openair-cn/S1AP/MESSAGES/ASN1/COPYING deleted file mode 100644 index 94a9ed024d..0000000000 --- a/openair-cn/S1AP/MESSAGES/ASN1/COPYING +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program 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. - - This program 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 this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/openair-cn/S1AP/MESSAGES/ASN1/Makefile.am b/openair-cn/S1AP/MESSAGES/ASN1/Makefile.am deleted file mode 100644 index 818775406c..0000000000 --- a/openair-cn/S1AP/MESSAGES/ASN1/Makefile.am +++ /dev/null @@ -1,8 +0,0 @@ -BUILT_SOURCES=ieregen.stamp - -ieregen.stamp: $(top_srcdir)/S1AP/MESSAGES/ASN1/$(ASN1DIR)/S1AP-PDU-Contents.asn $(top_srcdir)/S1AP/MESSAGES/ASN1/asn1tostruct.py $(top_srcdir)/configure - echo Timestamp > $@ - python $(top_srcdir)/S1AP/MESSAGES/ASN1/asn1tostruct.py -f$(top_srcdir)/S1AP/MESSAGES/ASN1/$(ASN1DIR)/S1AP-PDU-Contents.asn -o$(top_builddir)/S1AP - -clean-local: - rm -f ieregen.stamp \ No newline at end of file diff --git a/openair-cn/S1AP/MESSAGES/ASN1/R10.5/COPYING b/openair-cn/S1AP/MESSAGES/ASN1/R10.5/COPYING deleted file mode 100644 index 94a9ed024d..0000000000 --- a/openair-cn/S1AP/MESSAGES/ASN1/R10.5/COPYING +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program 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. - - This program 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 this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/openair-cn/S1AP/MESSAGES/ASN1/R8.10/COPYING b/openair-cn/S1AP/MESSAGES/ASN1/R8.10/COPYING deleted file mode 100644 index 94a9ed024d..0000000000 --- a/openair-cn/S1AP/MESSAGES/ASN1/R8.10/COPYING +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program 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. - - This program 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 this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/openair-cn/S1AP/MESSAGES/ASN1/R9.8/COPYING b/openair-cn/S1AP/MESSAGES/ASN1/R9.8/COPYING deleted file mode 100644 index 94a9ed024d..0000000000 --- a/openair-cn/S1AP/MESSAGES/ASN1/R9.8/COPYING +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program 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. - - This program 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 this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/openair-cn/S1AP/MESSAGES/COPYING b/openair-cn/S1AP/MESSAGES/COPYING deleted file mode 100644 index 94a9ed024d..0000000000 --- a/openair-cn/S1AP/MESSAGES/COPYING +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program 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. - - This program 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 this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/openair-cn/S1AP/MESSAGES/Makefile.am b/openair-cn/S1AP/MESSAGES/Makefile.am deleted file mode 100644 index 765f972ab8..0000000000 --- a/openair-cn/S1AP/MESSAGES/Makefile.am +++ /dev/null @@ -1,805 +0,0 @@ -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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 . -# -# Contact Information -# OpenAirInterface Admin: openair_admin@eurecom.fr -# OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr -# -# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. -# -################################################################################ -SUBDIRS= ASN1/ . -ASN_MODULEdir=. -libs1apmessagesdir=. - -ASN_MODULE_SOURCES= \ - S1ap-Criticality.c \ - S1ap-Presence.c \ - S1ap-PrivateIE-ID.c \ - S1ap-ProcedureCode.c \ - S1ap-ProtocolExtensionID.c \ - S1ap-ProtocolIE-ID.c \ - S1ap-TriggeringMessage.c \ - S1ap-IE-Extensions.c \ - S1ap-AllocationAndRetentionPriority.c \ - S1ap-Bearers-SubjectToStatusTransfer-List.c \ - S1ap-Bearers-SubjectToStatusTransfer-Item.c \ - S1ap-BitRate.c \ - S1ap-BPLMNs.c \ - S1ap-BroadcastCompletedAreaList.c \ - S1ap-Cause.c \ - S1ap-CauseMisc.c \ - S1ap-CauseProtocol.c \ - S1ap-CauseRadioNetwork.c \ - S1ap-CauseTransport.c \ - S1ap-CauseNas.c \ - S1ap-CellIdentity.c \ - S1ap-CellID-Broadcast.c \ - S1ap-CellID-Broadcast-Item.c \ - S1ap-Cdma2000PDU.c \ - S1ap-Cdma2000RATType.c \ - S1ap-Cdma2000SectorID.c \ - S1ap-Cdma2000HOStatus.c \ - S1ap-Cdma2000HORequiredIndication.c \ - S1ap-Cdma2000OneXSRVCCInfo.c \ - S1ap-Cdma2000OneXMEID.c \ - S1ap-Cdma2000OneXMSI.c \ - S1ap-Cdma2000OneXPilot.c \ - S1ap-Cdma2000OneXRAND.c \ - S1ap-Cell-Size.c \ - S1ap-CellType.c \ - S1ap-CGI.c \ - S1ap-CI.c \ - S1ap-CNDomain.c \ - S1ap-CSFallbackIndicator.c \ - S1ap-CSG-Id.c \ - S1ap-CSG-IdList.c \ - S1ap-CSG-IdList-Item.c \ - S1ap-COUNTvalue.c \ - S1ap-CriticalityDiagnostics.c \ - S1ap-CriticalityDiagnostics-IE-List.c \ - S1ap-CriticalityDiagnostics-IE-Item.c \ - S1ap-DataCodingScheme.c \ - S1ap-DL-Forwarding.c \ - S1ap-Direct-Forwarding-Path-Availability.c \ - S1ap-E-RABToBeModifiedListBearerModReq.c \ - S1ap-E-RABToBeModifiedItemBearerModReq.c \ - S1ap-E-RABReleaseListBearerRelComp.c \ - S1ap-E-RABReleaseItemBearerRelComp.c \ - S1ap-E-RABDataForwardingList.c \ - S1ap-E-RABDataForwardingItem.c \ - S1ap-E-RABToBeSetupListCtxtSUReq.c \ - S1ap-E-RABToBeSetupItemCtxtSUReq.c \ - S1ap-E-RABSetupListBearerSURes.c \ - S1ap-E-RABSetupItemBearerSURes.c \ - S1ap-E-RABFailedToSetupListHOReqAck.c \ - S1ap-E-RABFailedToSetupItemHOReqAck.c \ - S1ap-E-RABToBeSetupListBearerSUReq.c \ - S1ap-E-RABToBeSetupItemBearerSUReq.c \ - S1ap-E-RABAdmittedList.c \ - S1ap-E-RABAdmittedItem.c \ - S1ap-E-RABToBeSwitchedDLList.c \ - S1ap-E-RABToBeSwitchedDLItem.c \ - S1ap-E-RABToBeSwitchedULList.c \ - S1ap-E-RABToBeSwitchedULItem.c \ - S1ap-E-RABModifyListBearerModRes.c \ - S1ap-E-RABModifyItemBearerModRes.c \ - S1ap-E-RABSetupListCtxtSURes.c \ - S1ap-E-RABSetupItemCtxtSURes.c \ - S1ap-E-RABToBeSetupListHOReq.c \ - S1ap-E-RABToBeSetupItemHOReq.c \ - S1ap-ECGIList.c \ - S1ap-EmergencyAreaIDList.c \ - S1ap-EmergencyAreaID.c \ - S1ap-EmergencyAreaID-Broadcast.c \ - S1ap-EmergencyAreaID-Broadcast-Item.c \ - S1ap-CompletedCellinEAI.c \ - S1ap-CompletedCellinEAI-Item.c \ - S1ap-ENB-ID.c \ - S1ap-GERAN-Cell-ID.c \ - S1ap-Global-ENB-ID.c \ - S1ap-ENB-StatusTransfer-TransparentContainer.c \ - S1ap-ENB-UE-S1AP-ID.c \ - S1ap-ENBname.c \ - S1ap-ENBX2TLAs.c \ - S1ap-EncryptionAlgorithms.c \ - S1ap-EPLMNs.c \ - S1ap-EventType.c \ - S1ap-E-RAB-ID.c \ - S1ap-E-RABInformationList.c \ - S1ap-E-RABInformationListItem.c \ - S1ap-E-RABList.c \ - S1ap-E-RABItem.c \ - S1ap-E-RABLevelQoSParameters.c \ - S1ap-EUTRAN-CGI.c \ - S1ap-ExtendedRNC-ID.c \ - S1ap-ForbiddenInterRATs.c \ - S1ap-ForbiddenTAs.c \ - S1ap-ForbiddenTAs-Item.c \ - S1ap-ForbiddenTACs.c \ - S1ap-ForbiddenLAs.c \ - S1ap-ForbiddenLAs-Item.c \ - S1ap-ForbiddenLACs.c \ - S1ap-GBR-QosInformation.c \ - S1ap-GTP-TEID.c \ - S1ap-GUMMEI.c \ - S1ap-HandoverRestrictionList.c \ - S1ap-HandoverType.c \ - S1ap-HFN.c \ - S1ap-HandoverNotify.c \ - S1ap-Inter-SystemInformationTransferType.c \ - S1ap-IMSI.c \ - S1ap-IntegrityProtectionAlgorithms.c \ - S1ap-InterfacesToTrace.c \ - S1ap-LAC.c \ - S1ap-LAI.c \ - S1ap-LastVisitedCell-Item.c \ - S1ap-LastVisitedEUTRANCellInformation.c \ - S1ap-LastVisitedUTRANCellInformation.c \ - S1ap-LastVisitedGERANCellInformation.c \ - S1ap-L3-Information.c \ - S1ap-MessageIdentifier.c \ - S1ap-MMEname.c \ - S1ap-MME-Group-ID.c \ - S1ap-MME-Code.c \ - S1ap-MME-UE-S1AP-ID.c \ - S1ap-M-TMSI.c \ - S1ap-MSClassmark2.c \ - S1ap-MSClassmark3.c \ - S1ap-NAS-PDU.c \ - S1ap-NASSecurityParametersfromE-UTRAN.c \ - S1ap-NASSecurityParameterstoE-UTRAN.c \ - S1ap-NumberofBroadcastRequest.c \ - S1ap-NumberOfBroadcasts.c \ - S1ap-OldBSS-ToNewBSS-Information.c \ - S1ap-OverloadAction.c \ - S1ap-OverloadResponse.c \ - S1ap-PagingDRX.c \ - S1ap-PDCP-SN.c \ - S1ap-PLMNidentity.c \ - S1ap-Pre-emptionCapability.c \ - S1ap-Pre-emptionVulnerability.c \ - S1ap-PriorityLevel.c \ - S1ap-QCI.c \ - S1ap-ReceiveStatusofULPDCPSDUs.c \ - S1ap-RelativeMMECapacity.c \ - S1ap-RAC.c \ - S1ap-RequestType.c \ - S1ap-ResetType.c \ - S1ap-ResetAll.c \ - S1ap-RIMTransfer.c \ - S1ap-RIMInformation.c \ - S1ap-RIMRoutingAddress.c \ - S1ap-ReportArea.c \ - S1ap-RepetitionPeriod.c \ - S1ap-RNC-ID.c \ - S1ap-RRC-Container.c \ - S1ap-RRC-Establishment-Cause.c \ - S1ap-SecurityKey.c \ - S1ap-SecurityContext.c \ - S1ap-SerialNumber.c \ - S1ap-SONInformation.c \ - S1ap-SONInformationRequest.c \ - S1ap-SONInformationReply.c \ - S1ap-SONConfigurationTransfer.c \ - S1ap-Source-ToTarget-TransparentContainer.c \ - S1ap-SourceBSS-ToTargetBSS-TransparentContainer.c \ - S1ap-SourceeNB-ID.c \ - S1ap-SRVCCOperationPossible.c \ - S1ap-SRVCCHOIndication.c \ - S1ap-SourceeNB-ToTargeteNB-TransparentContainer.c \ - S1ap-SourceRNC-ToTargetRNC-TransparentContainer.c \ - S1ap-ServedGUMMEIs.c \ - S1ap-ServedGUMMEIsItem.c \ - S1ap-ServedGroupIDs.c \ - S1ap-ServedMMECs.c \ - S1ap-ServedPLMNs.c \ - S1ap-SubscriberProfileIDforRFP.c \ - S1ap-SupportedTAs.c \ - S1ap-SupportedTAs-Item.c \ - S1ap-S-TMSI.c \ - S1ap-TAC.c \ - S1ap-TAIListforWarning.c \ - S1ap-TAIList.c \ - S1ap-TAIItem.c \ - S1ap-TAI.c \ - S1ap-TAI-Broadcast.c \ - S1ap-TAI-Broadcast-Item.c \ - S1ap-CompletedCellinTAI.c \ - S1ap-CompletedCellinTAI-Item.c \ - S1ap-TBCD-STRING.c \ - S1ap-TargetID.c \ - S1ap-TargeteNB-ID.c \ - S1ap-TargetRNC-ID.c \ - S1ap-TargeteNB-ToSourceeNB-TransparentContainer.c \ - S1ap-Target-ToSource-TransparentContainer.c \ - S1ap-TargetRNC-ToSourceRNC-TransparentContainer.c \ - S1ap-TargetBSS-ToSourceBSS-TransparentContainer.c \ - S1ap-TimeToWait.c \ - S1ap-Time-UE-StayedInCell.c \ - S1ap-TransportLayerAddress.c \ - S1ap-TraceActivation.c \ - S1ap-TraceDepth.c \ - S1ap-E-UTRAN-Trace-ID.c \ - S1ap-TypeOfError.c \ - S1ap-UEAggregateMaximumBitrate.c \ - S1ap-UE-S1AP-IDs.c \ - S1ap-UE-S1AP-ID-pair.c \ - S1ap-UE-associatedLogicalS1-ConnectionListRes.c \ - S1ap-UE-associatedLogicalS1-ConnectionListResAck.c \ - S1ap-UE-associatedLogicalS1-ConnectionItem.c \ - S1ap-UEIdentityIndexValue.c \ - S1ap-UE-HistoryInformation.c \ - S1ap-UEPagingID.c \ - S1ap-UERadioCapability.c \ - S1ap-UESecurityCapabilities.c \ - S1ap-WarningAreaList.c \ - S1ap-WarningType.c \ - S1ap-WarningSecurityInfo.c \ - S1ap-WarningMessageContents.c \ - S1ap-X2TNLConfigurationInfo.c \ - S1AP-PDU.c \ - S1ap-InitiatingMessage.c \ - S1ap-SuccessfulOutcome.c \ - S1ap-UnsuccessfulOutcome.c \ - S1ap-HandoverRequired.c \ - S1ap-HandoverCommand.c \ - S1ap-HandoverPreparationFailure.c \ - S1ap-HandoverRequest.c \ - S1ap-HandoverRequestAcknowledge.c \ - S1ap-HandoverFailure.c \ - S1ap-HandoverNotify.c \ - S1ap-PathSwitchRequest.c \ - S1ap-PathSwitchRequestAcknowledge.c \ - S1ap-PathSwitchRequestFailure.c \ - S1ap-E-RABSetupRequest.c \ - S1ap-E-RABSetupResponse.c \ - S1ap-E-RABModifyRequest.c \ - S1ap-E-RABModifyResponse.c \ - S1ap-E-RABReleaseIndication.c \ - S1ap-E-RABReleaseCommand.c \ - S1ap-E-RABReleaseResponse.c \ - S1ap-InitialContextSetupRequest.c \ - S1ap-InitialContextSetupResponse.c \ - S1ap-InitialContextSetupFailure.c \ - S1ap-UEContextReleaseRequest.c \ - S1ap-Paging.c \ - S1ap-DownlinkNASTransport.c \ - S1ap-InitialUEMessage.c \ - S1ap-UplinkNASTransport.c \ - S1ap-NASNonDeliveryIndication.c \ - S1ap-HandoverCancel.c \ - S1ap-HandoverCancelAcknowledge.c \ - S1ap-Reset.c \ - S1ap-ResetAcknowledge.c \ - S1ap-S1SetupResponse.c \ - S1ap-S1SetupRequest.c \ - S1ap-S1SetupFailure.c \ - S1ap-ErrorIndication.c \ - S1ap-ENBConfigurationUpdate.c \ - S1ap-ENBConfigurationUpdateAcknowledge.c \ - S1ap-ENBConfigurationUpdateFailure.c \ - S1ap-MMEConfigurationUpdate.c \ - S1ap-MMEConfigurationUpdateAcknowledge.c \ - S1ap-MMEConfigurationUpdateFailure.c \ - S1ap-DownlinkS1cdma2000tunneling.c \ - S1ap-UplinkS1cdma2000tunneling.c \ - S1ap-UEContextModificationRequest.c \ - S1ap-UEContextModificationResponse.c \ - S1ap-UEContextModificationFailure.c \ - S1ap-UECapabilityInfoIndication.c \ - S1ap-UEContextReleaseCommand.c \ - S1ap-UEContextReleaseComplete.c \ - S1ap-ENBStatusTransfer.c \ - S1ap-MMEStatusTransfer.c \ - S1ap-DeactivateTrace.c \ - S1ap-TraceStart.c \ - S1ap-TraceFailureIndication.c \ - S1ap-CellTrafficTrace.c \ - S1ap-LocationReportingControl.c \ - S1ap-LocationReportingFailureIndication.c \ - S1ap-LocationReport.c \ - S1ap-OverloadStart.c \ - S1ap-OverloadStop.c \ - S1ap-WriteReplaceWarningRequest.c \ - S1ap-WriteReplaceWarningResponse.c \ - S1ap-ENBDirectInformationTransfer.c \ - S1ap-MMEDirectInformationTransfer.c \ - S1ap-ENBConfigurationTransfer.c \ - S1ap-MMEConfigurationTransfer.c \ - S1ap-PrivateMessage.c \ - S1ap-IE.c \ - S1ap-IE-Extensions.c - -ASN_MODULE_HEADERS= \ - S1ap-Criticality.h \ - S1ap-Presence.h \ - S1ap-PrivateIE-ID.h \ - S1ap-ProcedureCode.h \ - S1ap-ProtocolExtensionID.h \ - S1ap-ProtocolIE-ID.h \ - S1ap-TriggeringMessage.h \ - S1ap-AllocationAndRetentionPriority.h \ - S1ap-Bearers-SubjectToStatusTransfer-List.h \ - S1ap-Bearers-SubjectToStatusTransfer-Item.h \ - S1ap-BitRate.h \ - S1ap-BPLMNs.h \ - S1ap-BroadcastCompletedAreaList.h \ - S1ap-Cause.h \ - S1ap-CauseMisc.h \ - S1ap-CauseProtocol.h \ - S1ap-CauseRadioNetwork.h \ - S1ap-CauseTransport.h \ - S1ap-CauseNas.h \ - S1ap-CellIdentity.h \ - S1ap-CellID-Broadcast.h \ - S1ap-CellID-Broadcast-Item.h \ - S1ap-Cdma2000PDU.h \ - S1ap-Cdma2000RATType.h \ - S1ap-Cdma2000SectorID.h \ - S1ap-Cdma2000HOStatus.h \ - S1ap-Cdma2000HORequiredIndication.h \ - S1ap-Cdma2000OneXSRVCCInfo.h \ - S1ap-Cdma2000OneXMEID.h \ - S1ap-Cdma2000OneXMSI.h \ - S1ap-Cdma2000OneXPilot.h \ - S1ap-Cdma2000OneXRAND.h \ - S1ap-Cell-Size.h \ - S1ap-CellType.h \ - S1ap-CGI.h \ - S1ap-CI.h \ - S1ap-CNDomain.h \ - S1ap-CSFallbackIndicator.h \ - S1ap-CSG-Id.h \ - S1ap-CSG-IdList.h \ - S1ap-CSG-IdList-Item.h \ - S1ap-COUNTvalue.h \ - S1ap-CriticalityDiagnostics.h \ - S1ap-CriticalityDiagnostics-IE-List.h \ - S1ap-CriticalityDiagnostics-IE-Item.h \ - S1ap-DataCodingScheme.h \ - S1ap-DL-Forwarding.h \ - S1ap-Direct-Forwarding-Path-Availability.h \ - S1ap-E-RABToBeModifiedListBearerModReq.h \ - S1ap-E-RABToBeModifiedItemBearerModReq.h \ - S1ap-E-RABReleaseListBearerRelComp.h \ - S1ap-E-RABReleaseItemBearerRelComp.h \ - S1ap-E-RABDataForwardingList.h \ - S1ap-E-RABDataForwardingItem.h \ - S1ap-E-RABToBeSetupListCtxtSUReq.h \ - S1ap-E-RABToBeSetupItemCtxtSUReq.h \ - S1ap-E-RABSetupListBearerSURes.h \ - S1ap-E-RABSetupItemBearerSURes.h \ - S1ap-E-RABFailedToSetupListHOReqAck.h \ - S1ap-E-RABFailedToSetupItemHOReqAck.h \ - S1ap-E-RABToBeSetupListBearerSUReq.h \ - S1ap-E-RABToBeSetupItemBearerSUReq.h \ - S1ap-E-RABAdmittedList.h \ - S1ap-E-RABAdmittedItem.h \ - S1ap-E-RABToBeSwitchedDLList.h \ - S1ap-E-RABToBeSwitchedDLItem.h \ - S1ap-E-RABToBeSwitchedULList.h \ - S1ap-E-RABToBeSwitchedULItem.h \ - S1ap-E-RABModifyListBearerModRes.h \ - S1ap-E-RABModifyItemBearerModRes.h \ - S1ap-E-RABSetupListCtxtSURes.h \ - S1ap-E-RABSetupItemCtxtSURes.h \ - S1ap-E-RABToBeSetupListHOReq.h \ - S1ap-E-RABToBeSetupItemHOReq.h \ - S1ap-ECGIList.h \ - S1ap-EmergencyAreaIDList.h \ - S1ap-EmergencyAreaID.h \ - S1ap-EmergencyAreaID-Broadcast.h \ - S1ap-EmergencyAreaID-Broadcast-Item.h \ - S1ap-CompletedCellinEAI.h \ - S1ap-CompletedCellinEAI-Item.h \ - S1ap-ENB-ID.h \ - S1ap-GERAN-Cell-ID.h \ - S1ap-Global-ENB-ID.h \ - S1ap-ENB-StatusTransfer-TransparentContainer.h \ - S1ap-ENB-UE-S1AP-ID.h \ - S1ap-ENBname.h \ - S1ap-ENBX2TLAs.h \ - S1ap-EncryptionAlgorithms.h \ - S1ap-EPLMNs.h \ - S1ap-EventType.h \ - S1ap-E-RAB-ID.h \ - S1ap-E-RABInformationList.h \ - S1ap-E-RABInformationListItem.h \ - S1ap-E-RABList.h \ - S1ap-E-RABItem.h \ - S1ap-E-RABLevelQoSParameters.h \ - S1ap-EUTRAN-CGI.h \ - S1ap-ExtendedRNC-ID.h \ - S1ap-ForbiddenInterRATs.h \ - S1ap-ForbiddenTAs.h \ - S1ap-ForbiddenTAs-Item.h \ - S1ap-ForbiddenTACs.h \ - S1ap-ForbiddenLAs.h \ - S1ap-ForbiddenLAs-Item.h \ - S1ap-ForbiddenLACs.h \ - S1ap-GBR-QosInformation.h \ - S1ap-GTP-TEID.h \ - S1ap-GUMMEI.h \ - S1ap-HandoverRestrictionList.h \ - S1ap-HandoverType.h \ - S1ap-HFN.h \ - S1ap-HandoverNotify.h \ - S1ap-Inter-SystemInformationTransferType.h \ - S1ap-IMSI.h \ - S1ap-IntegrityProtectionAlgorithms.h \ - S1ap-InterfacesToTrace.h \ - S1ap-LAC.h \ - S1ap-LAI.h \ - S1ap-LastVisitedCell-Item.h \ - S1ap-LastVisitedEUTRANCellInformation.h \ - S1ap-LastVisitedUTRANCellInformation.h \ - S1ap-LastVisitedGERANCellInformation.h \ - S1ap-L3-Information.h \ - S1ap-MessageIdentifier.h \ - S1ap-MMEname.h \ - S1ap-MME-Group-ID.h \ - S1ap-MME-Code.h \ - S1ap-MME-UE-S1AP-ID.h \ - S1ap-M-TMSI.h \ - S1ap-MSClassmark2.h \ - S1ap-MSClassmark3.h \ - S1ap-NAS-PDU.h \ - S1ap-NASSecurityParametersfromE-UTRAN.h \ - S1ap-NASSecurityParameterstoE-UTRAN.h \ - S1ap-NumberofBroadcastRequest.h \ - S1ap-NumberOfBroadcasts.h \ - S1ap-OldBSS-ToNewBSS-Information.h \ - S1ap-OverloadAction.h \ - S1ap-OverloadResponse.h \ - S1ap-PagingDRX.h \ - S1ap-PDCP-SN.h \ - S1ap-PLMNidentity.h \ - S1ap-Pre-emptionCapability.h \ - S1ap-Pre-emptionVulnerability.h \ - S1ap-PriorityLevel.h \ - S1ap-QCI.h \ - S1ap-ReceiveStatusofULPDCPSDUs.h \ - S1ap-RelativeMMECapacity.h \ - S1ap-RAC.h \ - S1ap-RequestType.h \ - S1ap-ResetType.h \ - S1ap-ResetAll.h \ - S1ap-RIMTransfer.h \ - S1ap-RIMInformation.h \ - S1ap-RIMRoutingAddress.h \ - S1ap-ReportArea.h \ - S1ap-RepetitionPeriod.h \ - S1ap-RNC-ID.h \ - S1ap-RRC-Container.h \ - S1ap-RRC-Establishment-Cause.h \ - S1ap-SecurityKey.h \ - S1ap-SecurityContext.h \ - S1ap-SerialNumber.h \ - S1ap-SONInformation.h \ - S1ap-SONInformationRequest.h \ - S1ap-SONInformationReply.h \ - S1ap-SONConfigurationTransfer.h \ - S1ap-Source-ToTarget-TransparentContainer.h \ - S1ap-SourceBSS-ToTargetBSS-TransparentContainer.h \ - S1ap-SourceeNB-ID.h \ - S1ap-SRVCCOperationPossible.h \ - S1ap-SRVCCHOIndication.h \ - S1ap-SourceeNB-ToTargeteNB-TransparentContainer.h \ - S1ap-SourceRNC-ToTargetRNC-TransparentContainer.h \ - S1ap-ServedGUMMEIs.h \ - S1ap-ServedGUMMEIsItem.h \ - S1ap-ServedGroupIDs.h \ - S1ap-ServedMMECs.h \ - S1ap-ServedPLMNs.h \ - S1ap-SubscriberProfileIDforRFP.h \ - S1ap-SupportedTAs.h \ - S1ap-SupportedTAs-Item.h \ - S1ap-S-TMSI.h \ - S1ap-TAC.h \ - S1ap-TAIListforWarning.h \ - S1ap-TAIList.h \ - S1ap-TAIItem.h \ - S1ap-TAI.h \ - S1ap-TAI-Broadcast.h \ - S1ap-TAI-Broadcast-Item.h \ - S1ap-CompletedCellinTAI.h \ - S1ap-CompletedCellinTAI-Item.h \ - S1ap-TBCD-STRING.h \ - S1ap-TargetID.h \ - S1ap-TargeteNB-ID.h \ - S1ap-TargetRNC-ID.h \ - S1ap-TargeteNB-ToSourceeNB-TransparentContainer.h \ - S1ap-Target-ToSource-TransparentContainer.h \ - S1ap-TargetRNC-ToSourceRNC-TransparentContainer.h \ - S1ap-TargetBSS-ToSourceBSS-TransparentContainer.h \ - S1ap-TimeToWait.h \ - S1ap-Time-UE-StayedInCell.h \ - S1ap-TransportLayerAddress.h \ - S1ap-TraceActivation.h \ - S1ap-TraceDepth.h \ - S1ap-E-UTRAN-Trace-ID.h \ - S1ap-TypeOfError.h \ - S1ap-UEAggregateMaximumBitrate.h \ - S1ap-UE-S1AP-IDs.h \ - S1ap-UE-S1AP-ID-pair.h \ - S1ap-UE-associatedLogicalS1-ConnectionListRes.h \ - S1ap-UE-associatedLogicalS1-ConnectionListResAck.h \ - S1ap-UE-associatedLogicalS1-ConnectionItem.h \ - S1ap-UEIdentityIndexValue.h \ - S1ap-UE-HistoryInformation.h \ - S1ap-UEPagingID.h \ - S1ap-UERadioCapability.h \ - S1ap-UESecurityCapabilities.h \ - S1ap-WarningAreaList.h \ - S1ap-WarningType.h \ - S1ap-WarningSecurityInfo.h \ - S1ap-WarningMessageContents.h \ - S1ap-X2TNLConfigurationInfo.h \ - S1AP-PDU.h \ - S1ap-InitiatingMessage.h \ - S1ap-SuccessfulOutcome.h \ - S1ap-UnsuccessfulOutcome.h \ - S1ap-HandoverRequired.h \ - S1ap-HandoverCommand.h \ - S1ap-HandoverPreparationFailure.h \ - S1ap-HandoverRequest.h \ - S1ap-HandoverRequestAcknowledge.h \ - S1ap-HandoverFailure.h \ - S1ap-PathSwitchRequest.h \ - S1ap-PathSwitchRequestAcknowledge.h \ - S1ap-PathSwitchRequestFailure.h \ - S1ap-E-RABSetupRequest.h \ - S1ap-E-RABSetupResponse.h \ - S1ap-E-RABModifyRequest.h \ - S1ap-E-RABModifyResponse.h \ - S1ap-E-RABReleaseIndication.h \ - S1ap-E-RABReleaseCommand.h \ - S1ap-E-RABReleaseResponse.h \ - S1ap-InitialContextSetupRequest.h \ - S1ap-InitialContextSetupResponse.h \ - S1ap-InitialContextSetupFailure.h \ - S1ap-UEContextReleaseRequest.h \ - S1ap-Paging.h \ - S1ap-DownlinkNASTransport.h \ - S1ap-InitialUEMessage.h \ - S1ap-UplinkNASTransport.h \ - S1ap-NASNonDeliveryIndication.h \ - S1ap-HandoverCancel.h \ - S1ap-HandoverCancelAcknowledge.h \ - S1ap-Reset.h \ - S1ap-ResetAcknowledge.h \ - S1ap-S1SetupResponse.h \ - S1ap-S1SetupRequest.h \ - S1ap-S1SetupFailure.h \ - S1ap-ErrorIndication.h \ - S1ap-ENBConfigurationUpdate.h \ - S1ap-ENBConfigurationUpdateAcknowledge.h \ - S1ap-ENBConfigurationUpdateFailure.h \ - S1ap-MMEConfigurationUpdate.h \ - S1ap-MMEConfigurationUpdateAcknowledge.h \ - S1ap-MMEConfigurationUpdateFailure.h \ - S1ap-DownlinkS1cdma2000tunneling.h \ - S1ap-UplinkS1cdma2000tunneling.h \ - S1ap-UEContextModificationRequest.h \ - S1ap-UEContextModificationResponse.h \ - S1ap-UEContextModificationFailure.h \ - S1ap-UECapabilityInfoIndication.h \ - S1ap-UEContextReleaseCommand.h \ - S1ap-UEContextReleaseComplete.h \ - S1ap-ENBStatusTransfer.h \ - S1ap-MMEStatusTransfer.h \ - S1ap-DeactivateTrace.h \ - S1ap-TraceStart.h \ - S1ap-TraceFailureIndication.h \ - S1ap-CellTrafficTrace.h \ - S1ap-LocationReportingControl.h \ - S1ap-LocationReportingFailureIndication.h \ - S1ap-LocationReport.h \ - S1ap-OverloadStart.h \ - S1ap-OverloadStop.h \ - S1ap-WriteReplaceWarningRequest.h \ - S1ap-WriteReplaceWarningResponse.h \ - S1ap-ENBDirectInformationTransfer.h \ - S1ap-MMEDirectInformationTransfer.h \ - S1ap-ENBConfigurationTransfer.h \ - S1ap-MMEConfigurationTransfer.h \ - S1ap-PrivateMessage.h \ - S1ap-IE.h \ - S1ap-IE-Extensions.h - -ASN_MODULE_HEADERS+=ANY.h -ASN_MODULE_SOURCES+=ANY.c -ASN_MODULE_HEADERS+=BOOLEAN.h -ASN_MODULE_SOURCES+=BOOLEAN.c -ASN_MODULE_HEADERS+=INTEGER.h -ASN_MODULE_HEADERS+=NativeEnumerated.h -ASN_MODULE_SOURCES+=INTEGER.c -ASN_MODULE_HEADERS+=NULL.h -ASN_MODULE_SOURCES+=NULL.c -ASN_MODULE_SOURCES+=NativeEnumerated.c -ASN_MODULE_HEADERS+=NativeInteger.h -ASN_MODULE_SOURCES+=NativeInteger.c -ASN_MODULE_HEADERS+=OBJECT_IDENTIFIER.h -ASN_MODULE_SOURCES+=OBJECT_IDENTIFIER.c -ASN_MODULE_HEADERS+=PrintableString.h -ASN_MODULE_SOURCES+=PrintableString.c -ASN_MODULE_HEADERS+=asn_SEQUENCE_OF.h -ASN_MODULE_SOURCES+=asn_SEQUENCE_OF.c -ASN_MODULE_HEADERS+=asn_SET_OF.h -ASN_MODULE_SOURCES+=asn_SET_OF.c -ASN_MODULE_HEADERS+=constr_CHOICE.h -ASN_MODULE_SOURCES+=constr_CHOICE.c -ASN_MODULE_HEADERS+=constr_SEQUENCE.h -ASN_MODULE_SOURCES+=constr_SEQUENCE.c -ASN_MODULE_HEADERS+=constr_SEQUENCE_OF.h -ASN_MODULE_SOURCES+=constr_SEQUENCE_OF.c -ASN_MODULE_HEADERS+=constr_SET_OF.h -ASN_MODULE_SOURCES+=constr_SET_OF.c -ASN_MODULE_HEADERS+=asn_application.h -ASN_MODULE_HEADERS+=asn_system.h -ASN_MODULE_HEADERS+=asn_codecs.h -ASN_MODULE_HEADERS+=asn_internal.h -ASN_MODULE_HEADERS+=OCTET_STRING.h -ASN_MODULE_SOURCES+=OCTET_STRING.c -ASN_MODULE_HEADERS+=BIT_STRING.h -ASN_MODULE_SOURCES+=BIT_STRING.c -ASN_MODULE_SOURCES+=asn_codecs_prim.c -ASN_MODULE_HEADERS+=asn_codecs_prim.h -ASN_MODULE_HEADERS+=ber_tlv_length.h -ASN_MODULE_SOURCES+=ber_tlv_length.c -ASN_MODULE_HEADERS+=ber_tlv_tag.h -ASN_MODULE_SOURCES+=ber_tlv_tag.c -ASN_MODULE_HEADERS+=ber_decoder.h -ASN_MODULE_SOURCES+=ber_decoder.c -ASN_MODULE_HEADERS+=der_encoder.h -ASN_MODULE_SOURCES+=der_encoder.c -ASN_MODULE_HEADERS+=constr_TYPE.h -ASN_MODULE_SOURCES+=constr_TYPE.c -ASN_MODULE_HEADERS+=constraints.h -ASN_MODULE_SOURCES+=constraints.c -ASN_MODULE_HEADERS+=xer_support.h -ASN_MODULE_SOURCES+=xer_support.c -ASN_MODULE_HEADERS+=xer_decoder.h -ASN_MODULE_SOURCES+=xer_decoder.c -ASN_MODULE_HEADERS+=xer_encoder.h -ASN_MODULE_SOURCES+=xer_encoder.c -ASN_MODULE_HEADERS+=per_support.h -ASN_MODULE_SOURCES+=per_support.c -ASN_MODULE_HEADERS+=per_decoder.h -ASN_MODULE_SOURCES+=per_decoder.c -ASN_MODULE_HEADERS+=per_encoder.h -ASN_MODULE_SOURCES+=per_encoder.c -ASN_MODULE_HEADERS+=per_opentype.h -ASN_MODULE_SOURCES+=per_opentype.c - -if UPDATE_RELEASE_9 -ASN_MODULE_SOURCES += \ - S1ap-KillResponse.c \ - S1ap-KillRequest.c \ - S1ap-Data-Forwarding-Not-Possible.c \ - S1ap-DownlinkUEAssociatedLPPaTransport.c \ - S1ap-UplinkUEAssociatedLPPaTransport.c \ - S1ap-DownlinkNonUEAssociatedLPPaTransport.c \ - S1ap-UplinkNonUEAssociatedLPPaTransport.c \ - S1ap-TAI-Cancelled.c \ - S1ap-TAI-Cancelled-Item.c \ - S1ap-StratumLevel.c \ - S1ap-SynchronizationStatus.c \ - S1ap-TimeSynchronizationInfo.c \ - S1ap-Routing-ID.c \ - S1ap-PS-ServiceNotAvailable.c \ - S1ap-LPPa-PDU.c \ - S1ap-ExtendedRepetitionPeriod.c \ - S1ap-EUTRANRoundTripDelayEstimationInfo.c \ - S1ap-EmergencyAreaID-Cancelled.c \ - S1ap-EmergencyAreaID-Cancelled-Item.c \ - S1ap-CSGMembershipStatus.c \ - S1ap-ConcurrentWarningMessageIndicator.c \ - S1ap-CellID-Cancelled.c \ - S1ap-CellID-Cancelled-Item.c \ - S1ap-CellAccessMode.c \ - S1ap-CancelledCellinEAI.c \ - S1ap-CancelledCellinEAI-Item.c \ - S1ap-CancelledCellinTAI.c \ - S1ap-CancelledCellinTAI-Item.c \ - S1ap-BroadcastCancelledAreaList.c - -ASN_MODULE_HEADERS += \ - S1ap-BroadcastCancelledAreaList.h \ - S1ap-CancelledCellinEAI.h \ - S1ap-CancelledCellinEAI-Item.h \ - S1ap-CancelledCellinTAI.h \ - S1ap-CancelledCellinTAI-Item.h \ - S1ap-CellAccessMode.h \ - S1ap-CellID-Cancelled.h \ - S1ap-CellID-Cancelled-Item.h \ - S1ap-ConcurrentWarningMessageIndicator.h \ - S1ap-CSGMembershipStatus.h \ - S1ap-Data-Forwarding-Not-Possible.h \ - S1ap-EmergencyAreaID-Cancelled.h \ - S1ap-EmergencyAreaID-Cancelled-Item.h \ - S1ap-E-RABList.h \ - S1ap-EUTRANRoundTripDelayEstimationInfo.h \ - S1ap-ExtendedRepetitionPeriod.h \ - S1ap-LPPa-PDU.h \ - S1ap-PS-ServiceNotAvailable.h \ - S1ap-Routing-ID.h \ - S1ap-StratumLevel.h \ - S1ap-SynchronizationStatus.h \ - S1ap-TimeSynchronizationInfo.h \ - S1ap-TAI-Cancelled.h \ - S1ap-TAI-Cancelled-Item.h \ - S1ap-KillResponse.h \ - S1ap-KillRequest.h \ - S1ap-DownlinkUEAssociatedLPPaTransport.h \ - S1ap-UplinkUEAssociatedLPPaTransport.h \ - S1ap-DownlinkNonUEAssociatedLPPaTransport.h \ - S1ap-UplinkNonUEAssociatedLPPaTransport.h -endif - -if UPDATE_RELEASE_10 -ASN_MODULE_SOURCES += \ - S1ap-PagingPriority.c \ - S1ap-RelayNode-Indicator.c \ - S1ap-GWContextReleaseIndication.c \ - S1ap-MMERelaySupportIndicator.c \ - S1ap-ManagementBasedMDTAllowed.c \ - S1ap-PrivacyIndicator.c \ - S1ap-TrafficLoadReductionIndication.c \ - S1ap-GUMMEIList.c - -ASN_MODULE_HEADERS += \ - S1ap-PagingPriority.h \ - S1ap-RelayNode-Indicator.h \ - S1ap-GWContextReleaseIndication.h \ - S1ap-MMERelaySupportIndicator.h \ - S1ap-ManagementBasedMDTAllowed.h \ - S1ap-PrivacyIndicator.h \ - S1ap-TrafficLoadReductionIndication.h \ - S1ap-GUMMEIList.h -endif - -noinst_LTLIBRARIES = libs1apmessages.la -libs1apmessages_la_LDFLAGS = -all-static - -BUILT_SOURCES = asn1regen.stamp - -AM_CFLAGS = \ - @ADD_CFLAGS@ \ - -DEMIT_ASN_DEBUG_EXTERN - -libs1apmessages_la_SOURCES=$(ASN_MODULE_SOURCES) $(ASN_MODULE_HEADERS) - -asn1regen.stamp: ASN1/$(ASN1DIR)/S1AP-CommonDataTypes.asn ASN1/$(ASN1DIR)/S1AP-Constants.asn ASN1/$(ASN1DIR)/S1AP-IEs.asn ASN1/$(ASN1DIR)/S1AP-PDU.asn - asn1c -gen-PER -fhave_native64 $^ - echo Timestamp > $@ - -clean-messages: - rm -f *.lo - -clean-local: - rm -f asn1regen.stamp - rm -f Makefile.am.sample - rm -f converter-sample.c - rm -f $(ASN_MODULE_SOURCES) - rm -f $(ASN_MODULE_HEADERS) - rm -f $(ASN_MODULE_HEADERS_IES) diff --git a/openair-cn/S1AP/MESSAGES/Makefile.inc b/openair-cn/S1AP/MESSAGES/Makefile.inc deleted file mode 100644 index e0a780d541..0000000000 --- a/openair-cn/S1AP/MESSAGES/Makefile.inc +++ /dev/null @@ -1,784 +0,0 @@ -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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 . -# -# Contact Information -# OpenAirInterface Admin: openair_admin@eurecom.fr -# OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr -# -# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. -# -################################################################################ -S1AP_ASN_MODULE_SOURCES= \ - S1ap-Criticality.o \ - S1ap-Presence.o \ - S1ap-PrivateIE-ID.o \ - S1ap-ProcedureCode.o \ - S1ap-ProtocolExtensionID.o \ - S1ap-ProtocolIE-ID.o \ - S1ap-TriggeringMessage.o \ - S1ap-IE-Extensions.o \ - S1ap-AllocationAndRetentionPriority.o \ - S1ap-Bearers-SubjectToStatusTransfer-List.o \ - S1ap-Bearers-SubjectToStatusTransfer-Item.o \ - S1ap-BitRate.o \ - S1ap-BPLMNs.o \ - S1ap-BroadcastCompletedAreaList.o \ - S1ap-Cause.o \ - S1ap-CauseMisc.o \ - S1ap-CauseProtocol.o \ - S1ap-CauseRadioNetwork.o \ - S1ap-CauseTransport.o \ - S1ap-CauseNas.o \ - S1ap-CellIdentity.o \ - S1ap-CellID-Broadcast.o \ - S1ap-CellID-Broadcast-Item.o \ - S1ap-Cdma2000PDU.o \ - S1ap-Cdma2000RATType.o \ - S1ap-Cdma2000SectorID.o \ - S1ap-Cdma2000HOStatus.o \ - S1ap-Cdma2000HORequiredIndication.o \ - S1ap-Cdma2000OneXSRVCCInfo.o \ - S1ap-Cdma2000OneXMEID.o \ - S1ap-Cdma2000OneXMSI.o \ - S1ap-Cdma2000OneXPilot.o \ - S1ap-Cdma2000OneXRAND.o \ - S1ap-Cell-Size.o \ - S1ap-CellType.o \ - S1ap-CGI.o \ - S1ap-CI.o \ - S1ap-CNDomain.o \ - S1ap-CSFallbackIndicator.o \ - S1ap-CSG-Id.o \ - S1ap-CSG-IdList.o \ - S1ap-CSG-IdList-Item.o \ - S1ap-COUNTvalue.o \ - S1ap-CriticalityDiagnostics.o \ - S1ap-CriticalityDiagnostics-IE-List.o \ - S1ap-CriticalityDiagnostics-IE-Item.o \ - S1ap-DataCodingScheme.o \ - S1ap-DL-Forwarding.o \ - S1ap-Direct-Forwarding-Path-Availability.o \ - S1ap-E-RABToBeModifiedListBearerModReq.o \ - S1ap-E-RABToBeModifiedItemBearerModReq.o \ - S1ap-E-RABReleaseListBearerRelComp.o \ - S1ap-E-RABReleaseItemBearerRelComp.o \ - S1ap-E-RABDataForwardingList.o \ - S1ap-E-RABDataForwardingItem.o \ - S1ap-E-RABToBeSetupListCtxtSUReq.o \ - S1ap-E-RABToBeSetupItemCtxtSUReq.o \ - S1ap-E-RABSetupListBearerSURes.o \ - S1ap-E-RABSetupItemBearerSURes.o \ - S1ap-E-RABFailedToSetupListHOReqAck.o \ - S1ap-E-RABFailedToSetupItemHOReqAck.o \ - S1ap-E-RABToBeSetupListBearerSUReq.o \ - S1ap-E-RABToBeSetupItemBearerSUReq.o \ - S1ap-E-RABAdmittedList.o \ - S1ap-E-RABAdmittedItem.o \ - S1ap-E-RABToBeSwitchedDLList.o \ - S1ap-E-RABToBeSwitchedDLItem.o \ - S1ap-E-RABToBeSwitchedULList.o \ - S1ap-E-RABToBeSwitchedULItem.o \ - S1ap-E-RABModifyListBearerModRes.o \ - S1ap-E-RABModifyItemBearerModRes.o \ - S1ap-E-RABSetupListCtxtSURes.o \ - S1ap-E-RABSetupItemCtxtSURes.o \ - S1ap-E-RABToBeSetupListHOReq.o \ - S1ap-E-RABToBeSetupItemHOReq.o \ - S1ap-ECGIList.o \ - S1ap-EmergencyAreaIDList.o \ - S1ap-EmergencyAreaID.o \ - S1ap-EmergencyAreaID-Broadcast.o \ - S1ap-EmergencyAreaID-Broadcast-Item.o \ - S1ap-CompletedCellinEAI.o \ - S1ap-CompletedCellinEAI-Item.o \ - S1ap-ENB-ID.o \ - S1ap-GERAN-Cell-ID.o \ - S1ap-Global-ENB-ID.o \ - S1ap-ENB-StatusTransfer-TransparentContainer.o \ - S1ap-ENB-UE-S1AP-ID.o \ - S1ap-ENBname.o \ - S1ap-ENBX2TLAs.o \ - S1ap-EncryptionAlgorithms.o \ - S1ap-EPLMNs.o \ - S1ap-EventType.o \ - S1ap-E-RAB-ID.o \ - S1ap-E-RABInformationList.o \ - S1ap-E-RABInformationListItem.o \ - S1ap-E-RABList.o \ - S1ap-E-RABItem.o \ - S1ap-E-RABLevelQoSParameters.o \ - S1ap-EUTRAN-CGI.o \ - S1ap-ExtendedRNC-ID.o \ - S1ap-ForbiddenInterRATs.o \ - S1ap-ForbiddenTAs.o \ - S1ap-ForbiddenTAs-Item.o \ - S1ap-ForbiddenTACs.o \ - S1ap-ForbiddenLAs.o \ - S1ap-ForbiddenLAs-Item.o \ - S1ap-ForbiddenLACs.o \ - S1ap-GBR-QosInformation.o \ - S1ap-GTP-TEID.o \ - S1ap-GUMMEI.o \ - S1ap-HandoverRestrictionList.o \ - S1ap-HandoverType.o \ - S1ap-HFN.o \ - S1ap-Inter-SystemInformationTransferType.o \ - S1ap-IMSI.o \ - S1ap-IntegrityProtectionAlgorithms.o \ - S1ap-InterfacesToTrace.o \ - S1ap-LAC.o \ - S1ap-LAI.o \ - S1ap-LastVisitedCell-Item.o \ - S1ap-LastVisitedEUTRANCellInformation.o \ - S1ap-LastVisitedUTRANCellInformation.o \ - S1ap-LastVisitedGERANCellInformation.o \ - S1ap-L3-Information.o \ - S1ap-MessageIdentifier.o \ - S1ap-MMEname.o \ - S1ap-MME-Group-ID.o \ - S1ap-MME-Code.o \ - S1ap-MME-UE-S1AP-ID.o \ - S1ap-M-TMSI.o \ - S1ap-MSClassmark2.o \ - S1ap-MSClassmark3.o \ - S1ap-NAS-PDU.o \ - S1ap-NASSecurityParametersfromE-UTRAN.o \ - S1ap-NASSecurityParameterstoE-UTRAN.o \ - S1ap-NumberofBroadcastRequest.o \ - S1ap-NumberOfBroadcasts.o \ - S1ap-OldBSS-ToNewBSS-Information.o \ - S1ap-OverloadAction.o \ - S1ap-OverloadResponse.o \ - S1ap-PagingDRX.o \ - S1ap-PDCP-SN.o \ - S1ap-PLMNidentity.o \ - S1ap-Pre-emptionCapability.o \ - S1ap-Pre-emptionVulnerability.o \ - S1ap-PriorityLevel.o \ - S1ap-QCI.o \ - S1ap-ReceiveStatusofULPDCPSDUs.o \ - S1ap-RelativeMMECapacity.o \ - S1ap-RAC.o \ - S1ap-RequestType.o \ - S1ap-ResetType.o \ - S1ap-ResetAll.o \ - S1ap-RIMTransfer.o \ - S1ap-RIMInformation.o \ - S1ap-RIMRoutingAddress.o \ - S1ap-ReportArea.o \ - S1ap-RepetitionPeriod.o \ - S1ap-RNC-ID.o \ - S1ap-RRC-Container.o \ - S1ap-RRC-Establishment-Cause.o \ - S1ap-SecurityKey.o \ - S1ap-SecurityContext.o \ - S1ap-SerialNumber.o \ - S1ap-SONInformation.o \ - S1ap-SONInformationRequest.o \ - S1ap-SONInformationReply.o \ - S1ap-SONConfigurationTransfer.o \ - S1ap-Source-ToTarget-TransparentContainer.o \ - S1ap-SourceBSS-ToTargetBSS-TransparentContainer.o \ - S1ap-SourceeNB-ID.o \ - S1ap-SRVCCOperationPossible.o \ - S1ap-SRVCCHOIndication.o \ - S1ap-SourceeNB-ToTargeteNB-TransparentContainer.o \ - S1ap-SourceRNC-ToTargetRNC-TransparentContainer.o \ - S1ap-ServedGUMMEIs.o \ - S1ap-ServedGUMMEIsItem.o \ - S1ap-ServedGroupIDs.o \ - S1ap-ServedMMECs.o \ - S1ap-ServedPLMNs.o \ - S1ap-SubscriberProfileIDforRFP.o \ - S1ap-SupportedTAs.o \ - S1ap-SupportedTAs-Item.o \ - S1ap-S-TMSI.o \ - S1ap-TAC.o \ - S1ap-TAIListforWarning.o \ - S1ap-TAIList.o \ - S1ap-TAIItem.o \ - S1ap-TAI.o \ - S1ap-TAI-Broadcast.o \ - S1ap-TAI-Broadcast-Item.o \ - S1ap-CompletedCellinTAI.o \ - S1ap-CompletedCellinTAI-Item.o \ - S1ap-TBCD-STRING.o \ - S1ap-TargetID.o \ - S1ap-TargeteNB-ID.o \ - S1ap-TargetRNC-ID.o \ - S1ap-TargeteNB-ToSourceeNB-TransparentContainer.o \ - S1ap-Target-ToSource-TransparentContainer.o \ - S1ap-TargetRNC-ToSourceRNC-TransparentContainer.o \ - S1ap-TargetBSS-ToSourceBSS-TransparentContainer.o \ - S1ap-TimeToWait.o \ - S1ap-Time-UE-StayedInCell.o \ - S1ap-TransportLayerAddress.o \ - S1ap-TraceActivation.o \ - S1ap-TraceDepth.o \ - S1ap-E-UTRAN-Trace-ID.o \ - S1ap-TypeOfError.o \ - S1ap-UEAggregateMaximumBitrate.o \ - S1ap-UE-S1AP-IDs.o \ - S1ap-UE-S1AP-ID-pair.o \ - S1ap-UE-associatedLogicalS1-ConnectionListRes.o \ - S1ap-UE-associatedLogicalS1-ConnectionListResAck.o \ - S1ap-UE-associatedLogicalS1-ConnectionItem.o \ - S1ap-UEIdentityIndexValue.o \ - S1ap-UE-HistoryInformation.o \ - S1ap-UEPagingID.o \ - S1ap-UERadioCapability.o \ - S1ap-UESecurityCapabilities.o \ - S1ap-WarningAreaList.o \ - S1ap-WarningType.o \ - S1ap-WarningSecurityInfo.o \ - S1ap-WarningMessageContents.o \ - S1ap-X2TNLConfigurationInfo.o \ - S1AP-PDU.o \ - S1ap-InitiatingMessage.o \ - S1ap-SuccessfulOutcome.o \ - S1ap-UnsuccessfulOutcome.o \ - S1ap-HandoverRequired.o \ - S1ap-HandoverCommand.o \ - S1ap-HandoverPreparationFailure.o \ - S1ap-HandoverRequest.o \ - S1ap-HandoverRequestAcknowledge.o \ - S1ap-HandoverFailure.o \ - S1ap-HandoverNotify.o \ - S1ap-PathSwitchRequest.o \ - S1ap-PathSwitchRequestAcknowledge.o \ - S1ap-PathSwitchRequestFailure.o \ - S1ap-E-RABSetupRequest.o \ - S1ap-E-RABSetupResponse.o \ - S1ap-E-RABModifyRequest.o \ - S1ap-E-RABModifyResponse.o \ - S1ap-E-RABReleaseIndication.o \ - S1ap-E-RABReleaseCommand.o \ - S1ap-E-RABReleaseResponse.o \ - S1ap-InitialContextSetupRequest.o \ - S1ap-InitialContextSetupResponse.o \ - S1ap-InitialContextSetupFailure.o \ - S1ap-UEContextReleaseRequest.o \ - S1ap-Paging.o \ - S1ap-DownlinkNASTransport.o \ - S1ap-InitialUEMessage.o \ - S1ap-UplinkNASTransport.o \ - S1ap-NASNonDeliveryIndication.o \ - S1ap-HandoverCancel.o \ - S1ap-HandoverCancelAcknowledge.o \ - S1ap-Reset.o \ - S1ap-ResetAcknowledge.o \ - S1ap-S1SetupResponse.o \ - S1ap-S1SetupRequest.o \ - S1ap-S1SetupFailure.o \ - S1ap-ErrorIndication.o \ - S1ap-ENBConfigurationUpdate.o \ - S1ap-ENBConfigurationUpdateAcknowledge.o \ - S1ap-ENBConfigurationUpdateFailure.o \ - S1ap-MMEConfigurationUpdate.o \ - S1ap-MMEConfigurationUpdateAcknowledge.o \ - S1ap-MMEConfigurationUpdateFailure.o \ - S1ap-DownlinkS1cdma2000tunneling.o \ - S1ap-UplinkS1cdma2000tunneling.o \ - S1ap-UEContextModificationRequest.o \ - S1ap-UEContextModificationResponse.o \ - S1ap-UEContextModificationFailure.o \ - S1ap-UECapabilityInfoIndication.o \ - S1ap-UEContextReleaseCommand.o \ - S1ap-UEContextReleaseComplete.o \ - S1ap-ENBStatusTransfer.o \ - S1ap-MMEStatusTransfer.o \ - S1ap-DeactivateTrace.o \ - S1ap-TraceStart.o \ - S1ap-TraceFailureIndication.o \ - S1ap-CellTrafficTrace.o \ - S1ap-LocationReportingControl.o \ - S1ap-LocationReportingFailureIndication.o \ - S1ap-LocationReport.o \ - S1ap-OverloadStart.o \ - S1ap-OverloadStop.o \ - S1ap-WriteReplaceWarningRequest.o \ - S1ap-WriteReplaceWarningResponse.o \ - S1ap-ENBDirectInformationTransfer.o \ - S1ap-MMEDirectInformationTransfer.o \ - S1ap-ENBConfigurationTransfer.o \ - S1ap-MMEConfigurationTransfer.o \ - S1ap-PrivateMessage.o \ - S1ap-IE.o - -S1AP_ASN_MODULE_HEADERS= \ - S1ap-Criticality.h \ - S1ap-Presence.h \ - S1ap-PrivateIE-ID.h \ - S1ap-ProcedureCode.h \ - S1ap-ProtocolExtensionID.h \ - S1ap-ProtocolIE-ID.h \ - S1ap-TriggeringMessage.h \ - S1ap-IE-Extensions.h \ - S1ap-AllocationAndRetentionPriority.h \ - S1ap-Bearers-SubjectToStatusTransfer-List.h \ - S1ap-Bearers-SubjectToStatusTransfer-Item.h \ - S1ap-BitRate.h \ - S1ap-BPLMNs.h \ - S1ap-BroadcastCompletedAreaList.h \ - S1ap-Cause.h \ - S1ap-CauseMisc.h \ - S1ap-CauseProtocol.h \ - S1ap-CauseRadioNetwork.h \ - S1ap-CauseTransport.h \ - S1ap-CauseNas.h \ - S1ap-CellIdentity.h \ - S1ap-CellID-Broadcast.h \ - S1ap-CellID-Broadcast-Item.h \ - S1ap-Cdma2000PDU.h \ - S1ap-Cdma2000RATType.h \ - S1ap-Cdma2000SectorID.h \ - S1ap-Cdma2000HOStatus.h \ - S1ap-Cdma2000HORequiredIndication.h \ - S1ap-Cdma2000OneXSRVCCInfo.h \ - S1ap-Cdma2000OneXMEID.h \ - S1ap-Cdma2000OneXMSI.h \ - S1ap-Cdma2000OneXPilot.h \ - S1ap-Cdma2000OneXRAND.h \ - S1ap-Cell-Size.h \ - S1ap-CellType.h \ - S1ap-CGI.h \ - S1ap-CI.h \ - S1ap-CNDomain.h \ - S1ap-CSFallbackIndicator.h \ - S1ap-CSG-Id.h \ - S1ap-CSG-IdList.h \ - S1ap-CSG-IdList-Item.h \ - S1ap-COUNTvalue.h \ - S1ap-CriticalityDiagnostics.h \ - S1ap-CriticalityDiagnostics-IE-List.h \ - S1ap-CriticalityDiagnostics-IE-Item.h \ - S1ap-DataCodingScheme.h \ - S1ap-DL-Forwarding.h \ - S1ap-Direct-Forwarding-Path-Availability.h \ - S1ap-E-RABToBeModifiedListBearerModReq.h \ - S1ap-E-RABToBeModifiedItemBearerModReqIEs.h \ - S1ap-E-RABToBeModifiedItemBearerModReq.h \ - S1ap-E-RABReleaseListBearerRelComp.h \ - S1ap-E-RABReleaseItemBearerRelCompIEs.h \ - S1ap-E-RABReleaseItemBearerRelComp.h \ - S1ap-E-RABSubjecttoDataForwardingList.h \ - S1ap-E-RABDataForwardingList.h \ - S1ap-E-RABDataForwardingItemIEs.h \ - S1ap-E-RABDataForwardingItem.h \ - S1ap-E-RABToBeSetupListCtxtSUReq.h \ - S1ap-E-RABToBeSetupItemCtxtSUReqIEs.h \ - S1ap-E-RABToBeSetupItemCtxtSUReq.h \ - S1ap-E-RABSetupListBearerSURes.h \ - S1ap-E-RABSetupItemBearerSUResIEs.h \ - S1ap-E-RABSetupItemBearerSURes.h \ - S1ap-E-RABFailedToSetupListHOReqAck.h \ - S1ap-E-RABFailedToSetupItemHOReqAckIEs.h \ - S1ap-E-RABFailedToSetupItemHOReqAck.h \ - S1ap-E-RABToBeSetupListBearerSUReq.h \ - S1ap-E-RABToBeSetupItemBearerSUReqIEs.h \ - S1ap-E-RABToBeSetupItemBearerSUReq.h \ - S1ap-E-RABAdmittedList.h \ - S1ap-E-RABAdmittedItemIEs.h \ - S1ap-E-RABAdmittedItem.h \ - S1ap-E-RABToBeSwitchedDLList.h \ - S1ap-E-RABToBeSwitchedDLListIEs.h \ - S1ap-E-RABToBeSwitchedDLItem.h \ - S1ap-E-RABToBeSwitchedULList.h \ - S1ap-E-RABToBeSwitchedULItemIEs.h \ - S1ap-E-RABToBeSwitchedULItem.h \ - S1ap-E-RABModifyListBearerModRes.h \ - S1ap-E-RABModifyItemBearerModResIEs.h \ - S1ap-E-RABModifyItemBearerModRes.h \ - S1ap-E-RABSetupListCtxtSURes.h \ - S1ap-E-RABSetupListCtxtSUResIEs.h \ - S1ap-E-RABSetupItemCtxtSURes.h \ - S1ap-E-RABToBeSetupListHOReq.h \ - S1ap-E-RABToBeSetupListHOReqIEs.h \ - S1ap-E-RABToBeSetupItemHOReq.h \ - S1ap-ECGIList.h \ - S1ap-EmergencyAreaIDList.h \ - S1ap-EmergencyAreaID.h \ - S1ap-EmergencyAreaID-Broadcast.h \ - S1ap-EmergencyAreaID-Broadcast-Item.h \ - S1ap-CompletedCellinEAI.h \ - S1ap-CompletedCellinEAI-Item.h \ - S1ap-ENB-ID.h \ - S1ap-GERAN-Cell-ID.h \ - S1ap-Global-ENB-ID.h \ - S1ap-ENB-StatusTransfer-TransparentContainer.h \ - S1ap-ENB-UE-S1AP-ID.h \ - S1ap-ENBname.h \ - S1ap-ENBX2TLAs.h \ - S1ap-EncryptionAlgorithms.h \ - S1ap-EPLMNs.h \ - S1ap-EventType.h \ - S1ap-E-RAB-ID.h \ - S1ap-E-RABInformationList.h \ - S1ap-E-RABInformationListItem.h \ - S1ap-E-RABList.h \ - S1ap-E-RABItem.h \ - S1ap-E-RABLevelQoSParameters.h \ - S1ap-EUTRAN-CGI.h \ - S1ap-ExtendedRNC-ID.h \ - S1ap-ForbiddenInterRATs.h \ - S1ap-ForbiddenTAs.h \ - S1ap-ForbiddenTAs-Item.h \ - S1ap-ForbiddenTACs.h \ - S1ap-ForbiddenLAs.h \ - S1ap-ForbiddenLAs-Item.h \ - S1ap-ForbiddenLACs.h \ - S1ap-GBR-QosInformation.h \ - S1ap-GTP-TEID.h \ - S1ap-GUMMEI.h \ - S1ap-HandoverRestrictionList.h \ - S1ap-HandoverType.h \ - S1ap-HFN.h \ - S1ap-HandoverNotify.h \ - S1ap-Inter-SystemInformationTransferType.h \ - S1ap-IMSI.h \ - S1ap-IntegrityProtectionAlgorithms.h \ - S1ap-InterfacesToTrace.h \ - S1ap-LAC.h \ - S1ap-LAI.h \ - S1ap-LastVisitedCell-Item.h \ - S1ap-LastVisitedEUTRANCellInformation.h \ - S1ap-LastVisitedUTRANCellInformation.h \ - S1ap-LastVisitedGERANCellInformation.h \ - S1ap-L3-Information.h \ - S1ap-MessageIdentifier.h \ - S1ap-MMEname.h \ - S1ap-MME-Group-ID.h \ - S1ap-MME-Code.h \ - S1ap-MME-UE-S1AP-ID.h \ - S1ap-M-TMSI.h \ - S1ap-MSClassmark2.h \ - S1ap-MSClassmark3.h \ - S1ap-NAS-PDU.h \ - S1ap-NASSecurityParametersfromE-UTRAN.h \ - S1ap-NASSecurityParameterstoE-UTRAN.h \ - S1ap-NumberofBroadcastRequest.h \ - S1ap-NumberOfBroadcasts.h \ - S1ap-OldBSS-ToNewBSS-Information.h \ - S1ap-OverloadAction.h \ - S1ap-OverloadResponse.h \ - S1ap-PagingDRX.h \ - S1ap-PDCP-SN.h \ - S1ap-PLMNidentity.h \ - S1ap-Pre-emptionCapability.h \ - S1ap-Pre-emptionVulnerability.h \ - S1ap-PriorityLevel.h \ - S1ap-QCI.h \ - S1ap-ReceiveStatusofULPDCPSDUs.h \ - S1ap-RelativeMMECapacity.h \ - S1ap-RAC.h \ - S1ap-RequestType.h \ - S1ap-ResetType.h \ - S1ap-ResetAll.h \ - S1ap-RIMTransfer.h \ - S1ap-RIMInformation.h \ - S1ap-RIMRoutingAddress.h \ - S1ap-ReportArea.h \ - S1ap-RepetitionPeriod.h \ - S1ap-RNC-ID.h \ - S1ap-RRC-Container.h \ - S1ap-RRC-Establishment-Cause.h \ - S1ap-SecurityKey.h \ - S1ap-SecurityContext.h \ - S1ap-SerialNumber.h \ - S1ap-SONInformation.h \ - S1ap-SONInformationRequest.h \ - S1ap-SONInformationReply.h \ - S1ap-SONConfigurationTransfer.h \ - S1ap-Source-ToTarget-TransparentContainer.h \ - S1ap-SourceBSS-ToTargetBSS-TransparentContainer.h \ - S1ap-SourceeNB-ID.h \ - S1ap-SRVCCOperationPossible.h \ - S1ap-SRVCCHOIndication.h \ - S1ap-SourceeNB-ToTargeteNB-TransparentContainer.h \ - S1ap-SourceRNC-ToTargetRNC-TransparentContainer.h \ - S1ap-ServedGUMMEIs.h \ - S1ap-ServedGUMMEIsItem.h \ - S1ap-ServedGroupIDs.h \ - S1ap-ServedMMECs.h \ - S1ap-ServedPLMNs.h \ - S1ap-SubscriberProfileIDforRFP.h \ - S1ap-SupportedTAs.h \ - S1ap-SupportedTAs-Item.h \ - S1ap-S-TMSI.h \ - S1ap-TAC.h \ - S1ap-TAIListforWarning.h \ - S1ap-TAIList.h \ - S1ap-TAIItem.h \ - S1ap-TAI.h \ - S1ap-TAI-Broadcast.h \ - S1ap-TAI-Broadcast-Item.h \ - S1ap-CompletedCellinTAI.h \ - S1ap-CompletedCellinTAI-Item.h \ - S1ap-TBCD-STRING.h \ - S1ap-TargetID.h \ - S1ap-TargeteNB-ID.h \ - S1ap-TargetRNC-ID.h \ - S1ap-TargeteNB-ToSourceeNB-TransparentContainer.h \ - S1ap-Target-ToSource-TransparentContainer.h \ - S1ap-TargetRNC-ToSourceRNC-TransparentContainer.h \ - S1ap-TargetBSS-ToSourceBSS-TransparentContainer.h \ - S1ap-TimeToWait.h \ - S1ap-Time-UE-StayedInCell.h \ - S1ap-TransportLayerAddress.h \ - S1ap-TraceActivation.h \ - S1ap-TraceDepth.h \ - S1ap-E-UTRAN-Trace-ID.h \ - S1ap-TypeOfError.h \ - S1ap-UEAggregateMaximumBitrate.h \ - S1ap-UE-S1AP-IDs.h \ - S1ap-UE-S1AP-ID-pair.h \ - S1ap-UE-associatedLogicalS1-ConnectionListRes.h \ - S1ap-UE-associatedLogicalS1-ConnectionListResAck.h \ - S1ap-UE-associatedLogicalS1-ConnectionItem.h \ - S1ap-UEIdentityIndexValue.h \ - S1ap-UE-HistoryInformation.h \ - S1ap-UEPagingID.h \ - S1ap-UERadioCapability.h \ - S1ap-UESecurityCapabilities.h \ - S1ap-WarningAreaList.h \ - S1ap-WarningType.h \ - S1ap-WarningSecurityInfo.h \ - S1ap-WarningMessageContents.h \ - S1ap-X2TNLConfigurationInfo.h \ - S1AP-PDU.h \ - S1ap-InitiatingMessage.h \ - S1ap-SuccessfulOutcome.h \ - S1ap-UnsuccessfulOutcome.h \ - S1ap-HandoverRequired.h \ - S1ap-HandoverCommand.h \ - S1ap-HandoverPreparationFailure.h \ - S1ap-HandoverRequest.h \ - S1ap-HandoverRequestAcknowledge.h \ - S1ap-HandoverFailure.h \ - S1ap-HandoverNotify.h \ - S1ap-PathSwitchRequest.h \ - S1ap-PathSwitchRequestAcknowledge.h \ - S1ap-PathSwitchRequestFailure.h \ - S1ap-E-RABSetupRequest.h \ - S1ap-E-RABSetupResponse.h \ - S1ap-E-RABModifyRequest.h \ - S1ap-E-RABModifyResponse.h \ - S1ap-E-RABReleaseIndication.h \ - S1ap-E-RABReleaseCommand.h \ - S1ap-E-RABReleaseResponse.h \ - S1ap-InitialContextSetupRequest.h \ - S1ap-InitialContextSetupResponse.h \ - S1ap-InitialContextSetupFailure.h \ - S1ap-UEContextReleaseRequest.h \ - S1ap-Paging.h \ - S1ap-DownlinkNASTransport.h \ - S1ap-InitialUEMessage.h \ - S1ap-UplinkNASTransport.h \ - S1ap-NASNonDeliveryIndication.h \ - S1ap-HandoverCancel.h \ - S1ap-HandoverCancelAcknowledge.h \ - S1ap-Reset.h \ - S1ap-ResetAcknowledge.h \ - S1ap-S1SetupResponse.h \ - S1ap-S1SetupRequest.h \ - S1ap-S1SetupFailure.h \ - S1ap-ErrorIndication.h \ - S1ap-ENBConfigurationUpdate.h \ - S1ap-ENBConfigurationUpdateAcknowledge.h \ - S1ap-ENBConfigurationUpdateFailure.h \ - S1ap-MMEConfigurationUpdate.h \ - S1ap-MMEConfigurationUpdateAcknowledge.h \ - S1ap-MMEConfigurationUpdateFailure.h \ - S1ap-DownlinkS1cdma2000tunneling.h \ - S1ap-UplinkS1cdma2000tunneling.h \ - S1ap-UEContextModificationRequest.h \ - S1ap-UEContextModificationResponse.h \ - S1ap-UEContextModificationFailure.h \ - S1ap-UECapabilityInfoIndication.h \ - S1ap-UEContextReleaseCommand.h \ - S1ap-UEContextReleaseComplete.h \ - S1ap-ENBStatusTransfer.h \ - S1ap-MMEStatusTransfer.h \ - S1ap-DeactivateTrace.h \ - S1ap-TraceStart.h \ - S1ap-TraceFailureIndication.h \ - S1ap-CellTrafficTrace.h \ - S1ap-LocationReportingControl.h \ - S1ap-LocationReportingFailureIndication.h \ - S1ap-LocationReport.h \ - S1ap-OverloadStart.h \ - S1ap-OverloadStop.h \ - S1ap-WriteReplaceWarningRequest.h \ - S1ap-WriteReplaceWarningResponse.h \ - S1ap-ENBDirectInformationTransfer.h \ - S1ap-MMEDirectInformationTransfer.h \ - S1ap-ENBConfigurationTransfer.h \ - S1ap-MMEConfigurationTransfer.h \ - S1ap-PrivateMessage.h \ - S1ap-IE.h - -S1AP_ASN_MODULE_SOURCES_R9 = \ - S1ap-KillResponse.o \ - S1ap-KillRequest.o \ - S1ap-Data-Forwarding-Not-Possible.o \ - S1ap-DownlinkUEAssociatedLPPaTransport.o \ - S1ap-UplinkUEAssociatedLPPaTransport.o \ - S1ap-DownlinkNonUEAssociatedLPPaTransport.o \ - S1ap-UplinkNonUEAssociatedLPPaTransport.o \ - S1ap-TAI-Cancelled.o \ - S1ap-TAI-Cancelled-Item.o \ - S1ap-StratumLevel.o \ - S1ap-SynchronizationStatus.o \ - S1ap-TimeSynchronizationInfo.o \ - S1ap-Routing-ID.o \ - S1ap-PS-ServiceNotAvailable.o \ - S1ap-LPPa-PDU.o \ - S1ap-ExtendedRepetitionPeriod.o \ - S1ap-EUTRANRoundTripDelayEstimationInfo.o \ - S1ap-EmergencyAreaID-Cancelled.o \ - S1ap-EmergencyAreaID-Cancelled-Item.o \ - S1ap-CSGMembershipStatus.o \ - S1ap-ConcurrentWarningMessageIndicator.o \ - S1ap-CellID-Cancelled.o \ - S1ap-CellID-Cancelled-Item.o \ - S1ap-CellAccessMode.o \ - S1ap-CancelledCellinEAI.o \ - S1ap-CancelledCellinEAI-Item.o \ - S1ap-CancelledCellinTAI.o \ - S1ap-CancelledCellinTAI-Item.o \ - S1ap-BroadcastCancelledAreaList.o - -S1AP_ASN_MODULE_HEADERS_R9 = \ - S1ap-BroadcastCancelledAreaList.h \ - S1ap-CancelledCellinEAI.h \ - S1ap-CancelledCellinEAI-Item.h \ - S1ap-CancelledCellinTAI.h \ - S1ap-CancelledCellinTAI-Item.h \ - S1ap-CellAccessMode.h \ - S1ap-CellID-Cancelled.h \ - S1ap-CellID-Cancelled-Item.h \ - S1ap-ConcurrentWarningMessageIndicator.h \ - S1ap-CSGMembershipStatus.h \ - S1ap-Data-Forwarding-Not-Possible.h \ - S1ap-EmergencyAreaID-Cancelled.h \ - S1ap-EmergencyAreaID-Cancelled-Item.h \ - S1ap-E-RABList.h \ - S1ap-EUTRANRoundTripDelayEstimationInfo.h \ - S1ap-ExtendedRepetitionPeriod.h \ - S1ap-LPPa-PDU.h \ - S1ap-PS-ServiceNotAvailable.h \ - S1ap-Routing-ID.h \ - S1ap-StratumLevel.h \ - S1ap-SynchronizationStatus.h \ - S1ap-TimeSynchronizationInfo.h \ - S1ap-TAI-Cancelled.h \ - S1ap-TAI-Cancelled-Item.h \ - S1ap-KillResponse.h \ - S1ap-KillRequest.h \ - S1ap-DownlinkUEAssociatedLPPaTransport.h \ - S1ap-UplinkUEAssociatedLPPaTransport.h \ - S1ap-DownlinkNonUEAssociatedLPPaTransport.h \ - S1ap-UplinkNonUEAssociatedLPPaTransport.h - -S1AP_ASN_MODULE_SOURCES_R10 = \ - S1ap-PagingPriority.o \ - S1ap-RelayNode-Indicator.o \ - S1ap-GWContextReleaseIndication.o \ - S1ap-MMERelaySupportIndicator.o \ - S1ap-ManagementBasedMDTAllowed.o \ - S1ap-PrivacyIndicator.o \ - S1ap-TrafficLoadReductionIndication.o \ - S1ap-GUMMEIList.o - -S1AP_ASN_MODULE_HEADERS_R10 = \ - S1ap-PagingPriority.h \ - S1ap-RelayNode-Indicator.h \ - S1ap-GWContextReleaseIndication.h \ - S1ap-MMERelaySupportIndicator.h \ - S1ap-ManagementBasedMDTAllowed.h \ - S1ap-PrivacyIndicator.h \ - S1ap-TrafficLoadReductionIndication.h \ - S1ap-GUMMEIList.h - -S1AP_ASN_MODULE_HEADERS+=ANY.h -S1AP_ASN_MODULE_SOURCES+=ANY.o -S1AP_ASN_MODULE_HEADERS+=BOOLEAN.h -S1AP_ASN_MODULE_SOURCES+=BOOLEAN.o -S1AP_ASN_MODULE_HEADERS+=INTEGER.h -S1AP_ASN_MODULE_HEADERS+=NativeEnumerated.h -S1AP_ASN_MODULE_SOURCES+=INTEGER.o -S1AP_ASN_MODULE_HEADERS+=NULL.h -S1AP_ASN_MODULE_SOURCES+=NULL.o -S1AP_ASN_MODULE_SOURCES+=NativeEnumerated.o -S1AP_ASN_MODULE_HEADERS+=NativeInteger.h -S1AP_ASN_MODULE_SOURCES+=NativeInteger.o -S1AP_ASN_MODULE_HEADERS+=OBJECT_IDENTIFIER.h -S1AP_ASN_MODULE_SOURCES+=OBJECT_IDENTIFIER.o -S1AP_ASN_MODULE_HEADERS+=PrintableString.h -S1AP_ASN_MODULE_SOURCES+=PrintableString.o -S1AP_ASN_MODULE_HEADERS+=asn_SEQUENCE_OF.h -S1AP_ASN_MODULE_SOURCES+=asn_SEQUENCE_OF.o -S1AP_ASN_MODULE_HEADERS+=asn_SET_OF.h -S1AP_ASN_MODULE_SOURCES+=asn_SET_OF.o -S1AP_ASN_MODULE_HEADERS+=constr_CHOICE.h -S1AP_ASN_MODULE_SOURCES+=constr_CHOICE.o -S1AP_ASN_MODULE_HEADERS+=constr_SEQUENCE.h -S1AP_ASN_MODULE_SOURCES+=constr_SEQUENCE.o -S1AP_ASN_MODULE_HEADERS+=constr_SEQUENCE_OF.h -S1AP_ASN_MODULE_SOURCES+=constr_SEQUENCE_OF.o -S1AP_ASN_MODULE_HEADERS+=constr_SET_OF.h -S1AP_ASN_MODULE_SOURCES+=constr_SET_OF.o -S1AP_ASN_MODULE_HEADERS+=asn_application.h -S1AP_ASN_MODULE_HEADERS+=asn_system.h -S1AP_ASN_MODULE_HEADERS+=asn_codecs.h -S1AP_ASN_MODULE_HEADERS+=asn_internal.h -S1AP_ASN_MODULE_HEADERS+=OCTET_STRING.h -S1AP_ASN_MODULE_SOURCES+=OCTET_STRING.o -S1AP_ASN_MODULE_HEADERS+=BIT_STRING.h -S1AP_ASN_MODULE_SOURCES+=BIT_STRING.o -S1AP_ASN_MODULE_SOURCES+=asn_codecs_prim.o -S1AP_ASN_MODULE_HEADERS+=asn_codecs_prim.h -S1AP_ASN_MODULE_HEADERS+=ber_tlv_length.h -S1AP_ASN_MODULE_SOURCES+=ber_tlv_length.o -S1AP_ASN_MODULE_HEADERS+=ber_tlv_tag.h -S1AP_ASN_MODULE_SOURCES+=ber_tlv_tag.o -S1AP_ASN_MODULE_HEADERS+=ber_decoder.h -S1AP_ASN_MODULE_SOURCES+=ber_decoder.o -S1AP_ASN_MODULE_HEADERS+=der_encoder.h -S1AP_ASN_MODULE_SOURCES+=der_encoder.o -S1AP_ASN_MODULE_HEADERS+=constr_TYPE.h -S1AP_ASN_MODULE_SOURCES+=constr_TYPE.o -S1AP_ASN_MODULE_HEADERS+=constraints.h -S1AP_ASN_MODULE_SOURCES+=constraints.o -S1AP_ASN_MODULE_HEADERS+=xer_support.h -S1AP_ASN_MODULE_SOURCES+=xer_support.o -S1AP_ASN_MODULE_HEADERS+=xer_decoder.h -S1AP_ASN_MODULE_SOURCES+=xer_decoder.o -S1AP_ASN_MODULE_HEADERS+=xer_encoder.h -S1AP_ASN_MODULE_SOURCES+=xer_encoder.o -S1AP_ASN_MODULE_HEADERS+=per_support.h -S1AP_ASN_MODULE_SOURCES+=per_support.o -S1AP_ASN_MODULE_HEADERS+=per_decoder.h -S1AP_ASN_MODULE_SOURCES+=per_decoder.o -S1AP_ASN_MODULE_HEADERS+=per_encoder.h -S1AP_ASN_MODULE_SOURCES+=per_encoder.o -S1AP_ASN_MODULE_HEADERS+=per_opentype.h -S1AP_ASN_MODULE_SOURCES+=per_opentype.o \ No newline at end of file diff --git a/openair-cn/S1AP/Makefile.am b/openair-cn/S1AP/Makefile.am deleted file mode 100644 index b957c18137..0000000000 --- a/openair-cn/S1AP/Makefile.am +++ /dev/null @@ -1,70 +0,0 @@ -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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 . -# -# Contact Information -# OpenAirInterface Admin: openair_admin@eurecom.fr -# OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr -# -# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. -# -################################################################################ -SUBDIRS = ./MESSAGES/ . - -AM_CFLAGS = \ - @ADD_CFLAGS@ \ - -I$(top_srcdir)/COMMON \ - -I$(top_builddir)/S1AP \ - -I$(top_builddir)/S1AP/MESSAGES \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/api/network \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/include \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/ies \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/emm/msg \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/esm/msg \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/util \ - -I$(top_srcdir)/INTERTASK_INTERFACE \ - -I$(top_srcdir)/SCTP \ - -I$(top_srcdir)/UTILS \ - -DEMIT_ASN_DEBUG_EXTERN - -noinst_LTLIBRARIES = libs1ap.la -libs1ap_la_LDFLAGS = -all-static -libs1ap_la_LIBADD = ./MESSAGES/libs1apmessages.la - -libs1ap_la_SOURCES = \ - s1ap_common.h s1ap_common.c \ - s1ap_mme_encoder.h s1ap_mme_encoder.c \ - s1ap_mme_decoder.h s1ap_mme_decoder.c \ - s1ap_mme_handlers.h s1ap_mme_handlers.c \ - s1ap_mme_nas_procedures.c s1ap_mme_nas_procedures.h \ - s1ap_mme.h s1ap_mme.c \ - s1ap_mme_itti_messaging.c s1ap_mme_itti_messaging.h \ - s1ap_mme_retransmission.c s1ap_mme_retransmission.h \ - s1ap_mme_ta.c s1ap_mme_ta.h \ - $(top_builddir)/S1AP/s1ap_decoder.c \ - $(top_builddir)/S1AP/s1ap_encoder.c \ - $(top_builddir)/S1AP/s1ap_xer_print.c \ - $(top_builddir)/S1AP/s1ap_ies_defs.h - -clean-local: - rm -f $(top_builddir)/S1AP/s1ap_ies_defs.h - rm -f $(top_builddir)/S1AP/s1ap_decoder.c - rm -f $(top_builddir)/S1AP/s1ap_encoder.c - rm -f $(top_builddir)/S1AP/s1ap_xer_print.c diff --git a/openair-cn/S1AP/Makefile.eNB b/openair-cn/S1AP/Makefile.eNB deleted file mode 100644 index 4547fdbaea..0000000000 --- a/openair-cn/S1AP/Makefile.eNB +++ /dev/null @@ -1,163 +0,0 @@ -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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 . -# -# Contact Information -# OpenAirInterface Admin: openair_admin@eurecom.fr -# OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr -# -# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. -# -################################################################################ -# include $(OPENAIR_TARGETS)/SIMU/USER/Makerules - -OUTDIR = $(S1AP_DIR)/enb_objs - -ASN1MESSAGESDIR=$(S1AP_DIR)/MESSAGES -ASN1DIR=$(ASN1MESSAGESDIR)/ASN1 - -ifeq ($(USE_MME), R10) - ASN1RELDIR=R10.5 - UPDATE_RELEASE_9=1 - UPDATE_RELEASE_10=1 - ADD_CFLAGS=-DUPDATE_RELEASE_9 -DUPDATE_RELEASE_10 -else - ifeq ($(USE_MME), R9) - UPDATE_RELEASE_9=1 - ASN1RELDIR=R9.8 - ADD_CFLAGS=-DUPDATE_RELEASE_9 - else - ASN1RELDIR=R8.10 - endif -endif - -include $(ASN1MESSAGESDIR)/Makefile.inc - -libs1ap_OBJECTS = \ - s1ap_common.o \ - s1ap_eNB.o \ - s1ap_eNB_context_management_procedures.o \ - s1ap_eNB_decoder.o \ - s1ap_eNB_encoder.o \ - s1ap_eNB_handlers.o \ - s1ap_eNB_itti_messaging.o \ - s1ap_eNB_management_procedures.o \ - s1ap_eNB_nas_procedures.o \ - s1ap_eNB_nnsf.o \ - s1ap_eNB_overload.o \ - s1ap_eNB_trace.o \ - s1ap_eNB_ue_context.o \ - $(addprefix MESSAGES/, $(S1AP_ASN_MODULE_SOURCES)) - -ifeq ($(USE_MME), R10) - libs1ap_OBJECTS += $(addprefix MESSAGES/, $(S1AP_ASN_MODULE_SOURCES_R9)) - libs1ap_OBJECTS += $(addprefix MESSAGES/, $(S1AP_ASN_MODULE_SOURCES_R10)) -else - ifeq ($(USE_MME), R9) - libs1ap_OBJECTS += $(addprefix MESSAGES/, $(S1AP_ASN_MODULE_SOURCES_R9)) - endif -endif - -# pull in dependency info for *existing* .o files --include $(OUTDIR)/*.d - -CFLAGS = \ - -Wall \ - -DENB_MODE \ - -DENABLE_USE_MME \ - -DUSER_MODE \ - -I./MESSAGES \ - -I$(OUTDIR) \ - -I../UTILS \ - $(ADD_CFLAGS) \ - -DENB_MODE \ - $(S1AP_CFLAGS) \ - -Wuninitialized \ - -Werror=implicit-function-declaration - -S1AP_GENERATED = \ - $(OUTDIR)/s1ap_encoder.o \ - $(OUTDIR)/s1ap_decoder.o \ - $(OUTDIR)/s1ap_xer_print.o - -$(OUTDIR)/%.o : %.c - @echo "Compiling $<" - @if [ ! -d $(dir $@) ]; then mkdir -p $(dir $@); fi; - @$(CC) -c $(CFLAGS) -o $@ $< - @$(CC) -MM $(CFLAGS) $< > $(basename $@).d - @mv -f $(basename $@).d $(basename $@).d.tmp - @sed -e 's|.*:|$@:|' < $(basename $@).d.tmp > $(basename $@).d - @sed -e 's/.*://' -e 's/\\$$//' < $(basename $@).d.tmp | fmt -1 | \ - sed -e 's/^ *//' -e 's/$$/:/' >> $(basename $@).d - @rm -f $(basename $@).d.tmp - -$(S1AP_GENERATED): %.o : %.c - @echo "Compiling $<" - @if [ ! -d $(dir $@) ]; then mkdir -p $(dir $@); fi; - @$(CC) -c $(CFLAGS) -o $@ $< - @$(CC) -MM $(CFLAGS) $< > $(basename $@).d - @mv -f $(basename $@).d $(basename $@).d.tmp - @sed -e 's|.*:|$@:|' < $(basename $@).d.tmp > $(basename $@).d - @sed -e 's/.*://' -e 's/\\$$//' < $(basename $@).d.tmp | fmt -1 | \ - sed -e 's/^ *//' -e 's/$$/:/' >> $(basename $@).d - @rm -f $(basename $@).d.tmp - -#$(OUTDIR)/%.c : $(OUTDIR)/s1ap_ieregen.stamp $(OUTDIR)/s1ap_asn1regen.stamp - #@if [ -f $< ] ; then touch $<; else echo "ERROR: " $< "not generated" ; exit 1 ; fi; - -$(OUTDIR)/s1ap_ieregen.stamp: $(ASN1DIR)/$(ASN1RELDIR)/S1AP-PDU-Contents.asn $(ASN1DIR)/asn1tostruct.py - @if [ ! -d $(OUTDIR) ]; then mkdir -p $(OUTDIR); fi; - @python $(ASN1DIR)/asn1tostruct.py -f$< -o$(OUTDIR) - @echo Timestamp > $@ - -$(OUTDIR)/s1ap_asn1regen.stamp: $(ASN1DIR)/$(ASN1RELDIR)/S1AP-CommonDataTypes.asn \ - $(ASN1DIR)/$(ASN1RELDIR)/S1AP-Constants.asn $(ASN1DIR)/$(ASN1RELDIR)/S1AP-IEs.asn $(ASN1DIR)/$(ASN1RELDIR)/S1AP-PDU.asn - (cd $(ASN1MESSAGESDIR) && asn1c -fhave_native64 -gen-PER $^) - @echo Timestamp > $@ - -$(OUTDIR)/libs1ap.a: $(OUTDIR)/s1ap_ieregen.stamp $(OUTDIR)/s1ap_asn1regen.stamp $(S1AP_GENERATED) $(addprefix $(OUTDIR)/,$(libs1ap_OBJECTS)) - @echo Creating S1AP archive - @$(AR) rcs $@ $(S1AP_GENERATED) $(addprefix $(OUTDIR)/,$(libs1ap_OBJECTS)) - -clean: - @$(RM_F_V) $(OUTDIR)/*.o - @$(RM_F_V) $(OUTDIR)/*.d - @$(RM_F_V) $(addprefix $(OUTDIR)/MESSAGES/, $(S1AP_ASN_MODULE_SOURCES)) - @$(RM_F_V) $(addprefix $(OUTDIR)/MESSAGES/, $(S1AP_ASN_MODULE_SOURCES_R9)) - @$(RM_F_V) $(addprefix $(OUTDIR)/MESSAGES/, $(S1AP_ASN_MODULE_SOURCES_R10)) - @$(RM_F_V) $(addprefix $(OUTDIR)/MESSAGES/, $(S1AP_ASN_MODULE_SOURCES:.o=.d)) - @$(RM_F_V) $(addprefix $(OUTDIR)/MESSAGES/, $(S1AP_ASN_MODULE_SOURCES_R9:.o=.d)) - @$(RM_F_V) $(addprefix $(OUTDIR)/MESSAGES/, $(S1AP_ASN_MODULE_SOURCES_R10:.o=.d)) - @$(RM_F_V) $(OUTDIR)/libs1ap.a - @$(RM_F_V) $(OUTDIR)/s1ap_asn1regen.stamp - @$(RM_F_V) $(OUTDIR)/s1ap_ieregen.stamp - @$(RM_F_V) $(OUTDIR)/s1ap_decoder.c $(OUTDIR)/s1ap_encoder.c - @$(RM_F_V) $(OUTDIR)/s1ap_xer_print.c $(OUTDIR)/s1ap_ies_defs.h - -cleanall: clean - @$(RM_F_V) $(addprefix $(OUTDIR)/MESSAGES/, $(S1AP_ASN_MODULE_SOURCES:.o=.c)) - @$(RM_F_V) $(addprefix $(OUTDIR)/MESSAGES/, $(S1AP_ASN_MODULE_SOURCES:.o=.h)) - @$(RM_F_V) $(addprefix $(OUTDIR)/MESSAGES/, $(S1AP_ASN_MODULE_SOURCES_R9:.o=.c)) - @$(RM_F_V) $(addprefix $(OUTDIR)/MESSAGES/, $(S1AP_ASN_MODULE_SOURCES_R9:.o=.h)) - @$(RM_F_V) $(addprefix $(OUTDIR)/MESSAGES/, $(S1AP_ASN_MODULE_SOURCES_R10:.o=.c)) - @$(RM_F_V) $(addprefix $(OUTDIR)/MESSAGES/, $(S1AP_ASN_MODULE_SOURCES_R10:.o=.h)) - -showcflags: - @echo s1ap cflags: $(CFLAGS) diff --git a/openair-cn/S1AP/Makefile.inc b/openair-cn/S1AP/Makefile.inc deleted file mode 100644 index 8bca6ba59c..0000000000 --- a/openair-cn/S1AP/Makefile.inc +++ /dev/null @@ -1,37 +0,0 @@ -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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 . -# -# Contact Information -# OpenAirInterface Admin: openair_admin@eurecom.fr -# OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr -# -# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. -# -################################################################################ -S1AP_OBJS = $(OPENAIR2_DIR)/S1AP/s1ap_eNB.o -S1AP_OBJS += $(OPENAIR2_DIR)/S1AP/s1ap_common.o -S1AP_OBJS += $(OPENAIR2_DIR)/S1AP/s1ap_encoder.o -S1AP_OBJS += $(OPENAIR2_DIR)/S1AP/s1ap_decoder.o -S1AP_OBJS += $(OPENAIR2_DIR)/S1AP/s1ap_eNB_decoder.o -S1AP_OBJS += $(OPENAIR2_DIR)/S1AP/s1ap_eNB_encoder.o -S1AP_OBJS += $(OPENAIR2_DIR)/S1AP/s1ap_eNB_handlers.o - -S1AP_Incl = -I$(OPENAIR2_DIR)/S1AP -I$(OPENAIR2_DIR)/S1AP/MESSAGES diff --git a/openair-cn/S1AP/s1ap_mme.c b/openair-cn/S1AP/s1ap_mme.c deleted file mode 100644 index a599d32c68..0000000000 --- a/openair-cn/S1AP/s1ap_mme.c +++ /dev/null @@ -1,474 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#if HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include - -#if !defined(MME_CLIENT_TEST) -# include "intertask_interface.h" -#endif - -#include "assertions.h" -#include "queue.h" - -#include "s1ap_mme.h" -#include "s1ap_mme_decoder.h" -#include "s1ap_mme_handlers.h" -#include "s1ap_ies_defs.h" - -#include "s1ap_mme_nas_procedures.h" -#include "s1ap_mme_retransmission.h" -#include "msc.h" - -#define S1AP_DEBUG_LIST -#ifdef S1AP_DEBUG_LIST -# define eNB_LIST_OUT(x, args...) S1AP_DEBUG("[eNB]%*s"x"\n", 4*indent, "", ##args) -# define UE_LIST_OUT(x, args...) S1AP_DEBUG("[UE] %*s"x"\n", 4*indent, "", ##args) -#else -# define eNB_LIST_OUT(x, args...) -# define UE_LIST_OUT(x, args...) -#endif - -#if !defined(MME_CLIENT_TEST) -// static pthread_t s1ap_task_thread; - -int hss_associated = 0; -uint32_t nb_eNB_associated = 0; -STAILQ_HEAD(eNB_list_s, eNB_description_s) -eNB_list_head; - -static int indent = 0; - -void *s1ap_mme_thread(void *args); - -static int s1ap_send_init_sctp(void) -{ - // Create and alloc new message - MessageDef *message_p; - message_p = itti_alloc_new_message(TASK_S1AP, SCTP_INIT_MSG); - message_p->ittiMsg.sctpInit.port = S1AP_PORT_NUMBER; - message_p->ittiMsg.sctpInit.ppid = S1AP_SCTP_PPID; - message_p->ittiMsg.sctpInit.ipv4 = 1; - message_p->ittiMsg.sctpInit.ipv6 = 0; - message_p->ittiMsg.sctpInit.nb_ipv4_addr = 1; - message_p->ittiMsg.sctpInit.ipv4_address[0] - = mme_config.ipv4.mme_ip_address_for_S1_MME; - /* SR WARNING: ipv6 multi-homing fails sometimes for localhost. - * Disable it for now.*/ - message_p->ittiMsg.sctpInit.nb_ipv6_addr = 0; - message_p->ittiMsg.sctpInit.ipv6_address[0] = "0:0:0:0:0:0:0:1"; - - return itti_send_msg_to_task(TASK_SCTP, INSTANCE_DEFAULT, message_p); -} - -void *s1ap_mme_thread(void *args) -{ - MessageDef *received_message_p; - - itti_mark_task_ready(TASK_S1AP); - MSC_START_USE(); - - while(1) { - /* Trying to fetch a message from the message queue. - * If the queue is empty, this function will block till a - * message is sent to the task. - */ - itti_receive_msg(TASK_S1AP, &received_message_p); - DevAssert(received_message_p != NULL); - - switch (ITTI_MSG_ID(received_message_p)) { - case ACTIVATE_MESSAGE: { - hss_associated = 1; - } - break; - - case SCTP_DATA_IND: { - /* New message received from SCTP layer. - * Decode and handle it. - */ - s1ap_message message; - - memset((void *)&message, 0, sizeof(s1ap_message)); - - /* Invoke S1AP message decoder */ - if (s1ap_mme_decode_pdu(&message, - SCTP_DATA_IND(received_message_p).buffer, - SCTP_DATA_IND(received_message_p).buf_length) < 0) { - // TODO: Notify eNB of failure with right cause - S1AP_ERROR("Failed to decode new buffer\n"); - } else { - s1ap_mme_handle_message(SCTP_DATA_IND(received_message_p).assoc_id, - SCTP_DATA_IND(received_message_p).stream, - &message); - } - - /* Free received PDU array */ - free(SCTP_DATA_IND(received_message_p).buffer); - } - break; - - /* SCTP layer notifies S1AP of disconnection of a peer. */ - case SCTP_CLOSE_ASSOCIATION: { - s1ap_handle_sctp_deconnection(SCTP_CLOSE_ASSOCIATION(received_message_p).assoc_id); - } - break; - - case SCTP_NEW_ASSOCIATION: { - s1ap_handle_new_association(&received_message_p->ittiMsg.sctp_new_peer); - } - break; - - case NAS_DOWNLINK_DATA_REQ: { - /* New message received from NAS task. - * This corresponds to a S1AP downlink nas transport message. - */ - s1ap_generate_downlink_nas_transport(NAS_DL_DATA_REQ(received_message_p).UEid, - NAS_DL_DATA_REQ(received_message_p).nasMsg.data, - NAS_DL_DATA_REQ(received_message_p).nasMsg.length); - } - break; - - case S1AP_UE_CONTEXT_RELEASE_COMMAND: { - s1ap_handle_ue_context_release_command(&received_message_p->ittiMsg.s1ap_ue_context_release_command); - } - break; - -#if defined(DISABLE_USE_NAS) - - case NAS_ATTACH_ACCEPT: { - s1ap_handle_attach_accepted(&received_message_p->ittiMsg.nas_attach_accept); - } - break; -#else - // handled by MME_APP know - //case NAS_CONNECTION_ESTABLISHMENT_CNF: { - // s1ap_handle_conn_est_cnf(&NAS_CONNECTION_ESTABLISHMENT_CNF(received_message_p)); - //} break; - - case MME_APP_CONNECTION_ESTABLISHMENT_CNF: { - s1ap_handle_conn_est_cnf(&MME_APP_CONNECTION_ESTABLISHMENT_CNF(received_message_p)); - } - break; -#endif - - case TIMER_HAS_EXPIRED: { - s1ap_handle_timer_expiry(&received_message_p->ittiMsg.timer_has_expired); - } - break; - - case TERMINATE_MESSAGE: { - itti_exit_task(); - } - break; - - default: { - S1AP_DEBUG("Unkwnon message ID %d:%s\n", - ITTI_MSG_ID(received_message_p), ITTI_MSG_NAME(received_message_p)); - } - break; - } - - itti_free(ITTI_MSG_ORIGIN_ID(received_message_p), received_message_p); - received_message_p = NULL; - } - - return NULL; -} - -int s1ap_mme_init(const mme_config_t *mme_config_p) -{ - S1AP_DEBUG("Initializing S1AP interface\n"); - - if (get_asn1c_environment_version() < ASN1_MINIMUM_VERSION) { - S1AP_ERROR("ASN1C version %d fount, expecting at least %d\n", - get_asn1c_environment_version(), ASN1_MINIMUM_VERSION); - return -1; - } else { - S1AP_DEBUG("ASN1C version %d\n", get_asn1c_environment_version()); - } - -#if defined(UPDATE_RELEASE_10) - S1AP_DEBUG("S1AP Release v10.5\n"); -#else -# if defined(UPDATE_RELEASE_9) - S1AP_DEBUG("S1AP Release v9.8\n"); -# else - S1AP_DEBUG("S1AP Release v8.10\n"); -# endif -#endif - - STAILQ_INIT(&eNB_list_head); - - if (itti_create_task(TASK_S1AP, &s1ap_mme_thread, NULL) < 0) { - S1AP_ERROR("Error while creating S1AP task\n"); - return -1; - } - - if (s1ap_send_init_sctp() < 0) { - S1AP_ERROR("Error while sendind SCTP_INIT_MSG to SCTP \n"); - return -1; - } - - S1AP_DEBUG("Initializing S1AP interface: DONE\n"); - return 0; -} - -void s1ap_dump_eNB_list(void) -{ - eNB_description_t *eNB_ref; - - STAILQ_FOREACH(eNB_ref, &eNB_list_head, eNB_entries) { - s1ap_dump_eNB(eNB_ref); - } -} - -void s1ap_dump_eNB(eNB_description_t *eNB_ref) -{ -#ifdef S1AP_DEBUG_LIST - ue_description_t *ue_ref; - //Reset indentation - indent = 0; - - if (eNB_ref == NULL) { - return; - } - - eNB_LIST_OUT(""); - eNB_LIST_OUT("eNB name: %s", eNB_ref->eNB_name == NULL ? "not present" : eNB_ref->eNB_name); - eNB_LIST_OUT("eNB ID: %07x", eNB_ref->eNB_id); - eNB_LIST_OUT("SCTP assoc id: %d", eNB_ref->sctp_assoc_id); - eNB_LIST_OUT("SCTP instreams: %d", eNB_ref->instreams); - eNB_LIST_OUT("SCTP outstreams: %d", eNB_ref->outstreams); - eNB_LIST_OUT("UE attache to eNB: %d", eNB_ref->nb_ue_associated); - - indent++; - - STAILQ_FOREACH(ue_ref, &eNB_ref->ue_list_head, ue_entries) { - s1ap_dump_ue(ue_ref); - } - indent--; - eNB_LIST_OUT(""); -#else - s1ap_dump_ue(NULL); -#endif -} - -void s1ap_dump_ue(ue_description_t *ue_ref) -{ -#ifdef S1AP_DEBUG_LIST - - if (ue_ref == NULL) return; - - UE_LIST_OUT("eNB UE s1ap id: 0x%06x", ue_ref->eNB_ue_s1ap_id); - UE_LIST_OUT("MME UE s1ap id: 0x%08x", ue_ref->mme_ue_s1ap_id); - UE_LIST_OUT("SCTP stream recv: 0x%04x", ue_ref->sctp_stream_recv); - UE_LIST_OUT("SCTP stream send: 0x%04x", ue_ref->sctp_stream_send); -#else - ue_ref = ue_ref; -#endif -} - -eNB_description_t* s1ap_is_eNB_id_in_list(const uint32_t eNB_id) -{ - - eNB_description_t *eNB_ref; - - STAILQ_FOREACH(eNB_ref, &eNB_list_head, eNB_entries) { - if (eNB_ref->eNB_id == eNB_id) { - /* We found a matching reference, return it */ - return eNB_ref; - } - } - /* No matching eNB, return NULL */ - return eNB_ref; -} - -eNB_description_t* s1ap_is_eNB_assoc_id_in_list(const uint32_t sctp_assoc_id) -{ - - eNB_description_t *eNB_ref; - - STAILQ_FOREACH(eNB_ref, &eNB_list_head, eNB_entries) { - if (eNB_ref->sctp_assoc_id == sctp_assoc_id) { - /* We found a matching reference, return it */ - return eNB_ref; - } - } - /* No matching eNB or no eNB in list, return NULL */ - return NULL; -} - -ue_description_t *s1ap_is_ue_eNB_id_in_list(eNB_description_t *eNB_ref, - const uint32_t eNB_ue_s1ap_id) -{ - ue_description_t *ue_ref; - - DevAssert(eNB_ref != NULL); - - STAILQ_FOREACH(ue_ref, &eNB_ref->ue_list_head, ue_entries) { - if (ue_ref->eNB_ue_s1ap_id == eNB_ue_s1ap_id) { - return ue_ref; - } - } - - return NULL; -} - -ue_description_t* s1ap_is_ue_mme_id_in_list(const uint32_t mme_ue_s1ap_id) -{ - - ue_description_t *ue_ref; - eNB_description_t *eNB_ref; - - STAILQ_FOREACH(eNB_ref, &eNB_list_head, eNB_entries) { - STAILQ_FOREACH(ue_ref, &eNB_ref->ue_list_head, ue_entries) { - // We found a matching reference, return it - if (ue_ref->mme_ue_s1ap_id == mme_ue_s1ap_id) { - return ue_ref; - } - } - } - - return NULL; -} - -ue_description_t* s1ap_is_teid_in_list(const uint32_t teid) -{ - - ue_description_t *ue_ref; - eNB_description_t *eNB_ref; - - STAILQ_FOREACH(eNB_ref, &eNB_list_head, eNB_entries) { - STAILQ_FOREACH(ue_ref, &eNB_ref->ue_list_head, ue_entries) { - // We found a matching reference, return it - if (ue_ref->teid == teid) { - return ue_ref; - } - } - } - - return NULL; -} - -eNB_description_t* s1ap_new_eNB(void) -{ - - eNB_description_t *eNB_ref = NULL; - - eNB_ref = calloc(1, sizeof(eNB_description_t)); - /* Something bad happened during malloc... - * May be we are running out of memory. - * TODO: Notify eNB with a cause like Hardware Failure. - */ - DevAssert(eNB_ref != NULL); - - // Update number of eNB associated - nb_eNB_associated++; - - STAILQ_INIT(&eNB_ref->ue_list_head); - - eNB_ref->nb_ue_associated = 0; - - STAILQ_INSERT_TAIL(&eNB_list_head, eNB_ref, eNB_entries); - - return eNB_ref; -} - -ue_description_t* s1ap_new_ue(const uint32_t sctp_assoc_id) -{ - - eNB_description_t *eNB_ref = NULL; - ue_description_t *ue_ref = NULL; - - eNB_ref = s1ap_is_eNB_assoc_id_in_list(sctp_assoc_id); - DevAssert(eNB_ref != NULL); - - ue_ref = calloc(1, sizeof(ue_description_t)); - /* Something bad happened during malloc... - * May be we are running out of memory. - * TODO: Notify eNB with a cause like Hardware Failure. - */ - DevAssert(ue_ref != NULL); - - ue_ref->eNB = eNB_ref; - - // Increment number of UE - eNB_ref->nb_ue_associated++; - STAILQ_INSERT_TAIL(&eNB_ref->ue_list_head, ue_ref, ue_entries); - - return ue_ref; -} - -void s1ap_remove_ue(ue_description_t *ue_ref) -{ - eNB_description_t *eNB_ref; - - /* NULL reference... */ - if (ue_ref == NULL) return; - - eNB_ref = ue_ref->eNB; - - /* Updating number of UE */ - eNB_ref->nb_ue_associated--; - /* Remove any attached timer */ - // s1ap_timer_remove_ue(ue_ref->mme_ue_s1ap_id); - - STAILQ_REMOVE(&eNB_ref->ue_list_head, ue_ref, ue_description_s, ue_entries); - eNB_ref->nb_ue_associated--; - - /* Freeing memory */ - free(ue_ref); - ue_ref = NULL; -} - -void s1ap_remove_eNB(eNB_description_t *eNB_ref) -{ - ue_description_t *ue_ref; - - if (eNB_ref == NULL) return; - - while (!STAILQ_EMPTY(&eNB_ref->ue_list_head)) { - ue_ref = STAILQ_FIRST(&eNB_ref->ue_list_head); - eNB_ref->nb_ue_associated--; - STAILQ_REMOVE_HEAD(&eNB_ref->ue_list_head, ue_entries); - free(ue_ref); - } - - STAILQ_REMOVE(&eNB_list_head, eNB_ref, eNB_description_s, eNB_entries); - - free(eNB_ref); - eNB_ref = NULL; - nb_eNB_associated--; -} - -#endif diff --git a/openair-cn/S1AP/s1ap_mme.h b/openair-cn/S1AP/s1ap_mme.h deleted file mode 100644 index 1b33ec297d..0000000000 --- a/openair-cn/S1AP/s1ap_mme.h +++ /dev/null @@ -1,185 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -#if !defined(MME_CLIENT_TEST) -# include "intertask_interface.h" -#endif - -#include "mme_config.h" - -#ifndef S1AP_MME_H_ -#define S1AP_MME_H_ - -// Forward declarations -struct eNB_description_s; - -enum s1_eNB_state_s { - S1AP_RESETING, ///< After a reset request (eNB or MME initiated) - S1AP_READY ///< MME and eNB are S1 associated, UE contexts can be added -}; - -enum s1_ue_state_s { - S1AP_UE_WAITING_CSR, ///< Waiting for Initial Context Setup Response - S1AP_UE_HANDOVER, ///< Handover procedure triggered - S1AP_UE_CONNECTED, ///< UE context ready -}; - -/** Main structure representing UE association over s1ap - * Generated every time a new InitialUEMessage is received - **/ -typedef struct ue_description_s { - STAILQ_ENTRY(ue_description_s) ue_entries; - - struct eNB_description_s *eNB; ///< Which eNB this UE is attached to - - enum s1_ue_state_s s1_ue_state; ///< S1AP UE state - - unsigned eNB_ue_s1ap_id:24; ///< Unique UE id over eNB (24 bits wide) - uint32_t mme_ue_s1ap_id; ///< Unique UE id over MME (32 bits wide) - - /** SCTP stream on which S1 message will be sent/received. - * During an UE S1 connection, a pair of streams is - * allocated and is used during all the connection. - * Stream 0 is reserved for non UE signalling. - * @name sctp stream identifier - **/ - /*@{*/ - uint16_t sctp_stream_recv; ///< eNB -> MME stream - uint16_t sctp_stream_send; ///< MME -> eNB stream - /*@}*/ - - uint32_t teid; - - /* Timer for procedure outcume issued by MME that should be answered */ - long outcome_response_timer_id; -} ue_description_t; - -/* Main structure representing eNB association over s1ap - * Generated (or updated) every time a new S1SetupRequest is received. - */ -typedef struct eNB_description_s { - STAILQ_ENTRY(eNB_description_s) eNB_entries; - - enum s1_eNB_state_s s1_state; ///< State of the eNB S1AP association over MME - - /** eNB related parameters **/ - /*@{*/ - char eNB_name[150]; ///< Printable eNB Name - uint32_t eNB_id; ///< Unique eNB ID - uint8_t default_paging_drx; ///< Default paging DRX interval for eNB - /*@}*/ - - /** UE list for this eNB **/ - /*@{*/ - uint32_t nb_ue_associated; ///< Number of NAS associated UE on this eNB - STAILQ_HEAD(ue_list_s, ue_description_s) ue_list_head; - /*@}*/ - - /** SCTP stuff **/ - /*@{*/ - uint32_t sctp_assoc_id; ///< SCTP association id on this machine - uint16_t next_sctp_stream; ///< Next SCTP stream - uint16_t instreams; ///< Number of streams avalaible on eNB -> MME - uint16_t outstreams; ///< Number of streams avalaible on MME -> eNB - /*@}*/ -} eNB_description_t; - -extern int hss_associated; -extern uint32_t nb_eNB_associated; -extern mme_config_t *global_mme_config_p; - -/** \brief S1AP layer top init - * @returns -1 in case of failure - **/ -int s1ap_mme_init(const mme_config_t *mme_config); - -/** \brief Look for given eNB id in the list - * \param eNB_id The unique eNB id to search in list - * @returns NULL if no eNB matchs the eNB id, or reference to the eNB element in list if matches - **/ -eNB_description_t* s1ap_is_eNB_id_in_list(const uint32_t eNB_id); - -/** \brief Look for given eNB SCTP assoc id in the list - * \param eNB_id The unique sctp assoc id to search in list - * @returns NULL if no eNB matchs the sctp assoc id, or reference to the eNB element in list if matches - **/ -eNB_description_t* s1ap_is_eNB_assoc_id_in_list(const uint32_t sctp_assoc_id); - -/** \brief Look for given ue eNB id in the list - * \param eNB_id The unique ue_eNB_id to search in list - * @returns NULL if no UE matchs the ue_eNB_id, or reference to the ue element in list if matches - **/ -ue_description_t* s1ap_is_ue_eNB_id_in_list(eNB_description_t *eNB_ref, - const uint32_t eNB_ue_s1ap_id); - -/** \brief Look for given ue mme id in the list - * \param eNB_id The unique ue_mme_id to search in list - * @returns NULL if no UE matchs the ue_mme_id, or reference to the ue element in list if matches - **/ -ue_description_t* s1ap_is_ue_mme_id_in_list(const uint32_t ue_mme_id); -ue_description_t* s1ap_is_teid_in_list(const uint32_t teid); - -/** \brief Allocate and add to the list a new eNB descriptor - * @returns Reference to the new eNB element in list - **/ -eNB_description_t* s1ap_new_eNB(void); - -/** \brief Allocate and add to the right eNB list a new UE descriptor - * \param sctp_assoc_id association ID over SCTP - * @returns Reference to the new UE element in list - **/ -ue_description_t* s1ap_new_ue(const uint32_t sctp_assoc_id); - -/** \brief Dump the eNB list - * Calls dump_eNB for each eNB in list - **/ -void s1ap_dump_eNB_list(void); - -/** \brief Dump eNB related information. - * Calls dump_ue for each UE in list - * \param eNB_ref eNB structure reference to dump - **/ -void s1ap_dump_eNB(eNB_description_t *eNB_ref); - -/** \brief Dump UE related information. - * \param ue_ref ue structure reference to dump - **/ -void s1ap_dump_ue(ue_description_t *ue_ref); - -/** \brief Remove target UE from the list - * \param ue_ref UE structure reference to remove - **/ -void s1ap_remove_ue(ue_description_t *ue_ref); - -/** \brief Remove target eNB from the list and remove any UE associated - * \param eNB_ref eNB structure reference to remove - **/ -void s1ap_remove_eNB(eNB_description_t *eNB_ref); - -#endif /* S1AP_MME_H_ */ diff --git a/openair-cn/S1AP/s1ap_mme_decoder.c b/openair-cn/S1AP/s1ap_mme_decoder.c deleted file mode 100644 index 4ee8aca34b..0000000000 --- a/openair-cn/S1AP/s1ap_mme_decoder.c +++ /dev/null @@ -1,297 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -/*! \file s1ap_mme_decoder.c - * \brief s1ap decode procedures for MME - * \author Sebastien ROUX - * \date 2012 - * \version 0.1 - */ - -#include -#include -#include - -#include "assertions.h" -#include "s1ap_common.h" -#include "s1ap_ies_defs.h" -#include "s1ap_mme_decoder.h" -#include "s1ap_mme_handlers.h" - -#if !defined(MME_CLIENT_TEST) -# include "intertask_interface.h" -#endif - -#include "assertions.h" - -static int s1ap_mme_decode_initiating( - s1ap_message *message, S1ap_InitiatingMessage_t *initiating_p) -{ - int ret = -1; - - MessageDef *message_p; - char *message_string = NULL; - size_t message_string_size; - MessagesIds message_id; - - DevAssert(initiating_p != NULL); - - message_string = calloc(10000, sizeof(char)); - s1ap_string_total_size = 0; - - message->procedureCode = initiating_p->procedureCode; - message->criticality = initiating_p->criticality; - - switch(initiating_p->procedureCode) { - case S1ap_ProcedureCode_id_uplinkNASTransport: { - ret = s1ap_decode_s1ap_uplinknastransporties( - &message->msg.s1ap_UplinkNASTransportIEs, &initiating_p->value); - s1ap_xer_print_s1ap_uplinknastransport(s1ap_xer__print2sp, message_string, - message); - message_id = S1AP_UPLINK_NAS_LOG; - } - break; - - case S1ap_ProcedureCode_id_S1Setup: { - ret = s1ap_decode_s1ap_s1setuprequesties(&message->msg.s1ap_S1SetupRequestIEs, - &initiating_p->value); - s1ap_xer_print_s1ap_s1setuprequest(s1ap_xer__print2sp, message_string, message); - message_id = S1AP_S1_SETUP_LOG; - } - break; - - case S1ap_ProcedureCode_id_initialUEMessage: { - ret = s1ap_decode_s1ap_initialuemessageies( - &message->msg.s1ap_InitialUEMessageIEs, - &initiating_p->value); - s1ap_xer_print_s1ap_initialuemessage(s1ap_xer__print2sp, message_string, - message); - message_id = S1AP_INITIAL_UE_MESSAGE_LOG; - } - break; - - case S1ap_ProcedureCode_id_UEContextReleaseRequest: { - ret = s1ap_decode_s1ap_uecontextreleaserequesties( - &message->msg.s1ap_UEContextReleaseRequestIEs, &initiating_p->value); - s1ap_xer_print_s1ap_uecontextreleaserequest(s1ap_xer__print2sp, message_string, - message); - message_id = S1AP_UE_CONTEXT_RELEASE_REQ_LOG; - } - break; - - case S1ap_ProcedureCode_id_UECapabilityInfoIndication: { - ret = s1ap_decode_s1ap_uecapabilityinfoindicationies( - &message->msg.s1ap_UECapabilityInfoIndicationIEs, &initiating_p->value); - s1ap_xer_print_s1ap_uecapabilityinfoindication(s1ap_xer__print2sp, - message_string, message); - message_id = S1AP_UE_CAPABILITY_IND_LOG; - } - break; - - case S1ap_ProcedureCode_id_NASNonDeliveryIndication: { - ret = s1ap_decode_s1ap_nasnondeliveryindication_ies( - &message->msg.s1ap_NASNonDeliveryIndication_IEs, &initiating_p->value); - s1ap_xer_print_s1ap_nasnondeliveryindication_(s1ap_xer__print2sp, - message_string, message); - message_id = S1AP_NAS_NON_DELIVERY_IND_LOG; - } - break; - - default: { - S1AP_ERROR("Unknown procedure ID (%d) for initiating message\n", - (int)initiating_p->procedureCode); - AssertFatal(0, "Unknown procedure ID (%d) for initiating message\n", - (int)initiating_p->procedureCode); - } - break; - } - - message_string_size = strlen(message_string); - - message_p = itti_alloc_new_message_sized(TASK_S1AP, message_id, message_string_size + sizeof (IttiMsgText)); - message_p->ittiMsg.s1ap_uplink_nas_log.size = message_string_size; - memcpy(&message_p->ittiMsg.s1ap_uplink_nas_log.text, message_string, message_string_size); - - itti_send_msg_to_task(TASK_UNKNOWN, INSTANCE_DEFAULT, message_p); - - free(message_string); - - return ret; -} - -static int s1ap_mme_decode_successfull_outcome( - s1ap_message *message, S1ap_SuccessfulOutcome_t *successfullOutcome_p) -{ - int ret = -1; - MessageDef *message_p = NULL; - char *message_string = NULL; - size_t message_string_size = 0; - MessagesIds message_id = MESSAGES_ID_MAX; - - DevAssert(successfullOutcome_p != NULL); - - message_string = calloc(10000, sizeof(char)); - s1ap_string_total_size = 0; - - message->procedureCode = successfullOutcome_p->procedureCode; - message->criticality = successfullOutcome_p->criticality; - - switch(successfullOutcome_p->procedureCode) { - case S1ap_ProcedureCode_id_InitialContextSetup: { - ret = s1ap_decode_s1ap_initialcontextsetupresponseies( - &message->msg.s1ap_InitialContextSetupResponseIEs, - &successfullOutcome_p->value); - s1ap_xer_print_s1ap_initialcontextsetupresponse(s1ap_xer__print2sp, - message_string, message); - message_id = S1AP_INITIAL_CONTEXT_SETUP_LOG; - } - break; - - case S1ap_ProcedureCode_id_UEContextRelease: { - ret = s1ap_decode_s1ap_uecontextreleasecompleteies( - &message->msg.s1ap_UEContextReleaseCompleteIEs, &successfullOutcome_p->value); - s1ap_xer_print_s1ap_uecontextreleasecomplete(s1ap_xer__print2sp, - message_string, message); - message_id = S1AP_UE_CONTEXT_RELEASE_LOG; - } - break; - - default: { - S1AP_ERROR("Unknown procedure ID (%ld) for successfull outcome message\n", - successfullOutcome_p->procedureCode); - } - break; - } - - message_string_size = strlen(message_string); - - message_p = itti_alloc_new_message_sized(TASK_S1AP, message_id, message_string_size + sizeof (IttiMsgText)); - message_p->ittiMsg.s1ap_initial_context_setup_log.size = message_string_size; - memcpy(&message_p->ittiMsg.s1ap_initial_context_setup_log.text, message_string, message_string_size); - - itti_send_msg_to_task(TASK_UNKNOWN, INSTANCE_DEFAULT, message_p); - - free(message_string); - - return ret; -} - -static int s1ap_mme_decode_unsuccessfull_outcome( - s1ap_message *message, S1ap_UnsuccessfulOutcome_t *unSuccessfulOutcome_p) -{ - int ret = -1; - - MessageDef *message_p; - char *message_string = NULL; - size_t message_string_size; - MessagesIds message_id; - - DevAssert(unSuccessfulOutcome_p != NULL); - - message_string = calloc(10000, sizeof(char)); - s1ap_string_total_size = 0; - - message->procedureCode = unSuccessfulOutcome_p->procedureCode; - message->criticality = unSuccessfulOutcome_p->criticality; - - switch(unSuccessfulOutcome_p->procedureCode) { - case S1ap_ProcedureCode_id_InitialContextSetup: { - ret = s1ap_decode_s1ap_initialcontextsetupfailureies( - &message->msg.s1ap_InitialContextSetupFailureIEs, &unSuccessfulOutcome_p->value); - s1ap_xer_print_s1ap_initialcontextsetupfailure(s1ap_xer__print2sp, - message_string, message); - message_id = S1AP_INITIAL_CONTEXT_SETUP_LOG; - } - break; - - default: { - S1AP_ERROR("Unknown procedure ID (%d) for unsuccessfull outcome message\n", - (int)unSuccessfulOutcome_p->procedureCode); - } - break; - } - - message_string_size = strlen(message_string); - - message_p = itti_alloc_new_message_sized(TASK_S1AP, message_id, message_string_size + sizeof (IttiMsgText)); - message_p->ittiMsg.s1ap_initial_context_setup_log.size = message_string_size; - memcpy(&message_p->ittiMsg.s1ap_initial_context_setup_log.text, message_string, message_string_size); - - itti_send_msg_to_task(TASK_UNKNOWN, INSTANCE_DEFAULT, message_p); - - free(message_string); - - return ret; -} - -int s1ap_mme_decode_pdu(s1ap_message *message, uint8_t *buffer, uint32_t len) -{ - S1AP_PDU_t pdu; - S1AP_PDU_t *pdu_p = &pdu; - asn_dec_rval_t dec_ret; - - DevAssert(buffer != NULL); - - memset((void *)pdu_p, 0, sizeof(S1AP_PDU_t)); - - dec_ret = aper_decode(NULL, - &asn_DEF_S1AP_PDU, - (void **)&pdu_p, - buffer, - len, - 0, - 0); - - if (dec_ret.code != RC_OK) { - S1AP_ERROR("Failed to decode PDU\n"); - return -1; - } - - message->direction = pdu_p->present; - - switch(pdu_p->present) { - case S1AP_PDU_PR_initiatingMessage: - return s1ap_mme_decode_initiating(message, &pdu_p->choice.initiatingMessage); - - case S1AP_PDU_PR_successfulOutcome: - return s1ap_mme_decode_successfull_outcome(message, - &pdu_p->choice.successfulOutcome); - - case S1AP_PDU_PR_unsuccessfulOutcome: - return s1ap_mme_decode_unsuccessfull_outcome(message, - &pdu_p->choice.unsuccessfulOutcome); - - default: - S1AP_ERROR("Unknown message outcome (%d) or not implemented", - (int)pdu_p->present); - break; - } - - return -1; -} diff --git a/openair-cn/S1AP/s1ap_mme_decoder.h b/openair-cn/S1AP/s1ap_mme_decoder.h deleted file mode 100644 index 4f5e13c373..0000000000 --- a/openair-cn/S1AP/s1ap_mme_decoder.h +++ /dev/null @@ -1,39 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -#include "s1ap_common.h" -#include "s1ap_ies_defs.h" - -#ifndef S1AP_MME_DECODER_H_ -#define S1AP_MME_DECODER_H_ - -int s1ap_mme_decode_pdu(s1ap_message *message, uint8_t *buffer, uint32_t len) -__attribute__ ((warn_unused_result)); - -#endif /* S1AP_MME_DECODER_H_ */ diff --git a/openair-cn/S1AP/s1ap_mme_encoder.c b/openair-cn/S1AP/s1ap_mme_encoder.c deleted file mode 100644 index 6209a93334..0000000000 --- a/openair-cn/S1AP/s1ap_mme_encoder.c +++ /dev/null @@ -1,266 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -/*! \file s1ap_mme_encoder.c - * \brief s1ap encode procedures for MME - * \author Sebastien ROUX - * \date 2012 - * \version 0.1 - */ - -#include "intertask_interface.h" - -#include "s1ap_common.h" -#include "s1ap_ies_defs.h" -#include "s1ap_mme_encoder.h" -#include "s1ap_mme.h" - -#include "assertions.h" - -static inline -int s1ap_mme_encode_initial_context_setup_request(s1ap_message *message_p, - uint8_t **buffer, uint32_t *length); -static inline -int s1ap_mme_encode_s1setupresponse(s1ap_message *message_p, - uint8_t **buffer, uint32_t *length); -static inline -int s1ap_mme_encode_s1setupfailure(s1ap_message *message_p, - uint8_t **buffer, uint32_t *length); -static inline -int s1ap_mme_encode_ue_context_release_command(s1ap_message *message_p, - uint8_t **buffer, uint32_t *length); -static inline -int s1ap_mme_encode_downlink_nas_transport( - s1ap_message *message_p, uint8_t **buffer, uint32_t *length); - -static inline -int s1ap_mme_encode_initiating(s1ap_message *message_p, - uint8_t **buffer, - uint32_t *length); -static inline -int s1ap_mme_encode_successfull_outcome(s1ap_message *message_p, - uint8_t **buffer, uint32_t *len); -static inline -int s1ap_mme_encode_unsuccessfull_outcome(s1ap_message *message_p, - uint8_t **buffer, uint32_t *len); - -static inline -int s1ap_mme_encode_initial_context_setup_request(s1ap_message *message_p, - uint8_t **buffer, uint32_t *length) -{ - S1ap_InitialContextSetupRequest_t initialContextSetupRequest; - S1ap_InitialContextSetupRequest_t *initialContextSetupRequest_p = - &initialContextSetupRequest; - - memset(initialContextSetupRequest_p, 0, sizeof(S1ap_InitialContextSetupRequest_t)); - - if (s1ap_encode_s1ap_initialcontextsetuprequesties(initialContextSetupRequest_p, - &message_p->msg.s1ap_InitialContextSetupRequestIEs) < 0) { - return -1; - } - - return s1ap_generate_initiating_message(buffer, - length, - S1ap_ProcedureCode_id_InitialContextSetup, - S1ap_Criticality_reject, - &asn_DEF_S1ap_InitialContextSetupRequest, - initialContextSetupRequest_p); -} - -int s1ap_mme_encode_pdu(s1ap_message *message_p, uint8_t **buffer, uint32_t *length) -{ - DevAssert(message_p != NULL); - DevAssert(buffer != NULL); - DevAssert(length != NULL); - - switch(message_p->direction) { - case S1AP_PDU_PR_initiatingMessage: - return s1ap_mme_encode_initiating(message_p, buffer, length); - - case S1AP_PDU_PR_successfulOutcome: - return s1ap_mme_encode_successfull_outcome(message_p, buffer, length); - - case S1AP_PDU_PR_unsuccessfulOutcome: - return s1ap_mme_encode_unsuccessfull_outcome(message_p, buffer, length); - - default: - S1AP_DEBUG("Unknown message outcome (%d) or not implemented", - (int)message_p->direction); - break; - } - - return -1; -} - -static inline -int s1ap_mme_encode_initiating(s1ap_message *message_p, - uint8_t **buffer, - uint32_t *length) -{ - switch(message_p->procedureCode) { - case S1ap_ProcedureCode_id_downlinkNASTransport: - return s1ap_mme_encode_downlink_nas_transport(message_p, buffer, length); - - case S1ap_ProcedureCode_id_InitialContextSetup: - return s1ap_mme_encode_initial_context_setup_request(message_p, buffer, length); - - case S1ap_ProcedureCode_id_UEContextRelease: - return s1ap_mme_encode_ue_context_release_command(message_p, buffer, length); - - default: - S1AP_DEBUG("Unknown procedure ID (%d) for initiating message_p\n", - (int)message_p->procedureCode); - break; - } - - return -1; -} - -static inline -int s1ap_mme_encode_successfull_outcome(s1ap_message *message_p, - uint8_t **buffer, uint32_t *length) -{ - switch(message_p->procedureCode) { - case S1ap_ProcedureCode_id_S1Setup: - return s1ap_mme_encode_s1setupresponse(message_p, buffer, length); - - default: - S1AP_DEBUG("Unknown procedure ID (%d) for successfull outcome message\n", - (int)message_p->procedureCode); - break; - } - - return -1; -} - -static inline -int s1ap_mme_encode_unsuccessfull_outcome(s1ap_message *message_p, - uint8_t **buffer, uint32_t *length) -{ - switch(message_p->procedureCode) { - case S1ap_ProcedureCode_id_S1Setup: - return s1ap_mme_encode_s1setupfailure(message_p, buffer, length); - - default: - S1AP_DEBUG("Unknown procedure ID (%d) for unsuccessfull outcome message\n", - (int)message_p->procedureCode); - break; - } - - return -1; -} - -static inline -int s1ap_mme_encode_s1setupresponse(s1ap_message *message_p, - uint8_t **buffer, uint32_t *length) -{ - S1ap_S1SetupResponse_t s1SetupResponse; - S1ap_S1SetupResponse_t *s1SetupResponse_p = &s1SetupResponse; - - memset(s1SetupResponse_p, 0, sizeof(S1ap_S1SetupResponse_t)); - - if (s1ap_encode_s1ap_s1setupresponseies(s1SetupResponse_p, &message_p->msg.s1ap_S1SetupResponseIEs) < 0) { - return -1; - } - - return s1ap_generate_successfull_outcome(buffer, - length, - S1ap_ProcedureCode_id_S1Setup, - message_p->criticality, - &asn_DEF_S1ap_S1SetupResponse, - s1SetupResponse_p); -} - -static inline -int s1ap_mme_encode_s1setupfailure(s1ap_message *message_p, - uint8_t **buffer, uint32_t *length) -{ - S1ap_S1SetupFailure_t s1SetupFailure; - S1ap_S1SetupFailure_t *s1SetupFailure_p = &s1SetupFailure; - - memset(s1SetupFailure_p, 0, sizeof(S1ap_S1SetupFailure_t)); - - if (s1ap_encode_s1ap_s1setupfailureies(s1SetupFailure_p, &message_p->msg.s1ap_S1SetupFailureIEs) < 0) { - return -1; - } - - return s1ap_generate_unsuccessfull_outcome(buffer, - length, - S1ap_ProcedureCode_id_S1Setup, - message_p->criticality, - &asn_DEF_S1ap_S1SetupFailure, - s1SetupFailure_p); -} - -static inline -int s1ap_mme_encode_downlink_nas_transport( - s1ap_message *message_p, uint8_t **buffer, uint32_t *length) -{ - S1ap_DownlinkNASTransport_t downlinkNasTransport; - S1ap_DownlinkNASTransport_t *downlinkNasTransport_p = &downlinkNasTransport; - - memset(downlinkNasTransport_p, 0, sizeof(S1ap_DownlinkNASTransport_t)); - - /* Convert IE structure into asn1 message_p */ - if (s1ap_encode_s1ap_downlinknastransporties(downlinkNasTransport_p, - &message_p->msg.s1ap_DownlinkNASTransportIEs) < 0) { - return -1; - } - - /* Generate Initiating message_p for the list of IEs */ - return s1ap_generate_initiating_message(buffer, - length, - S1ap_ProcedureCode_id_downlinkNASTransport, - message_p->criticality, - &asn_DEF_S1ap_DownlinkNASTransport, - downlinkNasTransport_p); -} - -static inline -int s1ap_mme_encode_ue_context_release_command(s1ap_message *message_p, - uint8_t **buffer, uint32_t *length) -{ - S1ap_UEContextReleaseCommand_t ueContextReleaseCommand; - S1ap_UEContextReleaseCommand_t *ueContextReleaseCommand_p = &ueContextReleaseCommand; - - memset(ueContextReleaseCommand_p, 0, sizeof(S1ap_UEContextReleaseCommand_t)); - - /* Convert IE structure into asn1 message_p */ - if (s1ap_encode_s1ap_uecontextreleasecommandies(ueContextReleaseCommand_p, - &message_p->msg.s1ap_UEContextReleaseCommandIEs) < 0) { - return -1; - } - - return s1ap_generate_initiating_message(buffer, - length, - S1ap_ProcedureCode_id_UEContextRelease, - message_p->criticality, - &asn_DEF_S1ap_UEContextReleaseCommand, - ueContextReleaseCommand_p); -} diff --git a/openair-cn/S1AP/s1ap_mme_encoder.h b/openair-cn/S1AP/s1ap_mme_encoder.h deleted file mode 100644 index fb8c6adf89..0000000000 --- a/openair-cn/S1AP/s1ap_mme_encoder.h +++ /dev/null @@ -1,38 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -#include - -#ifndef S1AP_MME_ENCODER_H_ -#define S1AP_MME_ENCODER_H_ - -int s1ap_mme_encode_pdu(s1ap_message *message, uint8_t **buffer, uint32_t *len) -__attribute__ ((warn_unused_result)); - -#endif /* S1AP_MME_ENCODER_H_ */ diff --git a/openair-cn/S1AP/s1ap_mme_handlers.c b/openair-cn/S1AP/s1ap_mme_handlers.c deleted file mode 100644 index e1a9d48059..0000000000 --- a/openair-cn/S1AP/s1ap_mme_handlers.c +++ /dev/null @@ -1,1212 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -#include -#include -#include - -#include "mme_config.h" -#include "assertions.h" -#include "conversions.h" - -#include "s1ap_common.h" -#include "s1ap_ies_defs.h" -#include "s1ap_mme_encoder.h" -#include "s1ap_mme_handlers.h" -#include "s1ap_mme_nas_procedures.h" - -#include "s1ap_mme_itti_messaging.h" - -#include "s1ap_mme.h" -#include "s1ap_mme_ta.h" -#include "msc.h" - -static int s1ap_generate_s1_setup_response(eNB_description_t *eNB_association); -static int s1ap_mme_generate_ue_context_release_command( - ue_description_t *ue_ref); - -//Forward declaration -struct s1ap_message_s; - -/* Handlers matrix. Only mme related procedures present here. - */ -s1ap_message_decoded_callback messages_callback[][3] = { - { 0, 0, 0 }, /* HandoverPreparation */ - { 0, 0, 0 }, /* HandoverResourceAllocation */ - { 0, 0, 0 }, /* HandoverNotification */ - { s1ap_mme_handle_path_switch_request, 0, 0 }, /* PathSwitchRequest */ - { 0, 0, 0 }, /* HandoverCancel */ - { 0, 0, 0 }, /* E_RABSetup */ - { 0, 0, 0 }, /* E_RABModify */ - { 0, 0, 0 }, /* E_RABRelease */ - { 0, 0, 0 }, /* E_RABReleaseIndication */ - { - 0, s1ap_mme_handle_initial_context_setup_response, - s1ap_mme_handle_initial_context_setup_failure - }, /* InitialContextSetup */ - { 0, 0, 0 }, /* Paging */ - { 0, 0, 0 }, /* downlinkNASTransport */ - { s1ap_mme_handle_initial_ue_message, 0, 0 }, /* initialUEMessage */ - { s1ap_mme_handle_uplink_nas_transport, 0, 0 }, /* uplinkNASTransport */ - { 0, 0, 0 }, /* Reset */ - { 0, 0, 0 }, /* ErrorIndication */ - { s1ap_mme_handle_nas_non_delivery, 0, 0 }, /* NASNonDeliveryIndication */ - { s1ap_mme_handle_s1_setup_request, 0, 0 }, /* S1Setup */ - { s1ap_mme_handle_ue_context_release_request, 0, 0 }, /* UEContextReleaseRequest */ - { 0, 0, 0 }, /* DownlinkS1cdma2000tunneling */ - { 0, 0, 0 }, /* UplinkS1cdma2000tunneling */ - { 0, 0, 0 }, /* UEContextModification */ - { s1ap_mme_handle_ue_cap_indication, 0, 0 }, /* UECapabilityInfoIndication*/ - { - s1ap_mme_handle_ue_context_release_request, - s1ap_mme_handle_ue_context_release_complete, 0 - }, /* UEContextRelease*/ - { 0, 0, 0 }, /* eNBStatusTransfer*/ - { 0, 0, 0 }, /* MMEStatusTransfer*/ - { 0, 0, 0 }, /* DeactivateTrace*/ - { 0, 0, 0 }, /* TraceStart*/ - { 0, 0, 0 }, /* TraceFailureIndication*/ - { 0, 0, 0 }, /* ENBConfigurationUpdate*/ - { 0, 0, 0 }, /* MMEConfigurationUpdate*/ - { 0, 0, 0 }, /* LocationReportingControl*/ - { 0, 0, 0 }, /* LocationReportingFailureIndication*/ - { 0, 0, 0 }, /* LocationReport*/ - { 0, 0, 0 }, /* OverloadStart*/ - { 0, 0, 0 }, /* OverloadStop*/ - { 0, 0, 0 }, /* WriteReplaceWarning*/ - { 0, 0, 0 }, /* eNBDirectInformationTransfer*/ - { 0, 0, 0 }, /* MMEDirectInformationTransfer*/ - { 0, 0, 0 }, /* PrivateMessage*/ - { 0, 0, 0 }, /* eNBConfigurationTransfer*/ - { 0, 0, 0 }, /* MMEConfigurationTransfer*/ - { 0, 0, 0 }, /* CellTrafficTrace */ -#if defined(UPDATE_RELEASE_9) - { 0, 0, 0 }, /* Kill */ - { 0, 0, 0 }, /* DownlinkUEAssociatedLPPaTransport */ - { 0, 0, 0 }, /* UplinkUEAssociatedLPPaTransport */ - { 0, 0, 0 }, /* DownlinkNonUEAssociatedLPPaTransport */ - { 0, 0, 0 }, /* UplinkNonUEAssociatedLPPaTransport */ -#endif -}; - -const char *s1ap_direction2String[] = { - "", /* Nothing */ - "Originating message", /* originating message */ - "Successfull outcome", /* successfull outcome */ - "UnSuccessfull outcome", /* successfull outcome */ -}; - -//------------------------------------------------------------------------------ -int s1ap_mme_handle_message(uint32_t assoc_id, uint32_t stream, - struct s1ap_message_s *message) -//------------------------------------------------------------------------------ -{ - /* Checking procedure Code and direction of message */ - if ((message->procedureCode > (sizeof(messages_callback) / (3 * sizeof( - s1ap_message_decoded_callback)))) || - (message->direction > S1AP_PDU_PR_unsuccessfulOutcome)) { - - S1AP_DEBUG("[SCTP %d] Either procedureCode %d or direction %d exceed expected\n", - assoc_id, (int)message->procedureCode, (int)message->direction); - return -1; - } - - /* No handler present. - * This can mean not implemented or no procedure for eNB (wrong message). - */ - if (messages_callback[message->procedureCode][message->direction-1] == NULL) { - S1AP_DEBUG("[SCTP %d] No handler for procedureCode %d in %s\n", assoc_id, - (int)message->procedureCode, - s1ap_direction2String[(int)message->direction]); - return -2; - } - - /* Calling the right handler */ - return (*messages_callback[message->procedureCode][message->direction-1])( - assoc_id, stream, message); -} - -//------------------------------------------------------------------------------ -int s1ap_mme_set_cause(S1ap_Cause_t *cause_p, S1ap_Cause_PR cause_type, long cause_value) -//------------------------------------------------------------------------------ -{ - DevAssert(cause_p != NULL); - - cause_p->present = cause_type; - - switch(cause_type) { - case S1ap_Cause_PR_radioNetwork: - cause_p->choice.misc = cause_value; - break; - - case S1ap_Cause_PR_transport: - cause_p->choice.transport = cause_value; - break; - - case S1ap_Cause_PR_nas: - cause_p->choice.nas = cause_value; - break; - - case S1ap_Cause_PR_protocol: - cause_p->choice.protocol = cause_value; - break; - - case S1ap_Cause_PR_misc: - cause_p->choice.misc = cause_value; - break; - - default: - return -1; - } - - return 0; -} - -//------------------------------------------------------------------------------ -int s1ap_mme_generate_s1_setup_failure( - uint32_t assoc_id, S1ap_Cause_PR cause_type, long cause_value, - long time_to_wait) -//------------------------------------------------------------------------------ -{ - uint8_t *buffer_p; - uint32_t length; - s1ap_message message; - S1ap_S1SetupFailureIEs_t *s1_setup_failure_p; - - memset(&message, 0, sizeof(s1ap_message)); - - s1_setup_failure_p = &message.msg.s1ap_S1SetupFailureIEs; - - message.procedureCode = S1ap_ProcedureCode_id_S1Setup; - message.direction = S1AP_PDU_PR_unsuccessfulOutcome; - - s1ap_mme_set_cause(&s1_setup_failure_p->cause, cause_type, cause_value); - - /* Include the optional field time to wait only if the value is > -1 */ - if (time_to_wait > -1) { - s1_setup_failure_p->presenceMask |= S1AP_S1SETUPFAILUREIES_TIMETOWAIT_PRESENT; - s1_setup_failure_p->timeToWait = time_to_wait; - } - - if (s1ap_mme_encode_pdu(&message, &buffer_p, &length) < 0) { - S1AP_ERROR("Failed to encode s1 setup failure\n"); - return -1; - } - MSC_LOG_TX_MESSAGE( - MSC_S1AP_MME, - MSC_S1AP_ENB, - NULL,0, - "0 S1Setup/unsuccessfulOutcome assoc_id %u cause %u value %u", - assoc_id, cause_type, cause_value); - return s1ap_mme_itti_send_sctp_request(buffer_p, length, assoc_id, 0); -} - -//////////////////////////////////////////////////////////////////////////////// -//************************** Management procedures ***************************// -//////////////////////////////////////////////////////////////////////////////// - -//------------------------------------------------------------------------------ -int s1ap_mme_handle_s1_setup_request(uint32_t assoc_id, uint32_t stream, - struct s1ap_message_s *message) -//------------------------------------------------------------------------------ -{ - if (hss_associated) { - S1ap_S1SetupRequestIEs_t *s1SetupRequest_p; - eNB_description_t *eNB_association; - uint32_t eNB_id = 0; - char *eNB_name = NULL; - int ta_ret; - uint16_t max_enb_connected; - - DevAssert(message != NULL); - - s1SetupRequest_p = &message->msg.s1ap_S1SetupRequestIEs; - - /* We received a new valid S1 Setup Request on a stream != 0. - * This should not happen -> reject eNB s1 setup request. - */ - MSC_LOG_RX_MESSAGE( - MSC_S1AP_MME, - MSC_S1AP_ENB, - NULL,0, - "0 S1Setup/%s assoc_id %u stream %u", - s1ap_direction2String[message->direction], - assoc_id, stream); - - if (stream != 0) { - S1AP_ERROR("Received new s1 setup request on stream != 0\n"); - /* Send a s1 setup failure with protocol cause unspecified */ - return s1ap_mme_generate_s1_setup_failure(assoc_id, S1ap_Cause_PR_protocol, - S1ap_CauseProtocol_unspecified, -1); - } - - S1AP_DEBUG("New s1 setup request incoming from "); - - if (s1SetupRequest_p->presenceMask & S1AP_S1SETUPREQUESTIES_ENBNAME_PRESENT) { - S1AP_DEBUG("%*s ", s1SetupRequest_p->eNBname.size, s1SetupRequest_p->eNBname.buf); - eNB_name = (char *)s1SetupRequest_p->eNBname.buf; - } - - if (s1SetupRequest_p->global_ENB_ID.eNB_ID.present == S1ap_ENB_ID_PR_homeENB_ID) { - // Home eNB ID = 28 bits - uint8_t *eNB_id_buf = - s1SetupRequest_p->global_ENB_ID.eNB_ID.choice.homeENB_ID.buf; - - if (s1SetupRequest_p->global_ENB_ID.eNB_ID.choice.macroENB_ID.size != 28) { - //TODO: handle case were size != 28 -> notify ? reject ? - } - - eNB_id = (eNB_id_buf[0] << 20) + (eNB_id_buf[1] << 12) + - (eNB_id_buf[2] << 4) + ((eNB_id_buf[3] & 0xf0) >> 4); - S1AP_DEBUG("home eNB id: %07x\n", eNB_id); - } else { - // Macro eNB = 20 bits - uint8_t *eNB_id_buf = - s1SetupRequest_p->global_ENB_ID.eNB_ID.choice.macroENB_ID.buf; - - if (s1SetupRequest_p->global_ENB_ID.eNB_ID.choice.macroENB_ID.size != 20) { - //TODO: handle case were size != 20 -> notify ? reject ? - } - - eNB_id = (eNB_id_buf[0] << 12) + (eNB_id_buf[1] << 4) + (( - eNB_id_buf[2] & 0xf0) >> 4); - S1AP_DEBUG("macro eNB id: %05x\n", eNB_id); - } - - config_read_lock(&mme_config); - max_enb_connected = mme_config.max_eNBs; - config_unlock(&mme_config); - - if (nb_eNB_associated == max_enb_connected) { - S1AP_ERROR("There is too much eNB connected to MME, rejecting the association\n"); - S1AP_DEBUG("Connected = %d, maximum allowed = %d\n", nb_eNB_associated, - max_enb_connected); - - /* Send an overload cause... */ - return s1ap_mme_generate_s1_setup_failure(assoc_id, S1ap_Cause_PR_misc, - S1ap_CauseMisc_control_processing_overload, - S1ap_TimeToWait_v20s); - } - - /* If none of the provided PLMNs/TAC match the one configured in MME, - * the s1 setup should be rejected with a cause set to Unknown PLMN. - */ - ta_ret = s1ap_mme_compare_ta_lists(&s1SetupRequest_p->supportedTAs); - - /* eNB and MME have no common PLMN */ - if (ta_ret != TA_LIST_RET_OK) { - S1AP_ERROR("No Common PLMN with eNB, generate_s1_setup_failure\n"); - return s1ap_mme_generate_s1_setup_failure(assoc_id, S1ap_Cause_PR_misc, - S1ap_CauseMisc_unknown_PLMN, - S1ap_TimeToWait_v20s); - } - - S1AP_DEBUG("Adding eNB to the list of served eNBs\n"); - - if ((eNB_association = s1ap_is_eNB_id_in_list(eNB_id)) == NULL) { - /* eNB has not been fount in list of associated eNB, - * Add it to the tail of list and initialize data */ - if ((eNB_association = s1ap_is_eNB_assoc_id_in_list(assoc_id)) == NULL) { - /* ?? */ - return -1; - } else { - eNB_association->s1_state = S1AP_RESETING; - eNB_association->eNB_id = eNB_id; - eNB_association->default_paging_drx = s1SetupRequest_p->defaultPagingDRX; - - if (eNB_name != NULL) { - memcpy(eNB_association->eNB_name, s1SetupRequest_p->eNBname.buf, - s1SetupRequest_p->eNBname.size); - eNB_association->eNB_name[s1SetupRequest_p->eNBname.size] = '\0'; - } - } - } else { - eNB_association->s1_state = S1AP_RESETING; - - /* eNB has been fount in list, consider the s1 setup request as a reset connection, - * reseting any previous UE state if sctp association is != than the previous one */ - if (eNB_association->sctp_assoc_id != assoc_id) { - S1ap_S1SetupFailureIEs_t s1SetupFailure; - - memset(&s1SetupFailure, 0, sizeof(s1SetupFailure)); - - /* Send an overload cause... */ - s1SetupFailure.cause.present = S1ap_Cause_PR_misc; //TODO: send the right cause - s1SetupFailure.cause.choice.misc = S1ap_CauseMisc_control_processing_overload; - S1AP_ERROR("Rejeting s1 setup request as eNB id %d is already associated to an active sctp association" - "Previous known: %d, new one: %d\n", - eNB_id, eNB_association->sctp_assoc_id, assoc_id); - // s1ap_mme_encode_s1setupfailure(&s1SetupFailure, - // receivedMessage->msg.s1ap_sctp_new_msg_ind.assocId); - return -1; - } - - /* TODO: call the reset procedure */ - } - - s1ap_dump_eNB(eNB_association); - return s1ap_generate_s1_setup_response(eNB_association); - } else { - /* Can not process the request, MME is not connected to HSS */ - S1AP_ERROR("Rejecting s1 setup request Can not process the request, MME is not connected to HSS\n"); - return s1ap_mme_generate_s1_setup_failure(assoc_id, S1ap_Cause_PR_misc, - S1ap_CauseMisc_unspecified, -1); - } -} - -//------------------------------------------------------------------------------ -static -int s1ap_generate_s1_setup_response(eNB_description_t *eNB_association) -//------------------------------------------------------------------------------ -{ - int i; - int enc_rval = 0; - S1ap_S1SetupResponseIEs_t *s1_setup_response_p; - S1ap_ServedGUMMEIsItem_t servedGUMMEI; - s1ap_message message; - uint8_t *buffer; - uint32_t length; - - DevAssert(eNB_association != NULL); - - // Generating response - memset(&message, 0, sizeof(s1ap_message)); - memset(&servedGUMMEI, 0, sizeof(servedGUMMEI)); - - s1_setup_response_p = &message.msg.s1ap_S1SetupResponseIEs; - - config_read_lock(&mme_config); - - s1_setup_response_p->relativeMMECapacity = mme_config.relative_capacity; - - /* Use the gummei parameters provided by configuration */ - for (i = 0; i < mme_config.gummei.nb_plmns; i++) { - S1ap_PLMNidentity_t *plmn; - - /* FIXME: free object from list once encoded */ - plmn = calloc(1, sizeof(*plmn)); - MCC_MNC_TO_PLMNID( - mme_config.gummei.plmn_mcc[i], - mme_config.gummei.plmn_mnc[i], - mme_config.gummei.plmn_mnc_len[i], - plmn); - ASN_SEQUENCE_ADD(&servedGUMMEI.servedPLMNs.list, plmn); - } - - for (i = 0; i < mme_config.gummei.nb_mme_gid; i++) { - S1ap_MME_Group_ID_t *mme_gid; - - /* FIXME: free object from list once encoded */ - mme_gid = calloc(1, sizeof(*mme_gid)); - INT16_TO_OCTET_STRING(mme_config.gummei.mme_gid[i], mme_gid); - ASN_SEQUENCE_ADD(&servedGUMMEI.servedGroupIDs.list, mme_gid); - } - - for (i = 0; i < mme_config.gummei.nb_mmec; i++) { - S1ap_MME_Code_t *mmec; - - /* FIXME: free object from list once encoded */ - mmec = calloc(1, sizeof(*mmec)); - INT8_TO_OCTET_STRING(mme_config.gummei.mmec[i], mmec); - ASN_SEQUENCE_ADD(&servedGUMMEI.servedMMECs.list, mmec); - } - - config_unlock(&mme_config); - - /* The MME is only serving E-UTRAN RAT, so the list contains only one element */ - ASN_SEQUENCE_ADD(&s1_setup_response_p->servedGUMMEIs, &servedGUMMEI); - - message.procedureCode = S1ap_ProcedureCode_id_S1Setup; - message.direction = S1AP_PDU_PR_successfulOutcome; - - enc_rval = s1ap_mme_encode_pdu(&message, &buffer, &length); - - /* Failed to encode s1 setup response... */ - if (enc_rval < 0) { - S1AP_DEBUG("Removed eNB %d\n", eNB_association->sctp_assoc_id); - s1ap_remove_eNB(eNB_association); - } else { - /* Consider the response as sent. S1AP is ready to accept UE contexts */ - eNB_association->s1_state = S1AP_READY; - } - - MSC_LOG_TX_MESSAGE( - MSC_S1AP_MME, - MSC_S1AP_ENB, - NULL,0, - "0 S1Setup/successfulOutcome assoc_id %u", - eNB_association->sctp_assoc_id); - /* Non-UE signalling -> stream 0 */ - return s1ap_mme_itti_send_sctp_request(buffer, length, eNB_association->sctp_assoc_id, - 0); -} - -//------------------------------------------------------------------------------ -int s1ap_mme_handle_ue_cap_indication(uint32_t assoc_id, uint32_t stream, - struct s1ap_message_s *message) -//------------------------------------------------------------------------------ -{ - ue_description_t *ue_ref; - S1ap_UECapabilityInfoIndicationIEs_t *ue_cap_p; - - DevAssert(message != NULL); - - ue_cap_p = &message->msg.s1ap_UECapabilityInfoIndicationIEs; - - MSC_LOG_RX_MESSAGE( - MSC_S1AP_MME, - MSC_S1AP_ENB, - NULL,0, - "0 UECapabilityInfoIndication/%s eNB_ue_s1ap_id "S1AP_UE_ID_FMT" mme_ue_s1ap_id "S1AP_UE_ID_FMT" ", - s1ap_direction2String[message->direction], - ue_cap_p->eNB_UE_S1AP_ID, - ue_cap_p->mme_ue_s1ap_id); - - if ((ue_ref = s1ap_is_ue_mme_id_in_list(ue_cap_p->mme_ue_s1ap_id)) == NULL) { - S1AP_DEBUG("No UE is attached to this mme UE s1ap id: "S1AP_UE_ID_FMT"\n", - (uint32_t)ue_cap_p->mme_ue_s1ap_id); - return -1; - } - - if (ue_ref->eNB_ue_s1ap_id != ue_cap_p->eNB_UE_S1AP_ID) { - S1AP_DEBUG("Mismatch in eNB UE S1AP ID, known: "S1AP_UE_ID_FMT", received: "S1AP_UE_ID_FMT"\n", - ue_ref->eNB_ue_s1ap_id, (uint32_t)ue_cap_p->eNB_UE_S1AP_ID); - return -1; - } - - /* Just display a warning when message received over wrong stream */ - if (ue_ref->sctp_stream_recv != stream) { - S1AP_ERROR("Received ue capability indication for " - "(MME UE S1AP ID/eNB UE S1AP ID) ("S1AP_UE_ID_FMT"/"S1AP_UE_ID_FMT") over wrong stream " - "expecting %u, received on %u\n", - (uint32_t)ue_cap_p->mme_ue_s1ap_id, ue_ref->eNB_ue_s1ap_id, - ue_ref->sctp_stream_recv, stream); - } - - /* Forward the ue capabilities to MME application layer */ - { - MessageDef *message_p; - s1ap_ue_cap_ind_t *ue_cap_ind_p; - - message_p = itti_alloc_new_message(TASK_S1AP, S1AP_UE_CAPABILITIES_IND); - - DevAssert(message_p != NULL); - - ue_cap_ind_p = &message_p->ittiMsg.s1ap_ue_cap_ind; - ue_cap_ind_p->eNB_ue_s1ap_id = ue_ref->eNB_ue_s1ap_id; - ue_cap_ind_p->mme_ue_s1ap_id = ue_ref->mme_ue_s1ap_id; - - DevCheck(ue_cap_p->ueRadioCapability.size < 100, - 100, ue_cap_p->ueRadioCapability.size, 0); - - memcpy(ue_cap_ind_p->radio_capabilities, ue_cap_p->ueRadioCapability.buf, - ue_cap_p->ueRadioCapability.size); - - ue_cap_ind_p->radio_capabilities_length = ue_cap_p->ueRadioCapability.size; - - MSC_LOG_TX_MESSAGE( - MSC_S1AP_MME, - MSC_MMEAPP_MME, - NULL,0, - "0 S1AP_UE_CAPABILITIES_IND eNB_ue_s1ap_id "S1AP_UE_ID_FMT" mme_ue_s1ap_id "S1AP_UE_ID_FMT" len %u", - ue_cap_ind_p->eNB_ue_s1ap_id, - ue_cap_ind_p->mme_ue_s1ap_id, - ue_cap_ind_p->radio_capabilities_length); - - return itti_send_msg_to_task(TASK_MME_APP, INSTANCE_DEFAULT, message_p); - } - return 0; -} - -//////////////////////////////////////////////////////////////////////////////// -//******************* Context Management procedures **************************// -//////////////////////////////////////////////////////////////////////////////// - -//------------------------------------------------------------------------------ -int s1ap_mme_handle_initial_context_setup_response( - uint32_t assoc_id, - uint32_t stream, - struct s1ap_message_s *message) -//------------------------------------------------------------------------------ -{ - - S1ap_InitialContextSetupResponseIEs_t *initialContextSetupResponseIEs_p = NULL; - S1ap_E_RABSetupItemCtxtSURes_t *eRABSetupItemCtxtSURes_p = NULL; - ue_description_t *ue_ref = NULL; - MessageDef *message_p = NULL; - - initialContextSetupResponseIEs_p = &message->msg.s1ap_InitialContextSetupResponseIEs; - - MSC_LOG_RX_MESSAGE( - MSC_S1AP_MME, - MSC_S1AP_ENB, - NULL,0, - "0 InitialContextSetup/%s eNB_ue_s1ap_id "S1AP_UE_ID_FMT" mme_ue_s1ap_id "S1AP_UE_ID_FMT" len %u", - s1ap_direction2String[message->direction], - initialContextSetupResponseIEs_p->eNB_UE_S1AP_ID, - initialContextSetupResponseIEs_p->mme_ue_s1ap_id); - - if ((ue_ref = s1ap_is_ue_mme_id_in_list( - (uint32_t)initialContextSetupResponseIEs_p->mme_ue_s1ap_id)) == NULL) { - S1AP_DEBUG("No UE is attached to this mme UE s1ap id: "S1AP_UE_ID_FMT" %u(10)\n", - (uint32_t)initialContextSetupResponseIEs_p->mme_ue_s1ap_id, - (uint32_t)initialContextSetupResponseIEs_p->mme_ue_s1ap_id); - return -1; - } - - if (ue_ref->eNB_ue_s1ap_id != - initialContextSetupResponseIEs_p->eNB_UE_S1AP_ID) { - S1AP_DEBUG("Mismatch in eNB UE S1AP ID, known: "S1AP_UE_ID_FMT" %u(10), received: 0x%06x %u(10)\n", - ue_ref->eNB_ue_s1ap_id, - ue_ref->eNB_ue_s1ap_id, - (uint32_t)initialContextSetupResponseIEs_p->eNB_UE_S1AP_ID, - (uint32_t)initialContextSetupResponseIEs_p->eNB_UE_S1AP_ID); - return -1; - } - - if (initialContextSetupResponseIEs_p->e_RABSetupListCtxtSURes.s1ap_E_RABSetupItemCtxtSURes.count - != 1) { - S1AP_DEBUG("E-RAB creation has failed\n"); - return -1; - } - - ue_ref->s1_ue_state = S1AP_UE_CONNECTED; - - message_p = itti_alloc_new_message(TASK_S1AP, MME_APP_INITIAL_CONTEXT_SETUP_RSP); - - AssertFatal(message_p != NULL,"itti_alloc_new_message Failed"); - memset((void*)&message_p->ittiMsg.mme_app_initial_context_setup_rsp, - 0, - sizeof(mme_app_initial_context_setup_rsp_t)); - - /* Bad, very bad cast... */ - eRABSetupItemCtxtSURes_p = (S1ap_E_RABSetupItemCtxtSURes_t *) - initialContextSetupResponseIEs_p->e_RABSetupListCtxtSURes.s1ap_E_RABSetupItemCtxtSURes.array[0]; - - - MME_APP_INITIAL_CONTEXT_SETUP_RSP(message_p).mme_ue_s1ap_id = ue_ref->mme_ue_s1ap_id; - MME_APP_INITIAL_CONTEXT_SETUP_RSP(message_p).eps_bearer_id = eRABSetupItemCtxtSURes_p->e_RAB_ID ; - MME_APP_INITIAL_CONTEXT_SETUP_RSP(message_p).bearer_s1u_enb_fteid.ipv4 = 1; // TO DO - MME_APP_INITIAL_CONTEXT_SETUP_RSP(message_p).bearer_s1u_enb_fteid.ipv6 = 0; // TO DO - MME_APP_INITIAL_CONTEXT_SETUP_RSP(message_p).bearer_s1u_enb_fteid.interface_type = S1_U_ENODEB_GTP_U; - MME_APP_INITIAL_CONTEXT_SETUP_RSP(message_p).bearer_s1u_enb_fteid.teid = htonl(*((uint32_t *)eRABSetupItemCtxtSURes_p->gTP_TEID.buf)); - memcpy(&MME_APP_INITIAL_CONTEXT_SETUP_RSP(message_p).bearer_s1u_enb_fteid.ipv4_address, - eRABSetupItemCtxtSURes_p->transportLayerAddress.buf, - 4); - - - MSC_LOG_TX_MESSAGE( - MSC_S1AP_MME, - MSC_MMEAPP_MME, - NULL,0, - "0 MME_APP_INITIAL_CONTEXT_SETUP_RSP mme_ue_s1ap_id "S1AP_UE_ID_FMT" ebi %u s1u enb teid %u", - MME_APP_INITIAL_CONTEXT_SETUP_RSP(message_p).mme_ue_s1ap_id, - MME_APP_INITIAL_CONTEXT_SETUP_RSP(message_p).eps_bearer_id, - MME_APP_INITIAL_CONTEXT_SETUP_RSP(message_p).bearer_s1u_enb_fteid.teid); - - return itti_send_msg_to_task(TASK_MME_APP, INSTANCE_DEFAULT, message_p); -} - - -//------------------------------------------------------------------------------ -int s1ap_mme_handle_ue_context_release_request(uint32_t assoc_id, - uint32_t stream, struct s1ap_message_s *message) -//------------------------------------------------------------------------------ -{ - S1ap_UEContextReleaseRequestIEs_t *ueContextReleaseRequest_p = NULL; - ue_description_t *ue_ref = NULL; - MessageDef *message_p = NULL; - - ueContextReleaseRequest_p = &message->msg.s1ap_UEContextReleaseRequestIEs; - - MSC_LOG_RX_MESSAGE( - MSC_S1AP_MME, - MSC_S1AP_ENB, - NULL,0, - "0 UEContextReleaseRequest/%s eNB_ue_s1ap_id "S1AP_UE_ID_FMT" mme_ue_s1ap_id "S1AP_UE_ID_FMT" len %u", - s1ap_direction2String[message->direction], - ueContextReleaseRequest_p->eNB_UE_S1AP_ID, - ueContextReleaseRequest_p->mme_ue_s1ap_id); - - /* The UE context release procedure is initiated if the cause is != than user inactivity. - * TS36.413 #8.3.2.2. - */ - if (ueContextReleaseRequest_p->cause.present == S1ap_Cause_PR_radioNetwork) { - if (ueContextReleaseRequest_p->cause.choice.radioNetwork == - S1ap_CauseRadioNetwork_user_inactivity) { - S1AP_DEBUG("UE_CONTEXT_RELEASE_REQUEST ignored, cause user inactivity\n"); - MSC_LOG_EVENT( - MSC_S1AP_MME, - "0 UE_CONTEXT_RELEASE_REQUEST ignored, cause user inactivity", - ueContextReleaseRequest_p->mme_ue_s1ap_id); - return -1; - } - } - - if ((ue_ref = s1ap_is_ue_mme_id_in_list( - ueContextReleaseRequest_p->mme_ue_s1ap_id)) == NULL) { - /* MME doesn't know the MME UE S1AP ID provided. - * TODO - */ - S1AP_DEBUG("UE_CONTEXT_RELEASE_REQUEST ignored cause could not get context with mme_ue_s1ap_id "S1AP_UE_ID_FMT" %u(10)\n", - ueContextReleaseRequest_p->mme_ue_s1ap_id, - ueContextReleaseRequest_p->mme_ue_s1ap_id); - MSC_LOG_EVENT( - MSC_S1AP_MME, - "0 UE_CONTEXT_RELEASE_REQUEST ignored, no context mme_ue_s1ap_id "S1AP_UE_ID_FMT" ", - ueContextReleaseRequest_p->mme_ue_s1ap_id); - return -1; - } else { - if (ue_ref->eNB_ue_s1ap_id == (ueContextReleaseRequest_p->eNB_UE_S1AP_ID & - 0x00ffffff)) { - /* Both eNB UE S1AP ID and MME UE S1AP ID match. - * -> Send a UE context Release Command to eNB. - * TODO - */ - //s1ap_mme_generate_ue_context_release_command(ue_ref); - // UE context will be removed when receiving UE_CONTEXT_RELEASE_COMPLETE - - message_p = itti_alloc_new_message(TASK_S1AP, S1AP_UE_CONTEXT_RELEASE_REQ); - - AssertFatal(message_p != NULL,"itti_alloc_new_message Failed"); - memset((void*)&message_p->ittiMsg.s1ap_ue_context_release_req, - 0, - sizeof(s1ap_ue_context_release_req_t)); - - S1AP_UE_CONTEXT_RELEASE_REQ(message_p).mme_ue_s1ap_id = ue_ref->mme_ue_s1ap_id; - - MSC_LOG_TX_MESSAGE( - MSC_S1AP_MME, - MSC_MMEAPP_MME, - NULL,0, - "0 S1AP_UE_CONTEXT_RELEASE_REQ mme_ue_s1ap_id "S1AP_UE_ID_FMT" ", - S1AP_UE_CONTEXT_RELEASE_REQ(message_p).mme_ue_s1ap_id); - - return itti_send_msg_to_task(TASK_MME_APP, INSTANCE_DEFAULT, message_p); - - } else { - // TODO - S1AP_DEBUG("UE_CONTEXT_RELEASE_REQUEST ignored, cause mismatch eNB_ue_s1ap_id: ctxt "S1AP_UE_ID_FMT" != request "S1AP_UE_ID_FMT" ", - ue_ref->eNB_ue_s1ap_id, ueContextReleaseRequest_p->eNB_UE_S1AP_ID); - MSC_LOG_EVENT( - MSC_S1AP_MME, - "0 UE_CONTEXT_RELEASE_REQUEST ignored, cause mismatch eNB_ue_s1ap_id: ctxt "S1AP_UE_ID_FMT" != request "S1AP_UE_ID_FMT" ", - ue_ref->eNB_ue_s1ap_id, ueContextReleaseRequest_p->eNB_UE_S1AP_ID); - return -1; - } - } - - return 0; -} - -//------------------------------------------------------------------------------ -static int s1ap_mme_generate_ue_context_release_command( - ue_description_t *ue_ref) -//------------------------------------------------------------------------------ -{ - uint8_t *buffer; - uint32_t length; - - s1ap_message message; - S1ap_UEContextReleaseCommandIEs_t *ueContextReleaseCommandIEs_p; - - if (ue_ref == NULL) { - return -1; - } - - memset(&message, 0, sizeof(s1ap_message)); - - message.procedureCode = S1ap_ProcedureCode_id_UEContextRelease; - message.direction = S1AP_PDU_PR_initiatingMessage; - - ueContextReleaseCommandIEs_p = &message.msg.s1ap_UEContextReleaseCommandIEs; - - /* Fill in ID pair */ - ueContextReleaseCommandIEs_p->uE_S1AP_IDs.present = S1ap_UE_S1AP_IDs_PR_uE_S1AP_ID_pair; - ueContextReleaseCommandIEs_p->uE_S1AP_IDs.choice.uE_S1AP_ID_pair.mME_UE_S1AP_ID = - ue_ref->mme_ue_s1ap_id; - ueContextReleaseCommandIEs_p->uE_S1AP_IDs.choice.uE_S1AP_ID_pair.eNB_UE_S1AP_ID = - ue_ref->eNB_ue_s1ap_id; - ueContextReleaseCommandIEs_p->uE_S1AP_IDs.choice.uE_S1AP_ID_pair.iE_Extensions = - NULL; - - ueContextReleaseCommandIEs_p->cause.present = S1ap_Cause_PR_radioNetwork; - ueContextReleaseCommandIEs_p->cause.choice.radioNetwork = - S1ap_CauseRadioNetwork_release_due_to_eutran_generated_reason; - - if (s1ap_mme_encode_pdu(&message, &buffer, &length) < 0) { - MSC_LOG_EVENT( - MSC_S1AP_MME, - "0 UEContextRelease/initiatingMessage eNB_ue_s1ap_id "S1AP_UE_ID_FMT" mme_ue_s1ap_id "S1AP_UE_ID_FMT" encoding failed", - ue_ref->eNB_ue_s1ap_id, - ue_ref->mme_ue_s1ap_id); - return -1; - } - MSC_LOG_TX_MESSAGE( - MSC_S1AP_MME, - MSC_S1AP_ENB, - NULL,0, - "0 UEContextRelease/initiatingMessage eNB_ue_s1ap_id "S1AP_UE_ID_FMT" mme_ue_s1ap_id "S1AP_UE_ID_FMT"", - ue_ref->eNB_ue_s1ap_id,ue_ref->mme_ue_s1ap_id); - - return s1ap_mme_itti_send_sctp_request(buffer, length, ue_ref->eNB->sctp_assoc_id, - ue_ref->sctp_stream_send); -} - - -//------------------------------------------------------------------------------ -int s1ap_handle_ue_context_release_command( - const s1ap_ue_context_release_command_t * const ue_context_release_command_pP) -//------------------------------------------------------------------------------ -{ - ue_description_t *ue_ref_p = NULL; - - if ((ue_ref_p = s1ap_is_ue_mme_id_in_list( - ue_context_release_command_pP->mme_ue_s1ap_id)) == NULL) { - /* MME doesn't know the MME UE S1AP ID provided. - * TODO - */ - S1AP_DEBUG("UE_CONTEXT_RELEASE_COMMAND ignored cause could not get context with mme_ue_s1ap_id "S1AP_UE_ID_FMT" %u(10)\n", - ue_context_release_command_pP->mme_ue_s1ap_id, - ue_context_release_command_pP->mme_ue_s1ap_id); - MSC_LOG_EVENT( - MSC_S1AP_MME, - "0 UE_CONTEXT_RELEASE_COMMAND ignored, no context mme_ue_s1ap_id", - ue_context_release_command_pP->mme_ue_s1ap_id); - return -1; - } else { - return s1ap_mme_generate_ue_context_release_command(ue_ref_p); - } - return -1; -} - -//------------------------------------------------------------------------------ -int s1ap_mme_handle_ue_context_release_complete(uint32_t assoc_id, - uint32_t stream, struct s1ap_message_s *message) -//------------------------------------------------------------------------------ -{ - S1ap_UEContextReleaseCompleteIEs_t *ueContextReleaseComplete_p; - ue_description_t *ue_ref = NULL; - MessageDef *message_p = NULL; - - ueContextReleaseComplete_p = &message->msg.s1ap_UEContextReleaseCompleteIEs; - MSC_LOG_RX_MESSAGE( - MSC_S1AP_MME, - MSC_S1AP_ENB, - NULL,0, - "0 UEContextRelease/%s eNB_ue_s1ap_id "S1AP_UE_ID_FMT" mme_ue_s1ap_id "S1AP_UE_ID_FMT" len %u", - s1ap_direction2String[message->direction], - ueContextReleaseComplete_p->eNB_UE_S1AP_ID, - ueContextReleaseComplete_p->mme_ue_s1ap_id); - - if ((ue_ref = s1ap_is_ue_mme_id_in_list( - ueContextReleaseComplete_p->mme_ue_s1ap_id)) == NULL) { - /* MME doesn't know the MME UE S1AP ID provided. - * TODO - */ - MSC_LOG_EVENT( - MSC_S1AP_MME, - "0 UEContextReleaseComplete ignored, no context mme_ue_s1ap_id "S1AP_UE_ID_FMT" ", - ueContextReleaseComplete_p->mme_ue_s1ap_id); - return -1; - } - - /* eNB has sent a release complete message. We can safely remove UE context. - * TODO: inform NAS and remove e-RABS. - */ - message_p = itti_alloc_new_message(TASK_S1AP, S1AP_UE_CONTEXT_RELEASE_COMPLETE); - - AssertFatal(message_p != NULL,"itti_alloc_new_message Failed"); - memset((void*)&message_p->ittiMsg.s1ap_ue_context_release_complete, - 0, - sizeof(s1ap_ue_context_release_complete_t)); - - S1AP_UE_CONTEXT_RELEASE_COMPLETE(message_p).mme_ue_s1ap_id = ue_ref->mme_ue_s1ap_id; - - MSC_LOG_TX_MESSAGE( - MSC_S1AP_MME, - MSC_MMEAPP_MME, - NULL,0, - "0 S1AP_UE_CONTEXT_RELEASE_COMPLETE mme_ue_s1ap_id "S1AP_UE_ID_FMT" ", - S1AP_UE_CONTEXT_RELEASE_COMPLETE(message_p).mme_ue_s1ap_id); - - itti_send_msg_to_task(TASK_MME_APP, INSTANCE_DEFAULT, message_p); - - s1ap_remove_ue(ue_ref); - S1AP_DEBUG("Removed UE "S1AP_UE_ID_FMT"\n", - (uint32_t)ueContextReleaseComplete_p->mme_ue_s1ap_id); - return 0; -} - -//------------------------------------------------------------------------------ -int s1ap_mme_handle_initial_context_setup_failure(uint32_t assoc_id, - uint32_t stream, struct s1ap_message_s *message) -//------------------------------------------------------------------------------ -{ - S1ap_InitialContextSetupFailureIEs_t *initialContextSetupFailureIEs_p; - - ue_description_t *ue_ref = NULL; - - initialContextSetupFailureIEs_p = &message->msg.s1ap_InitialContextSetupFailureIEs; - MSC_LOG_RX_MESSAGE( - MSC_S1AP_MME, - MSC_S1AP_ENB, - NULL,0, - "0 InitialContextSetup/%s eNB_ue_s1ap_id "S1AP_UE_ID_FMT" mme_ue_s1ap_id "S1AP_UE_ID_FMT" len %u", - s1ap_direction2String[message->direction], - initialContextSetupFailureIEs_p->eNB_UE_S1AP_ID, - initialContextSetupFailureIEs_p->mme_ue_s1ap_id); - - if ((ue_ref = s1ap_is_ue_mme_id_in_list( - initialContextSetupFailureIEs_p->mme_ue_s1ap_id)) == NULL) { - /* MME doesn't know the MME UE S1AP ID provided. */ - MSC_LOG_EVENT( - MSC_S1AP_MME, - "0 InitialContextSetupFailure ignored, no context mme_ue_s1ap_id "S1AP_UE_ID_FMT" ", - initialContextSetupFailureIEs_p->mme_ue_s1ap_id); - return -1; - } - - if (ue_ref->eNB_ue_s1ap_id != (initialContextSetupFailureIEs_p->eNB_UE_S1AP_ID - & 0x00ffffff)) { - return -1; - } - - s1ap_remove_ue(ue_ref); - MSC_LOG_EVENT( - MSC_S1AP_MME, - "0 Removed UE mme_ue_s1ap_id "S1AP_UE_ID_FMT" ", - initialContextSetupFailureIEs_p->mme_ue_s1ap_id); - S1AP_DEBUG("Removed UE "S1AP_UE_ID_FMT"\n", - (uint32_t)initialContextSetupFailureIEs_p->mme_ue_s1ap_id); - return 0; -} - -//////////////////////////////////////////////////////////////////////////////// -//************************ Handover signalling *******************************// -//////////////////////////////////////////////////////////////////////////////// - -//------------------------------------------------------------------------------ -int s1ap_mme_handle_path_switch_request(uint32_t assoc_id, uint32_t stream, - struct s1ap_message_s *message) -//------------------------------------------------------------------------------ -{ - S1ap_PathSwitchRequestIEs_t *pathSwitchRequest_p; - ue_description_t *ue_ref; - uint32_t eNB_ue_s1ap_id; - - pathSwitchRequest_p = &message->msg.s1ap_PathSwitchRequestIEs; - - // eNB UE S1AP ID is limited to 24 bits - eNB_ue_s1ap_id = (uint32_t)(pathSwitchRequest_p->eNB_UE_S1AP_ID & 0x00ffffff); - - S1AP_DEBUG("Path Switch Request message received from eNB UE S1AP ID: "S1AP_UE_ID_FMT"\n", - (int)eNB_ue_s1ap_id); - - if ((ue_ref = s1ap_is_ue_mme_id_in_list( - pathSwitchRequest_p->sourceMME_UE_S1AP_ID)) == NULL) { - /* The MME UE S1AP ID provided by eNB doesn't point to any valid UE. - * MME replies with a PATH SWITCH REQUEST FAILURE message and start operation - * as described in TS 36.413 [11]. - * TODO - */ - } else { - if (ue_ref->eNB_ue_s1ap_id != eNB_ue_s1ap_id) { - /* Received unique UE eNB ID mismatch with the one known in MME. - * Handle this case as defined upper. - * TODO - */ - return -1; - } - - //TODO: Switch the eRABs provided - } - - return 0; -} - -//------------------------------------------------------------------------------ -int s1ap_handle_sctp_deconnection(uint32_t assoc_id) -//------------------------------------------------------------------------------ -{ - int current_ue_index = 0; - int handled_ues = 0; - int i; - - MessageDef *message_p = NULL; - - ue_description_t *ue_ref = NULL; - eNB_description_t *eNB_association; - - /* Checking that the assoc id has a valid eNB attached to. */ - eNB_association = s1ap_is_eNB_assoc_id_in_list(assoc_id); - - if (eNB_association == NULL) { - S1AP_ERROR("No eNB attached to this assoc_id: %d\n", - assoc_id); - return -1; - } - MSC_LOG_EVENT( - MSC_S1AP_MME, - "0 Event SCTP_CLOSE_ASSOCIATION assoc_id: %d", - assoc_id); - - STAILQ_FOREACH(ue_ref, &eNB_association->ue_list_head, ue_entries) { - /* Ask for a release of each UE context associated to the eNB */ - if (current_ue_index == 0) { - message_p = itti_alloc_new_message(TASK_S1AP, S1AP_ENB_DEREGISTERED_IND); - } - - S1AP_ENB_DEREGISTERED_IND(message_p).mme_ue_s1ap_id[current_ue_index] = ue_ref->mme_ue_s1ap_id; - - if (current_ue_index == 0 && handled_ues > 0) { - S1AP_ENB_DEREGISTERED_IND(message_p).nb_ue_to_deregister = S1AP_ITTI_UE_PER_DEREGISTER_MESSAGE; - itti_send_msg_to_task(TASK_NAS_MME, INSTANCE_DEFAULT, message_p); - } - - handled_ues++; - current_ue_index = handled_ues % S1AP_ITTI_UE_PER_DEREGISTER_MESSAGE; - } - - if ((handled_ues % S1AP_ITTI_UE_PER_DEREGISTER_MESSAGE) != 0) { - S1AP_ENB_DEREGISTERED_IND(message_p).nb_ue_to_deregister = current_ue_index; - - for (i = current_ue_index; i < S1AP_ITTI_UE_PER_DEREGISTER_MESSAGE; i++) { - S1AP_ENB_DEREGISTERED_IND(message_p).mme_ue_s1ap_id[current_ue_index] = 0; - } - - MSC_LOG_TX_MESSAGE( - MSC_S1AP_MME, - MSC_NAS_MME, - NULL,0, - "0 S1AP_ENB_DEREGISTERED_IND num ue to deregister %u", - S1AP_ENB_DEREGISTERED_IND(message_p).nb_ue_to_deregister); - - itti_send_msg_to_task(TASK_NAS_MME, INSTANCE_DEFAULT, message_p); - } - - s1ap_remove_eNB(eNB_association); - s1ap_dump_eNB_list(); - - S1AP_DEBUG("Removed eNB attached to assoc_id: %d\n", - assoc_id); - return 0; -} - -//------------------------------------------------------------------------------ -int s1ap_handle_new_association(sctp_new_peer_t *sctp_new_peer_p) -//------------------------------------------------------------------------------ -{ - eNB_description_t *eNB_association; - - DevAssert(sctp_new_peer_p != NULL); - - /* Checking that the assoc id has a valid eNB attached to. */ - if ((eNB_association = s1ap_is_eNB_assoc_id_in_list(sctp_new_peer_p->assoc_id)) == NULL) { - S1AP_DEBUG("Create eNB context for assoc_id: %d\n", - sctp_new_peer_p->assoc_id); - /* Create new context */ - eNB_association = s1ap_new_eNB(); - - if (eNB_association == NULL) { - /* We failed to allocate memory */ - /* TODO: send reject there */ - S1AP_ERROR("Failed to allocate eNB context for assoc_id: %d\n", - sctp_new_peer_p->assoc_id); - } - } else { - S1AP_DEBUG("eNB context already exists for assoc_id: %d, update it\n", - sctp_new_peer_p->assoc_id); - } - - eNB_association->sctp_assoc_id = sctp_new_peer_p->assoc_id; - - /* Fill in in and out number of streams available on SCTP connection. */ - eNB_association->instreams = sctp_new_peer_p->instreams; - eNB_association->outstreams = sctp_new_peer_p->outstreams; - - /* initialize the next sctp stream to 1 as 0 is reserved for non - * ue associated signalling. - */ - eNB_association->next_sctp_stream = 1; - MSC_LOG_EVENT( - MSC_S1AP_MME, - "0 Event SCTP_NEW_ASSOCIATION assoc_id: %d", - eNB_association->sctp_assoc_id); - - return 0; -} - -//////////////////////////////////////////////////////////////////////////////// -//************************* E-RAB management *********************************// -//////////////////////////////////////////////////////////////////////////////// - -// NOT CALLED -int s1ap_handle_create_session_response(SgwCreateSessionResponse - *session_response_p) -{ - /* We received create session response from S-GW on S11 interface abstraction. - * At least one bearer has been established. We can now send s1ap initial context setup request - * message to eNB. - */ - char supportedAlgorithms[] = { 0x02, 0xa0 }; - char securityKey[] = { 0xfd, 0x23, 0xad, 0x22, 0xd0, 0x21, 0x02, 0x90, 0x19, 0xed, - 0xcf, 0xc9, 0x78, 0x44, 0xba, 0xbb, 0x34, 0x6e, 0xff, 0x89, - 0x1c, 0x3a, 0x56, 0xf0, 0x81, 0x34, 0xdd, 0xee, 0x19, 0x55, - 0xf2, 0x1f - }; - - ue_description_t *ue_ref = NULL; - s1ap_message message; - uint8_t *buffer_p; - uint32_t length; - - S1ap_InitialContextSetupRequestIEs_t *initialContextSetupRequest_p; - S1ap_E_RABToBeSetupItemCtxtSUReq_t e_RABToBeSetup; - - AssertFatal(0, "Not called anymore"); - DevAssert(session_response_p != NULL); - - DevCheck(session_response_p->bearer_context_created.cause == REQUEST_ACCEPTED, - REQUEST_ACCEPTED, session_response_p->bearer_context_created.cause, 0); - - if ((session_response_p->bearer_context_created.s1u_sgw_fteid.ipv4 == 0) && - (session_response_p->bearer_context_created.s1u_sgw_fteid.ipv6 == 0)) { - - S1AP_ERROR("No IP address provided for transport layer address\n" - " -->Sending Intial context setup failure\n"); - return -1; - } - - if ((ue_ref = s1ap_is_teid_in_list(session_response_p->s11_sgw_teid.teid)) == NULL) { - S1AP_DEBUG("[%d] is not attached to any UE context\n", - session_response_p->s11_sgw_teid.teid); - return -1; - } - - memset(&message, 0, sizeof(s1ap_message)); - memset(&e_RABToBeSetup, 0, sizeof(S1ap_E_RABToBeSetupItemCtxtSUReq_t)); - - message.procedureCode = S1ap_ProcedureCode_id_InitialContextSetup; - message.direction = S1AP_PDU_PR_initiatingMessage; - - initialContextSetupRequest_p = &message.msg.s1ap_InitialContextSetupRequestIEs; - - initialContextSetupRequest_p->mme_ue_s1ap_id = ue_ref->mme_ue_s1ap_id; - initialContextSetupRequest_p->eNB_UE_S1AP_ID = ue_ref->eNB_ue_s1ap_id; - - /* uEaggregateMaximumBitrateDL and uEaggregateMaximumBitrateUL expressed in term of bits/sec */ - asn_int642INTEGER( - &initialContextSetupRequest_p->uEaggregateMaximumBitrate.uEaggregateMaximumBitRateDL, - 100000000UL); - asn_int642INTEGER( - &initialContextSetupRequest_p->uEaggregateMaximumBitrate.uEaggregateMaximumBitRateUL, - 50000000UL); - - //initialContextSetupRequest_p->uEaggregateMaximumBitrate.uEaggregateMaximumBitRateDL = 100000000UL; - //initialContextSetupRequest_p->uEaggregateMaximumBitrate.uEaggregateMaximumBitRateUL = 50000000UL; - - e_RABToBeSetup.e_RAB_ID = - session_response_p->bearer_context_created.eps_bearer_id; /* ??? */ - e_RABToBeSetup.e_RABlevelQoSParameters.qCI = 0; // ?? - e_RABToBeSetup.e_RABlevelQoSParameters.allocationRetentionPriority.priorityLevel - = 15; //No priority - e_RABToBeSetup.e_RABlevelQoSParameters.allocationRetentionPriority.pre_emptionCapability - = S1ap_Pre_emptionCapability_shall_not_trigger_pre_emption; - e_RABToBeSetup.e_RABlevelQoSParameters.allocationRetentionPriority.pre_emptionVulnerability - = S1ap_Pre_emptionVulnerability_not_pre_emptable; - - // e_RABToBeSetup.gTP_TEID.buf = calloc(4, sizeof(uint8_t)); - // INT32_TO_BUFFER(session_response_p->bearer_context_created.s1u_sgw_fteid.teid, - // e_RABToBeSetup.gTP_TEID.buf); - // e_RABToBeSetup.gTP_TEID.size = 4; - DevCheck(session_response_p->bearer_context_created.s1u_sgw_fteid.teid != 0, - session_response_p->bearer_context_created.s1u_sgw_fteid.teid, 0, 0); - INT32_TO_OCTET_STRING( - session_response_p->bearer_context_created.s1u_sgw_fteid.teid, - &e_RABToBeSetup.gTP_TEID); - - if ((session_response_p->bearer_context_created.s1u_sgw_fteid.ipv4 == 1) && - (session_response_p->bearer_context_created.s1u_sgw_fteid.ipv6 == 0)) { - /* Only IPv4 supported */ - INT32_TO_BIT_STRING( - session_response_p->bearer_context_created.s1u_sgw_fteid.ipv4_address, - &e_RABToBeSetup.transportLayerAddress); - } else if ((session_response_p->bearer_context_created.s1u_sgw_fteid.ipv4 == 0) && - (session_response_p->bearer_context_created.s1u_sgw_fteid.ipv6 == 1)) { - /* Only IPv6 supported */ - e_RABToBeSetup.transportLayerAddress.buf = calloc(16, sizeof(uint8_t)); - memcpy(e_RABToBeSetup.transportLayerAddress.buf, - (void *)&session_response_p->bearer_context_created.s1u_sgw_fteid.ipv6_address, - 16); - e_RABToBeSetup.transportLayerAddress.size = 16; - e_RABToBeSetup.transportLayerAddress.bits_unused = 0; - } else if ((session_response_p->bearer_context_created.s1u_sgw_fteid.ipv4 == 1) && - (session_response_p->bearer_context_created.s1u_sgw_fteid.ipv6 == 1)) { - /* Both IPv4 and IPv6 supported */ - e_RABToBeSetup.transportLayerAddress.buf = calloc(20, sizeof(uint8_t)); - e_RABToBeSetup.transportLayerAddress.size = 20; - e_RABToBeSetup.transportLayerAddress.bits_unused = 0; - memcpy(e_RABToBeSetup.transportLayerAddress.buf, - &session_response_p->bearer_context_created.s1u_sgw_fteid.ipv4_address, 4); - memcpy(e_RABToBeSetup.transportLayerAddress.buf + 4, - session_response_p->bearer_context_created.s1u_sgw_fteid.ipv6_address, 16); - } - - ASN_SEQUENCE_ADD(&initialContextSetupRequest_p->e_RABToBeSetupListCtxtSUReq, - &e_RABToBeSetup); - - initialContextSetupRequest_p->ueSecurityCapabilities.encryptionAlgorithms.buf = - (uint8_t *)supportedAlgorithms; - initialContextSetupRequest_p->ueSecurityCapabilities.encryptionAlgorithms.size = 2; - initialContextSetupRequest_p->ueSecurityCapabilities.encryptionAlgorithms.bits_unused - = 0; - - initialContextSetupRequest_p->ueSecurityCapabilities.integrityProtectionAlgorithms.buf - = (uint8_t *)supportedAlgorithms; - initialContextSetupRequest_p->ueSecurityCapabilities.integrityProtectionAlgorithms.size - = 2; - initialContextSetupRequest_p->ueSecurityCapabilities.integrityProtectionAlgorithms.bits_unused - = 0; - - initialContextSetupRequest_p->securityKey.buf = (uint8_t *) - securityKey; /* 256 bits length */ - initialContextSetupRequest_p->securityKey.size = 32; - initialContextSetupRequest_p->securityKey.bits_unused = 0; - - if (s1ap_mme_encode_pdu(&message, &buffer_p, &length) < 0) { - return -1; - } - - return s1ap_mme_itti_send_sctp_request(buffer_p, length, ue_ref->eNB->sctp_assoc_id, - ue_ref->sctp_stream_send); - - // return s1ap_mme_encode_initial_context_setup_request(&initialContextSetupRequest, - // ue_ref); -} diff --git a/openair-cn/S1AP/s1ap_mme_handlers.h b/openair-cn/S1AP/s1ap_mme_handlers.h deleted file mode 100644 index fc00d8c8af..0000000000 --- a/openair-cn/S1AP/s1ap_mme_handlers.h +++ /dev/null @@ -1,93 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -#include "s1ap_ies_defs.h" -#include "intertask_interface.h" - -#ifndef S1AP_MME_HANDLERS_H_ -#define S1AP_MME_HANDLERS_H_ - -/** \brief Handle decoded incoming messages from SCTP - * \param assoc_id SCTP association ID - * \param stream Stream number - * \param message_p The message decoded by the ASN1C decoder - * @returns int - **/ -int s1ap_mme_handle_message(uint32_t assoc_id, uint32_t stream, - struct s1ap_message_s *message_p); - -int s1ap_mme_handle_ue_cap_indication(uint32_t assoc_id, uint32_t stream, - struct s1ap_message_s *message); - -/** \brief Handle an S1 Setup request message. - * Typically add the eNB in the list of served eNB if not present, simply reset - * UEs association otherwise. S1SetupResponse message is sent in case of success or - * S1SetupFailure if the MME cannot accept the configuration received. - * \param assoc_id SCTP association ID - * \param stream Stream number - * \param message_p The message decoded by the ASN1C decoder - * @returns int - **/ -int s1ap_mme_handle_s1_setup_request(uint32_t assoc_id, uint32_t stream, - struct s1ap_message_s *message_p); - -int s1ap_mme_handle_path_switch_request(uint32_t assoc_id, uint32_t stream, - struct s1ap_message_s *message_p); - -int s1ap_mme_handle_ue_context_release_request(uint32_t assoc_id, - uint32_t stream, struct s1ap_message_s *message_p); - -int s1ap_handle_ue_context_release_command( - const s1ap_ue_context_release_command_t * const ue_context_release_command_pP); - -int s1ap_mme_handle_ue_context_release_complete(uint32_t assoc_id, - uint32_t stream, struct s1ap_message_s *message_p); - -int s1ap_mme_handle_initial_context_setup_failure(uint32_t assoc_id, - uint32_t stream, struct s1ap_message_s *message_p); - -int s1ap_mme_handle_initial_context_setup_response( - uint32_t assoc_id, - uint32_t stream, - struct s1ap_message_s *message_p); - -int s1ap_handle_sctp_deconnection(uint32_t assoc_id); - -int s1ap_handle_new_association(sctp_new_peer_t *sctp_new_peer_p); - -int s1ap_handle_create_session_response(SgwCreateSessionResponse - *session_response_p); - -int s1ap_mme_set_cause(S1ap_Cause_t *cause_p, S1ap_Cause_PR cause_type, long cause_value); - -int s1ap_mme_generate_s1_setup_failure( - uint32_t assoc_id, S1ap_Cause_PR cause_type, long cause_value, - long time_to_wait); - -#endif /* S1AP_MME_HANDLERS_H_ */ diff --git a/openair-cn/S1AP/s1ap_mme_itti_messaging.c b/openair-cn/S1AP/s1ap_mme_itti_messaging.c deleted file mode 100644 index 1c2a90be61..0000000000 --- a/openair-cn/S1AP/s1ap_mme_itti_messaging.c +++ /dev/null @@ -1,88 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -#include "s1ap_mme_itti_messaging.h" - -int s1ap_mme_itti_send_sctp_request(uint8_t *buffer, uint32_t length, - uint32_t assoc_id, uint16_t stream) -{ - MessageDef *message_p; - - message_p = itti_alloc_new_message(TASK_S1AP, SCTP_DATA_REQ); - - SCTP_DATA_REQ(message_p).buffer = buffer; - SCTP_DATA_REQ(message_p).bufLen = length; - SCTP_DATA_REQ(message_p).assocId = assoc_id; - SCTP_DATA_REQ(message_p).stream = stream; - - return itti_send_msg_to_task(TASK_SCTP, INSTANCE_DEFAULT, message_p); -} - -int s1ap_mme_itti_nas_uplink_ind(const uint32_t ue_id, uint8_t * const buffer, - const uint32_t length) -{ - MessageDef *message_p; - - message_p = itti_alloc_new_message(TASK_S1AP, NAS_UPLINK_DATA_IND); - - NAS_UL_DATA_IND(message_p).UEid = ue_id; - NAS_UL_DATA_IND(message_p).nasMsg.data = buffer; - NAS_UL_DATA_IND(message_p).nasMsg.length = length; - - MSC_LOG_TX_MESSAGE( - MSC_S1AP_MME, - MSC_NAS_MME, - NULL,0, - "0 NAS_UPLINK_DATA_IND ue_id "S1AP_UE_ID_FMT" len %u", - NAS_UL_DATA_IND(message_p).UEid, - NAS_UL_DATA_IND(message_p).nasMsg.length); - - return itti_send_msg_to_task(TASK_NAS_MME, INSTANCE_DEFAULT, message_p); -} - -int s1ap_mme_itti_nas_downlink_cnf(const uint32_t ue_id, - nas_error_code_t error_code) -{ - MessageDef *message_p; - - message_p = itti_alloc_new_message(TASK_S1AP, NAS_DOWNLINK_DATA_CNF); - - NAS_DL_DATA_CNF(message_p).UEid = ue_id; - NAS_DL_DATA_CNF(message_p).errCode = error_code; - - MSC_LOG_TX_MESSAGE( - MSC_S1AP_MME, - MSC_NAS_MME, - NULL,0, - "0 NAS_DOWNLINK_DATA_CNF ue_id "S1AP_UE_ID_FMT" errCode %u", - NAS_DL_DATA_CNF(message_p).UEid, - NAS_DL_DATA_CNF(message_p).errCode); - - return itti_send_msg_to_task(TASK_NAS_MME, INSTANCE_DEFAULT, message_p); -} diff --git a/openair-cn/S1AP/s1ap_mme_itti_messaging.h b/openair-cn/S1AP/s1ap_mme_itti_messaging.h deleted file mode 100644 index 28ad9863c6..0000000000 --- a/openair-cn/S1AP/s1ap_mme_itti_messaging.h +++ /dev/null @@ -1,151 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -#include -#include - -#include "intertask_interface.h" -#include "s1ap_common.h" -#include "msc.h" - -#ifndef S1AP_MME_ITTI_MESSAGING_H_ -#define S1AP_MME_ITTI_MESSAGING_H_ - -int s1ap_mme_itti_send_sctp_request(uint8_t *buffer, uint32_t length, - uint32_t assoc_id, uint16_t stream); - -int s1ap_mme_itti_nas_uplink_ind(const uint32_t ue_id, uint8_t *const buffer, - const uint32_t length); - -int s1ap_mme_itti_nas_downlink_cnf(const uint32_t ue_id, - nas_error_code_t error_code); - - -static inline void s1ap_mme_itti_mme_app_establish_ind( - const uint32_t ue_id, - const uint8_t * const nas_msg, - const uint32_t nas_msg_length, - const long cause, - const uint16_t tac) -{ - MessageDef *message_p = NULL; - - message_p = itti_alloc_new_message(TASK_S1AP, MME_APP_CONNECTION_ESTABLISHMENT_IND); - - MME_APP_CONNECTION_ESTABLISHMENT_IND(message_p).mme_ue_s1ap_id = ue_id; - - MME_APP_CONNECTION_ESTABLISHMENT_IND(message_p).nas.UEid = ue_id; - /* Mapping between asn1 definition and NAS definition */ - MME_APP_CONNECTION_ESTABLISHMENT_IND(message_p).nas.asCause = cause + 1; - MME_APP_CONNECTION_ESTABLISHMENT_IND(message_p).nas.tac = tac; - MME_APP_CONNECTION_ESTABLISHMENT_IND(message_p).nas.initialNasMsg.length = nas_msg_length; - - MME_APP_CONNECTION_ESTABLISHMENT_IND(message_p).nas.initialNasMsg.data = malloc(sizeof(uint8_t) * nas_msg_length); - memcpy(MME_APP_CONNECTION_ESTABLISHMENT_IND(message_p).nas.initialNasMsg.data, nas_msg, nas_msg_length); - - - MSC_LOG_TX_MESSAGE( - MSC_S1AP_MME, - MSC_MMEAPP_MME, - NULL,0, - "0 MME_APP_CONNECTION_ESTABLISHMENT_IND ue_id "S1AP_UE_ID_FMT" as cause %u tac %u len %u", - ue_id, - MME_APP_CONNECTION_ESTABLISHMENT_IND(message_p).nas.asCause, - MME_APP_CONNECTION_ESTABLISHMENT_IND(message_p).nas.tac, - MME_APP_CONNECTION_ESTABLISHMENT_IND(message_p).nas.initialNasMsg.length); - // should be sent to MME_APP, but this one would forward it to NAS_MME, so send it directly to NAS_MME - // but let's see - itti_send_msg_to_task(TASK_MME_APP, INSTANCE_DEFAULT, message_p); -} - - - -static inline void s1ap_mme_itti_nas_establish_ind( - const uint32_t ue_id, uint8_t * const nas_msg, const uint32_t nas_msg_length, - const long cause, const uint16_t tac) -{ - MessageDef *message_p; - - message_p = itti_alloc_new_message(TASK_S1AP, NAS_CONNECTION_ESTABLISHMENT_IND); - - NAS_CONN_EST_IND(message_p).nas.UEid = ue_id; - /* Mapping between asn1 definition and NAS definition */ - NAS_CONN_EST_IND(message_p).nas.asCause = cause + 1; - NAS_CONN_EST_IND(message_p).nas.tac = tac; - NAS_CONN_EST_IND(message_p).nas.initialNasMsg.length = nas_msg_length; - - NAS_CONN_EST_IND(message_p).nas.initialNasMsg.data = malloc(sizeof(uint8_t) * nas_msg_length); - memcpy(NAS_CONN_EST_IND(message_p).nas.initialNasMsg.data, nas_msg, nas_msg_length); - - - MSC_LOG_TX_MESSAGE( - MSC_S1AP_MME, - MSC_NAS_MME, - NULL,0, - "0 NAS_CONNECTION_ESTABLISHMENT_IND ue_id "S1AP_UE_ID_FMT" as cause %u tac %u len %u", - ue_id, - NAS_CONN_EST_IND(message_p).nas.asCause, - NAS_CONN_EST_IND(message_p).nas.tac, - NAS_CONN_EST_IND(message_p).nas.initialNasMsg.length); - - // should be sent to MME_APP, but this one would forward it to NAS_MME, so send it directly to NAS_MME - // but let's see - itti_send_msg_to_task(TASK_NAS_MME, INSTANCE_DEFAULT, message_p); -} - -static inline void s1ap_mme_itti_nas_non_delivery_ind( - const uint32_t ue_id, uint8_t * const nas_msg, const uint32_t nas_msg_length) -{ - MessageDef *message_p; - - message_p = itti_alloc_new_message(TASK_S1AP, NAS_DOWNLINK_DATA_REJ); - - NAS_DL_DATA_REJ(message_p).UEid = ue_id; - /* Mapping between asn1 definition and NAS definition */ - //NAS_NON_DELIVERY_IND(message_p).asCause = cause + 1; - NAS_DL_DATA_REJ(message_p).nasMsg.length = nas_msg_length; - - NAS_DL_DATA_REJ(message_p).nasMsg.data = malloc(sizeof(uint8_t) * nas_msg_length); - memcpy(NAS_DL_DATA_REJ(message_p).nasMsg.data, nas_msg, nas_msg_length); - - - MSC_LOG_TX_MESSAGE( - MSC_S1AP_MME, - MSC_NAS_MME, - NULL,0, - "0 NAS_DOWNLINK_DATA_REJ ue_id "S1AP_UE_ID_FMT" len %u", - ue_id, - NAS_DL_DATA_REJ(message_p).nasMsg.length); - - // should be sent to MME_APP, but this one would forward it to NAS_MME, so send it directly to NAS_MME - // but let's see - itti_send_msg_to_task(TASK_NAS_MME, INSTANCE_DEFAULT, message_p); -} - -#endif /* S1AP_MME_ITTI_MESSAGING_H_ */ diff --git a/openair-cn/S1AP/s1ap_mme_nas_procedures.c b/openair-cn/S1AP/s1ap_mme_nas_procedures.c deleted file mode 100644 index 4b8229e73b..0000000000 --- a/openair-cn/S1AP/s1ap_mme_nas_procedures.c +++ /dev/null @@ -1,765 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -#include -#include - - -#include "s1ap_common.h" -#include "s1ap_ies_defs.h" -#include "s1ap_mme_encoder.h" -#include "s1ap_mme_handlers.h" -#include "s1ap_mme_nas_procedures.h" -#include "s1ap_mme_retransmission.h" - -#include "s1ap_mme_itti_messaging.h" - -#include "s1ap_mme.h" - -#include "intertask_interface.h" -#include "timer.h" - -#include "assertions.h" -#include "conversions.h" -#include "msc.h" - -/* Every time a new UE is associated, increment this variable. - * But care if it wraps to increment also the mme_ue_s1ap_id_has_wrapped - * variable. Limit: UINT32_MAX (in stdint.h). - */ -static uint32_t mme_ue_s1ap_id = 0; -static uint8_t mme_ue_s1ap_id_has_wrapped = 0; - -extern const char *s1ap_direction2String[]; - - -int s1ap_mme_handle_initial_ue_message(uint32_t assoc_id, uint32_t stream, - struct s1ap_message_s *message) -{ - S1ap_InitialUEMessageIEs_t *initialUEMessage_p; - ue_description_t *ue_ref; - eNB_description_t *eNB_ref; - uint32_t eNB_ue_s1ap_id; - - initialUEMessage_p = &message->msg.s1ap_InitialUEMessageIEs; - - MSC_LOG_RX_MESSAGE( - MSC_S1AP_MME, - MSC_S1AP_ENB, - NULL,0, - "0 initialUEMessage/%s assoc_id %u stream %u "S1AP_UE_ID_FMT" ", - s1ap_direction2String[message->direction], - assoc_id, stream, initialUEMessage_p->eNB_UE_S1AP_ID); - - if ((eNB_ref = s1ap_is_eNB_assoc_id_in_list(assoc_id)) == NULL) { - S1AP_DEBUG("Unkwnon eNB on assoc_id %d\n", assoc_id); - return -1; - } - - // eNB UE S1AP ID is limited to 24 bits - eNB_ue_s1ap_id = (uint32_t)(initialUEMessage_p->eNB_UE_S1AP_ID & 0x00ffffff); - - S1AP_DEBUG("New Initial UE message received with eNB UE S1AP ID: "S1AP_UE_ID_FMT"\n", - eNB_ue_s1ap_id); - - ue_ref = s1ap_is_ue_eNB_id_in_list(eNB_ref, eNB_ue_s1ap_id); - - if (ue_ref == NULL) { - uint16_t tac = 0; - - /* This UE eNB Id has currently no known s1 association. - * Create new UE context by associating new mme_ue_s1ap_id. - * Update eNB UE list. - * Forward message to NAS. - */ - if ((ue_ref = s1ap_new_ue(assoc_id)) == NULL) - // If we failed to allocate a new UE return -1 - { - return -1; - } - - ue_ref->s1_ue_state = S1AP_UE_WAITING_CSR; - ue_ref->eNB_ue_s1ap_id = eNB_ue_s1ap_id; - ue_ref->mme_ue_s1ap_id = (uint32_t)ue_ref; - // On which stream we received the message - ue_ref->sctp_stream_recv = stream; - ue_ref->sctp_stream_send = ue_ref->eNB->next_sctp_stream; - - /* Increment the sctp stream for the eNB association. - * If the next sctp stream is >= outstream negociated between eNB and MME, - * wrap to first stream. - * TODO: search for the first available stream instead. - */ - if (ue_ref->eNB->next_sctp_stream++ >= ue_ref->eNB->outstreams) { - ue_ref->eNB->next_sctp_stream = 1; - } - - /* Increment the unique UE mme s1ap id and - * take care about overflow case. - */ - if (mme_ue_s1ap_id_has_wrapped == 0) { - mme_ue_s1ap_id++; - - if (mme_ue_s1ap_id == 0) { - mme_ue_s1ap_id_has_wrapped = 1; - } - } else { - /* TODO: should take the first available mme_ue_s1ap_id instead of - * the mme_ue_s1ap_id variable. - */ - DevMessage("mme ue s1ap id has wrapped -> case not handled\n"); - } - - s1ap_dump_eNB(ue_ref->eNB); - - OCTET_STRING_TO_TAC(&initialUEMessage_p->tai.tAC, tac); - - /* We received the first NAS transport message: initial UE message. - * Send a NAS ESTABLISH IND to NAS layer - */ -#if defined(ORIGINAL_CODE) - s1ap_mme_itti_nas_establish_ind( - ue_ref->mme_ue_s1ap_id, - initialUEMessage_p->nas_pdu.buf, - initialUEMessage_p->nas_pdu.size, - initialUEMessage_p->rrC_Establishment_Cause, - tac); -#else - s1ap_mme_itti_mme_app_establish_ind( - ue_ref->mme_ue_s1ap_id, - initialUEMessage_p->nas_pdu.buf, - initialUEMessage_p->nas_pdu.size, - initialUEMessage_p->rrC_Establishment_Cause, - tac); -#endif - } - - return 0; -} - - - -int s1ap_mme_handle_uplink_nas_transport(uint32_t assoc_id, uint32_t stream, - struct s1ap_message_s *message) -{ - S1ap_UplinkNASTransportIEs_t *uplinkNASTransport_p; - ue_description_t *ue_ref; - - uplinkNASTransport_p = &message->msg.s1ap_UplinkNASTransportIEs; - - MSC_LOG_RX_MESSAGE( - MSC_S1AP_MME, - MSC_S1AP_ENB, - NULL,0, - "0 uplinkNASTransport/%s mme_ue_s1ap_id "S1AP_UE_ID_FMT" eNB_ue_s1ap_id "S1AP_UE_ID_FMT" nas len %u", - s1ap_direction2String[message->direction], - uplinkNASTransport_p->mme_ue_s1ap_id, - uplinkNASTransport_p->eNB_UE_S1AP_ID, - uplinkNASTransport_p->nas_pdu.size); - - if ((ue_ref = s1ap_is_ue_mme_id_in_list(uplinkNASTransport_p->mme_ue_s1ap_id)) - == NULL) { - S1AP_DEBUG("No UE is attached to this mme UE s1ap id: "S1AP_UE_ID_FMT"\n", - (int)uplinkNASTransport_p->mme_ue_s1ap_id); - return -1; - } - - if (ue_ref->s1_ue_state != S1AP_UE_CONNECTED) { - S1AP_DEBUG("Received uplink NAS transport while UE in state != S1AP_UE_CONNECTED\n"); - return -1; - } - - //TODO: forward NAS PDU to NAS -#if defined(DISABLE_USE_NAS) - DevMessage("Can't go further (TODO)\n"); -#else - s1ap_mme_itti_nas_uplink_ind(uplinkNASTransport_p->mme_ue_s1ap_id, uplinkNASTransport_p->nas_pdu.buf, - uplinkNASTransport_p->nas_pdu.size); -#endif - return 0; -} - - - -int s1ap_mme_handle_nas_non_delivery(uint32_t assoc_id, uint32_t stream, - struct s1ap_message_s *message) -{ - S1ap_NASNonDeliveryIndication_IEs_t *nasNonDeliveryIndication_p = NULL; - ue_description_t *ue_ref = NULL; - - /* UE associated signalling on stream == 0 is not valid. */ - if (stream == 0) { - S1AP_DEBUG("Received new nas non delivery on stream == 0\n"); - return -1; - } - - nasNonDeliveryIndication_p = &message->msg.s1ap_NASNonDeliveryIndication_IEs; - - MSC_LOG_RX_MESSAGE( - MSC_S1AP_MME, - MSC_S1AP_ENB, - NULL,0, - "0 NASNonDeliveryIndication/%s mme_ue_s1ap_id "S1AP_UE_ID_FMT" eNB_ue_s1ap_id "S1AP_UE_ID_FMT" cause %u nas len %u", - s1ap_direction2String[message->direction], - nasNonDeliveryIndication_p->mme_ue_s1ap_id, - nasNonDeliveryIndication_p->eNB_UE_S1AP_ID, - nasNonDeliveryIndication_p->cause, - nasNonDeliveryIndication_p->nas_pdu.size); - - if ((ue_ref = s1ap_is_ue_mme_id_in_list(nasNonDeliveryIndication_p->mme_ue_s1ap_id)) - == NULL) { - S1AP_DEBUG("No UE is attached to this mme UE s1ap id: "S1AP_UE_ID_FMT"\n", - (int)nasNonDeliveryIndication_p->mme_ue_s1ap_id); - return -1; - } - - if (ue_ref->s1_ue_state != S1AP_UE_CONNECTED) { - S1AP_DEBUG("Received uplink NASNonDeliveryIndication while UE in state != S1AP_UE_CONNECTED\n"); - return -1; - } - - //TODO: forward NAS PDU to NAS - s1ap_mme_itti_nas_non_delivery_ind( - nasNonDeliveryIndication_p->mme_ue_s1ap_id, - nasNonDeliveryIndication_p->nas_pdu.buf, - nasNonDeliveryIndication_p->nas_pdu.size); - return 0; -} - -int s1ap_generate_downlink_nas_transport(const uint32_t ue_id, void * const data, - const uint32_t size) -{ - ue_description_t *ue_ref; - uint8_t *buffer_p; - uint32_t length; - - if ((ue_ref = s1ap_is_ue_mme_id_in_list(ue_id)) == NULL) { - /* If the UE-associated logical S1-connection is not established, - * the MME shall allocate a unique MME UE S1AP ID to be used for the UE. - */ - S1AP_DEBUG("Unknown UE MME ID "S1AP_UE_ID_FMT", This case is not handled right now\n", ue_id); - - return -1; - } else { - /* We have fount the UE in the list. - * Create new IE list message and encode it. - */ - S1ap_DownlinkNASTransportIEs_t *downlinkNasTransport = NULL; - - s1ap_message message; - - memset(&message, 0, sizeof(s1ap_message)); - - message.procedureCode = S1ap_ProcedureCode_id_downlinkNASTransport; - message.direction = S1AP_PDU_PR_initiatingMessage; - - ue_ref->s1_ue_state = S1AP_UE_CONNECTED; - - downlinkNasTransport = &message.msg.s1ap_DownlinkNASTransportIEs; - - /* Setting UE informations with the ones fount in ue_ref */ - downlinkNasTransport->mme_ue_s1ap_id = ue_ref->mme_ue_s1ap_id; - downlinkNasTransport->eNB_UE_S1AP_ID = ue_ref->eNB_ue_s1ap_id; - - /* Fill in the NAS pdu */ - OCTET_STRING_fromBuf(&downlinkNasTransport->nas_pdu, (char*)data, size); - - if (s1ap_mme_encode_pdu(&message, &buffer_p, &length) < 0) { - // TODO: handle something - return -1; - } - - S1AP_DEBUG("Send S1ap_ProcedureCode_id_downlinkNASTransport ue_id = "S1AP_UE_ID_FMT" mme_ue_s1ap_id = "S1AP_UE_ID_FMT" eNB_UE_S1AP_ID = "S1AP_UE_ID_FMT"\n", - ue_id, - downlinkNasTransport->mme_ue_s1ap_id, - downlinkNasTransport->eNB_UE_S1AP_ID); - - MSC_LOG_TX_MESSAGE( - MSC_S1AP_MME, - MSC_S1AP_ENB, - NULL,0, - "0 downlinkNASTransport/initiatingMessage ue_id "S1AP_UE_ID_FMT" mme_ue_s1ap_id "S1AP_UE_ID_FMT" eNB_ue_s1ap_id"S1AP_UE_ID_FMT" nas length %u", - ue_id, - downlinkNasTransport->mme_ue_s1ap_id, - downlinkNasTransport->eNB_UE_S1AP_ID, - size); - - s1ap_mme_itti_send_sctp_request(buffer_p, length, - ue_ref->eNB->sctp_assoc_id, - ue_ref->sctp_stream_send); - } - - return 0; -} - -#if defined(DISABLE_USE_NAS) -int s1ap_handle_attach_accepted(nas_attach_accept_t *attach_accept_p) -{ - /* We received create session response from S-GW on S11 interface abstraction. - * At least one bearer has been established. We can now send s1ap initial context setup request - * message to eNB. - */ - uint8_t supportedAlgorithms[] = { 0x00, 0x02 }; - uint8_t offset = 0; - uint8_t *buffer_p; - uint32_t length; - - ue_description_t *ue_ref = NULL; - s1ap_message message; - s1ap_initial_ctxt_setup_req_t *initial_p; - - S1ap_InitialContextSetupRequestIEs_t *initialContextSetupRequest_p; - S1ap_E_RABToBeSetupItemCtxtSUReq_t e_RABToBeSetup; - - DevAssert(attach_accept_p != NULL); - - initial_p = &attach_accept_p->transparent; - - if ((ue_ref = s1ap_is_ue_mme_id_in_list(initial_p->mme_ue_s1ap_id)) == NULL) { - S1AP_DEBUG("This mme ue s1ap id ("S1AP_UE_ID_FMT") is not attached to any UE context\n", - initial_p->mme_ue_s1ap_id); - return -1; - } - - /* Start the outcome response timer. - * When time is reached, MME consider that procedure outcome has failed. - */ - // timer_setup(mme_config.s1ap_config.outcome_drop_timer_sec, 0, TASK_S1AP, INSTANCE_DEFAULT, - // TIMER_ONE_SHOT, - // NULL, - // &ue_ref->outcome_response_timer_id); - /* Insert the timer in the MAP of mme_ue_s1ap_id <-> timer_id */ - // s1ap_timer_insert(ue_ref->mme_ue_s1ap_id, ue_ref->outcome_response_timer_id); - - memset(&message, 0, sizeof(s1ap_message)); - memset(&e_RABToBeSetup, 0, sizeof(S1ap_E_RABToBeSetupItemCtxtSUReq_t)); - - message.procedureCode = S1ap_ProcedureCode_id_InitialContextSetup; - message.direction = S1AP_PDU_PR_initiatingMessage; - - initialContextSetupRequest_p = &message.msg.s1ap_InitialContextSetupRequestIEs; - - initialContextSetupRequest_p->mme_ue_s1ap_id = (unsigned long)ue_ref->mme_ue_s1ap_id; - initialContextSetupRequest_p->eNB_UE_S1AP_ID = (unsigned long)ue_ref->eNB_ue_s1ap_id; - - /* uEaggregateMaximumBitrateDL and uEaggregateMaximumBitrateUL expressed in term of bits/sec */ - initialContextSetupRequest_p->uEaggregateMaximumBitrate.uEaggregateMaximumBitRateDL = initial_p->ambr.br_dl; - initialContextSetupRequest_p->uEaggregateMaximumBitrate.uEaggregateMaximumBitRateUL = initial_p->ambr.br_ul; - - e_RABToBeSetup.e_RAB_ID = initial_p->ebi; - e_RABToBeSetup.e_RABlevelQoSParameters.qCI = initial_p->qci; - e_RABToBeSetup.e_RABlevelQoSParameters.allocationRetentionPriority.priorityLevel - = initial_p->prio_level; //No priority - e_RABToBeSetup.e_RABlevelQoSParameters.allocationRetentionPriority.pre_emptionCapability - = initial_p->pre_emp_capability; - e_RABToBeSetup.e_RABlevelQoSParameters.allocationRetentionPriority.pre_emptionVulnerability - = initial_p->pre_emp_vulnerability; - - /* Set the GTP-TEID. This is the S1-U S-GW TEID */ - INT32_TO_OCTET_STRING(initial_p->teid, &e_RABToBeSetup.gTP_TEID); - - /* S-GW IP address(es) for user-plane */ - if ((initial_p->s_gw_address.pdn_type == IPv4) || - (initial_p->s_gw_address.pdn_type == IPv4_AND_v6)) { - e_RABToBeSetup.transportLayerAddress.buf = calloc(4, sizeof(uint8_t)); - /* Only IPv4 supported */ - memcpy(e_RABToBeSetup.transportLayerAddress.buf, - initial_p->s_gw_address.address.ipv4_address, - 4); - offset += 4; - e_RABToBeSetup.transportLayerAddress.size = 4; - e_RABToBeSetup.transportLayerAddress.bits_unused = 0; - } - - if ((initial_p->s_gw_address.pdn_type == IPv6) || - (initial_p->s_gw_address.pdn_type == IPv4_AND_v6)) { - if (offset == 0) { - /* Both IPv4 and IPv6 provided */ - /* TODO: check memory allocation */ - e_RABToBeSetup.transportLayerAddress.buf = calloc(16, sizeof(uint8_t)); - } else { - /* Only IPv6 supported */ - /* TODO: check memory allocation */ - e_RABToBeSetup.transportLayerAddress.buf - = realloc(e_RABToBeSetup.transportLayerAddress.buf, (16 + offset) * sizeof(uint8_t)); - } - - memcpy(&e_RABToBeSetup.transportLayerAddress.buf[offset], - initial_p->s_gw_address.address.ipv6_address, - 16); - e_RABToBeSetup.transportLayerAddress.size = 16 + offset; - e_RABToBeSetup.transportLayerAddress.bits_unused = 0; - } - - ASN_SEQUENCE_ADD(&initialContextSetupRequest_p->e_RABToBeSetupListCtxtSUReq, - &e_RABToBeSetup); - - initialContextSetupRequest_p->ueSecurityCapabilities.encryptionAlgorithms.buf = - (uint8_t *)supportedAlgorithms; - initialContextSetupRequest_p->ueSecurityCapabilities.encryptionAlgorithms.size = 2; - initialContextSetupRequest_p->ueSecurityCapabilities.encryptionAlgorithms.bits_unused - = 0; - - initialContextSetupRequest_p->ueSecurityCapabilities.integrityProtectionAlgorithms.buf - = (uint8_t *)supportedAlgorithms; - initialContextSetupRequest_p->ueSecurityCapabilities.integrityProtectionAlgorithms.size - = 2; - initialContextSetupRequest_p->ueSecurityCapabilities.integrityProtectionAlgorithms.bits_unused - = 0; - - initialContextSetupRequest_p->securityKey.buf = initial_p->keNB; /* 256 bits length */ - initialContextSetupRequest_p->securityKey.size = 32; - initialContextSetupRequest_p->securityKey.bits_unused = 0; - - if (s1ap_mme_encode_pdu(&message, &buffer_p, &length) < 0) { - // TODO: handle something - return -1; - } - - return s1ap_mme_itti_send_sctp_request(buffer_p, length, ue_ref->eNB->sctp_assoc_id, - ue_ref->sctp_stream_send); -} -#else -//void s1ap_handle_conn_est_cnf(nas_conn_est_cnf_t *nas_conn_est_cnf_p) -//{ -// /* We received create session response from S-GW on S11 interface abstraction. -// * At least one bearer has been established. We can now send s1ap initial context setup request -// * message to eNB. -// */ -// uint8_t supportedAlgorithms[] = { 0x00, 0x00 }; -// uint8_t offset = 0; -// uint8_t *buffer_p; -// uint32_t length, teid = 12; -// -// ue_description_t *ue_ref = NULL; -// s1ap_message message; -// -// S1ap_InitialContextSetupRequestIEs_t *initialContextSetupRequest_p; -// S1ap_E_RABToBeSetupItemCtxtSUReq_t e_RABToBeSetup; -// S1ap_NAS_PDU_t nas_pdu; -// -// DevAssert(nas_conn_est_cnf_p != NULL); -// -// if ((ue_ref = s1ap_is_ue_mme_id_in_list(nas_conn_est_cnf_p->UEid)) == NULL) { -// S1AP_DEBUG("This mme ue s1ap id (%08x) is not attached to any UE context\n", -// nas_conn_est_cnf_p->UEid); -// DevParam(nas_conn_est_cnf_p->UEid, 0, 0); -// } -// -// /* Start the outcome response timer. -// * When time is reached, MME consider that procedure outcome has failed. -// */ -//// timer_setup(mme_config.s1ap_config.outcome_drop_timer_sec, 0, TASK_S1AP, INSTANCE_DEFAULT, -//// TIMER_ONE_SHOT, -//// NULL, -//// &ue_ref->outcome_response_timer_id); -// /* Insert the timer in the MAP of mme_ue_s1ap_id <-> timer_id */ -//// s1ap_timer_insert(ue_ref->mme_ue_s1ap_id, ue_ref->outcome_response_timer_id); -// -// memset(&message, 0, sizeof(s1ap_message)); -// memset(&e_RABToBeSetup, 0, sizeof(S1ap_E_RABToBeSetupItemCtxtSUReq_t)); -// -// message.procedureCode = S1ap_ProcedureCode_id_InitialContextSetup; -// message.direction = S1AP_PDU_PR_initiatingMessage; -// -// initialContextSetupRequest_p = &message.msg.s1ap_InitialContextSetupRequestIEs; -// -// initialContextSetupRequest_p->mme_ue_s1ap_id = (unsigned long)ue_ref->mme_ue_s1ap_id; -// initialContextSetupRequest_p->eNB_UE_S1AP_ID = (unsigned long)ue_ref->eNB_ue_s1ap_id; -// -// /* uEaggregateMaximumBitrateDL and uEaggregateMaximumBitrateUL expressed in term of bits/sec */ -//// initialContextSetupRequest_p->uEaggregateMaximumBitrate.uEaggregateMaximumBitRateDL = initial_p->ambr.br_dl; -//// initialContextSetupRequest_p->uEaggregateMaximumBitrate.uEaggregateMaximumBitRateUL = initial_p->ambr.br_ul; -// -// initialContextSetupRequest_p->uEaggregateMaximumBitrate.uEaggregateMaximumBitRateDL = 1024 * 1024; -// initialContextSetupRequest_p->uEaggregateMaximumBitrate.uEaggregateMaximumBitRateDL = 512 * 1024; -// -//// e_RABToBeSetup.e_RAB_ID = initial_p->ebi; -// e_RABToBeSetup.e_RAB_ID = 5; -//// e_RABToBeSetup.e_RABlevelQoSParameters.qCI = initial_p->qci; -// e_RABToBeSetup.e_RABlevelQoSParameters.qCI = 0; -// -// memset(&nas_pdu, 0, sizeof(nas_pdu)); -// -// nas_pdu.size = nas_conn_est_cnf_p->nasMsg.length; -// nas_pdu.buf = nas_conn_est_cnf_p->nasMsg.data; -// -// e_RABToBeSetup.nAS_PDU = &nas_pdu; -// e_RABToBeSetup.e_RABlevelQoSParameters.allocationRetentionPriority.priorityLevel = -// S1ap_PriorityLevel_lowest; -// e_RABToBeSetup.e_RABlevelQoSParameters.allocationRetentionPriority.pre_emptionCapability = -// S1ap_Pre_emptionCapability_shall_not_trigger_pre_emption; -// e_RABToBeSetup.e_RABlevelQoSParameters.allocationRetentionPriority.pre_emptionVulnerability = -// S1ap_Pre_emptionVulnerability_not_pre_emptable; -// INT32_TO_OCTET_STRING(teid, &e_RABToBeSetup.gTP_TEID); -//// e_RABToBeSetup.e_RABlevelQoSParameters.allocationRetentionPriority.priorityLevel -//// = initial_p->prio_level; //No priority -//// e_RABToBeSetup.e_RABlevelQoSParameters.allocationRetentionPriority.pre_emptionCapability -//// = initial_p->pre_emp_capability; -//// e_RABToBeSetup.e_RABlevelQoSParameters.allocationRetentionPriority.pre_emptionVulnerability -//// = initial_p->pre_emp_vulnerability; -// -// /* Set the GTP-TEID. This is the S1-U S-GW TEID */ -//// INT32_TO_OCTET_STRING(initial_p->teid, &e_RABToBeSetup.gTP_TEID); -// -// /* S-GW IP address(es) for user-plane */ -//// if ((initial_p->s_gw_address.pdn_type == IPv4) || -//// (initial_p->s_gw_address.pdn_type == IPv4_AND_v6)) -//// { -//// e_RABToBeSetup.transportLayerAddress.buf = calloc(4, sizeof(uint8_t)); -//// /* Only IPv4 supported */ -//// memcpy(e_RABToBeSetup.transportLayerAddress.buf, -//// initial_p->s_gw_address.address.ipv4_address, -//// 4); -//// offset += 4; -//// e_RABToBeSetup.transportLayerAddress.size = 4; -//// e_RABToBeSetup.transportLayerAddress.bits_unused = 0; -//// } -//// if ((initial_p->s_gw_address.pdn_type == IPv6) || -//// (initial_p->s_gw_address.pdn_type == IPv4_AND_v6)) -//// { -//// if (offset == 0) { -//// /* Both IPv4 and IPv6 provided */ -//// /* TODO: check memory allocation */ -//// e_RABToBeSetup.transportLayerAddress.buf = calloc(16, sizeof(uint8_t)); -//// } else { -//// /* Only IPv6 supported */ -//// /* TODO: check memory allocation */ -//// e_RABToBeSetup.transportLayerAddress.buf -//// = realloc(e_RABToBeSetup.transportLayerAddress.buf, (16 + offset) * sizeof(uint8_t)); -//// } -//// memcpy(&e_RABToBeSetup.transportLayerAddress.buf[offset], -//// initial_p->s_gw_address.address.ipv6_address, -//// 16); -//// e_RABToBeSetup.transportLayerAddress.size = 16 + offset; -//// e_RABToBeSetup.transportLayerAddress.bits_unused = 0; -//// } -// -// ASN_SEQUENCE_ADD(&initialContextSetupRequest_p->e_RABToBeSetupListCtxtSUReq, -// &e_RABToBeSetup); -// -// initialContextSetupRequest_p->ueSecurityCapabilities.encryptionAlgorithms.buf = -// (uint8_t *)supportedAlgorithms; -// initialContextSetupRequest_p->ueSecurityCapabilities.encryptionAlgorithms.size = 2; -// initialContextSetupRequest_p->ueSecurityCapabilities.encryptionAlgorithms.bits_unused -// = 0; -// -// initialContextSetupRequest_p->ueSecurityCapabilities.integrityProtectionAlgorithms.buf -// = (uint8_t *)supportedAlgorithms; -// initialContextSetupRequest_p->ueSecurityCapabilities.integrityProtectionAlgorithms.size -// = 2; -// initialContextSetupRequest_p->ueSecurityCapabilities.integrityProtectionAlgorithms.bits_unused -// = 0; -// -//// initialContextSetupRequest_p->securityKey.buf = initial_p->keNB; /* 256 bits length */ -// uint8_t keNB[32]; -// memset(keNB, 0, sizeof(keNB)); -// -// initialContextSetupRequest_p->securityKey.buf = keNB; -// initialContextSetupRequest_p->securityKey.size = 32; -// initialContextSetupRequest_p->securityKey.bits_unused = 0; -// -// if (s1ap_mme_encode_pdu(&message, &buffer_p, &length) < 0) { -// // TODO: handle something -// DevMessage("Failed to encode initial context setup request message\n"); -// } -// -// free(nas_conn_est_cnf_p->nasMsg.data); -// -// s1ap_mme_itti_send_sctp_request(buffer_p, length, ue_ref->eNB->sctp_assoc_id, -// ue_ref->sctp_stream_send); -//} - -void s1ap_handle_conn_est_cnf(const mme_app_connection_establishment_cnf_t * const conn_est_cnf_pP) -{ - /* We received create session response from S-GW on S11 interface abstraction. - * At least one bearer has been established. We can now send s1ap initial context setup request - * message to eNB. - */ - uint8_t offset = 0; - uint8_t *buffer_p = NULL; - uint32_t length = 0; - ue_description_t *ue_ref = NULL; - S1ap_InitialContextSetupRequestIEs_t *initialContextSetupRequest_p = NULL; - S1ap_E_RABToBeSetupItemCtxtSUReq_t e_RABToBeSetup; - S1ap_NAS_PDU_t nas_pdu; - s1ap_message message; - - DevAssert(conn_est_cnf_pP != NULL); - - if ((ue_ref = s1ap_is_ue_mme_id_in_list(conn_est_cnf_pP->nas_conn_est_cnf.UEid)) == NULL) { - S1AP_DEBUG("This mme ue s1ap id ("S1AP_UE_ID_FMT") is not attached to any UE context\n", - conn_est_cnf_pP->nas_conn_est_cnf.UEid); - - DevParam(conn_est_cnf_pP->nas_conn_est_cnf.UEid, 0, 0); - } - - /* Start the outcome response timer. - * When time is reached, MME consider that procedure outcome has failed. - */ - // timer_setup(mme_config.s1ap_config.outcome_drop_timer_sec, 0, TASK_S1AP, INSTANCE_DEFAULT, - // TIMER_ONE_SHOT, - // NULL, - // &ue_ref->outcome_response_timer_id); - /* Insert the timer in the MAP of mme_ue_s1ap_id <-> timer_id */ - // s1ap_timer_insert(ue_ref->mme_ue_s1ap_id, ue_ref->outcome_response_timer_id); - - memset(&message, 0, sizeof(s1ap_message)); - memset(&e_RABToBeSetup, 0, sizeof(S1ap_E_RABToBeSetupItemCtxtSUReq_t)); - - message.procedureCode = S1ap_ProcedureCode_id_InitialContextSetup; - message.direction = S1AP_PDU_PR_initiatingMessage; - - initialContextSetupRequest_p = &message.msg.s1ap_InitialContextSetupRequestIEs; - - initialContextSetupRequest_p->mme_ue_s1ap_id = (unsigned long)ue_ref->mme_ue_s1ap_id; - initialContextSetupRequest_p->eNB_UE_S1AP_ID = (unsigned long)ue_ref->eNB_ue_s1ap_id; - - /* uEaggregateMaximumBitrateDL and uEaggregateMaximumBitrateUL expressed in term of bits/sec */ - asn_uint642INTEGER(&initialContextSetupRequest_p->uEaggregateMaximumBitrate.uEaggregateMaximumBitRateDL, conn_est_cnf_pP->ambr.br_dl); - asn_uint642INTEGER(&initialContextSetupRequest_p->uEaggregateMaximumBitrate.uEaggregateMaximumBitRateUL, conn_est_cnf_pP->ambr.br_ul); - - e_RABToBeSetup.e_RAB_ID = conn_est_cnf_pP->eps_bearer_id; //5; - e_RABToBeSetup.e_RABlevelQoSParameters.qCI = conn_est_cnf_pP->bearer_qos_qci; - - - memset(&nas_pdu, 0, sizeof(nas_pdu)); - nas_pdu.size = conn_est_cnf_pP->nas_conn_est_cnf.nasMsg.length; - nas_pdu.buf = conn_est_cnf_pP->nas_conn_est_cnf.nasMsg.data; - e_RABToBeSetup.nAS_PDU = &nas_pdu; - -#if defined(ORIGINAL_S1AP_CODE) - e_RABToBeSetup.e_RABlevelQoSParameters.allocationRetentionPriority.priorityLevel = - S1ap_PriorityLevel_lowest; - e_RABToBeSetup.e_RABlevelQoSParameters.allocationRetentionPriority.pre_emptionCapability = - S1ap_Pre_emptionCapability_shall_not_trigger_pre_emption; - e_RABToBeSetup.e_RABlevelQoSParameters.allocationRetentionPriority.pre_emptionVulnerability = - S1ap_Pre_emptionVulnerability_not_pre_emptable; -#else - e_RABToBeSetup.e_RABlevelQoSParameters.allocationRetentionPriority.priorityLevel = - conn_est_cnf_pP->bearer_qos_prio_level; - e_RABToBeSetup.e_RABlevelQoSParameters.allocationRetentionPriority.pre_emptionCapability = - conn_est_cnf_pP->bearer_qos_pre_emp_capability; - e_RABToBeSetup.e_RABlevelQoSParameters.allocationRetentionPriority.pre_emptionVulnerability = - conn_est_cnf_pP->bearer_qos_pre_emp_vulnerability; -#endif - /* Set the GTP-TEID. This is the S1-U S-GW TEID */ - INT32_TO_OCTET_STRING(conn_est_cnf_pP->bearer_s1u_sgw_fteid.teid, &e_RABToBeSetup.gTP_TEID); - - /* S-GW IP address(es) for user-plane */ - if (conn_est_cnf_pP->bearer_s1u_sgw_fteid.ipv4) { - e_RABToBeSetup.transportLayerAddress.buf = calloc(4, sizeof(uint8_t)); - /* Only IPv4 supported */ - memcpy(e_RABToBeSetup.transportLayerAddress.buf, - &conn_est_cnf_pP->bearer_s1u_sgw_fteid.ipv4_address, - 4); - offset += 4; - e_RABToBeSetup.transportLayerAddress.size = 4; - e_RABToBeSetup.transportLayerAddress.bits_unused = 0; - } - - if (conn_est_cnf_pP->bearer_s1u_sgw_fteid.ipv6) { - if (offset == 0) { - /* Both IPv4 and IPv6 provided */ - /* TODO: check memory allocation */ - e_RABToBeSetup.transportLayerAddress.buf = calloc(16, sizeof(uint8_t)); - } else { - /* Only IPv6 supported */ - /* TODO: check memory allocation */ - e_RABToBeSetup.transportLayerAddress.buf - = realloc(e_RABToBeSetup.transportLayerAddress.buf, (16 + offset) * sizeof(uint8_t)); - } - - memcpy(&e_RABToBeSetup.transportLayerAddress.buf[offset], - conn_est_cnf_pP->bearer_s1u_sgw_fteid.ipv6_address, - 16); - e_RABToBeSetup.transportLayerAddress.size = 16 + offset; - e_RABToBeSetup.transportLayerAddress.bits_unused = 0; - } - - ASN_SEQUENCE_ADD(&initialContextSetupRequest_p->e_RABToBeSetupListCtxtSUReq, - &e_RABToBeSetup); - - initialContextSetupRequest_p->ueSecurityCapabilities.encryptionAlgorithms.buf = - (uint8_t *)&conn_est_cnf_pP->security_capabilities_encryption_algorithms; - initialContextSetupRequest_p->ueSecurityCapabilities.encryptionAlgorithms.size = 2; - initialContextSetupRequest_p->ueSecurityCapabilities.encryptionAlgorithms.bits_unused - = 0; - - initialContextSetupRequest_p->ueSecurityCapabilities.integrityProtectionAlgorithms.buf = - (uint8_t *)&conn_est_cnf_pP->security_capabilities_integrity_algorithms; - initialContextSetupRequest_p->ueSecurityCapabilities.integrityProtectionAlgorithms.size - = 2; - initialContextSetupRequest_p->ueSecurityCapabilities.integrityProtectionAlgorithms.bits_unused - = 0; - - S1AP_DEBUG("security_capabilities_encryption_algorithms 0x%04X\n", - conn_est_cnf_pP->security_capabilities_encryption_algorithms); - S1AP_DEBUG("security_capabilities_integrity_algorithms 0x%04X\n", - conn_est_cnf_pP->security_capabilities_integrity_algorithms); - - if (conn_est_cnf_pP->keNB) { - initialContextSetupRequest_p->securityKey.buf = malloc(32); - memcpy(initialContextSetupRequest_p->securityKey.buf, - conn_est_cnf_pP->keNB, - 32); - - initialContextSetupRequest_p->securityKey.size = 32; - } else { - S1AP_DEBUG("No keNB\n"); - initialContextSetupRequest_p->securityKey.buf = NULL; - initialContextSetupRequest_p->securityKey.size = 0; - } - - initialContextSetupRequest_p->securityKey.bits_unused = 0; - - if (s1ap_mme_encode_pdu(&message, &buffer_p, &length) < 0) { - // TODO: handle something - DevMessage("Failed to encode initial context setup request message\n"); - } - - free(conn_est_cnf_pP->nas_conn_est_cnf.nasMsg.data); - - MSC_LOG_TX_MESSAGE( - MSC_S1AP_MME, - MSC_S1AP_ENB, - NULL,0, - "0 InitialContextSetup/initiatingMessage mme_ue_s1ap_id "S1AP_UE_ID_FMT" eNB_ue_s1ap_id "S1AP_UE_ID_FMT" nas length %u", - initialContextSetupRequest_p->mme_ue_s1ap_id, - initialContextSetupRequest_p->eNB_UE_S1AP_ID, - nas_pdu.size); - - s1ap_mme_itti_send_sctp_request( - buffer_p, - length, - ue_ref->eNB->sctp_assoc_id, - ue_ref->sctp_stream_send); -} - -#endif diff --git a/openair-cn/S1AP/s1ap_mme_nas_procedures.h b/openair-cn/S1AP/s1ap_mme_nas_procedures.h deleted file mode 100644 index 51d45f1fb2..0000000000 --- a/openair-cn/S1AP/s1ap_mme_nas_procedures.h +++ /dev/null @@ -1,74 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -#include - -#include "s1ap_ies_defs.h" -#include "intertask_interface.h" - -#ifndef S1AP_MME_NAS_PROCEDURES_H_ -#define S1AP_MME_NAS_PROCEDURES_H_ - -/** \brief Handle an Initial UE message. - * \param assocId lower layer assoc id (SCTP) - * \param stream SCTP stream on which data had been received - * \param message The message as decoded by the ASN.1 codec - * @returns -1 on failure, 0 otherwise - **/ -int s1ap_mme_handle_initial_ue_message(uint32_t assocId, uint32_t stream, - struct s1ap_message_s *message); - -/** \brief Handle an Uplink NAS transport message. - * Process the RRC transparent container and forward it to NAS entity. - * \param assocId lower layer assoc id (SCTP) - * \param stream SCTP stream on which data had been received - * \param message The message as decoded by the ASN.1 codec - * @returns -1 on failure, 0 otherwise - **/ -int s1ap_mme_handle_uplink_nas_transport(uint32_t assocId, uint32_t stream, - struct s1ap_message_s *message); - -/** \brief Handle a NAS non delivery indication message from eNB - * \param assocId lower layer assoc id (SCTP) - * \param stream SCTP stream on which data had been received - * \param message The message as decoded by the ASN.1 codec - * @returns -1 on failure, 0 otherwise - **/ -int s1ap_mme_handle_nas_non_delivery(uint32_t assocId, uint32_t stream, - struct s1ap_message_s *message); - -#if defined(DISABLE_USE_NAS) -int s1ap_handle_attach_accepted(nas_attach_accept_t *attach_accept_p); -#else -void s1ap_handle_conn_est_cnf(const mme_app_connection_establishment_cnf_t * const conn_est_cnf_p); -#endif - -int s1ap_generate_downlink_nas_transport(const uint32_t ue_id, void * const data, - const uint32_t size); -#endif /* S1AP_MME_NAS_PROCEDURES_H_ */ diff --git a/openair-cn/S1AP/s1ap_mme_retransmission.c b/openair-cn/S1AP/s1ap_mme_retransmission.c deleted file mode 100644 index 0ce368ffa8..0000000000 --- a/openair-cn/S1AP/s1ap_mme_retransmission.c +++ /dev/null @@ -1,150 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -#include -#include -#include - -#include "tree.h" -#include "assertions.h" - -#include "intertask_interface.h" - -#include "timer.h" -#include "s1ap_common.h" -#include "s1ap_mme_retransmission.h" - -inline int s1ap_mme_timer_map_compare_id( - struct s1ap_timer_map_s *p1, struct s1ap_timer_map_s *p2); - -/* Reference to tree root element */ -RB_HEAD(s1ap_timer_map, s1ap_timer_map_s) s1ap_timer_tree = RB_INITIALIZER(); - -/* RB tree functions for s1ap timer map are not exposed to the rest of the code - * only declare prototypes here. - */ -RB_PROTOTYPE(s1ap_timer_map, s1ap_timer_map_s, entries, - s1ap_mme_timer_map_compare_id); - -RB_GENERATE(s1ap_timer_map, s1ap_timer_map_s, entries, - s1ap_mme_timer_map_compare_id); - -int s1ap_mme_timer_map_compare_id( - struct s1ap_timer_map_s *p1, struct s1ap_timer_map_s *p2) -{ - if (p1->mme_ue_s1ap_id > 0) { - if (p1->mme_ue_s1ap_id > p2->mme_ue_s1ap_id) { - return 1; - } - - if (p1->mme_ue_s1ap_id < p2->mme_ue_s1ap_id) { - return -1; - } - - return 0; - } - - if (p1->timer_id > p2->timer_id) { - return 1; - } - - if (p1->timer_id < p2->timer_id) { - return -1; - } - - /* Match -> return 0 */ - return 0; -} - -int s1ap_timer_insert(uint32_t mme_ue_s1ap_id, long timer_id) -{ - struct s1ap_timer_map_s *new; - - new = malloc(sizeof(struct s1ap_timer_map_s)); - - new->timer_id = timer_id; - new->mme_ue_s1ap_id = mme_ue_s1ap_id; - - if (RB_INSERT(s1ap_timer_map, &s1ap_timer_tree, new) != NULL) { - S1AP_ERROR("Timer with id 0x%lx already exists\n", timer_id); - free(new); - return -1; - } - - return 0; -} - -int s1ap_handle_timer_expiry(timer_has_expired_t *timer_has_expired) -{ - struct s1ap_timer_map_s *find; - struct s1ap_timer_map_s elm; - - DevAssert(timer_has_expired != NULL); - - memset(&elm, 0, sizeof(elm)); - - elm.timer_id = timer_has_expired->timer_id; - - if ((find = RB_FIND(s1ap_timer_map, &s1ap_timer_tree, &elm)) == NULL) { - S1AP_WARN("Timer id 0x%lx has not been found in tree. Maybe the timer " - "reference has been removed before receiving timer signal\n", - timer_has_expired->timer_id); - return 0; - } - - /* Remove the timer from the map */ - RB_REMOVE(s1ap_timer_map, &s1ap_timer_tree, find); - - /* Destroy the element */ - free(find); - - /* TODO: notify NAS and remove ue context */ - return 0; -} - -int s1ap_timer_remove_ue(uint32_t mme_ue_s1ap_id) -{ - struct s1ap_timer_map_s *find; - - S1AP_DEBUG("Removing timer associated with UE "S1AP_UE_ID_FMT"\n", - mme_ue_s1ap_id); - - DevAssert(mme_ue_s1ap_id != 0); - - RB_FOREACH(find, s1ap_timer_map, &s1ap_timer_tree) { - if (find->mme_ue_s1ap_id == mme_ue_s1ap_id) { - timer_remove(find->timer_id); - /* Remove the timer from the map */ - RB_REMOVE(s1ap_timer_map, &s1ap_timer_tree, find); - /* Destroy the element */ - free(find); - } - } - return 0; -} diff --git a/openair-cn/S1AP/s1ap_mme_retransmission.h b/openair-cn/S1AP/s1ap_mme_retransmission.h deleted file mode 100644 index f13a0c597c..0000000000 --- a/openair-cn/S1AP/s1ap_mme_retransmission.h +++ /dev/null @@ -1,51 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -#include "tree.h" - -#ifndef S1AP_MME_RETRANSMISSION_H_ -#define S1AP_MME_RETRANSMISSION_H_ - -typedef struct s1ap_timer_map_s { - long timer_id; - uint32_t mme_ue_s1ap_id; - - RB_ENTRY(s1ap_timer_map_s) entries; -} s1ap_timer_map_t; - -int s1ap_mme_timer_map_compare_id( - struct s1ap_timer_map_s *p1, struct s1ap_timer_map_s *p2); - -int s1ap_handle_timer_expiry(timer_has_expired_t *timer_has_expired); - -int s1ap_timer_insert(uint32_t mme_ue_s1ap_id, long timer_id); - -int s1ap_timer_remove_ue(uint32_t mme_ue_s1ap_id); - -#endif /* S1AP_MME_RETRANSMISSION_H_ */ diff --git a/openair-cn/S1AP/s1ap_mme_ta.c b/openair-cn/S1AP/s1ap_mme_ta.c deleted file mode 100644 index 706f22a722..0000000000 --- a/openair-cn/S1AP/s1ap_mme_ta.c +++ /dev/null @@ -1,160 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -#include -#include -#include - -#include "assertions.h" -#include "conversions.h" - -#include "mme_config.h" - -#include "s1ap_mme.h" -#include "s1ap_common.h" -#include "s1ap_mme_ta.h" - -static -int s1ap_mme_compare_plmn(S1ap_PLMNidentity_t *plmn) -{ - int i; - uint16_t mcc; - uint16_t mnc; - uint16_t mnc_len; - - DevAssert(plmn != NULL); - - TBCD_TO_MCC_MNC(plmn, mcc, mnc, mnc_len); - - config_read_lock(&mme_config); - - for (i = 0; i < mme_config.gummei.nb_mme_gid; i++) { - S1AP_DEBUG("Comparing plmn_mcc %d/%d, plmn_mnc %d/%d plmn_mnc_len %d/%d\n", - mme_config.gummei.plmn_mcc[i], mcc, - mme_config.gummei.plmn_mnc[i],mnc, - mme_config.gummei.plmn_mnc_len[i],mnc_len); - - if ((mme_config.gummei.plmn_mcc[i] == mcc) && - (mme_config.gummei.plmn_mnc[i] == mnc) && - (mme_config.gummei.plmn_mnc_len[i] == mnc_len)) - /* There is a matching plmn */ - return TA_LIST_AT_LEAST_ONE_MATCH; - } - - config_unlock(&mme_config); - - return TA_LIST_NO_MATCH; -} - -/* @brief compare a list of broadcasted plmns against the MME configured. - */ -static -int s1ap_mme_compare_plmns(S1ap_BPLMNs_t *b_plmns) -{ - int i; - int matching_occurence = 0; - - DevAssert(b_plmns != NULL); - - for (i = 0; i < b_plmns->list.count; i++) { - if (s1ap_mme_compare_plmn(b_plmns->list.array[i]) - == TA_LIST_AT_LEAST_ONE_MATCH) - matching_occurence++; - } - - if (matching_occurence == 0) - return TA_LIST_NO_MATCH; - else if (matching_occurence == b_plmns->list.count - 1) - return TA_LIST_COMPLETE_MATCH; - else - return TA_LIST_AT_LEAST_ONE_MATCH; -} - -/* @brief compare a TAC - */ -static -int s1ap_mme_compare_tac(S1ap_TAC_t *tac) -{ - int i; - uint16_t tac_value; - - DevAssert(tac != NULL); - - OCTET_STRING_TO_TAC(tac, tac_value); - - config_read_lock(&mme_config); - - for (i = 0; i < mme_config.gummei.nb_plmns; i++) { - S1AP_DEBUG("Comparing config tac %d, received tac = %d\n", mme_config.gummei.plmn_tac[i], tac_value); - - if (mme_config.gummei.plmn_tac[i] == tac_value) - return TA_LIST_AT_LEAST_ONE_MATCH; - } - - config_unlock(&mme_config); - - return TA_LIST_NO_MATCH; -} - -/* @brief compare a given ta list against the one provided by mme configuration. - * @param ta_list - * @return - TA_LIST_UNKNOWN_PLMN if at least one TAC match and no PLMN match - * - TA_LIST_UNKNOWN_TAC if at least one PLMN match and no TAC match - * - TA_LIST_RET_OK if both tac and plmn match at least one element - */ -int s1ap_mme_compare_ta_lists(S1ap_SupportedTAs_t *ta_list) -{ - int i; - int tac_ret, bplmn_ret; - - DevAssert(ta_list != NULL); - - /* Parse every item in the list and try to find matching parameters */ - for (i = 0; i < ta_list->list.count; i++) { - S1ap_SupportedTAs_Item_t *ta; - - ta = ta_list->list.array[i]; - DevAssert(ta != NULL); - - tac_ret = s1ap_mme_compare_tac(&ta->tAC); - bplmn_ret = s1ap_mme_compare_plmns(&ta->broadcastPLMNs); - - if (tac_ret == TA_LIST_NO_MATCH && bplmn_ret == TA_LIST_NO_MATCH) { - return TA_LIST_UNKNOWN_PLMN + TA_LIST_UNKNOWN_TAC; - } else { - if (tac_ret > TA_LIST_NO_MATCH && bplmn_ret == TA_LIST_NO_MATCH) { - return TA_LIST_UNKNOWN_PLMN; - } else if (tac_ret == TA_LIST_NO_MATCH && bplmn_ret > TA_LIST_NO_MATCH) { - return TA_LIST_UNKNOWN_TAC; - } - } - } - - return TA_LIST_RET_OK; -} diff --git a/openair-cn/S1AP/s1ap_mme_ta.h b/openair-cn/S1AP/s1ap_mme_ta.h deleted file mode 100644 index 32a6a9cd15..0000000000 --- a/openair-cn/S1AP/s1ap_mme_ta.h +++ /dev/null @@ -1,44 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -#ifndef S1AP_MME_TA_H_ -#define S1AP_MME_TA_H_ - -enum { - TA_LIST_UNKNOWN_TAC = -2, - TA_LIST_UNKNOWN_PLMN = -1, - TA_LIST_RET_OK = 0, - TA_LIST_NO_MATCH = 0x1, - TA_LIST_AT_LEAST_ONE_MATCH = 0x2, - TA_LIST_COMPLETE_MATCH = 0x3, -}; - -int s1ap_mme_compare_ta_lists(S1ap_SupportedTAs_t *ta_list); - -#endif /* S1AP_MME_TA_H_ */ diff --git a/openair-cn/S6A/COPYING b/openair-cn/S6A/COPYING deleted file mode 100644 index 94a9ed024d..0000000000 --- a/openair-cn/S6A/COPYING +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program 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. - - This program 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 this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/openair-cn/S6A/Makefile.am b/openair-cn/S6A/Makefile.am deleted file mode 100644 index 4f781887c9..0000000000 --- a/openair-cn/S6A/Makefile.am +++ /dev/null @@ -1,52 +0,0 @@ -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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 . -# -# Contact Information -# OpenAirInterface Admin: openair_admin@eurecom.fr -# OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr -# -# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. -# -################################################################################ -AM_CFLAGS = \ - @ADD_CFLAGS@ \ - -I$(top_srcdir)/COMMON \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/api/network \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/include \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/ies \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/emm/msg \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/esm/msg \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/util \ - -I$(top_srcdir)/INTERTASK_INTERFACE \ - -I$(top_srcdir)/UTILS - -noinst_LTLIBRARIES = libs6a.la -libs6a_la_LDFLAGS = -all-static - -libs6a_la_SOURCES = \ - s6a_defs.h s6a_messages.h \ - s6a_auth_info.c \ - s6a_dict.c \ - s6a_error.c \ - s6a_peer.c \ - s6a_subscription_data.c \ - s6a_task.c \ - s6a_up_loc.c diff --git a/openair-cn/S6A/freediameter/README.txt b/openair-cn/S6A/freediameter/README.txt deleted file mode 100644 index a1c80e1cab..0000000000 --- a/openair-cn/S6A/freediameter/README.txt +++ /dev/null @@ -1,15 +0,0 @@ -Pre-requisities: -Cmake libgnutls-3.1.0 - -The best way to install freeDiameter is to use to script provided in this folder. - -download tarball here: http://www.freediameter.net/hg/freeDiameter/archive/1.1.5.tar.gz -extract it somewhere. -cd freeDiameter-1.1.5 -patch -p1 < freediameter-1.1.5.patch -mkdir build && cd build -cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr ../ -sudo make install - -if you choose to install libraries in default path (/usr/local/lib), you will have - to tell configure to use LDFLAGS='-L/usr/local/lib' \ No newline at end of file diff --git a/openair-cn/S6A/freediameter/freediameter-1.1.5.patch b/openair-cn/S6A/freediameter/freediameter-1.1.5.patch deleted file mode 100644 index 3b03890675..0000000000 --- a/openair-cn/S6A/freediameter/freediameter-1.1.5.patch +++ /dev/null @@ -1,4296 +0,0 @@ -diff -NaurB -x '*~' -x build freeDiameter-1.1.5-unmodified/extensions/CMakeLists.txt freeDiameter-1.1.5/extensions/CMakeLists.txt ---- freeDiameter-1.1.5-unmodified/extensions/CMakeLists.txt 2012-11-03 18:45:41.000000000 +0100 -+++ freeDiameter-1.1.5/extensions/CMakeLists.txt 2013-02-14 14:40:40.605217128 +0100 -@@ -35,7 +35,7 @@ - - #### - # Diameter applications dictionaries -- -+FD_EXTENSION_SUBDIR(dict_s6a "3GPP S6A TS.29.279-990" ON) - FD_EXTENSION_SUBDIR(dict_nasreq "NASREQ (RFC4005) Dictionary definitions" ON) - FD_EXTENSION_SUBDIR(dict_eap "Diameter EAP (RFC4072) Dictionary definitions" ON) - -diff -NaurB -x '*~' -x build freeDiameter-1.1.5-unmodified/extensions/dict_s6a/CMakeLists.txt freeDiameter-1.1.5/extensions/dict_s6a/CMakeLists.txt ---- freeDiameter-1.1.5-unmodified/extensions/dict_s6a/CMakeLists.txt 1970-01-01 01:00:00.000000000 +0100 -+++ freeDiameter-1.1.5/extensions/dict_s6a/CMakeLists.txt 2012-11-22 17:14:40.177272498 +0100 -@@ -0,0 +1,13 @@ -+# The dict_rfc5777 extension -+PROJECT("S6a protocol based on 3GPP 29.272-990" C) -+ -+# Compile as a module -+FD_ADD_EXTENSION(dict_s6a dict_s6a.c) -+ -+ -+#### -+## INSTALL section ## -+ -+INSTALL(TARGETS dict_s6a -+ LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX} -+ COMPONENT freeDiameter-dictionary-s6a) -diff -NaurB -x '*~' -x build freeDiameter-1.1.5-unmodified/extensions/dict_s6a/dict_s6a.c freeDiameter-1.1.5/extensions/dict_s6a/dict_s6a.c ---- freeDiameter-1.1.5-unmodified/extensions/dict_s6a/dict_s6a.c 1970-01-01 01:00:00.000000000 +0100 -+++ freeDiameter-1.1.5/extensions/dict_s6a/dict_s6a.c 2013-02-13 09:08:27.026025453 +0100 -@@ -0,0 +1,4212 @@ -+/********************************************************************************************************* -+* Software License Agreement (BSD License) * -+* Author: Sebastien ROUX * -+* * -+* Copyright (c) 2013, Eurecom * -+* All rights reserved. * -+* * -+* Redistribution and use of this software in source and binary forms, with or without modification, are * -+* permitted provided that the following conditions are met: * -+* * -+* * Redistributions of source code must retain the above * -+* copyright notice, this list of conditions and the * -+* following disclaimer. * -+* * -+* * Redistributions in binary form must reproduce the above * -+* copyright notice, this list of conditions and the * -+* following disclaimer in the documentation and/or other * -+* materials provided with the distribution. * -+* * -+* * Neither the name of the Teraoka Laboratory nor the * -+* names of its contributors may be used to endorse or * -+* promote products derived from this software without * -+* specific prior written permission of Teraoka Laboratory * -+* * -+* * -+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED * -+* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * -+* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR * -+* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * -+* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * -+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR * -+* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * -+* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * -+*********************************************************************************************************/ -+ -+#include -+ -+/* The content of this file follows the same structure as dict_base_proto.c */ -+ -+#define CHECK_dict_new( _type, _data, _parent, _ref ) \ -+ CHECK_FCT( fd_dict_new( fd_g_config->cnf_dict, (_type), (_data), (_parent), (_ref)) ); -+ -+#define CHECK_dict_search( _type, _criteria, _what, _result ) \ -+ CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, (_type), (_criteria), (_what), (_result), ENOENT) ); -+ -+struct local_rules_definition { -+ char *avp_name; -+ enum rule_position position; -+ int min; -+ int max; -+}; -+ -+#define RULE_ORDER( _position ) ((((_position) == RULE_FIXED_HEAD) || ((_position) == RULE_FIXED_TAIL)) ? 1 : 0 ) -+ -+#define PARSE_loc_rules( _rulearray, _parent) { \ -+ int __ar; \ -+ for (__ar=0; __ar < sizeof(_rulearray) / sizeof((_rulearray)[0]); __ar++) { \ -+ struct dict_rule_data __data = { NULL, \ -+ (_rulearray)[__ar].position, \ -+ 0, \ -+ (_rulearray)[__ar].min, \ -+ (_rulearray)[__ar].max}; \ -+ __data.rule_order = RULE_ORDER(__data.rule_position); \ -+ CHECK_FCT( fd_dict_search( \ -+ fd_g_config->cnf_dict, \ -+ DICT_AVP, \ -+ AVP_BY_NAME_ALL_VENDORS, \ -+ (_rulearray)[__ar].avp_name, \ -+ &__data.rule_avp, 0 ) ); \ -+ if ( !__data.rule_avp ) { \ -+ TRACE_DEBUG(INFO, "AVP Not found: '%s'", (_rulearray)[__ar].avp_name ); \ -+ return ENOENT; \ -+ } \ -+ CHECK_FCT_DO( fd_dict_new( fd_g_config->cnf_dict, DICT_RULE, &__data, _parent, NULL), \ -+ { \ -+ TRACE_DEBUG(INFO, "Error on rule with AVP '%s'", \ -+ (_rulearray)[__ar].avp_name ); \ -+ return EINVAL; \ -+ } ); \ -+ } \ -+} -+ -+#define enumval_def_u32( _val_, _str_ ) \ -+ { _str_, { .u32 = _val_ }} -+ -+#define enumval_def_os( _len_, _val_, _str_ ) \ -+ { _str_, { .os = { .data = (unsigned char *)_val_, .len = _len_ }}} -+ -+/* Defines if there are any */ -+ -+/* Dictionary */ -+ -+int dict_s6a_init(char * conffile) -+{ -+#define VENDOR_3GPP_Id 10415 -+ -+ TRACE_ENTRY("%p", conffile); -+ -+ struct dict_object * vendor_dict; -+ { -+ struct dict_vendor_data vendor_data = { VENDOR_3GPP_Id, "3GPP" }; -+ CHECK_dict_new (DICT_VENDOR, &vendor_data, NULL, &vendor_dict); -+ } -+ -+ struct dict_object * s6a_dict; -+ { -+ struct dict_application_data data = { 16777251, "Diameter S6a 3GPP" }; -+ CHECK_dict_new( DICT_APPLICATION, &data , NULL, &s6a_dict); -+ } -+ -+ /* AVP section */ -+ { -+ /* Loading the derived data formats */ -+ -+ struct dict_object * Time_type; -+ struct dict_object * Address_type; -+ struct dict_object * UTF8String_type; -+ -+ CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "Time", &Time_type); -+ CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "Address", &Address_type); -+ CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "UTF8String", &UTF8String_type); -+ -+ /* 3GPP-Charging-Characteristics */ -+ { -+ struct dict_avp_data data = { -+ 13, /* Code */ -+ 0, /* Vendor */ -+ "3GPP-Charging-Characteristics", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); -+ } -+ -+ /* Service-Selection - RFC 5778 */ -+ { -+ struct dict_avp_data data = { -+ 493, /* Code */ -+ 0, /* Vendor */ -+ "Service-Selection", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); -+ } -+ -+ /* Max-Requested-Bandwidth-DL AVP - 3GPP TS 29.214 #5.3.14 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 515, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Max-Requested-Bandwidth-DL", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* Max-Requested-Bandwidth-UL AVP - 3GPP TS 29.214 #5.3.15 */ -+ { -+ struct dict_avp_data data = { -+ 516, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Max-Requested-Bandwidth-UL", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, NULL, NULL); -+ } -+ -+ /* Visited-Network-Identifier AVP - 3GPP TS 29.229 #6.3.1 */ -+ { -+ struct dict_avp_data data = { -+ 600, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Visited-Network-Identifier", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, NULL); -+ } -+ -+ /* Confidentiality-Key AVP - 3GPP TS 29.229 #6.3.27 */ -+ { -+ struct dict_avp_data data = { -+ 625, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Confidentiality-Key", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, NULL); -+ } -+ -+ /* Integrity-Key AVP - 3GPP TS 29.229 #6.3.28 */ -+ { -+ struct dict_avp_data data = { -+ 626, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Integrity-Key", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, NULL); -+ } -+ -+ /* Feature-List-ID AVP - 3GPP TS 29.229 #6.3.29 */ -+ { -+ struct dict_avp_data data = { -+ 629, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Feature-List-ID", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, NULL); -+ } -+ -+ /* Feature-List AVP - 3GPP TS 29.229 #6.3.30 */ -+ { -+ struct dict_avp_data data = { -+ 630, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Feature-List", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, NULL); -+ } -+ -+ /* MSISDN AVP - 3GPP TS 29.329 #6.3.2 */ -+ { -+ struct dict_avp_data data = { -+ 701, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "MSISDN", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, NULL); -+ } -+ -+ /* Served-Party-IP-Address AVP - 3GPP TS 32.299 #7.2.187 -+ * The Served-Party-IP-Address AVP (AVP code 848) is of type Address -+ * and holds the IP address of either the calling or called party, -+ * depending on whether the P-CSCF is in touch with the calling or the -+ * called party. This AVP is only provided by the P-CSCF. -+ */ -+ { -+ struct dict_avp_data data = { -+ 848, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Served-Party-IP-Address", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , Address_type, NULL); -+ } -+ -+ /* QoS-Class-Identifier AVP - 3GPP TS 29.212 #5.3.17 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(QoS-Class-Identifier)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_1 = { "QCI_1", { .i32 = 1 }}; -+ struct dict_enumval_data t_2 = { "QCI_2", { .i32 = 2 }}; -+ struct dict_enumval_data t_3 = { "QCI_3", { .i32 = 3 }}; -+ struct dict_enumval_data t_4 = { "QCI_4", { .i32 = 4 }}; -+ struct dict_enumval_data t_5 = { "QCI_5", { .i32 = 5 }}; -+ struct dict_enumval_data t_6 = { "QCI_6", { .i32 = 6 }}; -+ struct dict_enumval_data t_7 = { "QCI_7", { .i32 = 7 }}; -+ struct dict_enumval_data t_8 = { "QCI_8", { .i32 = 8 }}; -+ struct dict_enumval_data t_9 = { "QCI_9", { .i32 = 9 }}; -+ -+ struct dict_avp_data data = { -+ 1028, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "QoS-Class-Identifier", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ /* Create the Enumerated type, and then the AVP */ -+ CHECK_dict_new( DICT_TYPE, &tdata, NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1, avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_2, avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_3, avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_4, avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_5, avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_6, avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_7, avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_8, avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_9, avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* RAT-Type AVP - 3GPP TS 29.212 #5.3.31 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "Enumerated(RAT-Type)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "WLAN", { .u32 = 0 }}; -+ struct dict_enumval_data t_1 = { "VIRTUAL", { .u32 = 1 }}; -+ struct dict_enumval_data t_1000 = { "UTRAN", { .u32 = 1000 }}; -+ struct dict_enumval_data t_1001 = { "GERAN", { .u32 = 1001 }}; -+ struct dict_enumval_data t_1002 = { "GAN", { .u32 = 1002 }}; -+ struct dict_enumval_data t_1003 = { "HSPA_EVOLUTION", { .u32 = 1003 }}; -+ struct dict_enumval_data t_1004 = { "EUTRAN", { .u32 = 1004 }}; -+ struct dict_enumval_data t_2000 = { "CDMA2000_1X", { .u32 = 2000 }}; -+ struct dict_enumval_data t_2001 = { "HRPD", { .u32 = 2001 }}; -+ struct dict_enumval_data t_2002 = { "UMB", { .u32 = 2002 }}; -+ struct dict_enumval_data t_2003 = { "EHRPD", { .u32 = 2003 }}; -+ -+ struct dict_avp_data data = { -+ 1032, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "RAT-Type", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ /* Create the Enumerated type, and then the AVP */ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1000 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1001 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1002 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1003 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1004 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_2000 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_2001 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_2002 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_2003 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* Priority-Level AVP - 3GPP TS 29.272 #5.3.45 */ -+ { -+ struct dict_avp_data data = { -+ 1046, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Priority-Level", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, NULL); -+ } -+ -+ /* Pre-emption-Capability AVP - 3GPP TS 29.212 #5.3.46 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Pre-emption-Capability)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "PRE-EMPTION_CAPABILITY_ENABLED", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "PRE-EMPTION_CAPABILITY_DISABLED", { .i32 = 1 }}; -+ -+ struct dict_avp_data data = { -+ 1047, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Pre-emption-Capability", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ /* Create the Enumerated type, and then the AVP */ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* Pre-emption-Vulnerability AVP - 3GPP TS 29.212 #5.3.47 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Pre-emption-Vulnerability)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "PRE-EMPTION_VULNERABILITY_ENABLED", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "PRE-EMPTION_VULNERABILITY_DISABLED", { .i32 = 1 }}; -+ -+ struct dict_avp_data data = { -+ 1048, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Pre-emption-Vulnerability", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ /* Create the Enumerated type, and then the AVP */ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* Allocation-Retention-Priority AVP - 3GPP TS 29.272 #5.3.32 */ -+ { -+ /* -+ -+ Allocation-Retention-Priority ::= < AVP Header: 1034 > -+ { Priority-Level } -+ [ Pre-emption-Capability ] -+ [ Pre-emption-Vulnerability ] -+ -+ The Allocation-Retention-Priority AVP (AVP code 1034) is of type -+ Grouped, and it is used to indicate the priority of allocation and -+ retention, the pre-emption capability and pre-emption vulnerability -+ for the SDF if provided within the QoS-Information-AVP or for the -+ EPS default bearer if provided within the Default-EPS-Bearer-QoS AVP. -+ */ -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1034, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Allocation-Retention-Priority", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Priority-Level", RULE_REQUIRED, -1, 1 } -+ ,{ "Pre-emption-Capability", RULE_OPTIONAL, -1, 1 } -+ ,{ "Pre-emption-Vulnerability", RULE_OPTIONAL, -1, 1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* PDP-Address AVP - 3GPP TS 32.299 #6.3.2 */ -+ { -+ /* -+ * The PDP-Address-Prefix-Length AVP needs not be available for IPv6 -+ * typed IP-address prefix length of 64 bits. -+ */ -+ struct dict_avp_data data = { -+ 1227, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "PDP-Address", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , Address_type, NULL); -+ } -+ -+ /* Subscriber-Status - 3GPP TS 29.272 #7.3.29 */ -+ { -+ struct dict_object * type; -+ struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "Enumerated(Subscriber-Status)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "SERVICE_GRANTED", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "OPERATOR_DETERMINED_BARRING", { .i32 = 1 }}; -+ -+ struct dict_avp_data data = { -+ 1424, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Subscriber-Status", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_TYPE, &tdata, NULL, &type); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0, type, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1, type, NULL); -+ CHECK_dict_new( DICT_AVP, &data, NULL, &type); -+ } -+ -+ /* STN-SR AVP - 3GPP TS 29.272 #7.3.33 */ -+ { -+ struct dict_avp_data data = { -+ 1433, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "STN-SR", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); -+ } -+ -+ /* ICS-Indicator AVP - 3GPP TS 29.272 #7.3.104 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(ICS-Indicator)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "FALSE", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "TRUE", { .i32 = 1 }}; -+ -+ struct dict_avp_data data = { -+ 1491, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "ICS-Indicator", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ /* Create the Enumerated type, and then the AVP */ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , avp, NULL); -+ } -+ -+ /* IMEI AVP - 3GPP TS 29.272 #7.3.4 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1402, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "IMEI", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , UTF8String_type, &avp); -+ } -+ -+ /* 3GPP2-MEID AVP - 3GPP TS 29.272 #7.3.6 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1471, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "3GPP2-MEID", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, NULL, &avp); -+ } -+ -+ /* Software Version - 3GPP TS 29.272 #7.3.5 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1403, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Software-Version", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , UTF8String_type, &avp); -+ } -+ -+ /* Terminal Information AVP - 3GPP TS 29.272 #7.3.3 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1401, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Terminal-Information", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "IMEI", RULE_REQUIRED, 1, 1 } -+ ,{ "3GPP2-MEID", RULE_REQUIRED, 1, 1 } -+ ,{ "Software-Version", RULE_REQUIRED, 1, 1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* ULA-Flags - 3GPP TS 29.272 #7.3.8 */ -+ { -+ struct dict_avp_data data = { -+ 1406, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "ULA-Flags", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, NULL); -+ } -+ -+ /* Visited-PLMN-Id AVP - 3GPP TS 29.272 #7.3.9 */ -+ { -+ struct dict_avp_data data = { -+ 1407, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Visited-PLMN-Id", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, NULL); -+ } -+ -+ /* Number-Of-Requested-Vectors - 3GPP TS 29.272 #7.3.14 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1410, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Number-Of-Requested-Vectors", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* Re-Synchronization-Info - 3GPP TS 29.272 #7.3.15 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1411, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Re-Synchronization-Info", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* Immediate-Response-Preferred - 3GPP TS 29.272 #7.3.16 */ -+ { -+ struct dict_avp_data data = { -+ 1412, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Immediate-Response-Preferred", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, NULL); -+ } -+ -+ /* Requested-EUTRAN-Authentication-Info AVP - 3GPP TS 29.272 #7.3.11 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1408, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Requested-EUTRAN-Authentication-Info", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Number-Of-Requested-Vectors", RULE_OPTIONAL, -1, 1 } -+ ,{ "Immediate-Response-Preferred", RULE_OPTIONAL, -1, 1 } -+ ,{ "Re-Synchronization-Info", RULE_OPTIONAL, -1, 1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* Requested-UTRAN-GERAN-Authentication-Info AVP - 3GPP TS 29.272 #7.3.12 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1409, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Requested-UTRAN-GERAN-Authentication-Info", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Number-Of-Requested-Vectors", RULE_OPTIONAL, -1, 1 } -+ ,{ "Immediate-Response-Preferred", RULE_OPTIONAL, -1, 1 } -+ ,{ "Re-Synchronization-Info", RULE_OPTIONAL, -1, 1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* Item-Number AVP - 3GPP TS 29.272 #7.3.23 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1419, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Item-Number", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* RAND AVP - 3GPP TS 29.272 #7.3.53 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1447, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "RAND", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* XRES AVP - 3GPP TS 29.272 #7.3.54 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1448, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "XRES", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* AUTN AVP - 3GPP TS 29.272 #7.3.55 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1449, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "AUTN", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* SRES AVP - 3GPP TS 29.272 #7.3.60 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1454, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "SRES", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, NULL, &avp); -+ } -+ -+ /* KASME AVP - 3GPP TS 29.272 #7.3.56 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1450, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "KASME", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* Kc AVP - 3GPP TS 29.272 #7.3.59 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1453, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Kc", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, NULL, &avp); -+ } -+ -+ /* Trace-Collection-Entity AVP - 3GPP TS 29.272 #7.3.96 */ -+ { -+ struct dict_avp_data data = { -+ 1452, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Trace-Collection-Entity", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, Address_type, NULL); -+ } -+ -+ /* E-UTRAN-Vector - 3GPP TS 29.272 #7.3.18 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1414, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "E-UTRAN-Vector", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Item-Number", RULE_OPTIONAL, -1, 1 } -+ ,{ "RAND", RULE_REQUIRED, -1, 1 } -+ ,{ "XRES", RULE_REQUIRED, -1, 1 } -+ ,{ "AUTN", RULE_REQUIRED, -1, 1 } -+ ,{ "KASME", RULE_REQUIRED, -1, 1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* UTRAN-Vector - 3GPP TS 29.272 #7.3.19 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1415, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "UTRAN-Vector", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Item-Number", RULE_OPTIONAL, -1, 1 } -+ ,{ "RAND", RULE_REQUIRED, -1, 1 } -+ ,{ "XRES", RULE_REQUIRED, -1, 1 } -+ ,{ "AUTN", RULE_REQUIRED, -1, 1 } -+ ,{ "Confidentiality-Key", RULE_REQUIRED, -1, 1 } -+ ,{ "Integrity-Key", RULE_REQUIRED, -1, 1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* GERAN-Vector - 3GPP TS 29.272 #7.3.20 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1416, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "GERAN-Vector", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Item-Number", RULE_OPTIONAL, -1, 1 } -+ ,{ "RAND", RULE_REQUIRED, -1, 1 } -+ ,{ "SRES", RULE_REQUIRED, -1, 1 } -+ ,{ "Kc", RULE_REQUIRED, -1, 1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* Authentication-Info - 3GPP TS 29.272 #7.3.17 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1413, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Authentication-Info", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "E-UTRAN-Vector", RULE_OPTIONAL, -1, -1 } -+ ,{ "UTRAN-Vector", RULE_OPTIONAL, -1, -1 } -+ ,{ "GERAN-Vector", RULE_OPTIONAL, -1, -1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* Network-Access-Mode - 3GPP TS 29.272 #7.3.21 */ -+ { -+ struct dict_object * type; -+ struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "Enumerated(Network-Access-Mode)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "PACKET_AND_CIRCUIT", { .u32 = 0 }}; -+ struct dict_enumval_data t_1 = { "ONLY_PACKET", { .u32 = 1 }}; -+ -+ struct dict_avp_data data = { -+ 1417, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Network-Access-Mode", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); -+ CHECK_dict_new( DICT_AVP, &data , type, NULL); -+ } -+ -+ /* HPLMN-ODB AVP - 3GPP TS 29.272 #7.3.22 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1418, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "HPLMN-ODB", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* Cancellation-Type - 3GPP TS 29.272 #7.3.24 */ -+ { -+ struct dict_object * type; -+ struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "Enumerated(Cancellation-Type)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "MME_UPDATE_PROCEDURE", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "SGSN_UPDATE_PROCEDURE", { .i32 = 1 }}; -+ struct dict_enumval_data t_2 = { "SUBSCRIPTION_WITHDRAWAL", { .i32 = 2 }}; -+ struct dict_enumval_data t_3 = { "UPDATE_PROCEDURE_IWF", { .i32 = 3 }}; -+ struct dict_enumval_data t_4 = { "INITIAL_ATTACH_PROCEDURE", { .i32 = 4 }}; -+ -+ struct dict_avp_data data = { -+ 1420, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Cancellation-Type", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_TYPE, &tdata, NULL, &type); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0, type, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1, type, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_2, type, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_3, type, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_4, type, NULL); -+ CHECK_dict_new( DICT_AVP, &data, NULL, &type); -+ } -+ -+ /* DSR-Flags AVP - 3GPP TS 29.272 #7.3.25 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1421, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "DSR-Flags", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* DSA-Flags AVP - 3GPP TS 29.272 #7.3.26 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1422, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "DSA-Flags", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* Context-Identifier AVP - 3GPP TS 29.272 #7.3.27 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1423, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Context-Identifier", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* Operator-Determined-Barring AVP - 3GPP TS 29.272 #7.3.30 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1425, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Operator-Determined-Barring", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* Access-Restriction-Data AVP - 3GPP TS 29.272 #7.3.31 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1426, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Access-Restriction-Data", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* APN-OI-Replacement AVP - 3GPP TS 29.272 #7.3.32 */ -+ { -+ struct dict_avp_data data = { -+ 1427, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "APN-OI-Replacement", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); -+ } -+ -+ /* All-APN-Configurations-Included-Indicator AVP - 3GPP TS 29.272 #7.3.33 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(All-APN-Configurations-Included-Indicator)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "All_APN_CONFIGURATIONS_INCLUDED", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "MODIFIED/ADDED_APN_CONFIGURATIONS_INCLUDED", { .i32 = 1 }}; -+ -+ struct dict_avp_data data = { -+ 1428, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "All-APN-Configurations-Included-Indicator", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ /* Create the Enumerated type, and then the AVP */ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , avp, NULL); -+ } -+ -+ /* PDN-Type AVP - 3GPP TS 29.272 #7.3.62 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(PDN-Type)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "IPv4", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "IPv6", { .i32 = 1 }}; -+ struct dict_enumval_data t_2 = { "IPv4v6", { .i32 = 2 }}; -+ struct dict_enumval_data t_3 = { "IPv4_OR_IPv6", { .i32 = 3 }}; -+ -+ struct dict_avp_data data = { -+ 1456, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "PDN-Type", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ /* Create the Enumerated type, and then the AVP */ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_2 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_3 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , avp, NULL); -+ } -+ -+ /* EPS-Subscribed-QoS-Profile AVP - 3GPP TS 29.272 #7.3.37 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1431, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "EPS-Subscribed-QoS-Profile", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "QoS-Class-Identifier", RULE_REQUIRED, -1, 1 } -+ ,{ "Allocation-Retention-Priority", RULE_REQUIRED, -1, 1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* VPLMN-Dynamic-Address-Allowed AVP - 3GPP TS 29.272 #7.3.38 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(VPLMN-Dynamic-Address-Allowed)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "NOTALLOWED", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "ALLOWED", { .i32 = 1 }}; -+ -+ struct dict_avp_data data = { -+ 1432, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "VPLMN-Dynamic-Address-Allowed", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ /* Create the Enumerated type, and then the AVP */ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , avp, NULL); -+ } -+ -+ /* Alert-Reason AVP - 3GPP TS 29.272 #7.3.83 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Alert-Reason)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "UE_PRESENT", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "UE_MEMORY_AVAILABLE", { .i32 = 1 }}; -+ -+ struct dict_avp_data data = { -+ 1434, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Alert-Reason", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ /* Create the Enumerated type, and then the AVP */ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , avp, NULL); -+ } -+ -+ /* PDN-GW-Allocation-Type AVP - 3GPP TS 29.272 #7.3.44 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(PDN-GW-Allocation-Type)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "STATIC", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "DYNAMIC", { .i32 = 1 }}; -+ -+ struct dict_avp_data data = { -+ 1438, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "PDN-GW-Allocation-Type", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ /* Create the Enumerated type, and then the AVP */ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , avp, NULL); -+ } -+ -+ /* Expiration-Date AVP - 3GPP TS 29.272 #7.3.80 */ -+ { -+ struct dict_avp_data data = { -+ 1439, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Expiration-Date", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , Time_type, NULL); -+ } -+ -+ /* CSG-Id AVP - 3GPP TS 29.272 #7.3.79 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1437, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "CSG-Id", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* AMBR AVP - 3GPP TS 29.272 #7.3.41 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1435, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "AMBR", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Max-Requested-Bandwidth-UL", RULE_REQUIRED, -1, 1 } -+ ,{ "Max-Requested-Bandwidth-DL", RULE_REQUIRED, -1, 1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* Specific-APN-Info AVP - 3GPP TS 29.272 #7.3.82 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1472, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Specific-APN-Info", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Service-Selection", RULE_REQUIRED, -1, 1 } -+ ,{ "MIP6-Agent-Info", RULE_REQUIRED, -1, 1 } -+ ,{ "Visited-Network-Identifier", RULE_OPTIONAL, -1, 1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* SIPTO-Permission AVP - 3GPP TS 29.272 #7.3.135 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(SIPTO-Permission)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "SIPTO_ALLOWED", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "SIPTO_NOTALLOWED", { .i32 = 1 }}; -+ -+ struct dict_avp_data data = { -+ 1613, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "SIPTO-Permission", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ /* Create the Enumerated type, and then the AVP */ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , avp, NULL); -+ } -+ -+ /* LIPA-Permission AVP - 3GPP TS 29.272 #7.3.133 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(LIPA-Permission)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "LIPA-PROHIBITED", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "LIPA-ONLY", { .i32 = 1 }}; -+ struct dict_enumval_data t_2 = { "LIPA-CONDITIONAL", { .i32 = 2 }}; -+ -+ struct dict_avp_data data = { -+ 1618, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "LIPA-Permission", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ /* Create the Enumerated type, and then the AVP */ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_2 , avp, NULL); -+ -+ CHECK_dict_new( DICT_AVP, &data , avp, NULL); -+ } -+ -+ /* List-Of-Measurements AVP - 3GPP TS 29.272 #7.3.139 */ -+ { -+ struct dict_avp_data data = { -+ 1625, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "List-Of-Measurements", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, NULL); -+ } -+ -+ /* Reporting-Trigger AVP - 3GPP TS 29.272 #7.3.140 */ -+ { -+ struct dict_avp_data data = { -+ 1626, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Reporting-Trigger", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, NULL); -+ } -+ -+ /* Report-Interval AVP - 3GPP TS 29.272 #7.3.141 and TS 32.422 #5.10.5 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Report-Interval)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "250ms", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "500ms", { .i32 = 1 }}; -+ struct dict_enumval_data t_2 = { "1000ms", { .i32 = 2 }}; -+ struct dict_enumval_data t_3 = { "2000ms", { .i32 = 3 }}; -+ struct dict_enumval_data t_4 = { "3000ms", { .i32 = 4 }}; -+ struct dict_enumval_data t_5 = { "4000ms", { .i32 = 5 }}; -+ struct dict_enumval_data t_6 = { "6000ms", { .i32 = 6 }}; -+ struct dict_enumval_data t_7 = { "8000ms", { .i32 = 7 }}; -+ struct dict_enumval_data t_8 = { "12000ms", { .i32 = 8 }}; -+ struct dict_enumval_data t_9 = { "16000ms", { .i32 = 9 }}; -+ struct dict_enumval_data t_10 = { "20000ms", { .i32 = 10 }}; -+ struct dict_enumval_data t_11 = { "24000ms", { .i32 = 11 }}; -+ struct dict_enumval_data t_12 = { "28000ms", { .i32 = 12 }}; -+ struct dict_enumval_data t_13 = { "32000ms", { .i32 = 13 }}; -+ struct dict_enumval_data t_14 = { "64000ms", { .i32 = 14 }}; -+ /* Possible in LTE */ -+ struct dict_enumval_data t_15 = { "120ms", { .i32 = 15 }}; -+ struct dict_enumval_data t_16 = { "240ms", { .i32 = 16 }}; -+ struct dict_enumval_data t_17 = { "480ms", { .i32 = 17 }}; -+ struct dict_enumval_data t_18 = { "640ms", { .i32 = 18 }}; -+ struct dict_enumval_data t_19 = { "1024ms", { .i32 = 19 }}; -+ struct dict_enumval_data t_20 = { "2048ms", { .i32 = 20 }}; -+ struct dict_enumval_data t_21 = { "5120ms", { .i32 = 21 }}; -+ struct dict_enumval_data t_22 = { "10240ms", { .i32 = 22 }}; -+ struct dict_enumval_data t_23 = { "1min", { .i32 = 23 }}; -+ struct dict_enumval_data t_24 = { "6min", { .i32 = 24 }}; -+ struct dict_enumval_data t_25 = { "12min", { .i32 = 25 }}; -+ struct dict_enumval_data t_26 = { "30min", { .i32 = 26 }}; -+ struct dict_enumval_data t_27 = { "60min", { .i32 = 27 }}; -+ -+ struct dict_avp_data data = { -+ 1627, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Report-Interval", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ /* Create the Enumerated type, and then the AVP */ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_2 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_3 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_4 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_5 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_6 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_7 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_8 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_9 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_10 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_11 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_12 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_13 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_14 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_15 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_16 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_17 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_18 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_19 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_20 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_21 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_22 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_23 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_24 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_25 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_26 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_27 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , avp, NULL); -+ } -+ -+ /* Report-Amount AVP - 3GPP TS 29.272 #7.3.142 and TS 32.422 #5.10.6 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Report-Amount)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "1", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "2", { .i32 = 1 }}; -+ struct dict_enumval_data t_2 = { "4", { .i32 = 2 }}; -+ struct dict_enumval_data t_3 = { "8", { .i32 = 3 }}; -+ struct dict_enumval_data t_4 = { "16", { .i32 = 4 }}; -+ struct dict_enumval_data t_5 = { "32", { .i32 = 5 }}; -+ struct dict_enumval_data t_6 = { "64", { .i32 = 6 }}; -+ struct dict_enumval_data t_7 = { "infinity", { .i32 = 7 }}; -+ -+ struct dict_avp_data data = { -+ 1628, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Report-Amount", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ /* Create the Enumerated type, and then the AVP */ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_2 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_3 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_4 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_5 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_6 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_7 , avp, NULL); -+ -+ CHECK_dict_new( DICT_AVP, &data , avp, NULL); -+ } -+ -+ /* Event-Threshold-RSRP AVP - 3GPP TS 29.272 #7.3.143 */ -+ { -+ struct dict_avp_data data = { -+ 1629, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Event-Threshold-RSRP", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, NULL); -+ } -+ -+ /* Event-Threshold-RSRQ AVP - 3GPP TS 29.272 #7.3.144 */ -+ { -+ struct dict_avp_data data = { -+ 1630, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Event-Threshold-RSRQ", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, NULL); -+ } -+ -+ /* Logging-Interval AVP - 3GPP TS 29.272 #7.3.145 and TS 32.422 #5.10.8 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Logging-Interval)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "1.28", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "2.56", { .i32 = 1 }}; -+ struct dict_enumval_data t_2 = { "5.12", { .i32 = 2 }}; -+ struct dict_enumval_data t_3 = { "10.24", { .i32 = 3 }}; -+ struct dict_enumval_data t_4 = { "20.48", { .i32 = 4 }}; -+ struct dict_enumval_data t_5 = { "30.72", { .i32 = 5 }}; -+ struct dict_enumval_data t_6 = { "40.96", { .i32 = 6 }}; -+ struct dict_enumval_data t_7 = { "61.44", { .i32 = 7 }}; -+ -+ struct dict_avp_data data = { -+ 1631, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Logging-Interval", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ /* Create the Enumerated type, and then the AVP */ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_2 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_3 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_4 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_5 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_6 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_7 , avp, NULL); -+ -+ CHECK_dict_new( DICT_AVP, &data , avp, NULL); -+ } -+ -+ /* Logging-Duration AVP - 3GPP TS 29.272 #7.3.145 and TS 32.422 #5.10.9 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Logging-Duration)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "600sec", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "1200sec", { .i32 = 1 }}; -+ struct dict_enumval_data t_2 = { "2400sec", { .i32 = 2 }}; -+ struct dict_enumval_data t_3 = { "3600sec", { .i32 = 3 }}; -+ struct dict_enumval_data t_4 = { "5400sec", { .i32 = 4 }}; -+ struct dict_enumval_data t_5 = { "7200sec", { .i32 = 5 }}; -+ -+ struct dict_avp_data data = { -+ 1632, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Logging-Duration", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ /* Create the Enumerated type, and then the AVP */ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_2 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_3 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_4 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_5 , avp, NULL); -+ -+ CHECK_dict_new( DICT_AVP, &data , avp, NULL); -+ } -+ -+ /* APN-Configuration AVP - 3GPP TS 29.272 #7.3.35 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1430, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "APN-Configuration", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Context-Identifier", RULE_REQUIRED, -1, 1 } -+ ,{ "Served-Party-IP-Address", RULE_OPTIONAL, -1, 2 } -+ ,{ "PDN-Type", RULE_REQUIRED, -1, 1 } -+ ,{ "Service-Selection", RULE_REQUIRED, -1, 1 } -+ ,{ "EPS-Subscribed-QoS-Profile", RULE_OPTIONAL, -1, 1 } -+ ,{ "VPLMN-Dynamic-Address-Allowed", RULE_OPTIONAL, -1, 1 } -+ ,{ "MIP6-Agent-Info", RULE_OPTIONAL, -1, 1 } -+ ,{ "Visited-Network-Identifier", RULE_OPTIONAL, -1, 1 } -+ ,{ "PDN-GW-Allocation-Type", RULE_OPTIONAL, -1, 1 } -+ ,{ "3GPP-Charging-Characteristics", RULE_OPTIONAL, -1, 1 } -+ ,{ "AMBR", RULE_OPTIONAL, -1, 1 } -+ ,{ "Specific-APN-Info", RULE_OPTIONAL, -1, -1 } -+ ,{ "APN-OI-Replacement", RULE_OPTIONAL, -1, 1 } -+ ,{ "SIPTO-Permission", RULE_OPTIONAL, -1, 1 } -+ ,{ "LIPA-Permission", RULE_OPTIONAL, -1, 1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* APN-Configuration-Profile AVP - 3GPP TS 29.272 #7.3.34 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1429, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "APN-Configuration-Profile", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Context-Identifier", RULE_REQUIRED, -1, 1 } -+ ,{ "All-APN-Configurations-Included-Indicator", RULE_REQUIRED, -1, 1 } -+ ,{ "APN-Configuration", RULE_REQUIRED, -1, -1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* CSG-Subscription-Data AVP - 3GPP TS 29.272 #7.3.78 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1436, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "CSG-Subscription-Data", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "CSG-Id", RULE_REQUIRED, -1, 1 } -+ ,{ "Expiration-Date", RULE_OPTIONAL, -1, 1 } -+ ,{ "Service-Selection", RULE_OPTIONAL, -1, -1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* RAT-Frequency-Selection-Priority-ID AVP - 3GPP TS 29.272 #7.3.46 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1440, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "RAT-Frequency-Selection-Priority-ID", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* IDA-Flags AVP - 3GPP TS 29.272 #7.3.47 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1441, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "IDA-Flags", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* PUA-Flags AVP - 3GPP TS 29.272 #7.3.48 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1442, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "PUA-Flags", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* NOR-Flags AVP - 3GPP TS 29.272 #7.3.49 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1443, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "NOR-Flags", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* User-Id AVP - 3GPP TS 29.272 #7.3.50 */ -+ { -+ struct dict_avp_data data = { -+ 1444, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "User-Id", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); -+ } -+ -+ /* Equipment-Status AVP - 3GPP TS 29.272 #7.3.51 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Equipment-Status)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "WHITELISTED", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "BLACKLISTED", { .i32 = 1 }}; -+ struct dict_enumval_data t_2 = { "GREYLISTED", { .i32 = 2 }}; -+ -+ struct dict_avp_data data = { -+ 1445, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Equipment-Status", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ /* Create the Enumerated type, and then the AVP */ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_2 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , avp, NULL); -+ } -+ -+ /* Regional-Subscription-Zone-Code AVP - 3GPP TS 29.272 #7.3.52 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1446, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Regional-Subscription-Zone-Code", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* Roaming-Restricted-Due-To-Unsupported-Feature AVP - 3GPP TS 29.272 #7.3.81 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Roaming-Restricted-Due-To-Unsupported-Feature)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "Roaming-Restricted-Due-To-Unsupported-Feature", { .i32 = 0 }}; -+ -+ struct dict_avp_data data = { -+ 1457, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Roaming-Restricted-Due-To-Unsupported-Feature", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ /* Create the Enumerated type, and then the AVP */ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , avp, NULL); -+ } -+ -+ /* Trace-Reference AVP - 3GPP TS 29.272 #7.3.64 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1459, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Trace-Reference", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, NULL, &avp); -+ } -+ -+ /* Trace-Depth AVP - 3GPP TS 29.272 #7.3.67 and 3GPP TS 32.422 #5.3 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Trace-Depth)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "Minimum", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "Medium", { .i32 = 1 }}; -+ struct dict_enumval_data t_2 = { "Maximum", { .i32 = 2 }}; -+ struct dict_enumval_data t_3 = { "MinimumWithoutVendorSpecificExtension", { .i32 = 3 }}; -+ struct dict_enumval_data t_4 = { "MediumWithoutVendorSpecificExtension", { .i32 = 4 }}; -+ struct dict_enumval_data t_5 = { "MaximumWithoutVendorSpecificExtension", { .i32 = 5 }}; -+ -+ struct dict_avp_data data = { -+ 1462, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Trace-Depth", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ /* Create the Enumerated type, and then the AVP */ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_2 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_3 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_4 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_5 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , avp, NULL); -+ } -+ -+ /* Trace-NE-Type-List AVP - 3GPP TS 29.272 #7.3.68 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1463, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Trace-NE-Type-List", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, NULL, &avp); -+ } -+ -+ /* Trace-Event-List AVP - 3GPP TS 29.272 #7.3.69 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1464, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Trace-Interface-List", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, NULL, &avp); -+ } -+ -+ /* Trace-Event-List AVP - 3GPP TS 29.272 #7.3.70 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1465, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Trace-Event-List", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, NULL, &avp); -+ } -+ -+ /* OMC-Id AVP - 3GPP TS 29.272 #7.3.71 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1466, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "OMC-Id", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, NULL, &avp); -+ } -+ -+ /* Complete-Data-List-Included-Indicator AVP - 3GPP TS 29.272 #7.3.73 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Complete-Data-List-Included-Indicator)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "All_PDP_CONTEXTS_INCLUDED", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "MODIFIED/ADDED_PDP CONTEXTS_INCLUDED", { .i32 = 1 }}; -+ -+ struct dict_avp_data data = { -+ 1468, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Complete-Data-List-Included-Indicator", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ /* Create the Enumerated type, and then the AVP */ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , avp, NULL); -+ } -+ -+ /* PDP-Type AVP - 3GPP TS 29.272 #7.3.75 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1470, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "PDP-Type", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, NULL, &avp); -+ } -+ -+ /* GMLC-Number AVP - 3GPP TS 29.272 #7.3.85 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1474, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "GMLC-Number", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, NULL, &avp); -+ } -+ -+ /* SS-Code AVP - 3GPP TS 29.272 #7.3.87 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1476, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "SS-Code", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, NULL, &avp); -+ } -+ -+ /* SS-Status AVP - 3GPP TS 29.272 #7.3.88 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1477, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "SS-Status", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, NULL, &avp); -+ } -+ -+ /* Notification-To-UE-User AVP - 3GPP TS 29.272 #7.3.89 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Notification-To-UE-User)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "NOTIFY_LOCATION_ALLOWED", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "NOTIFYANDVERIFY_LOCATION_ALLOWED_IF_NO_RESPONSE", { .i32 = 1 }}; -+ struct dict_enumval_data t_2 = { "NOTIFYANDVERIFY_LOCATION_NOT_ALLOWED_IF_NO_RESPONSE", { .i32 = 2 }}; -+ struct dict_enumval_data t_3 = { "LOCATION_NOT_ALLOWED", { .i32 = 3 }}; -+ -+ struct dict_avp_data data = { -+ 1478, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Notification-To-UE-User", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ /* Create the Enumerated type, and then the AVP */ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_2 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_3 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , avp, NULL); -+ } -+ -+ /* Client-Identity AVP - 3GPP TS 29.272 #7.3.91 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1480, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Client-Identity", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, NULL, &avp); -+ } -+ -+ /* GMLC-Restriction AVP - 3GPP TS 29.272 #7.3.92 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(GMLC-Restriction)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "GMLC_LIST", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "HOME_COUNTRY", { .i32 = 1 }}; -+ -+ struct dict_avp_data data = { -+ 1481, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "GMLC-Restriction", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ /* Create the Enumerated type, and then the AVP */ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , avp, NULL); -+ } -+ -+ /* PLMN-Client AVP - 3GPP TS 29.272 #7.3.92 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(PLMN-Client)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "BROADCAST_SERVICE", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "O_AND_M_HPLMN", { .i32 = 1 }}; -+ struct dict_enumval_data t_2 = { "O_AND_M_VPLMN", { .i32 = 2 }}; -+ struct dict_enumval_data t_3 = { "ANONYMOUS_LOCATION", { .i32 = 3 }}; -+ struct dict_enumval_data t_4 = { "TARGET_UE_SUBSCRIBED_SERVICE", { .i32 = 4 }}; -+ -+ struct dict_avp_data data = { -+ 1482, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "PLMN-Client", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ /* Create the Enumerated type, and then the AVP */ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_2 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_3 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_4 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , avp, NULL); -+ } -+ -+ /* ServiceTypeIdentity AVP - 3GPP TS 29.272 #7.3.95 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1484, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "ServiceTypeIdentity", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, NULL, &avp); -+ } -+ -+ /* QoS-Subscribed - 3GPP TS 29.272 #7.3.77 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1404, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "QoS-Subscribed", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* ULR-Flags - 3GPP TS 29.272 #7.3.7 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1405, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "ULR-Flags", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* Ext-PDP-Type AVP - 3GPP TS 29.272 #7.3.75A */ -+ { -+ struct dict_avp_data data = { -+ 1620, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Ext-PDP-Type", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, NULL, NULL); -+ } -+ -+ /* Ext-PDP-Address AVP - 3GPP TS 29.272 #7.3.129 */ -+ { -+ struct dict_avp_data data = { -+ 1621, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Ext-PDP-Address", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, Address_type, NULL); -+ } -+ -+ /* TS-Code AVP - 3GPP TS 29.272 #7.3.100 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1487, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "TS-Code", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* External-Client AVP - 3GPP TS 29.272 #7.3.90 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1479, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "External-Client", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Client-Identity", RULE_REQUIRED, -1, 1 } -+ ,{ "GMLC-Restriction", RULE_OPTIONAL, -1, 1 } -+ ,{ "Notification-To-UE-User", RULE_OPTIONAL, -1, 1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* Service-Type AVP - 3GPP TS 29.272 #7.3.94 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1483, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Service-Type", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "ServiceTypeIdentity", RULE_REQUIRED, -1, 1 } -+ ,{ "GMLC-Restriction", RULE_OPTIONAL, -1, 1 } -+ ,{ "Notification-To-UE-User", RULE_OPTIONAL, -1, 1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* LCS-PrivacyException AVP - 3GPP TS 29.272 #7.3.86 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1475, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "LCS-PrivacyException", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "SS-Code", RULE_REQUIRED, -1, 1 } -+ ,{ "SS-Status", RULE_REQUIRED, -1, 1 } -+ ,{ "Notification-To-UE-User", RULE_OPTIONAL, -1, 1 } -+ ,{ "External-Client", RULE_OPTIONAL, -1, -1 } -+ ,{ "PLMN-Client", RULE_OPTIONAL, -1, -1 } -+ ,{ "Service-Type", RULE_OPTIONAL, -1, -1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* MO-LR AVP - 3GPP TS 29.272 #7.3.96 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1485, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "MO-LR", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "SS-Code", RULE_REQUIRED, -1, 1 } -+ ,{ "SS-Status", RULE_REQUIRED, -1, 1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* LCS-Info AVP - 3GPP TS 29.272 #7.3.84 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1473, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "LCS-Info", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "GMLC-Number", RULE_OPTIONAL, -1, -1 } -+ ,{ "LCS-PrivacyException", RULE_OPTIONAL, -1, -1 } -+ ,{ "MO-LR", RULE_OPTIONAL, -1, -1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* PDP-Context AVP - 3GPP TS 29.272 #7.3.74 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1469, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "PDP-Context", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Context-Identifier", RULE_REQUIRED, -1, 1 } -+ ,{ "PDP-Type", RULE_REQUIRED, -1, 1 } -+ ,{ "PDP-Address", RULE_OPTIONAL, -1, 1 } -+ ,{ "QoS-Subscribed", RULE_REQUIRED, -1, 1 } -+ ,{ "VPLMN-Dynamic-Address-Allowed", RULE_OPTIONAL, -1, 1 } -+ ,{ "Service-Selection", RULE_REQUIRED, -1, 1 } -+ ,{ "3GPP-Charging-Characteristics", RULE_OPTIONAL, -1, 1 } -+ ,{ "Ext-PDP-Type", RULE_OPTIONAL, -1, 1 } -+ ,{ "Ext-PDP-Address", RULE_OPTIONAL, -1, 1 } -+ ,{ "AMBR", RULE_OPTIONAL, -1, 1 } -+ ,{ "SIPTO-Permission", RULE_OPTIONAL, -1, 1 } -+ ,{ "LIPA-Permission", RULE_OPTIONAL, -1, 1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* GPRS-Subscription-Data AVP - 3GPP TS 29.272 #7.3.72 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1467, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "GPRS-Subscription-Data", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Complete-Data-List-Included-Indicator", RULE_REQUIRED, -1, 1 } -+ ,{ "PDP-Context", RULE_REQUIRED, -1, 50 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* Teleservice-List AVP - 3GPP TS 29.272 #7.3.99 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1486, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Teleservice-List", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "TS-Code", RULE_REQUIRED, -1, 1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* Call-Barring-Infor-List AVP - 3GPP TS 29.272 #7.3.101 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1488, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Call-Barring-Infor-List", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "SS-Code", RULE_REQUIRED, 1, -1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* SGSN-Number AVP - 3GPP TS 29.272 #7.3.102 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1489, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "SGSN-Number", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* IDR-Flags AVP - 3GPP TS 29.272 #7.3.103 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1490, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "IDR-Flags", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* IMS-Voice-Over-PS-Sessions-Supported AVP - 3GPP TS 29.272 #7.3.106 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(IMS-Voice-Over-PS-Sessions-Supported)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "NOT_SUPPORTED", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "SUPPORTED", { .i32 = 1 }}; -+ -+ struct dict_avp_data data = { -+ 1492, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "IMS-Voice-Over-PS-Sessions-Supported", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ /* Create the Enumerated type, and then the AVP */ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , avp, NULL); -+ } -+ -+ /* SGSN-Number AVP - 3GPP TS 29.272 #7.3.102 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Homogeneous-Support-of-IMS-Voice-Over-PSSessions)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "NOT_SUPPORTED", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "SUPPORTED", { .i32 = 1 }}; -+ -+ struct dict_avp_data data = { -+ 1493, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Homogeneous-Support-of-IMS-Voice-Over-PSSessions", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* Last-UE-Activity-Time AVP - 3GPP TS 29.272 #7.3.108 */ -+ { -+ struct dict_avp_data data = { -+ 1494, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Last-UE-Activity-Time", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , Time_type, NULL); -+ } -+ -+ /* E-UTRAN-Cell-Global-Identity AVP - 3GPP TS 29.272 #7.3.117 */ -+ { -+ struct dict_avp_data data = { -+ 1602, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "E-UTRAN-Cell-Global-Identity", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, NULL, NULL); -+ } -+ -+ /* Tracking-Area-Identity AVP - 3GPP TS 29.272 #7.3.118 */ -+ { -+ struct dict_avp_data data = { -+ 1603, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Tracking-Area-Identity", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, NULL, NULL); -+ } -+ -+ /* Cell-Global-Identity AVP - 3GPP TS 29.272 #7.3.119 */ -+ { -+ struct dict_avp_data data = { -+ 1604, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Cell-Global-Identity", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, NULL, NULL); -+ } -+ -+ /* Routing-Area-Identity AVP - 3GPP TS 29.272 #7.3.120 */ -+ { -+ struct dict_avp_data data = { -+ 1605, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Routing-Area-Identity", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, NULL, NULL); -+ } -+ -+ /* Location-Area-Identity AVP - 3GPP TS 29.272 #7.3.121 */ -+ { -+ struct dict_avp_data data = { -+ 1606, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Location-Area-Identity", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, NULL, NULL); -+ } -+ -+ /* Service-Area-Identity AVP - 3GPP TS 29.272 #7.3.122 */ -+ { -+ struct dict_avp_data data = { -+ 1607, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Service-Area-Identity", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, NULL, NULL); -+ } -+ -+ /* Geographical-Information AVP - 3GPP TS 29.272 #7.3.123 */ -+ { -+ struct dict_avp_data data = { -+ 1608, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Geographical-Information", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, NULL, NULL); -+ } -+ -+ /* Geodetic-Information AVP - 3GPP TS 29.272 #7.3.124 */ -+ { -+ struct dict_avp_data data = { -+ 1609, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Geodetic-Information", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, NULL, NULL); -+ } -+ -+ /* Current-Location-Retrieved AVP - 3GPP TS 29.272 #7.3.125 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Current-Location-Retrieved)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "ACTIVE-LOCATION-RETRIEVAL", { .i32 = 0 }}; -+ -+ struct dict_avp_data data = { -+ 1610, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Current-Location-Retrieved", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* Age-Of-Location-Information AVP - 3GPP TS 29.272 #7.3.126 */ -+ { -+ struct dict_avp_data data = { -+ 1611, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Age-Of-Location-Information", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, NULL); -+ } -+ -+ /* UE-SRVCC-Capability AVP - 3GPP TS 29.272 #7.3.130 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(UE-SRVCC-Capability)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "UE-SRVCC-NOT-SUPPORTED", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "UE-SRVCC-SUPPORTED", { .i32 = 1 }}; -+ -+ struct dict_avp_data data = { -+ 1615, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "UE-SRVCC-Capability", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* MPS-Priority AVP - 3GPP TS 29.272 #7.3.131 */ -+ { -+ struct dict_avp_data data = { -+ 1616, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "MPS-Priority", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, NULL); -+ } -+ -+ /* VPLMN-LIPA-Allowed AVP - 3GPP TS 29.272 #7.3.132 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(VPLMN-LIPA-Allowed)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "LIPA-NOTALLOWED", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "LIPA-ALLOWED", { .i32 = 1 }}; -+ -+ struct dict_avp_data data = { -+ 1617, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "VPLMN-LIPA-Allowed", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* Subscribed-Periodic-RAU-TAU-Timer AVP - 3GPP TS 29.272 #7.3.134 */ -+ { -+ struct dict_avp_data data = { -+ 1619, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Subscribed-Periodic-RAU-TAU-Timer", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, NULL); -+ } -+ -+ /* Job-Type AVP - 3GPP TS 29.272 #7.3.132 and 3GPP TS 32.422 #5.10.1 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Job-Type)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "Immediate-MDT-Only", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "Logged-MDT-only", { .i32 = 1 }}; -+ struct dict_enumval_data t_2 = { "Trace-Only", { .i32 = 2 }}; -+ struct dict_enumval_data t_3 = { "Immediate-MDT-and-Trace", { .i32 = 3 }}; -+ -+ struct dict_avp_data data = { -+ 1623, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Job-Type", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_2 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_3 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* Relay-Node-Indicator AVP - 3GPP TS 29.272 #7.3.147 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Relay-Node-Indicator)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "NOT_RELAY_NODE", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "RELAY_NODE", { .i32 = 1 }}; -+ -+ struct dict_avp_data data = { -+ 1633, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Relay-Node-Indicator", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* MDT-User-Consent AVP - 3GPP TS 29.272 #7.3.148 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(MDT-User-Consent)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "CONSENT_NOT_GIVEN", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "CONSENT_GIVEN", { .i32 = 1 }}; -+ -+ struct dict_avp_data data = { -+ 1634, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "MDT-User-Consent", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* PUR-Flags AVP - 3GPP TS 29.272 #7.3.149 */ -+ { -+ struct dict_avp_data data = { -+ 1635, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "PUR-Flags", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, NULL); -+ } -+ -+ /* User-State AVP - 3GPP TS 29.272 #7.3.114 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(User-State)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "DETACHED", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "ATTACHED_NOT_REACHABLE_FOR_PAGING", { .i32 = 1 }}; -+ struct dict_enumval_data t_2 = { "ATTACHED_REACHABLE_FOR_PAGING", { .i32 = 2 }}; -+ struct dict_enumval_data t_3 = { "CONNECTED_NOT_REACHABLE_FOR_PAGING", { .i32 = 3 }}; -+ struct dict_enumval_data t_4 = { "CONNECTED_REACHABLE_FOR_PAGING", { .i32 = 4 }}; -+ struct dict_enumval_data t_5 = { "NETWORK_DETERMINED_NOT_REACHABLE", { .i32 = 5 }}; -+ -+ struct dict_avp_data data = { -+ 1499, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "User-State", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_2 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_3 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_4 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_5 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* MME-User-State AVP - 3GPP TS 29.272 #7.3.112 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1497, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "MME-User-State", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "User-State", RULE_OPTIONAL, -1, 1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* SGSN-User-State AVP - 3GPP TS 29.272 #7.3.113 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1498, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "SGSN-User-State", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "User-State", RULE_OPTIONAL, -1, 1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* EPS-User-State AVP - 3GPP TS 29.272 #7.3.110 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1495, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "EPS-User-State", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "MME-User-State", RULE_OPTIONAL, -1, 1 } -+ ,{ "SGSN-User-State", RULE_OPTIONAL, -1, 1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* MME-Location-Information AVP - 3GPP TS 29.272 #7.3.115 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1600, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "MME-Location-Information", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "E-UTRAN-Cell-Global-Identity", RULE_OPTIONAL, -1, 1 } -+ ,{ "Tracking-Area-Identity", RULE_OPTIONAL, -1, 1 } -+ ,{ "Geographical-Information", RULE_OPTIONAL, -1, 1 } -+ ,{ "Geodetic-Information", RULE_OPTIONAL, -1, 1 } -+ ,{ "Current-Location-Retrieved", RULE_OPTIONAL, -1, 1 } -+ ,{ "Age-Of-Location-Information", RULE_OPTIONAL, -1, 1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* SGSN-Location-Information AVP - 3GPP TS 29.272 #7.3.116 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1601, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "SGSN-Location-Information", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Cell-Global-Identity", RULE_OPTIONAL, -1, 1 } -+ ,{ "Location-Area-Identity", RULE_OPTIONAL, -1, 1 } -+ ,{ "Service-Area-Identity", RULE_OPTIONAL, -1, 1 } -+ ,{ "Routing-Area-Identity", RULE_OPTIONAL, -1, 1 } -+ ,{ "Geographical-Information", RULE_OPTIONAL, -1, 1 } -+ ,{ "Geodetic-Information", RULE_OPTIONAL, -1, 1 } -+ ,{ "Current-Location-Retrieved", RULE_OPTIONAL, -1, 1 } -+ ,{ "Age-Of-Location-Information", RULE_OPTIONAL, -1, 1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* Area-Scope AVP - 3GPP TS 29.272 #7.3.138 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1624, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Area-Scope", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Cell-Global-Identity", RULE_OPTIONAL, -1, -1 } -+ ,{ "E-UTRAN-Cell-Global-Identity", RULE_OPTIONAL, -1, -1 } -+ ,{ "Routing-Area-Identity", RULE_OPTIONAL, -1, -1 } -+ ,{ "Location-Area-Identity", RULE_OPTIONAL, -1, -1 } -+ ,{ "Tracking-Area-Identity", RULE_OPTIONAL, -1, -1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* MDT-Configuration AVP - 3GPP TS 29.272 #7.3.136 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1622, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "MDT-Configuration", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Job-Type", RULE_REQUIRED, -1, 1 } -+ ,{ "Area-Scope", RULE_OPTIONAL, -1, 1 } -+ ,{ "List-Of-Measurements", RULE_OPTIONAL, -1, 1 } -+ ,{ "Reporting-Trigger", RULE_OPTIONAL, -1, 1 } -+ ,{ "Report-Interval", RULE_OPTIONAL, -1, 1 } -+ ,{ "Report-Amount", RULE_OPTIONAL, -1, 1 } -+ ,{ "Event-Threshold-RSRP", RULE_OPTIONAL, -1, 1 } -+ ,{ "Event-Threshold-RSRQ", RULE_OPTIONAL, -1, 1 } -+ ,{ "Logging-Interval", RULE_OPTIONAL, -1, 1 } -+ ,{ "Logging-Duration", RULE_OPTIONAL, -1, 1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* EPS-Location-Information AVP - 3GPP TS 29.272 #7.3.111 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1496, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "EPS-Location-Information", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "MME-Location-Information", RULE_OPTIONAL, -1, 1 } -+ ,{ "SGSN-Location-Information", RULE_OPTIONAL, -1, 1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* Active-APN AVP - 3GPP TS 29.173 #7.3.127 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1612, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Active-APN", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Context-Identifier", RULE_REQUIRED, -1, 1 } -+ ,{ "Service-Selection", RULE_OPTIONAL, -1, 1 } -+ ,{ "MIP6-Agent-Info", RULE_OPTIONAL, -1, 1 } -+ ,{ "Visited-Network-Identifier", RULE_OPTIONAL, -1, 1 } -+ ,{ "Specific-APN-Info", RULE_OPTIONAL, -1, -1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* Error-Diagnostic AVP - 3GPP TS 29.272 #7.3.128 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Error-Diagnostic)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "GPRS_DATA_SUBSCRIBED", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "NO_GPRS_DATA_SUBSCRIBED", { .i32 = 1 }}; -+ struct dict_enumval_data t_2 = { "ODB-ALL-APN", { .i32 = 2 }}; -+ struct dict_enumval_data t_3 = { "ODB-HPLMN-APN", { .i32 = 3 }}; -+ struct dict_enumval_data t_4 = { "ODB-VPLMN-APN", { .i32 = 4 }}; -+ -+ struct dict_avp_data data = { -+ 1614, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Error-Diagnostic", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_2 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_3 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_4 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* GMLC-Address AVP - 3GPP TS 29.173 #6.4.7 */ -+ { -+ struct dict_avp_data data = { -+ 2405, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "GMLC-Address", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , Address_type, NULL); -+ } -+ -+ /* Supported Features AVP - 3GPP TS 29.229 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 628, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Supported-Features", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Vendor-Id", RULE_REQUIRED, 1, 1 } -+ ,{ "Feature-List-ID", RULE_REQUIRED, 1, 1 } -+ ,{ "Feature-List", RULE_REQUIRED, 1, 1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* Trace-Data AVP - 3GPP TS 29.272 #7.3.63 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1458, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Trace-Data", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Trace-Reference", RULE_REQUIRED, -1, 1 } -+ ,{ "Trace-Depth", RULE_REQUIRED, -1, 1 } -+ ,{ "Trace-NE-Type-List", RULE_REQUIRED, -1, 1 } -+ ,{ "Trace-Interface-List", RULE_OPTIONAL, -1, 1 } -+ ,{ "Trace-Event-List", RULE_REQUIRED, -1, 1 } -+ ,{ "OMC-Id", RULE_OPTIONAL, -1, 1 } -+ ,{ "Trace-Collection-Entity", RULE_REQUIRED, -1, 1 } -+ ,{ "MDT-Configuration", RULE_OPTIONAL, -1, 1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* Subscription-Data AVP - 3GPP TS 29.272 #7.3.2 */ -+ { -+ /* -+ -+ * The Subscription-Data AVP is of type Grouped. It shall contain -+ * the information related to the user profile relevant for -+ * EPS and GERAN/UTRAN. -+ -+ Subscription-Data ::= -+ [ Subscriber-Status ] -+ [ MSISDN ] -+ [ STN-SR ] -+ [ ICS-Indicator ] -+ [ Network-Access-Mode ] -+ [ Operator-Determined-Barring ] -+ [ HPLMN-ODB ] -+ *10[ Regional-Subscription-Zone-Code] -+ [ Access-Restriction-Data ] -+ [ APN-OI-Replacement ] -+ [ LCS-Info ] -+ [ Teleservice-List ] -+ [ Call-Barring-Infor-List ] -+ [ 3GPP-Charging-Characteristics ] -+ [ AMBR ] -+ [ APN-Configuration-Profile ] -+ [ RAT-Frequency-Selection-Priority-ID ] -+ [ Trace-Data] -+ [ GPRS-Subscription-Data ] -+ *[ CSG-Subscription-Data ] -+ [ Roaming-Restricted-Due-To-Unsupported-Feature ] -+ [ Subscribed-Periodic-RAU-TAU-Timer ] -+ [ MPS-Priority ] -+ [ VPLMN-LIPA-Allowed ] -+ [ Relay-Node-Indicator ] -+ [ MDT-User-Consent ] -+ *[ AVP ] -+ -+ * The AMBR included in this grouped AVP shall include the AMBR -+ * associated to the user’s subscription (UE-AMBR); -+ * Max-Requested-Bandwidth-UL and Max-Requested-Bandwidth-DL within -+ * this AVP shall not both be set to "0". -+ * The APN-OI-Replacement included in this grouped AVP shall include -+ * the UE level APN-OI-Replacement associated to the user’s subscription. -+ */ -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1400, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Subscription-Data", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Subscriber-Status", RULE_OPTIONAL, -1, 1 } -+ ,{ "MSISDN", RULE_OPTIONAL, -1, 1 } -+ ,{ "STN-SR", RULE_OPTIONAL, -1, 1 } -+ ,{ "ICS-Indicator", RULE_OPTIONAL, -1, 1 } -+ ,{ "Network-Access-Mode", RULE_OPTIONAL, -1, 1 } -+ ,{ "Operator-Determined-Barring", RULE_OPTIONAL, -1, 1 } -+ ,{ "HPLMN-ODB", RULE_OPTIONAL, -1, 1 } -+ ,{ "Regional-Subscription-Zone-Code", RULE_OPTIONAL, -1, 10 } -+ ,{ "Access-Restriction-Data", RULE_OPTIONAL, -1, 1 } -+ ,{ "APN-OI-Replacement", RULE_OPTIONAL, -1, 1 } -+ ,{ "LCS-Info", RULE_OPTIONAL, -1, 1 } -+ ,{ "Teleservice-List", RULE_OPTIONAL, -1, 1 } -+ ,{ "Call-Barring-Infor-List", RULE_OPTIONAL, -1, 1 } -+ ,{ "3GPP-Charging-Characteristics", RULE_OPTIONAL, -1, 1 } -+ ,{ "AMBR", RULE_OPTIONAL, -1, 1 } -+ ,{ "APN-Configuration-Profile", RULE_OPTIONAL, -1, 1 } -+ ,{ "RAT-Frequency-Selection-Priority-ID", RULE_OPTIONAL, -1, 1 } -+ ,{ "Trace-Data", RULE_OPTIONAL, -1, 1 } -+ ,{ "GPRS-Subscription-Data", RULE_OPTIONAL, -1, 1 } -+ ,{ "CSG-Subscription-Data", RULE_OPTIONAL, -1, -1 } -+ ,{ "Roaming-Restricted-Due-To-Unsupported-Feature", RULE_OPTIONAL, -1, 1 } -+ ,{ "Subscribed-Periodic-RAU-TAU-Timer", RULE_OPTIONAL, -1, 1 } -+ ,{ "MPS-Priority", RULE_OPTIONAL, -1, 1 } -+ ,{ "VPLMN-LIPA-Allowed", RULE_OPTIONAL, -1, 1 } -+ ,{ "Relay-Node-Indicator", RULE_OPTIONAL, -1, 1 } -+ ,{ "MDT-User-Consent", RULE_OPTIONAL, -1, 1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* S6A-Update Location Request - 3GPP TS 29.272 #7.2.3 */ -+ { -+ /* -+ -+ The Update-Location-Request (ULR) command, indicated by the -+ Command-Code field set to 316 and the "R" bit set in -+ the Command Flags field, is sent from MME or SGSN to HSS. -+ -+ < Update-Location-Request> ::= < Diameter Header: 316, REQ, PXY, 16777251 > -+ < Session-Id > -+ [ Vendor-Specific-Application-Id ] -+ { Auth-Session-State } -+ { Origin-Host } -+ { Origin-Realm } -+ [ Destination-Host ] -+ { Destination-Realm } -+ { User-Name } -+ *[ Supported-Features ] -+ [ Terminal-Information ] -+ { RAT-Type } -+ { ULR-Flags } -+ [ UE-SRVCC-Capability ] -+ { Visited-PLMN-Id } -+ [ SGSN-Number ] -+ [ Homogeneous-Support-of-IMS-Voice-Over-PS-Sessions ] -+ [ GMLC-Address ] -+ *[ Active-APN ] -+ *[ AVP ] -+ *[ Proxy-Info ] -+ *[ Route-Record ] -+ */ -+ struct dict_object * cmd; -+ struct dict_cmd_data data = { -+ 316, /* Code */ -+ "Update-Location-Request", /* Name */ -+ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ -+ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Session-Id", RULE_FIXED_HEAD, -1, 1 } -+ ,{ "Vendor-Specific-Application-Id", RULE_OPTIONAL, -1, 1 } -+ ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } -+ ,{ "Destination-Host", RULE_OPTIONAL, -1, 1 } -+ ,{ "Destination-Realm", RULE_REQUIRED, -1, 1 } -+ ,{ "User-Name", RULE_REQUIRED, -1, 1 } -+ ,{ "Supported-Features", RULE_OPTIONAL, -1, -1 } -+ ,{ "Terminal-Information", RULE_OPTIONAL, -1, 1 } -+ ,{ "RAT-Type", RULE_REQUIRED, 1, 1 } -+ ,{ "ULR-Flags", RULE_REQUIRED, 1, 1 } -+ ,{ "UE-SRVCC-Capability", RULE_OPTIONAL, -1, 1 } -+ ,{ "Visited-PLMN-Id", RULE_REQUIRED, 1, 1 } -+ ,{ "SGSN-Number", RULE_OPTIONAL, -1, 1 } -+ ,{ "Homogeneous-Support-of-IMS-Voice-Over-PSSessions", RULE_OPTIONAL, -1, 1 } -+ ,{ "GMLC-Address", RULE_OPTIONAL, -1, 1 } -+ ,{ "Active-APN", RULE_OPTIONAL, -1, -1 } -+ ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } -+ ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } -+ }; -+ -+ CHECK_dict_new( DICT_COMMAND, &data, s6a_dict, &cmd); -+ PARSE_loc_rules( rules, cmd ); -+ } -+ -+ /* S6A-Update Location Answer - 3GPP TS 29.272 #7.2.4 */ -+ { -+ /* -+ -+ The Update-Location-Answer (ULA) command, indicated by the -+ Command-Code field set to 316 and the 'R' bit cleared -+ in the Command Flags field, is sent from HSS to MME or SGSN. -+ -+ < Update-Location-Answer> ::= < Diameter Header: 316, PXY, 16777251 > -+ < Session-Id > -+ [ Vendor-Specific-Application-Id ] -+ [ Result-Code ] -+ [ Experimental-Result ] -+ [ Error-Diagnostic ] -+ { Auth-Session-State } -+ { Origin-Host } -+ { Origin-Realm } -+ *[ Supported-Features ] -+ [ ULA-Flags ] -+ [ Subscription-Data ] -+ *[ AVP ] -+ *[ Failed-AVP ] -+ *[ Proxy-Info ] -+ *[ Route-Record ] -+ */ -+ struct dict_object * cmd; -+ struct dict_cmd_data data = { -+ 316, /* Code */ -+ "Update-Location-Answer", /* Name */ -+ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ -+ CMD_FLAG_PROXIABLE /* Fixed flag values */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Session-Id", RULE_FIXED_HEAD, -1, 1 } -+ ,{ "Vendor-Specific-Application-Id", RULE_OPTIONAL, -1, 1 } -+ ,{ "Result-Code", RULE_OPTIONAL, -1, 1 } -+ ,{ "Experimental-Result", RULE_OPTIONAL, -1, 1 } -+ ,{ "Error-Diagnostic", RULE_OPTIONAL, -1, 1 } -+ ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } -+ ,{ "Supported-Features", RULE_OPTIONAL, -1, -1 } -+ ,{ "ULA-Flags", RULE_OPTIONAL, -1, 1 } -+ ,{ "Subscription-Data", RULE_OPTIONAL, -1, 1 } -+ ,{ "Failed-AVP", RULE_OPTIONAL, -1, -1 } -+ ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } -+ ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } -+ }; -+ -+ CHECK_dict_new( DICT_COMMAND, &data, s6a_dict, &cmd); -+ PARSE_loc_rules( rules, cmd ); -+ } -+ -+ /* S6A-Cancel-Location-Request - 3GPP TS 29.272 #7.2.7 */ -+ { -+ /* -+ -+ The Cancel-Location-Request (CLR) command, indicated by the -+ Command-Code field set to 317 and the 'R' bit set in -+ the Command Flags field, is sent from HSS to MME or SGSN. -+ -+ < Cancel-Location-Request> ::= < Diameter Header: 317, REQ, PXY, 16777251 > -+ < Session-Id > -+ [ Vendor-Specific-Application-Id ] -+ { Auth-Session-State } -+ { Origin-Host } -+ { Origin-Realm } -+ { Destination-Host } -+ { Destination-Realm } -+ { User-Name } -+ *[Supported-Features ] -+ { Cancellation-Type } -+ *[ AVP ] -+ *[ Proxy-Info ] -+ *[ Route-Record ] -+ */ -+ struct dict_object * cmd; -+ struct dict_cmd_data data = { -+ 317, /* Code */ -+ "Cancel-Location-Request", /* Name */ -+ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ -+ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Session-Id", RULE_FIXED_HEAD, -1, 1 } -+ ,{ "Vendor-Specific-Application-Id", RULE_OPTIONAL, -1, 1 } -+ ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } -+ ,{ "Destination-Host", RULE_OPTIONAL, -1, 1 } -+ ,{ "Destination-Realm", RULE_REQUIRED, -1, 1 } -+ ,{ "User-Name", RULE_REQUIRED, -1, 1 } -+ ,{ "Supported-Features", RULE_OPTIONAL, -1, -1 } -+ ,{ "Cancellation-Type", RULE_REQUIRED, -1, 1 } -+ ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } -+ ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } -+ }; -+ -+ CHECK_dict_new( DICT_COMMAND, &data, s6a_dict, &cmd); -+ PARSE_loc_rules( rules, cmd ); -+ } -+ -+ /* S6A-Cancel-Location-Answer - 3GPP TS 29.272 #7.2.8 */ -+ { -+ /* -+ -+ The Cancel-Location-Answer (CLA) command, indicated by the -+ Command-Code field set to 317 and the 'R' bit cleared -+ in the Command Flags field, is sent from MME or SGSN to HSS. -+ -+ < Cancel-Location-Answer> ::= < Diameter Header: 317, PXY, 16777251 > -+ < Session-Id > -+ [ Vendor-Specific-Application-Id ] -+ *[ Supported-Features ] -+ [ Result-Code ] -+ [ Experimental-Result ] -+ { Auth-Session-State } -+ { Origin-Host } -+ { Origin-Realm } -+ *[ AVP ] -+ *[ Failed-AVP ] -+ *[ Proxy-Info ] -+ *[ Route-Record ] -+ */ -+ struct dict_object * cmd; -+ struct dict_cmd_data data = { -+ 317, /* Code */ -+ "Cancel-Location-Answer", /* Name */ -+ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ -+ CMD_FLAG_PROXIABLE /* Fixed flag values */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Session-Id", RULE_FIXED_HEAD, -1, 1 } -+ ,{ "Vendor-Specific-Application-Id", RULE_OPTIONAL, -1, 1 } -+ ,{ "Supported-Features", RULE_OPTIONAL, -1, -1 } -+ ,{ "Result-Code", RULE_OPTIONAL, -1, 1 } -+ ,{ "Experimental-Result", RULE_OPTIONAL, -1, 1 } -+ ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } -+ ,{ "Failed-AVP", RULE_OPTIONAL, -1, -1 } -+ ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } -+ ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } -+ }; -+ -+ CHECK_dict_new( DICT_COMMAND, &data, s6a_dict, &cmd); -+ PARSE_loc_rules( rules, cmd ); -+ } -+ -+ /* S6A-Authentication-Information-Request - 3GPP TS 29.272 #7.2.4 */ -+ { -+ /* -+ -+ The Authentication-Information-Request (AIR) command, indicated by -+ the Command-Code field set to 318 and the 'R' -+ bit set in the Command Flags field, is sent from MME or SGSN to HSS. -+ -+ < Authentication-Information-Request> ::= < Diameter Header: 318, REQ, PXY, 16777251 > -+ < Session-Id > -+ [ Vendor-Specific-Application-Id ] -+ { Auth-Session-State } -+ { Origin-Host } -+ { Origin-Realm } -+ [ Destination-Host ] -+ { Destination-Realm } -+ { User-Name } -+ *[ Supported-Features ] -+ [ Requested-EUTRAN-Authentication-Info ] -+ [ Requested-UTRAN-GERAN-Authentication-Info ] -+ { Visited-PLMN-Id } -+ *[ AVP ] -+ *[ Proxy-Info ] -+ *[ Route-Record ] -+ */ -+ struct dict_object * cmd; -+ struct dict_cmd_data data = { -+ 318, /* Code */ -+ "Authentication-Information-Request", /* Name */ -+ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ -+ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Session-Id", RULE_FIXED_HEAD, -1, 1 } -+ ,{ "Vendor-Specific-Application-Id", RULE_OPTIONAL, -1, 1 } -+ ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } -+ ,{ "Destination-Host", RULE_OPTIONAL, -1, 1 } -+ ,{ "Destination-Realm", RULE_REQUIRED, -1, 1 } -+ ,{ "User-Name", RULE_REQUIRED, -1, 1 } -+ ,{ "Supported-Features", RULE_OPTIONAL, -1, -1 } -+ ,{ "Requested-EUTRAN-Authentication-Info", RULE_OPTIONAL, -1, 1 } -+ ,{ "Requested-UTRAN-GERAN-Authentication-Info", RULE_OPTIONAL, -1, 1 } -+ ,{ "Visited-PLMN-Id", RULE_REQUIRED, -1, 1 } -+ ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } -+ ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } -+ }; -+ -+ CHECK_dict_new( DICT_COMMAND, &data, s6a_dict, &cmd); -+ PARSE_loc_rules( rules, cmd ); -+ } -+ -+ /* S6A-Authentication-Information-Answer - 3GPP TS 29.272 #7.2.6 */ -+ { -+ /* -+ -+ The Authentication-Information-Answer (AIA) command, indicated by -+ the Command-Code field set to318 and the 'R' bit cleared in the -+ Command Flags field, is sent from HSS to MME or SGSN. -+ -+ < Authentication-Information-Answer> ::= < Diameter Header: 318, PXY, 16777251 > -+ < Session-Id > -+ [ Vendor-Specific-Application-Id ] -+ [ Result-Code ] -+ [ Experimental-Result ] -+ [ Error-Diagnostic ] -+ { Auth-Session-State } -+ { Origin-Host } -+ { Origin-Realm } -+ *[ Supported-Features ] -+ [ Authentication-Info ] -+ *[ AVP ] -+ *[ Failed-AVP ] -+ *[ Proxy-Info ] -+ *[ Route-Record ] -+ */ -+ struct dict_object * cmd; -+ struct dict_cmd_data data = { -+ 318, /* Code */ -+ "Authentication-Information-Answer", /* Name */ -+ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ -+ CMD_FLAG_PROXIABLE /* Fixed flag values */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Session-Id", RULE_FIXED_HEAD, -1, 1 } -+ ,{ "Vendor-Specific-Application-Id", RULE_OPTIONAL, -1, 1 } -+ ,{ "Result-Code", RULE_OPTIONAL, -1, 1 } -+ ,{ "Experimental-Result", RULE_OPTIONAL, -1, 1 } -+ ,{ "Error-Diagnostic", RULE_OPTIONAL, -1, 1 } -+ ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } -+ ,{ "Supported-Features", RULE_OPTIONAL, -1, -1 } -+ ,{ "Authentication-Info", RULE_OPTIONAL, -1, 1 } -+ ,{ "Failed-AVP", RULE_OPTIONAL, -1, -1 } -+ ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } -+ ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } -+ }; -+ -+ CHECK_dict_new( DICT_COMMAND, &data, s6a_dict, &cmd); -+ PARSE_loc_rules( rules, cmd ); -+ } -+ -+ /* Insert-Subscriber-Data-Request IDR Command - 3GPP TS 29.272 #7.2.9 */ -+ { -+ /* -+ -+ The Insert-Subscriber-Data-Request (IDR) command, indicated by the -+ Command-Code field set to 319 and the 'R' bit set in the Command -+ Flags field, is sent from HSS to MME or SGSN. -+ -+ < Insert-Subscriber-Data-Request> ::= < Diameter Header: 319, REQ, PXY, 16777251 > -+ < Session-Id > -+ [ Vendor-Specific-Application-Id ] -+ { Auth-Session-State } -+ { Origin-Host } -+ { Origin-Realm } -+ { Destination-Host } -+ { Destination-Realm } -+ { User-Name } -+ *[ Supported-Features] -+ { Subscription-Data} -+ [IDR- Flags ] -+ *[ AVP ] -+ *[ Proxy-Info ] -+ *[ Route-Record ] -+ */ -+ struct dict_object * cmd; -+ struct dict_cmd_data data = { -+ 319, /* Code */ -+ "Insert-Subscriber-Data-Request", /* Name */ -+ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ -+ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Session-Id", RULE_FIXED_HEAD, -1, 1 } -+ ,{ "Vendor-Specific-Application-Id", RULE_OPTIONAL, -1, 1 } -+ ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } -+ ,{ "Destination-Host", RULE_REQUIRED, -1, 1 } -+ ,{ "Destination-Realm", RULE_REQUIRED, -1, 1 } -+ ,{ "User-Name", RULE_REQUIRED, -1, 1 } -+ ,{ "Supported-Features", RULE_OPTIONAL, -1, -1 } -+ ,{ "Subscription-Data", RULE_REQUIRED, -1, 1 } -+ ,{ "IDR-Flags", RULE_OPTIONAL, -1, 1 } -+ ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } -+ ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } -+ }; -+ -+ CHECK_dict_new( DICT_COMMAND, &data, s6a_dict, &cmd); -+ PARSE_loc_rules( rules, cmd ); -+ } -+ -+ /* Insert-Subscriber-Data-Answer IDA Command - 3GPP TS 29.272 #7.2.10 */ -+ { -+ /* -+ -+ The Insert-Subscriber-Data-Request (IDR) command, indicated by the -+ Command-Code field set to 319 and the 'R' bit set in the Command -+ Flags field, is sent from HSS to MME or SGSN. -+ -+ < Insert-Subscriber-Data-Answer> ::= < Diameter Header: 319, PXY, 16777251 > -+ < Session-Id > -+ [ Vendor-Specific-Application-Id ] -+ *[ Supported-Features ] -+ [ Result-Code ] -+ [ Experimental-Result ] -+ { Auth-Session-State } -+ { Origin-Host } -+ { Origin-Realm } -+ [ IMS-Voice-Over-PS-Sessions-Supported ] -+ [ Last-UE-Activity-Time ] -+ [ RAT-Type ] -+ [ IDA-Flags ] -+ [ EPS-User-State ] -+ [ EPS-Location-Information ] -+ *[ AVP ] -+ *[ Failed-AVP ] -+ *[ Proxy-Info ] -+ *[ Route-Record ] -+ */ -+ struct dict_object * cmd; -+ struct dict_cmd_data data = { -+ 319, /* Code */ -+ "Insert-Subscriber-Data-Answer", /* Name */ -+ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ -+ CMD_FLAG_PROXIABLE /* Fixed flag values */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Session-Id", RULE_FIXED_HEAD, -1, 1 } -+ ,{ "Vendor-Specific-Application-Id", RULE_OPTIONAL, -1, 1 } -+ ,{ "Supported-Features", RULE_OPTIONAL, -1, -1 } -+ ,{ "Result-Code", RULE_OPTIONAL, -1, 1 } -+ ,{ "Experimental-Result", RULE_OPTIONAL, -1, 1 } -+ ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } -+ ,{ "IMS-Voice-Over-PS-Sessions-Supported", RULE_OPTIONAL, -1, 1 } -+ ,{ "Last-UE-Activity-Time", RULE_OPTIONAL, -1, 1 } -+ ,{ "RAT-Type", RULE_OPTIONAL, -1, 1 } -+ ,{ "IDA-Flags", RULE_OPTIONAL, -1, 1 } -+ ,{ "EPS-User-State", RULE_OPTIONAL, -1, 1 } -+ ,{ "EPS-Location-Information", RULE_OPTIONAL, -1, 1 } -+ ,{ "Failed-AVP", RULE_OPTIONAL, -1, -1 } -+ ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } -+ ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } -+ }; -+ -+ CHECK_dict_new( DICT_COMMAND, &data, s6a_dict, &cmd); -+ PARSE_loc_rules( rules, cmd ); -+ } -+ -+ /* Delete-Subscriber-Data-Request (DSR) Command - 3GPP TS 29.272 #7.2.11 */ -+ { -+ /* -+ -+ The Delete-SubscriberData-Request (DSR) command, indicated by -+ the Command-Code field set to 320 and the 'R' bit -+ set in the Command Flags field, is sent from HSS to MME or SGSN. -+ -+ < Delete-Subscriber-Data-Request > ::= < Diameter Header: 320, REQ, PXY, 16777251 > -+ < Session-Id > -+ [ Vendor-Specific-Application-Id ] -+ { Auth-Session-State } -+ { Origin-Host } -+ { Origin-Realm } -+ { Destination-Host } -+ { Destination-Realm } -+ { User-Name } -+ *[ Supported-Features ] -+ { DSR-Flags } -+ *[ Context-Identifier ] -+ [ Trace-Reference ] -+ *[ TS-Code ] -+ *[ SS-Code ] -+ *[ AVP ] -+ *[ Proxy-Info ] -+ *[ Route-Record ] -+ */ -+ struct dict_object * cmd; -+ struct dict_cmd_data data = { -+ 320, /* Code */ -+ "Delete-SubscriberData-Request", /* Name */ -+ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ -+ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Session-Id", RULE_FIXED_HEAD, -1, 1 } -+ ,{ "Vendor-Specific-Application-Id", RULE_OPTIONAL, -1, 1 } -+ ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } -+ ,{ "Destination-Host", RULE_REQUIRED, -1, 1 } -+ ,{ "Destination-Realm", RULE_REQUIRED, -1, 1 } -+ ,{ "User-Name", RULE_REQUIRED, -1, 1 } -+ ,{ "Supported-Features", RULE_OPTIONAL, -1, -1 } -+ ,{ "DSR-Flags", RULE_REQUIRED, -1, 1 } -+ ,{ "Context-Identifier", RULE_OPTIONAL, -1, -1 } -+ ,{ "Trace-Reference", RULE_OPTIONAL, -1, 1 } -+ ,{ "TS-Code", RULE_OPTIONAL, -1, -1 } -+ ,{ "SS-Code", RULE_OPTIONAL, -1, -1 } -+ ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } -+ ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } -+ }; -+ -+ CHECK_dict_new( DICT_COMMAND, &data, s6a_dict, &cmd); -+ PARSE_loc_rules( rules, cmd ); -+ } -+ -+ /* Delete-Subscriber-Data-Answer (DSA) Command - 3GPP TS 29.272 #7.2.12 */ -+ { -+ /* -+ -+ The Delete-SubscriberData-Answer (DSA) command, indicated by the -+ Command-Code field set to 320 and the 'R' bit -+ cleared in the Command Flags field, is sent from MME or SGSN to HSS. -+ -+ < Delete-Subscriber-Data-Answer> ::= < Diameter Header: 320, PXY, 16777251 > -+ < Session-Id > -+ [ Vendor-Specific-Application-Id ] -+ *[ Supported-Features ] -+ [ Result-Code ] -+ [ Experimental-Result ] -+ { Auth-Session-State } -+ { Origin-Host } -+ { Origin-Realm } -+ [ DSA-Flags ] -+ *[ AVP ] -+ *[ Failed-AVP ] -+ *[ Proxy-Info ] -+ *[ Route-Record ] -+ */ -+ struct dict_object * cmd; -+ struct dict_cmd_data data = { -+ 320, /* Code */ -+ "Delete-SubscriberData-Answer", /* Name */ -+ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ -+ CMD_FLAG_PROXIABLE /* Fixed flag values */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Session-Id", RULE_FIXED_HEAD, -1, 1 } -+ ,{ "Vendor-Specific-Application-Id", RULE_OPTIONAL, -1, 1 } -+ ,{ "Supported-Features", RULE_OPTIONAL, -1, -1 } -+ ,{ "Result-Code", RULE_OPTIONAL, -1, 1 } -+ ,{ "Experimental-Result", RULE_OPTIONAL, -1, 1 } -+ ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } -+ ,{ "DSA-Flags", RULE_OPTIONAL, -1, 1 } -+ ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } -+ ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } -+ }; -+ -+ CHECK_dict_new( DICT_COMMAND, &data, s6a_dict, &cmd); -+ PARSE_loc_rules( rules, cmd ); -+ } -+ -+ /* Purge-UE-Request (PUR) Command - 3GPP TS 29.272 #7.2.13 */ -+ { -+ /* -+ -+ The Delete-SubscriberData-Request (DSR) command, indicated by -+ the Command-Code field set to 320 and the 'R' bit -+ set in the Command Flags field, is sent from HSS to MME or SGSN. -+ -+ < Purge-UE-Request> ::= < Diameter Header: 321, REQ, PXY, 16777251 > -+ < Session-Id > -+ [ Vendor-Specific-Application-Id ] -+ { Auth-Session-State } -+ { Origin-Host } -+ { Origin-Realm } -+ [ Destination-Host ] -+ { Destination-Realm } -+ { User-Name } -+ [ PUR-Flags ] -+ *[ Supported-Features ] -+ *[ AVP ] -+ *[ Proxy-Info ] -+ *[ Route-Record ] -+ */ -+ struct dict_object * cmd; -+ struct dict_cmd_data data = { -+ 321, /* Code */ -+ "Purge-UE-Request", /* Name */ -+ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ -+ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Session-Id", RULE_FIXED_HEAD, -1, 1 } -+ ,{ "Vendor-Specific-Application-Id", RULE_OPTIONAL, -1, 1 } -+ ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } -+ ,{ "Destination-Host", RULE_OPTIONAL, -1, 1 } -+ ,{ "Destination-Realm", RULE_REQUIRED, -1, 1 } -+ ,{ "User-Name", RULE_REQUIRED, -1, 1 } -+ ,{ "PUR-Flags", RULE_OPTIONAL, -1, 1 } -+ ,{ "Supported-Features", RULE_OPTIONAL, -1, -1 } -+ ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } -+ ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } -+ }; -+ -+ CHECK_dict_new( DICT_COMMAND, &data, s6a_dict, &cmd); -+ PARSE_loc_rules( rules, cmd ); -+ } -+ -+ /* Purge-UE-Answer (PUA) Command - 3GPP TS 29.272 #7.2.14 */ -+ { -+ /* -+ -+ The Purge-UE-Answer (PUA) command, indicated by the Command-Code -+ field set to 321 and the 'R' bit cleared in the -+ Command Flags field, is sent from HSS to MME or SGSN. -+ -+ < Purge-UE-Answer> ::= < Diameter Header: 321, PXY, 16777251 > -+ < Session-Id > -+ [ Vendor-Specific-Application-Id ] -+ *[ Supported-Features ] -+ [ Result-Code ] -+ [ Experimental-Result ] -+ { Auth-Session-State } -+ { Origin-Host } -+ { Origin-Realm } -+ [ PUA-Flags ] -+ *[ AVP ] -+ *[ Failed-AVP ] -+ *[ Proxy-Info ] -+ *[ Route-Record ] -+ */ -+ struct dict_object * cmd; -+ struct dict_cmd_data data = { -+ 321, /* Code */ -+ "Purge-UE-Answer", /* Name */ -+ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ -+ CMD_FLAG_PROXIABLE /* Fixed flag values */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Session-Id", RULE_FIXED_HEAD, -1, 1 } -+ ,{ "Vendor-Specific-Application-Id", RULE_OPTIONAL, -1, 1 } -+ ,{ "Supported-Features", RULE_OPTIONAL, -1, -1 } -+ ,{ "Result-Code", RULE_OPTIONAL, -1, 1 } -+ ,{ "Experimental-Result", RULE_OPTIONAL, -1, 1 } -+ ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } -+ ,{ "PUA-Flags", RULE_OPTIONAL, -1, 1 } -+ ,{ "Failed-AVP", RULE_OPTIONAL, -1, -1 } -+ ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } -+ ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } -+ }; -+ -+ CHECK_dict_new( DICT_COMMAND, &data, s6a_dict, &cmd); -+ PARSE_loc_rules( rules, cmd ); -+ } -+ -+ /* Reset-Request (RSR) Command - 3GPP TS 29.272 #7.2.15 */ -+ { -+ /* -+ -+ The Reset-Request (RSR) command, indicated by the Command-Code -+ field set to 322 and the 'R' bit set in the -+ Command Flags field, is sent from HSS to MME or SGSN. -+ -+ < Reset-Request> ::= < Diameter Header: 322, REQ, PXY, 16777251 > -+ < Session-Id > -+ [ Vendor-Specific-Application-Id ] -+ { Auth-Session-State } -+ { Origin-Host } -+ { Origin-Realm } -+ { Destination-Host } -+ { Destination-Realm } -+ *[ Supported-Features ] -+ *[ User-Id ] -+ *[ AVP ] -+ *[ Proxy-Info ] -+ *[ Route-Record ] -+ */ -+ struct dict_object * cmd; -+ struct dict_cmd_data data = { -+ 322, /* Code */ -+ "Reset-Request", /* Name */ -+ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ -+ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Session-Id", RULE_FIXED_HEAD, -1, 1 } -+ ,{ "Vendor-Specific-Application-Id", RULE_OPTIONAL, -1, 1 } -+ ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } -+ ,{ "Destination-Host", RULE_REQUIRED, -1, 1 } -+ ,{ "Destination-Realm", RULE_REQUIRED, -1, 1 } -+ ,{ "Supported-Features", RULE_OPTIONAL, -1, -1 } -+ ,{ "User-Id", RULE_OPTIONAL, -1, -1 } -+ ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } -+ ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } -+ }; -+ -+ CHECK_dict_new( DICT_COMMAND, &data, s6a_dict, &cmd); -+ PARSE_loc_rules( rules, cmd ); -+ } -+ -+ /* Reset-Answer (RSA) Command - 3GPP TS 29.272 #7.2.16 */ -+ { -+ /* -+ -+ The Authentication-Information-Answer (RSA) command, indicated by -+ the Command-Code field set to 322 and the 'R' -+ bit cleared in the Command Flags field, is sent from MME or SGSN to HSS. -+ -+ < Reset-Answer> ::= < Diameter Header: 322, PXY, 16777251 > -+ < Session-Id > -+ [ Vendor-Specific-Application-Id ] -+ *[ Supported-Features ] -+ [ Result-Code ] -+ [ Experimental-Result ] -+ { Auth-Session-State } -+ { Origin-Host } -+ { Origin-Realm } -+ *[ AVP ] -+ *[ Failed-AVP ] -+ *[ Proxy-Info ] -+ *[ Route-Record ] -+ */ -+ struct dict_object * cmd; -+ struct dict_cmd_data data = { -+ 322, /* Code */ -+ "Reset-Anwer", /* Name */ -+ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ -+ CMD_FLAG_PROXIABLE /* Fixed flag values */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Session-Id", RULE_FIXED_HEAD, -1, 1 } -+ ,{ "Vendor-Specific-Application-Id", RULE_OPTIONAL, -1, 1 } -+ ,{ "Supported-Features", RULE_OPTIONAL, -1, -1 } -+ ,{ "Result-Code", RULE_OPTIONAL, -1, 1 } -+ ,{ "Experimental-Result", RULE_OPTIONAL, -1, 1 } -+ ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } -+ ,{ "Failed-AVP", RULE_OPTIONAL, -1, -1 } -+ ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } -+ ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } -+ }; -+ -+ CHECK_dict_new( DICT_COMMAND, &data, s6a_dict, &cmd); -+ PARSE_loc_rules( rules, cmd ); -+ } -+ -+ /* Notify-Request (NOR) Command - 3GPP TS 29.272 #7.2.17 */ -+ { -+ /* -+ -+ The Notify-Request (NOR) command, indicated by the Command-Code -+ field set to 323 and the 'R' bit set in the Command Flags field, -+ is sent from MME or SGSN to HSS. -+ -+ < Notify-Request> ::= < Diameter Header: 323, REQ, PXY, 16777251 > -+ < Session-Id > -+ [ Vendor-Specific-Application-Id ] -+ { Auth-Session-State } -+ { Origin-Host } -+ { Origin-Realm } -+ [ Destination-Host ] -+ { Destination-Realm } -+ { User-Name } -+ *[ Supported-Features ] -+ [ Terminal-Information ] -+ [ MIP6-Agent-Info ] -+ [ Visited-Network-Identifier ] -+ [ Context-Identifier ] -+ [ Service-Selection ] -+ [ Alert-Reason ] -+ [ UE-SRVCC-Capability ] -+ [ NOR-Flags ] -+ *[ AVP ] -+ *[ Proxy-Info ] -+ *[ Route-Record ] -+ */ -+ struct dict_object * cmd; -+ struct dict_cmd_data data = { -+ 323, /* Code */ -+ "Notify-Request", /* Name */ -+ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ -+ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Session-Id", RULE_FIXED_HEAD, -1, 1 } -+ ,{ "Vendor-Specific-Application-Id", RULE_OPTIONAL, -1, 1 } -+ ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } -+ ,{ "Destination-Host", RULE_OPTIONAL, -1, 1 } -+ ,{ "Destination-Realm", RULE_REQUIRED, -1, 1 } -+ ,{ "User-Name", RULE_REQUIRED, -1, 1 } -+ ,{ "Supported-Features", RULE_OPTIONAL, -1, -1 } -+ ,{ "Terminal-Information", RULE_OPTIONAL, -1, 1 } -+ ,{ "MIP6-Agent-Info", RULE_OPTIONAL, -1, 1 } -+ ,{ "Visited-Network-Identifier", RULE_OPTIONAL, -1, 1 } -+ ,{ "Context-Identifier", RULE_OPTIONAL, -1, 1 } -+ ,{ "Service-Selection", RULE_OPTIONAL, -1, 1 } -+ ,{ "Alert-Reason", RULE_OPTIONAL, -1, 1 } -+ ,{ "UE-SRVCC-Capability", RULE_OPTIONAL, -1, 1 } -+ ,{ "NOR-Flags", RULE_OPTIONAL, -1, 1 } -+ ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } -+ ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } -+ }; -+ -+ CHECK_dict_new( DICT_COMMAND, &data, s6a_dict, &cmd); -+ PARSE_loc_rules( rules, cmd ); -+ } -+ -+ /* Notify-Answer (NOA) Command - 3GPP TS 29.272 #7.2.18 */ -+ { -+ /* -+ -+ The Notify-Answer (NOA) command, indicated by the Command-Code -+ field set to 323 and the 'R' bit cleared in the -+ Command Flags field, is sent from HSS to MME or SGSN. -+ -+ < Notify-Answer> ::= < Diameter Header: 323, PXY, 16777251 > -+ < Session-Id > -+ [ Vendor-Specific-Application-Id ] -+ [ Result-Code ] -+ [ Experimental-Result ] -+ { Auth-Session-State } -+ { Origin-Host } -+ { Origin-Realm } -+ *[ Supported-Features ] -+ *[ AVP ] -+ *[ Failed-AVP ] -+ *[ Proxy-Info ] -+ *[ Route-Record ] -+ */ -+ struct dict_object * cmd; -+ struct dict_cmd_data data = { -+ 323, /* Code */ -+ "Notify-Answer", /* Name */ -+ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ -+ CMD_FLAG_PROXIABLE /* Fixed flag values */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Session-Id", RULE_FIXED_HEAD, -1, 1 } -+ ,{ "Vendor-Specific-Application-Id", RULE_OPTIONAL, -1, 1 } -+ ,{ "Result-Code", RULE_OPTIONAL, -1, 1 } -+ ,{ "Experimental-Result", RULE_OPTIONAL, -1, 1 } -+ ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } -+ ,{ "Supported-Features", RULE_OPTIONAL, -1, -1 } -+ ,{ "Failed-AVP", RULE_OPTIONAL, -1, -1 } -+ ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } -+ ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } -+ }; -+ -+ CHECK_dict_new( DICT_COMMAND, &data, s6a_dict, &cmd); -+ PARSE_loc_rules( rules, cmd ); -+ } -+ -+ /* ME-Identity-Check-Request (ECR) Command - 3GPP TS 29.272 #7.2.19 */ -+ { -+ /* -+ -+ The ME-Identity-Check-Request (ECR) command, indicated by the -+ Command-Code field set to 324 and the 'R' bit set -+ in the Command Flags field, is sent from MME or SGSN to EIR. -+ -+ < ME-Identity-Check-Request > ::= < Diameter Header: 324, REQ, PXY, 16777252 > -+ < Session-Id > -+ [ Vendor-Specific-Application-Id ] -+ { Auth-Session-State } -+ { Origin-Host } -+ { Origin-Realm } -+ [ Destination-Host ] -+ { Destination-Realm } -+ { Terminal-Information } -+ [ User-Name ] -+ *[ AVP ] -+ *[ Proxy-Info ] -+ *[ Route-Record ] -+ */ -+ struct dict_object * cmd; -+ struct dict_cmd_data data = { -+ 324, /* Code */ -+ "ME-Identity-Check-Request", /* Name */ -+ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ -+ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Session-Id", RULE_FIXED_HEAD, -1, 1 } -+ ,{ "Vendor-Specific-Application-Id", RULE_OPTIONAL, -1, 1 } -+ ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } -+ ,{ "Destination-Host", RULE_OPTIONAL, -1, 1 } -+ ,{ "Destination-Realm", RULE_REQUIRED, -1, 1 } -+ ,{ "Terminal-Information", RULE_REQUIRED, -1, 1 } -+ ,{ "User-Name", RULE_OPTIONAL, -1, 1 } -+ ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } -+ ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } -+ }; -+ -+ CHECK_dict_new( DICT_COMMAND, &data, s6a_dict, &cmd); -+ PARSE_loc_rules( rules, cmd ); -+ } -+ -+ /* ME-Identity-Check-Answer (ECA) Command - 3GPP TS 29.272 #7.2.20 */ -+ { -+ /* -+ -+ The ME-Identity-Check-Answer (ECA) command, indicated by the -+ Command-Code field set to 324 and the 'R' bit -+ cleared in the Command Flags field, is sent from EIR to MME or SGSN. -+ -+ < ME-Identity-Check-Answer> ::= < Diameter Header: 324, PXY, 16777252 > -+ < Session-Id > -+ [ Vendor-Specific-Application-Id ] -+ [ Result-Code ] -+ [ Experimental-Result ] -+ { Auth-Session-State } -+ { Origin-Host } -+ { Origin-Realm } -+ [ Equipment-Status ] -+ *[ AVP ] -+ *[ Failed-AVP ] -+ *[ Proxy-Info ] -+ *[ Route-Record ] -+ */ -+ struct dict_object * cmd; -+ struct dict_cmd_data data = { -+ 324, /* Code */ -+ "ME-Identity-Check-Answer", /* Name */ -+ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ -+ CMD_FLAG_PROXIABLE /* Fixed flag values */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Session-Id", RULE_FIXED_HEAD, -1, 1 } -+ ,{ "Vendor-Specific-Application-Id", RULE_OPTIONAL, -1, 1 } -+ ,{ "Result-Code", RULE_OPTIONAL, -1, 1 } -+ ,{ "Experimental-Result", RULE_OPTIONAL, -1, 1 } -+ ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } -+ ,{ "Equipment-Status", RULE_OPTIONAL, -1, 1 } -+ ,{ "User-Name", RULE_OPTIONAL, -1, 1 } -+ ,{ "Failed-AVP", RULE_OPTIONAL, -1, -1 } -+ ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } -+ ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } -+ }; -+ -+ CHECK_dict_new( DICT_COMMAND, &data, s6a_dict, &cmd); -+ PARSE_loc_rules( rules, cmd ); -+ } -+ } -+ -+ TRACE_DEBUG(INFO, "Dictionary Extension 'S6A from 3GPP standard v.10.5' initialized"); -+ return 0; -+} -+EXTENSION_ENTRY("dict_s6a", dict_s6a_init, "dict_nas_mipv6"); -diff -NaurB -x '*~' -x build freeDiameter-1.1.5-unmodified/include/freeDiameter/freeDiameter-host.h.in freeDiameter-1.1.5/include/freeDiameter/freeDiameter-host.h.in ---- freeDiameter-1.1.5-unmodified/include/freeDiameter/freeDiameter-host.h.in 2012-11-03 18:45:41.000000000 +0100 -+++ freeDiameter-1.1.5/include/freeDiameter/freeDiameter-host.h.in 2013-02-12 10:56:29.411429498 +0100 -@@ -37,6 +37,9 @@ - #ifndef FD_IS_CONFIG - #define FD_IS_CONFIG - -+#if HAVE_CONFIG_H -+# include "config.h" -+#else - #cmakedefine HAVE_NTOHLL - #cmakedefine HAVE_MALLOC_H - #cmakedefine HAVE_SIGNALENT_H -@@ -57,6 +60,7 @@ - #cmakedefine GNUTLS_VERSION_210 - #cmakedefine GNUTLS_VERSION_300 - #cmakedefine GNUTLS_VERSION_310 -+#endif /* !HAVE_CONFIG_H */ - - #cmakedefine ERRORS_ON_TODO - #cmakedefine DEBUG -diff -NaurB -x '*~' -x build freeDiameter-1.1.5-unmodified/include/freeDiameter/libfdproto.h freeDiameter-1.1.5/include/freeDiameter/libfdproto.h ---- freeDiameter-1.1.5-unmodified/include/freeDiameter/libfdproto.h 2012-11-03 18:45:41.000000000 +0100 -+++ freeDiameter-1.1.5/include/freeDiameter/libfdproto.h 2013-02-05 13:46:06.683419353 +0100 -@@ -499,7 +499,7 @@ - TRACE_DEBUG_ALL( "Check FCT: " #__call__ ); \ - __ret__ = (__call__); \ - if (__ret__ != 0) { \ -- TRACE_DEBUG_ERROR("ERROR: in '" #__call__ "':\t%s", strerror(__ret__)); \ -+ TRACE_DEBUG_ERROR("ERROR: in %s:%d'" #__call__ "':\t%s", __FILE__, __LINE__, strerror(__ret__)); \ - __fallback__; \ - } \ - } - -diff -NaurB -x '*~' -x build freeDiameter-1.1.5-unmodified/libfdproto/messages.c freeDiameter-1.1.5/libfdproto/messages.c ---- freeDiameter-1.1.5-unmodified/libfdproto/messages.c 2012-11-03 18:45:41.000000000 +0100 -+++ freeDiameter-1.1.5/libfdproto/messages.c 2013-02-14 14:41:42.281217289 +0100 -@@ -967,8 +967,12 @@ - - /* Check the parameters */ - CHECK_PARAMS( CHECK_MSG(msg) ); -- CHECK_PARAMS( msg->msg_public.msg_flags & CMD_FLAG_REQUEST ); /* we associate with requests only */ -+// CHECK_PARAMS( msg->msg_public.msg_flags & CMD_FLAG_REQUEST ); /* we associate with requests only */ - CHECK_PARAMS( (anscb == NULL) || (msg->msg_cb.fct == NULL) ); /* We are not overwritting a cb */ -+ /* No need to associate a callback with an answer. */ -+ if ((msg->msg_public.msg_flags & CMD_FLAG_REQUEST) == 0) { -+ return 0; -+ } - - /* Associate callback and data with the message, if any */ - msg->msg_cb.fct = anscb; diff --git a/openair-cn/S6A/freediameter/freediameter-1.2.0.patch b/openair-cn/S6A/freediameter/freediameter-1.2.0.patch deleted file mode 100644 index 1474f12138..0000000000 --- a/openair-cn/S6A/freediameter/freediameter-1.2.0.patch +++ /dev/null @@ -1,4245 +0,0 @@ -diff -rupN freeDiameter-1.2.0/extensions/CMakeLists.txt freeDiameter-1.2.0.yang/extensions/CMakeLists.txt ---- freeDiameter-1.2.0/extensions/CMakeLists.txt 2013-09-14 12:09:01.000000000 +0200 -+++ freeDiameter-1.2.0.yang/extensions/CMakeLists.txt 2015-03-17 15:47:15.237308388 +0100 -@@ -36,6 +36,7 @@ INCLUDE_DIRECTORIES(${LFDCORE_INCLUDES}) - #### - # Diameter applications dictionaries - -+FD_EXTENSION_SUBDIR(dict_s6a "3GPP S6A TS.29.279-990" ON) - FD_EXTENSION_SUBDIR(dict_nasreq "NASREQ (RFC4005) Dictionary definitions" ON) - FD_EXTENSION_SUBDIR(dict_eap "Diameter EAP (RFC4072) Dictionary definitions" ON) - -diff -rupN freeDiameter-1.2.0/extensions/dict_s6a/CMakeLists.txt freeDiameter-1.2.0.yang/extensions/dict_s6a/CMakeLists.txt ---- freeDiameter-1.2.0/extensions/dict_s6a/CMakeLists.txt 1970-01-01 01:00:00.000000000 +0100 -+++ freeDiameter-1.2.0.yang/extensions/dict_s6a/CMakeLists.txt 2015-03-17 15:22:46.729309000 +0100 -@@ -0,0 +1,14 @@ -+# The dict_rfc5777 extension -+PROJECT("S6a protocol based on 3GPP 29.272-990" C) -+ -+# Compile as a module -+FD_ADD_EXTENSION(dict_s6a dict_s6a.c) -+ -+ -+#### -+## INSTALL section ## -+ -+INSTALL(TARGETS dict_s6a -+ LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX} -+ COMPONENT freeDiameter-dictionary-s6a) -+ -diff -rupN freeDiameter-1.2.0/extensions/dict_s6a/dict_s6a.c freeDiameter-1.2.0.yang/extensions/dict_s6a/dict_s6a.c ---- freeDiameter-1.2.0/extensions/dict_s6a/dict_s6a.c 1970-01-01 01:00:00.000000000 +0100 -+++ freeDiameter-1.2.0.yang/extensions/dict_s6a/dict_s6a.c 2015-03-17 15:22:46.729309000 +0100 -@@ -0,0 +1,4212 @@ -+/********************************************************************************************************* -+* Software License Agreement (BSD License) * -+* Author: Sebastien ROUX * -+* * -+* Copyright (c) 2013, Eurecom * -+* All rights reserved. * -+* * -+* Redistribution and use of this software in source and binary forms, with or without modification, are * -+* permitted provided that the following conditions are met: * -+* * -+* * Redistributions of source code must retain the above * -+* copyright notice, this list of conditions and the * -+* following disclaimer. * -+* * -+* * Redistributions in binary form must reproduce the above * -+* copyright notice, this list of conditions and the * -+* following disclaimer in the documentation and/or other * -+* materials provided with the distribution. * -+* * -+* * Neither the name of the Teraoka Laboratory nor the * -+* names of its contributors may be used to endorse or * -+* promote products derived from this software without * -+* specific prior written permission of Teraoka Laboratory * -+* * -+* * -+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED * -+* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * -+* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR * -+* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * -+* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * -+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR * -+* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * -+* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * -+*********************************************************************************************************/ -+ -+#include -+ -+/* The content of this file follows the same structure as dict_base_proto.c */ -+ -+#define CHECK_dict_new( _type, _data, _parent, _ref ) \ -+ CHECK_FCT( fd_dict_new( fd_g_config->cnf_dict, (_type), (_data), (_parent), (_ref)) ); -+ -+#define CHECK_dict_search( _type, _criteria, _what, _result ) \ -+ CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, (_type), (_criteria), (_what), (_result), ENOENT) ); -+ -+struct local_rules_definition { -+ char *avp_name; -+ enum rule_position position; -+ int min; -+ int max; -+}; -+ -+#define RULE_ORDER( _position ) ((((_position) == RULE_FIXED_HEAD) || ((_position) == RULE_FIXED_TAIL)) ? 1 : 0 ) -+ -+#define PARSE_loc_rules( _rulearray, _parent) { \ -+ int __ar; \ -+ for (__ar=0; __ar < sizeof(_rulearray) / sizeof((_rulearray)[0]); __ar++) { \ -+ struct dict_rule_data __data = { NULL, \ -+ (_rulearray)[__ar].position, \ -+ 0, \ -+ (_rulearray)[__ar].min, \ -+ (_rulearray)[__ar].max}; \ -+ __data.rule_order = RULE_ORDER(__data.rule_position); \ -+ CHECK_FCT( fd_dict_search( \ -+ fd_g_config->cnf_dict, \ -+ DICT_AVP, \ -+ AVP_BY_NAME_ALL_VENDORS, \ -+ (_rulearray)[__ar].avp_name, \ -+ &__data.rule_avp, 0 ) ); \ -+ if ( !__data.rule_avp ) { \ -+ TRACE_DEBUG(INFO, "AVP Not found: '%s'", (_rulearray)[__ar].avp_name ); \ -+ return ENOENT; \ -+ } \ -+ CHECK_FCT_DO( fd_dict_new( fd_g_config->cnf_dict, DICT_RULE, &__data, _parent, NULL), \ -+ { \ -+ TRACE_DEBUG(INFO, "Error on rule with AVP '%s'", \ -+ (_rulearray)[__ar].avp_name ); \ -+ return EINVAL; \ -+ } ); \ -+ } \ -+} -+ -+#define enumval_def_u32( _val_, _str_ ) \ -+ { _str_, { .u32 = _val_ }} -+ -+#define enumval_def_os( _len_, _val_, _str_ ) \ -+ { _str_, { .os = { .data = (unsigned char *)_val_, .len = _len_ }}} -+ -+/* Defines if there are any */ -+ -+/* Dictionary */ -+ -+int dict_s6a_init(char * conffile) -+{ -+#define VENDOR_3GPP_Id 10415 -+ -+ TRACE_ENTRY("%p", conffile); -+ -+ struct dict_object * vendor_dict; -+ { -+ struct dict_vendor_data vendor_data = { VENDOR_3GPP_Id, "3GPP" }; -+ CHECK_dict_new (DICT_VENDOR, &vendor_data, NULL, &vendor_dict); -+ } -+ -+ struct dict_object * s6a_dict; -+ { -+ struct dict_application_data data = { 16777251, "Diameter S6a 3GPP" }; -+ CHECK_dict_new( DICT_APPLICATION, &data , NULL, &s6a_dict); -+ } -+ -+ /* AVP section */ -+ { -+ /* Loading the derived data formats */ -+ -+ struct dict_object * Time_type; -+ struct dict_object * Address_type; -+ struct dict_object * UTF8String_type; -+ -+ CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "Time", &Time_type); -+ CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "Address", &Address_type); -+ CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "UTF8String", &UTF8String_type); -+ -+ /* 3GPP-Charging-Characteristics */ -+ { -+ struct dict_avp_data data = { -+ 13, /* Code */ -+ 0, /* Vendor */ -+ "3GPP-Charging-Characteristics", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); -+ } -+ -+ /* Service-Selection - RFC 5778 */ -+ { -+ struct dict_avp_data data = { -+ 493, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor , EURECOM: with FD 1.2.0 does not work if vendor ID is 0 for this AVP*/ -+ "Service-Selection", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); -+ } -+ -+ /* Max-Requested-Bandwidth-DL AVP - 3GPP TS 29.214 #5.3.14 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 515, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Max-Requested-Bandwidth-DL", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* Max-Requested-Bandwidth-UL AVP - 3GPP TS 29.214 #5.3.15 */ -+ { -+ struct dict_avp_data data = { -+ 516, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Max-Requested-Bandwidth-UL", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, NULL, NULL); -+ } -+ -+ /* Visited-Network-Identifier AVP - 3GPP TS 29.229 #6.3.1 */ -+ { -+ struct dict_avp_data data = { -+ 600, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Visited-Network-Identifier", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, NULL); -+ } -+ -+ /* Confidentiality-Key AVP - 3GPP TS 29.229 #6.3.27 */ -+ { -+ struct dict_avp_data data = { -+ 625, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Confidentiality-Key", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, NULL); -+ } -+ -+ /* Integrity-Key AVP - 3GPP TS 29.229 #6.3.28 */ -+ { -+ struct dict_avp_data data = { -+ 626, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Integrity-Key", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, NULL); -+ } -+ -+ /* Feature-List-ID AVP - 3GPP TS 29.229 #6.3.29 */ -+ { -+ struct dict_avp_data data = { -+ 629, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Feature-List-ID", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, NULL); -+ } -+ -+ /* Feature-List AVP - 3GPP TS 29.229 #6.3.30 */ -+ { -+ struct dict_avp_data data = { -+ 630, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Feature-List", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, NULL); -+ } -+ -+ /* MSISDN AVP - 3GPP TS 29.329 #6.3.2 */ -+ { -+ struct dict_avp_data data = { -+ 701, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "MSISDN", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, NULL); -+ } -+ -+ /* Served-Party-IP-Address AVP - 3GPP TS 32.299 #7.2.187 -+ * The Served-Party-IP-Address AVP (AVP code 848) is of type Address -+ * and holds the IP address of either the calling or called party, -+ * depending on whether the P-CSCF is in touch with the calling or the -+ * called party. This AVP is only provided by the P-CSCF. -+ */ -+ { -+ struct dict_avp_data data = { -+ 848, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Served-Party-IP-Address", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , Address_type, NULL); -+ } -+ -+ /* QoS-Class-Identifier AVP - 3GPP TS 29.212 #5.3.17 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(QoS-Class-Identifier)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_1 = { "QCI_1", { .i32 = 1 }}; -+ struct dict_enumval_data t_2 = { "QCI_2", { .i32 = 2 }}; -+ struct dict_enumval_data t_3 = { "QCI_3", { .i32 = 3 }}; -+ struct dict_enumval_data t_4 = { "QCI_4", { .i32 = 4 }}; -+ struct dict_enumval_data t_5 = { "QCI_5", { .i32 = 5 }}; -+ struct dict_enumval_data t_6 = { "QCI_6", { .i32 = 6 }}; -+ struct dict_enumval_data t_7 = { "QCI_7", { .i32 = 7 }}; -+ struct dict_enumval_data t_8 = { "QCI_8", { .i32 = 8 }}; -+ struct dict_enumval_data t_9 = { "QCI_9", { .i32 = 9 }}; -+ -+ struct dict_avp_data data = { -+ 1028, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "QoS-Class-Identifier", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ /* Create the Enumerated type, and then the AVP */ -+ CHECK_dict_new( DICT_TYPE, &tdata, NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1, avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_2, avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_3, avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_4, avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_5, avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_6, avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_7, avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_8, avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_9, avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* RAT-Type AVP - 3GPP TS 29.212 #5.3.31 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "Enumerated(RAT-Type)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "WLAN", { .u32 = 0 }}; -+ struct dict_enumval_data t_1 = { "VIRTUAL", { .u32 = 1 }}; -+ struct dict_enumval_data t_1000 = { "UTRAN", { .u32 = 1000 }}; -+ struct dict_enumval_data t_1001 = { "GERAN", { .u32 = 1001 }}; -+ struct dict_enumval_data t_1002 = { "GAN", { .u32 = 1002 }}; -+ struct dict_enumval_data t_1003 = { "HSPA_EVOLUTION", { .u32 = 1003 }}; -+ struct dict_enumval_data t_1004 = { "EUTRAN", { .u32 = 1004 }}; -+ struct dict_enumval_data t_2000 = { "CDMA2000_1X", { .u32 = 2000 }}; -+ struct dict_enumval_data t_2001 = { "HRPD", { .u32 = 2001 }}; -+ struct dict_enumval_data t_2002 = { "UMB", { .u32 = 2002 }}; -+ struct dict_enumval_data t_2003 = { "EHRPD", { .u32 = 2003 }}; -+ -+ struct dict_avp_data data = { -+ 1032, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "RAT-Type", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ /* Create the Enumerated type, and then the AVP */ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1000 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1001 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1002 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1003 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1004 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_2000 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_2001 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_2002 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_2003 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* Priority-Level AVP - 3GPP TS 29.272 #5.3.45 */ -+ { -+ struct dict_avp_data data = { -+ 1046, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Priority-Level", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, NULL); -+ } -+ -+ /* Pre-emption-Capability AVP - 3GPP TS 29.212 #5.3.46 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Pre-emption-Capability)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "PRE-EMPTION_CAPABILITY_ENABLED", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "PRE-EMPTION_CAPABILITY_DISABLED", { .i32 = 1 }}; -+ -+ struct dict_avp_data data = { -+ 1047, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Pre-emption-Capability", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ /* Create the Enumerated type, and then the AVP */ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* Pre-emption-Vulnerability AVP - 3GPP TS 29.212 #5.3.47 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Pre-emption-Vulnerability)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "PRE-EMPTION_VULNERABILITY_ENABLED", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "PRE-EMPTION_VULNERABILITY_DISABLED", { .i32 = 1 }}; -+ -+ struct dict_avp_data data = { -+ 1048, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Pre-emption-Vulnerability", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ /* Create the Enumerated type, and then the AVP */ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* Allocation-Retention-Priority AVP - 3GPP TS 29.272 #5.3.32 */ -+ { -+ /* -+ -+ Allocation-Retention-Priority ::= < AVP Header: 1034 > -+ { Priority-Level } -+ [ Pre-emption-Capability ] -+ [ Pre-emption-Vulnerability ] -+ -+ The Allocation-Retention-Priority AVP (AVP code 1034) is of type -+ Grouped, and it is used to indicate the priority of allocation and -+ retention, the pre-emption capability and pre-emption vulnerability -+ for the SDF if provided within the QoS-Information-AVP or for the -+ EPS default bearer if provided within the Default-EPS-Bearer-QoS AVP. -+ */ -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1034, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Allocation-Retention-Priority", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Priority-Level", RULE_REQUIRED, -1, 1 } -+ ,{ "Pre-emption-Capability", RULE_OPTIONAL, -1, 1 } -+ ,{ "Pre-emption-Vulnerability", RULE_OPTIONAL, -1, 1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* PDP-Address AVP - 3GPP TS 32.299 #6.3.2 */ -+ { -+ /* -+ * The PDP-Address-Prefix-Length AVP needs not be available for IPv6 -+ * typed IP-address prefix length of 64 bits. -+ */ -+ struct dict_avp_data data = { -+ 1227, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "PDP-Address", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , Address_type, NULL); -+ } -+ -+ /* Subscriber-Status - 3GPP TS 29.272 #7.3.29 */ -+ { -+ struct dict_object * type; -+ struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "Enumerated(Subscriber-Status)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "SERVICE_GRANTED", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "OPERATOR_DETERMINED_BARRING", { .i32 = 1 }}; -+ -+ struct dict_avp_data data = { -+ 1424, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Subscriber-Status", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_TYPE, &tdata, NULL, &type); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0, type, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1, type, NULL); -+ CHECK_dict_new( DICT_AVP, &data, NULL, &type); -+ } -+ -+ /* STN-SR AVP - 3GPP TS 29.272 #7.3.33 */ -+ { -+ struct dict_avp_data data = { -+ 1433, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "STN-SR", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); -+ } -+ -+ /* ICS-Indicator AVP - 3GPP TS 29.272 #7.3.104 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(ICS-Indicator)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "FALSE", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "TRUE", { .i32 = 1 }}; -+ -+ struct dict_avp_data data = { -+ 1491, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "ICS-Indicator", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ /* Create the Enumerated type, and then the AVP */ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , avp, NULL); -+ } -+ -+ /* IMEI AVP - 3GPP TS 29.272 #7.3.4 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1402, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "IMEI", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , UTF8String_type, &avp); -+ } -+ -+ /* 3GPP2-MEID AVP - 3GPP TS 29.272 #7.3.6 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1471, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "3GPP2-MEID", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, NULL, &avp); -+ } -+ -+ /* Software Version - 3GPP TS 29.272 #7.3.5 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1403, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Software-Version", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , UTF8String_type, &avp); -+ } -+ -+ /* Terminal Information AVP - 3GPP TS 29.272 #7.3.3 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1401, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Terminal-Information", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "IMEI", RULE_REQUIRED, 1, 1 } -+ ,{ "3GPP2-MEID", RULE_REQUIRED, 1, 1 } -+ ,{ "Software-Version", RULE_REQUIRED, 1, 1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* ULA-Flags - 3GPP TS 29.272 #7.3.8 */ -+ { -+ struct dict_avp_data data = { -+ 1406, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "ULA-Flags", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, NULL); -+ } -+ -+ /* Visited-PLMN-Id AVP - 3GPP TS 29.272 #7.3.9 */ -+ { -+ struct dict_avp_data data = { -+ 1407, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Visited-PLMN-Id", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, NULL); -+ } -+ -+ /* Number-Of-Requested-Vectors - 3GPP TS 29.272 #7.3.14 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1410, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Number-Of-Requested-Vectors", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* Re-Synchronization-Info - 3GPP TS 29.272 #7.3.15 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1411, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Re-Synchronization-Info", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* Immediate-Response-Preferred - 3GPP TS 29.272 #7.3.16 */ -+ { -+ struct dict_avp_data data = { -+ 1412, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Immediate-Response-Preferred", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, NULL); -+ } -+ -+ /* Requested-EUTRAN-Authentication-Info AVP - 3GPP TS 29.272 #7.3.11 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1408, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Requested-EUTRAN-Authentication-Info", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Number-Of-Requested-Vectors", RULE_OPTIONAL, -1, 1 } -+ ,{ "Immediate-Response-Preferred", RULE_OPTIONAL, -1, 1 } -+ ,{ "Re-Synchronization-Info", RULE_OPTIONAL, -1, 1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* Requested-UTRAN-GERAN-Authentication-Info AVP - 3GPP TS 29.272 #7.3.12 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1409, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Requested-UTRAN-GERAN-Authentication-Info", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Number-Of-Requested-Vectors", RULE_OPTIONAL, -1, 1 } -+ ,{ "Immediate-Response-Preferred", RULE_OPTIONAL, -1, 1 } -+ ,{ "Re-Synchronization-Info", RULE_OPTIONAL, -1, 1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* Item-Number AVP - 3GPP TS 29.272 #7.3.23 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1419, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Item-Number", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* RAND AVP - 3GPP TS 29.272 #7.3.53 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1447, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "RAND", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* XRES AVP - 3GPP TS 29.272 #7.3.54 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1448, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "XRES", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* AUTN AVP - 3GPP TS 29.272 #7.3.55 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1449, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "AUTN", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* SRES AVP - 3GPP TS 29.272 #7.3.60 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1454, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "SRES", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, NULL, &avp); -+ } -+ -+ /* KASME AVP - 3GPP TS 29.272 #7.3.56 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1450, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "KASME", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* Kc AVP - 3GPP TS 29.272 #7.3.59 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1453, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Kc", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, NULL, &avp); -+ } -+ -+ /* Trace-Collection-Entity AVP - 3GPP TS 29.272 #7.3.96 */ -+ { -+ struct dict_avp_data data = { -+ 1452, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Trace-Collection-Entity", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, Address_type, NULL); -+ } -+ -+ /* E-UTRAN-Vector - 3GPP TS 29.272 #7.3.18 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1414, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "E-UTRAN-Vector", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Item-Number", RULE_OPTIONAL, -1, 1 } -+ ,{ "RAND", RULE_REQUIRED, -1, 1 } -+ ,{ "XRES", RULE_REQUIRED, -1, 1 } -+ ,{ "AUTN", RULE_REQUIRED, -1, 1 } -+ ,{ "KASME", RULE_REQUIRED, -1, 1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* UTRAN-Vector - 3GPP TS 29.272 #7.3.19 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1415, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "UTRAN-Vector", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Item-Number", RULE_OPTIONAL, -1, 1 } -+ ,{ "RAND", RULE_REQUIRED, -1, 1 } -+ ,{ "XRES", RULE_REQUIRED, -1, 1 } -+ ,{ "AUTN", RULE_REQUIRED, -1, 1 } -+ ,{ "Confidentiality-Key", RULE_REQUIRED, -1, 1 } -+ ,{ "Integrity-Key", RULE_REQUIRED, -1, 1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* GERAN-Vector - 3GPP TS 29.272 #7.3.20 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1416, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "GERAN-Vector", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Item-Number", RULE_OPTIONAL, -1, 1 } -+ ,{ "RAND", RULE_REQUIRED, -1, 1 } -+ ,{ "SRES", RULE_REQUIRED, -1, 1 } -+ ,{ "Kc", RULE_REQUIRED, -1, 1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* Authentication-Info - 3GPP TS 29.272 #7.3.17 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1413, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Authentication-Info", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "E-UTRAN-Vector", RULE_OPTIONAL, -1, -1 } -+ ,{ "UTRAN-Vector", RULE_OPTIONAL, -1, -1 } -+ ,{ "GERAN-Vector", RULE_OPTIONAL, -1, -1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* Network-Access-Mode - 3GPP TS 29.272 #7.3.21 */ -+ { -+ struct dict_object * type; -+ struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "Enumerated(Network-Access-Mode)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "PACKET_AND_CIRCUIT", { .u32 = 0 }}; -+ struct dict_enumval_data t_1 = { "ONLY_PACKET", { .u32 = 1 }}; -+ -+ struct dict_avp_data data = { -+ 1417, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Network-Access-Mode", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); -+ CHECK_dict_new( DICT_AVP, &data , type, NULL); -+ } -+ -+ /* HPLMN-ODB AVP - 3GPP TS 29.272 #7.3.22 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1418, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "HPLMN-ODB", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* Cancellation-Type - 3GPP TS 29.272 #7.3.24 */ -+ { -+ struct dict_object * type; -+ struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "Enumerated(Cancellation-Type)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "MME_UPDATE_PROCEDURE", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "SGSN_UPDATE_PROCEDURE", { .i32 = 1 }}; -+ struct dict_enumval_data t_2 = { "SUBSCRIPTION_WITHDRAWAL", { .i32 = 2 }}; -+ struct dict_enumval_data t_3 = { "UPDATE_PROCEDURE_IWF", { .i32 = 3 }}; -+ struct dict_enumval_data t_4 = { "INITIAL_ATTACH_PROCEDURE", { .i32 = 4 }}; -+ -+ struct dict_avp_data data = { -+ 1420, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Cancellation-Type", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_TYPE, &tdata, NULL, &type); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0, type, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1, type, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_2, type, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_3, type, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_4, type, NULL); -+ CHECK_dict_new( DICT_AVP, &data, NULL, &type); -+ } -+ -+ /* DSR-Flags AVP - 3GPP TS 29.272 #7.3.25 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1421, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "DSR-Flags", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* DSA-Flags AVP - 3GPP TS 29.272 #7.3.26 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1422, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "DSA-Flags", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* Context-Identifier AVP - 3GPP TS 29.272 #7.3.27 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1423, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Context-Identifier", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* Operator-Determined-Barring AVP - 3GPP TS 29.272 #7.3.30 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1425, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Operator-Determined-Barring", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* Access-Restriction-Data AVP - 3GPP TS 29.272 #7.3.31 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1426, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Access-Restriction-Data", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* APN-OI-Replacement AVP - 3GPP TS 29.272 #7.3.32 */ -+ { -+ struct dict_avp_data data = { -+ 1427, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "APN-OI-Replacement", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); -+ } -+ -+ /* All-APN-Configurations-Included-Indicator AVP - 3GPP TS 29.272 #7.3.33 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(All-APN-Configurations-Included-Indicator)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "All_APN_CONFIGURATIONS_INCLUDED", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "MODIFIED/ADDED_APN_CONFIGURATIONS_INCLUDED", { .i32 = 1 }}; -+ -+ struct dict_avp_data data = { -+ 1428, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "All-APN-Configurations-Included-Indicator", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ /* Create the Enumerated type, and then the AVP */ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , avp, NULL); -+ } -+ -+ /* PDN-Type AVP - 3GPP TS 29.272 #7.3.62 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(PDN-Type)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "IPv4", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "IPv6", { .i32 = 1 }}; -+ struct dict_enumval_data t_2 = { "IPv4v6", { .i32 = 2 }}; -+ struct dict_enumval_data t_3 = { "IPv4_OR_IPv6", { .i32 = 3 }}; -+ -+ struct dict_avp_data data = { -+ 1456, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "PDN-Type", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ /* Create the Enumerated type, and then the AVP */ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_2 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_3 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , avp, NULL); -+ } -+ -+ /* EPS-Subscribed-QoS-Profile AVP - 3GPP TS 29.272 #7.3.37 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1431, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "EPS-Subscribed-QoS-Profile", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "QoS-Class-Identifier", RULE_REQUIRED, -1, 1 } -+ ,{ "Allocation-Retention-Priority", RULE_REQUIRED, -1, 1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* VPLMN-Dynamic-Address-Allowed AVP - 3GPP TS 29.272 #7.3.38 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(VPLMN-Dynamic-Address-Allowed)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "NOTALLOWED", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "ALLOWED", { .i32 = 1 }}; -+ -+ struct dict_avp_data data = { -+ 1432, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "VPLMN-Dynamic-Address-Allowed", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ /* Create the Enumerated type, and then the AVP */ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , avp, NULL); -+ } -+ -+ /* Alert-Reason AVP - 3GPP TS 29.272 #7.3.83 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Alert-Reason)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "UE_PRESENT", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "UE_MEMORY_AVAILABLE", { .i32 = 1 }}; -+ -+ struct dict_avp_data data = { -+ 1434, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Alert-Reason", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ /* Create the Enumerated type, and then the AVP */ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , avp, NULL); -+ } -+ -+ /* PDN-GW-Allocation-Type AVP - 3GPP TS 29.272 #7.3.44 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(PDN-GW-Allocation-Type)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "STATIC", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "DYNAMIC", { .i32 = 1 }}; -+ -+ struct dict_avp_data data = { -+ 1438, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "PDN-GW-Allocation-Type", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ /* Create the Enumerated type, and then the AVP */ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , avp, NULL); -+ } -+ -+ /* Expiration-Date AVP - 3GPP TS 29.272 #7.3.80 */ -+ { -+ struct dict_avp_data data = { -+ 1439, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Expiration-Date", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , Time_type, NULL); -+ } -+ -+ /* CSG-Id AVP - 3GPP TS 29.272 #7.3.79 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1437, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "CSG-Id", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* AMBR AVP - 3GPP TS 29.272 #7.3.41 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1435, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "AMBR", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Max-Requested-Bandwidth-UL", RULE_REQUIRED, -1, 1 } -+ ,{ "Max-Requested-Bandwidth-DL", RULE_REQUIRED, -1, 1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* Specific-APN-Info AVP - 3GPP TS 29.272 #7.3.82 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1472, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Specific-APN-Info", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Service-Selection", RULE_REQUIRED, -1, 1 } -+ ,{ "MIP6-Agent-Info", RULE_REQUIRED, -1, 1 } -+ ,{ "Visited-Network-Identifier", RULE_OPTIONAL, -1, 1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* SIPTO-Permission AVP - 3GPP TS 29.272 #7.3.135 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(SIPTO-Permission)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "SIPTO_ALLOWED", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "SIPTO_NOTALLOWED", { .i32 = 1 }}; -+ -+ struct dict_avp_data data = { -+ 1613, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "SIPTO-Permission", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ /* Create the Enumerated type, and then the AVP */ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , avp, NULL); -+ } -+ -+ /* LIPA-Permission AVP - 3GPP TS 29.272 #7.3.133 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(LIPA-Permission)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "LIPA-PROHIBITED", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "LIPA-ONLY", { .i32 = 1 }}; -+ struct dict_enumval_data t_2 = { "LIPA-CONDITIONAL", { .i32 = 2 }}; -+ -+ struct dict_avp_data data = { -+ 1618, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "LIPA-Permission", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ /* Create the Enumerated type, and then the AVP */ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_2 , avp, NULL); -+ -+ CHECK_dict_new( DICT_AVP, &data , avp, NULL); -+ } -+ -+ /* List-Of-Measurements AVP - 3GPP TS 29.272 #7.3.139 */ -+ { -+ struct dict_avp_data data = { -+ 1625, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "List-Of-Measurements", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, NULL); -+ } -+ -+ /* Reporting-Trigger AVP - 3GPP TS 29.272 #7.3.140 */ -+ { -+ struct dict_avp_data data = { -+ 1626, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Reporting-Trigger", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, NULL); -+ } -+ -+ /* Report-Interval AVP - 3GPP TS 29.272 #7.3.141 and TS 32.422 #5.10.5 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Report-Interval)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "250ms", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "500ms", { .i32 = 1 }}; -+ struct dict_enumval_data t_2 = { "1000ms", { .i32 = 2 }}; -+ struct dict_enumval_data t_3 = { "2000ms", { .i32 = 3 }}; -+ struct dict_enumval_data t_4 = { "3000ms", { .i32 = 4 }}; -+ struct dict_enumval_data t_5 = { "4000ms", { .i32 = 5 }}; -+ struct dict_enumval_data t_6 = { "6000ms", { .i32 = 6 }}; -+ struct dict_enumval_data t_7 = { "8000ms", { .i32 = 7 }}; -+ struct dict_enumval_data t_8 = { "12000ms", { .i32 = 8 }}; -+ struct dict_enumval_data t_9 = { "16000ms", { .i32 = 9 }}; -+ struct dict_enumval_data t_10 = { "20000ms", { .i32 = 10 }}; -+ struct dict_enumval_data t_11 = { "24000ms", { .i32 = 11 }}; -+ struct dict_enumval_data t_12 = { "28000ms", { .i32 = 12 }}; -+ struct dict_enumval_data t_13 = { "32000ms", { .i32 = 13 }}; -+ struct dict_enumval_data t_14 = { "64000ms", { .i32 = 14 }}; -+ /* Possible in LTE */ -+ struct dict_enumval_data t_15 = { "120ms", { .i32 = 15 }}; -+ struct dict_enumval_data t_16 = { "240ms", { .i32 = 16 }}; -+ struct dict_enumval_data t_17 = { "480ms", { .i32 = 17 }}; -+ struct dict_enumval_data t_18 = { "640ms", { .i32 = 18 }}; -+ struct dict_enumval_data t_19 = { "1024ms", { .i32 = 19 }}; -+ struct dict_enumval_data t_20 = { "2048ms", { .i32 = 20 }}; -+ struct dict_enumval_data t_21 = { "5120ms", { .i32 = 21 }}; -+ struct dict_enumval_data t_22 = { "10240ms", { .i32 = 22 }}; -+ struct dict_enumval_data t_23 = { "1min", { .i32 = 23 }}; -+ struct dict_enumval_data t_24 = { "6min", { .i32 = 24 }}; -+ struct dict_enumval_data t_25 = { "12min", { .i32 = 25 }}; -+ struct dict_enumval_data t_26 = { "30min", { .i32 = 26 }}; -+ struct dict_enumval_data t_27 = { "60min", { .i32 = 27 }}; -+ -+ struct dict_avp_data data = { -+ 1627, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Report-Interval", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ /* Create the Enumerated type, and then the AVP */ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_2 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_3 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_4 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_5 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_6 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_7 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_8 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_9 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_10 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_11 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_12 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_13 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_14 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_15 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_16 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_17 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_18 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_19 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_20 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_21 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_22 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_23 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_24 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_25 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_26 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_27 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , avp, NULL); -+ } -+ -+ /* Report-Amount AVP - 3GPP TS 29.272 #7.3.142 and TS 32.422 #5.10.6 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Report-Amount)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "1", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "2", { .i32 = 1 }}; -+ struct dict_enumval_data t_2 = { "4", { .i32 = 2 }}; -+ struct dict_enumval_data t_3 = { "8", { .i32 = 3 }}; -+ struct dict_enumval_data t_4 = { "16", { .i32 = 4 }}; -+ struct dict_enumval_data t_5 = { "32", { .i32 = 5 }}; -+ struct dict_enumval_data t_6 = { "64", { .i32 = 6 }}; -+ struct dict_enumval_data t_7 = { "infinity", { .i32 = 7 }}; -+ -+ struct dict_avp_data data = { -+ 1628, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Report-Amount", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ /* Create the Enumerated type, and then the AVP */ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_2 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_3 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_4 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_5 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_6 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_7 , avp, NULL); -+ -+ CHECK_dict_new( DICT_AVP, &data , avp, NULL); -+ } -+ -+ /* Event-Threshold-RSRP AVP - 3GPP TS 29.272 #7.3.143 */ -+ { -+ struct dict_avp_data data = { -+ 1629, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Event-Threshold-RSRP", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, NULL); -+ } -+ -+ /* Event-Threshold-RSRQ AVP - 3GPP TS 29.272 #7.3.144 */ -+ { -+ struct dict_avp_data data = { -+ 1630, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Event-Threshold-RSRQ", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, NULL); -+ } -+ -+ /* Logging-Interval AVP - 3GPP TS 29.272 #7.3.145 and TS 32.422 #5.10.8 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Logging-Interval)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "1.28", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "2.56", { .i32 = 1 }}; -+ struct dict_enumval_data t_2 = { "5.12", { .i32 = 2 }}; -+ struct dict_enumval_data t_3 = { "10.24", { .i32 = 3 }}; -+ struct dict_enumval_data t_4 = { "20.48", { .i32 = 4 }}; -+ struct dict_enumval_data t_5 = { "30.72", { .i32 = 5 }}; -+ struct dict_enumval_data t_6 = { "40.96", { .i32 = 6 }}; -+ struct dict_enumval_data t_7 = { "61.44", { .i32 = 7 }}; -+ -+ struct dict_avp_data data = { -+ 1631, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Logging-Interval", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ /* Create the Enumerated type, and then the AVP */ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_2 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_3 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_4 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_5 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_6 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_7 , avp, NULL); -+ -+ CHECK_dict_new( DICT_AVP, &data , avp, NULL); -+ } -+ -+ /* Logging-Duration AVP - 3GPP TS 29.272 #7.3.145 and TS 32.422 #5.10.9 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Logging-Duration)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "600sec", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "1200sec", { .i32 = 1 }}; -+ struct dict_enumval_data t_2 = { "2400sec", { .i32 = 2 }}; -+ struct dict_enumval_data t_3 = { "3600sec", { .i32 = 3 }}; -+ struct dict_enumval_data t_4 = { "5400sec", { .i32 = 4 }}; -+ struct dict_enumval_data t_5 = { "7200sec", { .i32 = 5 }}; -+ -+ struct dict_avp_data data = { -+ 1632, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Logging-Duration", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ /* Create the Enumerated type, and then the AVP */ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_2 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_3 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_4 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_5 , avp, NULL); -+ -+ CHECK_dict_new( DICT_AVP, &data , avp, NULL); -+ } -+ -+ /* APN-Configuration AVP - 3GPP TS 29.272 #7.3.35 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1430, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "APN-Configuration", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Context-Identifier", RULE_REQUIRED, -1, 1 } -+ ,{ "Served-Party-IP-Address", RULE_OPTIONAL, -1, 2 } -+ ,{ "PDN-Type", RULE_REQUIRED, -1, 1 } -+ ,{ "Service-Selection", RULE_REQUIRED, -1, 1 } -+ ,{ "EPS-Subscribed-QoS-Profile", RULE_OPTIONAL, -1, 1 } -+ ,{ "VPLMN-Dynamic-Address-Allowed", RULE_OPTIONAL, -1, 1 } -+ ,{ "MIP6-Agent-Info", RULE_OPTIONAL, -1, 1 } -+ ,{ "Visited-Network-Identifier", RULE_OPTIONAL, -1, 1 } -+ ,{ "PDN-GW-Allocation-Type", RULE_OPTIONAL, -1, 1 } -+ ,{ "3GPP-Charging-Characteristics", RULE_OPTIONAL, -1, 1 } -+ ,{ "AMBR", RULE_OPTIONAL, -1, 1 } -+ ,{ "Specific-APN-Info", RULE_OPTIONAL, -1, -1 } -+ ,{ "APN-OI-Replacement", RULE_OPTIONAL, -1, 1 } -+ ,{ "SIPTO-Permission", RULE_OPTIONAL, -1, 1 } -+ ,{ "LIPA-Permission", RULE_OPTIONAL, -1, 1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* APN-Configuration-Profile AVP - 3GPP TS 29.272 #7.3.34 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1429, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "APN-Configuration-Profile", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Context-Identifier", RULE_REQUIRED, -1, 1 } -+ ,{ "All-APN-Configurations-Included-Indicator", RULE_REQUIRED, -1, 1 } -+ ,{ "APN-Configuration", RULE_REQUIRED, -1, -1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* CSG-Subscription-Data AVP - 3GPP TS 29.272 #7.3.78 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1436, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "CSG-Subscription-Data", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "CSG-Id", RULE_REQUIRED, -1, 1 } -+ ,{ "Expiration-Date", RULE_OPTIONAL, -1, 1 } -+ ,{ "Service-Selection", RULE_OPTIONAL, -1, -1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* RAT-Frequency-Selection-Priority-ID AVP - 3GPP TS 29.272 #7.3.46 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1440, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "RAT-Frequency-Selection-Priority-ID", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* IDA-Flags AVP - 3GPP TS 29.272 #7.3.47 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1441, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "IDA-Flags", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* PUA-Flags AVP - 3GPP TS 29.272 #7.3.48 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1442, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "PUA-Flags", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* NOR-Flags AVP - 3GPP TS 29.272 #7.3.49 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1443, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "NOR-Flags", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* User-Id AVP - 3GPP TS 29.272 #7.3.50 */ -+ { -+ struct dict_avp_data data = { -+ 1444, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "User-Id", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); -+ } -+ -+ /* Equipment-Status AVP - 3GPP TS 29.272 #7.3.51 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Equipment-Status)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "WHITELISTED", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "BLACKLISTED", { .i32 = 1 }}; -+ struct dict_enumval_data t_2 = { "GREYLISTED", { .i32 = 2 }}; -+ -+ struct dict_avp_data data = { -+ 1445, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Equipment-Status", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ /* Create the Enumerated type, and then the AVP */ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_2 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , avp, NULL); -+ } -+ -+ /* Regional-Subscription-Zone-Code AVP - 3GPP TS 29.272 #7.3.52 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1446, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Regional-Subscription-Zone-Code", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* Roaming-Restricted-Due-To-Unsupported-Feature AVP - 3GPP TS 29.272 #7.3.81 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Roaming-Restricted-Due-To-Unsupported-Feature)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "Roaming-Restricted-Due-To-Unsupported-Feature", { .i32 = 0 }}; -+ -+ struct dict_avp_data data = { -+ 1457, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Roaming-Restricted-Due-To-Unsupported-Feature", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ /* Create the Enumerated type, and then the AVP */ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , avp, NULL); -+ } -+ -+ /* Trace-Reference AVP - 3GPP TS 29.272 #7.3.64 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1459, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Trace-Reference", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, NULL, &avp); -+ } -+ -+ /* Trace-Depth AVP - 3GPP TS 29.272 #7.3.67 and 3GPP TS 32.422 #5.3 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Trace-Depth)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "Minimum", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "Medium", { .i32 = 1 }}; -+ struct dict_enumval_data t_2 = { "Maximum", { .i32 = 2 }}; -+ struct dict_enumval_data t_3 = { "MinimumWithoutVendorSpecificExtension", { .i32 = 3 }}; -+ struct dict_enumval_data t_4 = { "MediumWithoutVendorSpecificExtension", { .i32 = 4 }}; -+ struct dict_enumval_data t_5 = { "MaximumWithoutVendorSpecificExtension", { .i32 = 5 }}; -+ -+ struct dict_avp_data data = { -+ 1462, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Trace-Depth", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ /* Create the Enumerated type, and then the AVP */ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_2 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_3 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_4 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_5 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , avp, NULL); -+ } -+ -+ /* Trace-NE-Type-List AVP - 3GPP TS 29.272 #7.3.68 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1463, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Trace-NE-Type-List", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, NULL, &avp); -+ } -+ -+ /* Trace-Event-List AVP - 3GPP TS 29.272 #7.3.69 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1464, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Trace-Interface-List", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, NULL, &avp); -+ } -+ -+ /* Trace-Event-List AVP - 3GPP TS 29.272 #7.3.70 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1465, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Trace-Event-List", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, NULL, &avp); -+ } -+ -+ /* OMC-Id AVP - 3GPP TS 29.272 #7.3.71 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1466, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "OMC-Id", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, NULL, &avp); -+ } -+ -+ /* Complete-Data-List-Included-Indicator AVP - 3GPP TS 29.272 #7.3.73 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Complete-Data-List-Included-Indicator)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "All_PDP_CONTEXTS_INCLUDED", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "MODIFIED/ADDED_PDP CONTEXTS_INCLUDED", { .i32 = 1 }}; -+ -+ struct dict_avp_data data = { -+ 1468, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Complete-Data-List-Included-Indicator", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ /* Create the Enumerated type, and then the AVP */ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , avp, NULL); -+ } -+ -+ /* PDP-Type AVP - 3GPP TS 29.272 #7.3.75 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1470, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "PDP-Type", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, NULL, &avp); -+ } -+ -+ /* GMLC-Number AVP - 3GPP TS 29.272 #7.3.85 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1474, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "GMLC-Number", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, NULL, &avp); -+ } -+ -+ /* SS-Code AVP - 3GPP TS 29.272 #7.3.87 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1476, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "SS-Code", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, NULL, &avp); -+ } -+ -+ /* SS-Status AVP - 3GPP TS 29.272 #7.3.88 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1477, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "SS-Status", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, NULL, &avp); -+ } -+ -+ /* Notification-To-UE-User AVP - 3GPP TS 29.272 #7.3.89 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Notification-To-UE-User)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "NOTIFY_LOCATION_ALLOWED", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "NOTIFYANDVERIFY_LOCATION_ALLOWED_IF_NO_RESPONSE", { .i32 = 1 }}; -+ struct dict_enumval_data t_2 = { "NOTIFYANDVERIFY_LOCATION_NOT_ALLOWED_IF_NO_RESPONSE", { .i32 = 2 }}; -+ struct dict_enumval_data t_3 = { "LOCATION_NOT_ALLOWED", { .i32 = 3 }}; -+ -+ struct dict_avp_data data = { -+ 1478, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Notification-To-UE-User", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ /* Create the Enumerated type, and then the AVP */ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_2 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_3 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , avp, NULL); -+ } -+ -+ /* Client-Identity AVP - 3GPP TS 29.272 #7.3.91 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1480, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Client-Identity", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, NULL, &avp); -+ } -+ -+ /* GMLC-Restriction AVP - 3GPP TS 29.272 #7.3.92 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(GMLC-Restriction)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "GMLC_LIST", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "HOME_COUNTRY", { .i32 = 1 }}; -+ -+ struct dict_avp_data data = { -+ 1481, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "GMLC-Restriction", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ /* Create the Enumerated type, and then the AVP */ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , avp, NULL); -+ } -+ -+ /* PLMN-Client AVP - 3GPP TS 29.272 #7.3.92 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(PLMN-Client)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "BROADCAST_SERVICE", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "O_AND_M_HPLMN", { .i32 = 1 }}; -+ struct dict_enumval_data t_2 = { "O_AND_M_VPLMN", { .i32 = 2 }}; -+ struct dict_enumval_data t_3 = { "ANONYMOUS_LOCATION", { .i32 = 3 }}; -+ struct dict_enumval_data t_4 = { "TARGET_UE_SUBSCRIBED_SERVICE", { .i32 = 4 }}; -+ -+ struct dict_avp_data data = { -+ 1482, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "PLMN-Client", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ /* Create the Enumerated type, and then the AVP */ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_2 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_3 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_4 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , avp, NULL); -+ } -+ -+ /* ServiceTypeIdentity AVP - 3GPP TS 29.272 #7.3.95 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1484, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "ServiceTypeIdentity", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, NULL, &avp); -+ } -+ -+ /* QoS-Subscribed - 3GPP TS 29.272 #7.3.77 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1404, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "QoS-Subscribed", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* ULR-Flags - 3GPP TS 29.272 #7.3.7 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1405, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "ULR-Flags", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* Ext-PDP-Type AVP - 3GPP TS 29.272 #7.3.75A */ -+ { -+ struct dict_avp_data data = { -+ 1620, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Ext-PDP-Type", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, NULL, NULL); -+ } -+ -+ /* Ext-PDP-Address AVP - 3GPP TS 29.272 #7.3.129 */ -+ { -+ struct dict_avp_data data = { -+ 1621, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Ext-PDP-Address", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, Address_type, NULL); -+ } -+ -+ /* TS-Code AVP - 3GPP TS 29.272 #7.3.100 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1487, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "TS-Code", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* External-Client AVP - 3GPP TS 29.272 #7.3.90 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1479, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "External-Client", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Client-Identity", RULE_REQUIRED, -1, 1 } -+ ,{ "GMLC-Restriction", RULE_OPTIONAL, -1, 1 } -+ ,{ "Notification-To-UE-User", RULE_OPTIONAL, -1, 1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* Service-Type AVP - 3GPP TS 29.272 #7.3.94 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1483, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Service-Type", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "ServiceTypeIdentity", RULE_REQUIRED, -1, 1 } -+ ,{ "GMLC-Restriction", RULE_OPTIONAL, -1, 1 } -+ ,{ "Notification-To-UE-User", RULE_OPTIONAL, -1, 1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* LCS-PrivacyException AVP - 3GPP TS 29.272 #7.3.86 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1475, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "LCS-PrivacyException", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "SS-Code", RULE_REQUIRED, -1, 1 } -+ ,{ "SS-Status", RULE_REQUIRED, -1, 1 } -+ ,{ "Notification-To-UE-User", RULE_OPTIONAL, -1, 1 } -+ ,{ "External-Client", RULE_OPTIONAL, -1, -1 } -+ ,{ "PLMN-Client", RULE_OPTIONAL, -1, -1 } -+ ,{ "Service-Type", RULE_OPTIONAL, -1, -1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* MO-LR AVP - 3GPP TS 29.272 #7.3.96 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1485, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "MO-LR", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "SS-Code", RULE_REQUIRED, -1, 1 } -+ ,{ "SS-Status", RULE_REQUIRED, -1, 1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* LCS-Info AVP - 3GPP TS 29.272 #7.3.84 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1473, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "LCS-Info", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "GMLC-Number", RULE_OPTIONAL, -1, -1 } -+ ,{ "LCS-PrivacyException", RULE_OPTIONAL, -1, -1 } -+ ,{ "MO-LR", RULE_OPTIONAL, -1, -1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* PDP-Context AVP - 3GPP TS 29.272 #7.3.74 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1469, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "PDP-Context", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Context-Identifier", RULE_REQUIRED, -1, 1 } -+ ,{ "PDP-Type", RULE_REQUIRED, -1, 1 } -+ ,{ "PDP-Address", RULE_OPTIONAL, -1, 1 } -+ ,{ "QoS-Subscribed", RULE_REQUIRED, -1, 1 } -+ ,{ "VPLMN-Dynamic-Address-Allowed", RULE_OPTIONAL, -1, 1 } -+ ,{ "Service-Selection", RULE_REQUIRED, -1, 1 } -+ ,{ "3GPP-Charging-Characteristics", RULE_OPTIONAL, -1, 1 } -+ ,{ "Ext-PDP-Type", RULE_OPTIONAL, -1, 1 } -+ ,{ "Ext-PDP-Address", RULE_OPTIONAL, -1, 1 } -+ ,{ "AMBR", RULE_OPTIONAL, -1, 1 } -+ ,{ "SIPTO-Permission", RULE_OPTIONAL, -1, 1 } -+ ,{ "LIPA-Permission", RULE_OPTIONAL, -1, 1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* GPRS-Subscription-Data AVP - 3GPP TS 29.272 #7.3.72 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1467, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "GPRS-Subscription-Data", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Complete-Data-List-Included-Indicator", RULE_REQUIRED, -1, 1 } -+ ,{ "PDP-Context", RULE_REQUIRED, -1, 50 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* Teleservice-List AVP - 3GPP TS 29.272 #7.3.99 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1486, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Teleservice-List", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "TS-Code", RULE_REQUIRED, -1, 1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* Call-Barring-Infor-List AVP - 3GPP TS 29.272 #7.3.101 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1488, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Call-Barring-Infor-List", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "SS-Code", RULE_REQUIRED, 1, -1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* SGSN-Number AVP - 3GPP TS 29.272 #7.3.102 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1489, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "SGSN-Number", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* IDR-Flags AVP - 3GPP TS 29.272 #7.3.103 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1490, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "IDR-Flags", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* IMS-Voice-Over-PS-Sessions-Supported AVP - 3GPP TS 29.272 #7.3.106 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(IMS-Voice-Over-PS-Sessions-Supported)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "NOT_SUPPORTED", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "SUPPORTED", { .i32 = 1 }}; -+ -+ struct dict_avp_data data = { -+ 1492, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "IMS-Voice-Over-PS-Sessions-Supported", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ /* Create the Enumerated type, and then the AVP */ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , avp, NULL); -+ } -+ -+ /* SGSN-Number AVP - 3GPP TS 29.272 #7.3.102 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Homogeneous-Support-of-IMS-Voice-Over-PSSessions)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "NOT_SUPPORTED", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "SUPPORTED", { .i32 = 1 }}; -+ -+ struct dict_avp_data data = { -+ 1493, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Homogeneous-Support-of-IMS-Voice-Over-PSSessions", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* Last-UE-Activity-Time AVP - 3GPP TS 29.272 #7.3.108 */ -+ { -+ struct dict_avp_data data = { -+ 1494, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Last-UE-Activity-Time", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , Time_type, NULL); -+ } -+ -+ /* E-UTRAN-Cell-Global-Identity AVP - 3GPP TS 29.272 #7.3.117 */ -+ { -+ struct dict_avp_data data = { -+ 1602, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "E-UTRAN-Cell-Global-Identity", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, NULL, NULL); -+ } -+ -+ /* Tracking-Area-Identity AVP - 3GPP TS 29.272 #7.3.118 */ -+ { -+ struct dict_avp_data data = { -+ 1603, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Tracking-Area-Identity", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, NULL, NULL); -+ } -+ -+ /* Cell-Global-Identity AVP - 3GPP TS 29.272 #7.3.119 */ -+ { -+ struct dict_avp_data data = { -+ 1604, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Cell-Global-Identity", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, NULL, NULL); -+ } -+ -+ /* Routing-Area-Identity AVP - 3GPP TS 29.272 #7.3.120 */ -+ { -+ struct dict_avp_data data = { -+ 1605, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Routing-Area-Identity", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, NULL, NULL); -+ } -+ -+ /* Location-Area-Identity AVP - 3GPP TS 29.272 #7.3.121 */ -+ { -+ struct dict_avp_data data = { -+ 1606, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Location-Area-Identity", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, NULL, NULL); -+ } -+ -+ /* Service-Area-Identity AVP - 3GPP TS 29.272 #7.3.122 */ -+ { -+ struct dict_avp_data data = { -+ 1607, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Service-Area-Identity", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, NULL, NULL); -+ } -+ -+ /* Geographical-Information AVP - 3GPP TS 29.272 #7.3.123 */ -+ { -+ struct dict_avp_data data = { -+ 1608, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Geographical-Information", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, NULL, NULL); -+ } -+ -+ /* Geodetic-Information AVP - 3GPP TS 29.272 #7.3.124 */ -+ { -+ struct dict_avp_data data = { -+ 1609, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Geodetic-Information", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, NULL, NULL); -+ } -+ -+ /* Current-Location-Retrieved AVP - 3GPP TS 29.272 #7.3.125 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Current-Location-Retrieved)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "ACTIVE-LOCATION-RETRIEVAL", { .i32 = 0 }}; -+ -+ struct dict_avp_data data = { -+ 1610, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Current-Location-Retrieved", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* Age-Of-Location-Information AVP - 3GPP TS 29.272 #7.3.126 */ -+ { -+ struct dict_avp_data data = { -+ 1611, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Age-Of-Location-Information", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, NULL); -+ } -+ -+ /* UE-SRVCC-Capability AVP - 3GPP TS 29.272 #7.3.130 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(UE-SRVCC-Capability)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "UE-SRVCC-NOT-SUPPORTED", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "UE-SRVCC-SUPPORTED", { .i32 = 1 }}; -+ -+ struct dict_avp_data data = { -+ 1615, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "UE-SRVCC-Capability", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* MPS-Priority AVP - 3GPP TS 29.272 #7.3.131 */ -+ { -+ struct dict_avp_data data = { -+ 1616, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "MPS-Priority", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, NULL); -+ } -+ -+ /* VPLMN-LIPA-Allowed AVP - 3GPP TS 29.272 #7.3.132 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(VPLMN-LIPA-Allowed)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "LIPA-NOTALLOWED", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "LIPA-ALLOWED", { .i32 = 1 }}; -+ -+ struct dict_avp_data data = { -+ 1617, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "VPLMN-LIPA-Allowed", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* Subscribed-Periodic-RAU-TAU-Timer AVP - 3GPP TS 29.272 #7.3.134 */ -+ { -+ struct dict_avp_data data = { -+ 1619, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Subscribed-Periodic-RAU-TAU-Timer", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, NULL); -+ } -+ -+ /* Job-Type AVP - 3GPP TS 29.272 #7.3.132 and 3GPP TS 32.422 #5.10.1 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Job-Type)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "Immediate-MDT-Only", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "Logged-MDT-only", { .i32 = 1 }}; -+ struct dict_enumval_data t_2 = { "Trace-Only", { .i32 = 2 }}; -+ struct dict_enumval_data t_3 = { "Immediate-MDT-and-Trace", { .i32 = 3 }}; -+ -+ struct dict_avp_data data = { -+ 1623, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Job-Type", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_2 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_3 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* Relay-Node-Indicator AVP - 3GPP TS 29.272 #7.3.147 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Relay-Node-Indicator)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "NOT_RELAY_NODE", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "RELAY_NODE", { .i32 = 1 }}; -+ -+ struct dict_avp_data data = { -+ 1633, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Relay-Node-Indicator", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* MDT-User-Consent AVP - 3GPP TS 29.272 #7.3.148 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(MDT-User-Consent)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "CONSENT_NOT_GIVEN", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "CONSENT_GIVEN", { .i32 = 1 }}; -+ -+ struct dict_avp_data data = { -+ 1634, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "MDT-User-Consent", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* PUR-Flags AVP - 3GPP TS 29.272 #7.3.149 */ -+ { -+ struct dict_avp_data data = { -+ 1635, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "PUR-Flags", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_UNSIGNED32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, NULL); -+ } -+ -+ /* User-State AVP - 3GPP TS 29.272 #7.3.114 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(User-State)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "DETACHED", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "ATTACHED_NOT_REACHABLE_FOR_PAGING", { .i32 = 1 }}; -+ struct dict_enumval_data t_2 = { "ATTACHED_REACHABLE_FOR_PAGING", { .i32 = 2 }}; -+ struct dict_enumval_data t_3 = { "CONNECTED_NOT_REACHABLE_FOR_PAGING", { .i32 = 3 }}; -+ struct dict_enumval_data t_4 = { "CONNECTED_REACHABLE_FOR_PAGING", { .i32 = 4 }}; -+ struct dict_enumval_data t_5 = { "NETWORK_DETERMINED_NOT_REACHABLE", { .i32 = 5 }}; -+ -+ struct dict_avp_data data = { -+ 1499, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "User-State", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_2 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_3 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_4 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_5 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* MME-User-State AVP - 3GPP TS 29.272 #7.3.112 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1497, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "MME-User-State", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "User-State", RULE_OPTIONAL, -1, 1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* SGSN-User-State AVP - 3GPP TS 29.272 #7.3.113 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1498, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "SGSN-User-State", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "User-State", RULE_OPTIONAL, -1, 1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* EPS-User-State AVP - 3GPP TS 29.272 #7.3.110 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1495, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "EPS-User-State", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "MME-User-State", RULE_OPTIONAL, -1, 1 } -+ ,{ "SGSN-User-State", RULE_OPTIONAL, -1, 1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* MME-Location-Information AVP - 3GPP TS 29.272 #7.3.115 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1600, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "MME-Location-Information", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "E-UTRAN-Cell-Global-Identity", RULE_OPTIONAL, -1, 1 } -+ ,{ "Tracking-Area-Identity", RULE_OPTIONAL, -1, 1 } -+ ,{ "Geographical-Information", RULE_OPTIONAL, -1, 1 } -+ ,{ "Geodetic-Information", RULE_OPTIONAL, -1, 1 } -+ ,{ "Current-Location-Retrieved", RULE_OPTIONAL, -1, 1 } -+ ,{ "Age-Of-Location-Information", RULE_OPTIONAL, -1, 1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* SGSN-Location-Information AVP - 3GPP TS 29.272 #7.3.116 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1601, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "SGSN-Location-Information", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Cell-Global-Identity", RULE_OPTIONAL, -1, 1 } -+ ,{ "Location-Area-Identity", RULE_OPTIONAL, -1, 1 } -+ ,{ "Service-Area-Identity", RULE_OPTIONAL, -1, 1 } -+ ,{ "Routing-Area-Identity", RULE_OPTIONAL, -1, 1 } -+ ,{ "Geographical-Information", RULE_OPTIONAL, -1, 1 } -+ ,{ "Geodetic-Information", RULE_OPTIONAL, -1, 1 } -+ ,{ "Current-Location-Retrieved", RULE_OPTIONAL, -1, 1 } -+ ,{ "Age-Of-Location-Information", RULE_OPTIONAL, -1, 1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* Area-Scope AVP - 3GPP TS 29.272 #7.3.138 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1624, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Area-Scope", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Cell-Global-Identity", RULE_OPTIONAL, -1, -1 } -+ ,{ "E-UTRAN-Cell-Global-Identity", RULE_OPTIONAL, -1, -1 } -+ ,{ "Routing-Area-Identity", RULE_OPTIONAL, -1, -1 } -+ ,{ "Location-Area-Identity", RULE_OPTIONAL, -1, -1 } -+ ,{ "Tracking-Area-Identity", RULE_OPTIONAL, -1, -1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* MDT-Configuration AVP - 3GPP TS 29.272 #7.3.136 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1622, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "MDT-Configuration", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Job-Type", RULE_REQUIRED, -1, 1 } -+ ,{ "Area-Scope", RULE_OPTIONAL, -1, 1 } -+ ,{ "List-Of-Measurements", RULE_OPTIONAL, -1, 1 } -+ ,{ "Reporting-Trigger", RULE_OPTIONAL, -1, 1 } -+ ,{ "Report-Interval", RULE_OPTIONAL, -1, 1 } -+ ,{ "Report-Amount", RULE_OPTIONAL, -1, 1 } -+ ,{ "Event-Threshold-RSRP", RULE_OPTIONAL, -1, 1 } -+ ,{ "Event-Threshold-RSRQ", RULE_OPTIONAL, -1, 1 } -+ ,{ "Logging-Interval", RULE_OPTIONAL, -1, 1 } -+ ,{ "Logging-Duration", RULE_OPTIONAL, -1, 1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* EPS-Location-Information AVP - 3GPP TS 29.272 #7.3.111 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1496, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "EPS-Location-Information", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "MME-Location-Information", RULE_OPTIONAL, -1, 1 } -+ ,{ "SGSN-Location-Information", RULE_OPTIONAL, -1, 1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* Active-APN AVP - 3GPP TS 29.173 #7.3.127 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1612, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Active-APN", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Context-Identifier", RULE_REQUIRED, -1, 1 } -+ ,{ "Service-Selection", RULE_OPTIONAL, -1, 1 } -+ ,{ "MIP6-Agent-Info", RULE_OPTIONAL, -1, 1 } -+ ,{ "Visited-Network-Identifier", RULE_OPTIONAL, -1, 1 } -+ ,{ "Specific-APN-Info", RULE_OPTIONAL, -1, -1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* Error-Diagnostic AVP - 3GPP TS 29.272 #7.3.128 */ -+ { -+ struct dict_object * avp; -+ struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Error-Diagnostic)" , NULL, NULL, NULL }; -+ struct dict_enumval_data t_0 = { "GPRS_DATA_SUBSCRIBED", { .i32 = 0 }}; -+ struct dict_enumval_data t_1 = { "NO_GPRS_DATA_SUBSCRIBED", { .i32 = 1 }}; -+ struct dict_enumval_data t_2 = { "ODB-ALL-APN", { .i32 = 2 }}; -+ struct dict_enumval_data t_3 = { "ODB-HPLMN-APN", { .i32 = 3 }}; -+ struct dict_enumval_data t_4 = { "ODB-VPLMN-APN", { .i32 = 4 }}; -+ -+ struct dict_avp_data data = { -+ 1614, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Error-Diagnostic", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_INTEGER32 /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &avp); -+ CHECK_dict_new( DICT_ENUMVAL, &t_0 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_1 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_2 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_3 , avp, NULL); -+ CHECK_dict_new( DICT_ENUMVAL, &t_4 , avp, NULL); -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ } -+ -+ /* GMLC-Address AVP - 3GPP TS 29.173 #6.4.7 */ -+ { -+ struct dict_avp_data data = { -+ 2405, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "GMLC-Address", /* Name */ -+ AVP_FLAG_VENDOR, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_OCTETSTRING /* base type of data */ -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , Address_type, NULL); -+ } -+ -+ /* Supported Features AVP - 3GPP TS 29.229 */ -+ { -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 628, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Supported-Features", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Vendor-Id", RULE_REQUIRED, 1, 1 } -+ ,{ "Feature-List-ID", RULE_REQUIRED, 1, 1 } -+ ,{ "Feature-List", RULE_REQUIRED, 1, 1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* Trace-Data AVP - 3GPP TS 29.272 #7.3.63 */ -+ { -+ struct dict_object * avp; -+ -+ struct dict_avp_data data = { -+ 1458, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Trace-Data", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Trace-Reference", RULE_REQUIRED, -1, 1 } -+ ,{ "Trace-Depth", RULE_REQUIRED, -1, 1 } -+ ,{ "Trace-NE-Type-List", RULE_REQUIRED, -1, 1 } -+ ,{ "Trace-Interface-List", RULE_OPTIONAL, -1, 1 } -+ ,{ "Trace-Event-List", RULE_REQUIRED, -1, 1 } -+ ,{ "OMC-Id", RULE_OPTIONAL, -1, 1 } -+ ,{ "Trace-Collection-Entity", RULE_REQUIRED, -1, 1 } -+ ,{ "MDT-Configuration", RULE_OPTIONAL, -1, 1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data, NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* Subscription-Data AVP - 3GPP TS 29.272 #7.3.2 */ -+ { -+ /* -+ -+ * The Subscription-Data AVP is of type Grouped. It shall contain -+ * the information related to the user profile relevant for -+ * EPS and GERAN/UTRAN. -+ -+ Subscription-Data ::= -+ [ Subscriber-Status ] -+ [ MSISDN ] -+ [ STN-SR ] -+ [ ICS-Indicator ] -+ [ Network-Access-Mode ] -+ [ Operator-Determined-Barring ] -+ [ HPLMN-ODB ] -+ *10[ Regional-Subscription-Zone-Code] -+ [ Access-Restriction-Data ] -+ [ APN-OI-Replacement ] -+ [ LCS-Info ] -+ [ Teleservice-List ] -+ [ Call-Barring-Infor-List ] -+ [ 3GPP-Charging-Characteristics ] -+ [ AMBR ] -+ [ APN-Configuration-Profile ] -+ [ RAT-Frequency-Selection-Priority-ID ] -+ [ Trace-Data] -+ [ GPRS-Subscription-Data ] -+ *[ CSG-Subscription-Data ] -+ [ Roaming-Restricted-Due-To-Unsupported-Feature ] -+ [ Subscribed-Periodic-RAU-TAU-Timer ] -+ [ MPS-Priority ] -+ [ VPLMN-LIPA-Allowed ] -+ [ Relay-Node-Indicator ] -+ [ MDT-User-Consent ] -+ *[ AVP ] -+ -+ * The AMBR included in this grouped AVP shall include the AMBR -+ * associated to the user’s subscription (UE-AMBR); -+ * Max-Requested-Bandwidth-UL and Max-Requested-Bandwidth-DL within -+ * this AVP shall not both be set to "0". -+ * The APN-OI-Replacement included in this grouped AVP shall include -+ * the UE level APN-OI-Replacement associated to the user’s subscription. -+ */ -+ struct dict_object * avp; -+ struct dict_avp_data data = { -+ 1400, /* Code */ -+ VENDOR_3GPP_Id, /* Vendor */ -+ "Subscription-Data", /* Name */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ -+ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ -+ AVP_TYPE_GROUPED /* base type of data */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Subscriber-Status", RULE_OPTIONAL, -1, 1 } -+ ,{ "MSISDN", RULE_OPTIONAL, -1, 1 } -+ ,{ "STN-SR", RULE_OPTIONAL, -1, 1 } -+ ,{ "ICS-Indicator", RULE_OPTIONAL, -1, 1 } -+ ,{ "Network-Access-Mode", RULE_OPTIONAL, -1, 1 } -+ ,{ "Operator-Determined-Barring", RULE_OPTIONAL, -1, 1 } -+ ,{ "HPLMN-ODB", RULE_OPTIONAL, -1, 1 } -+ ,{ "Regional-Subscription-Zone-Code", RULE_OPTIONAL, -1, 10 } -+ ,{ "Access-Restriction-Data", RULE_OPTIONAL, -1, 1 } -+ ,{ "APN-OI-Replacement", RULE_OPTIONAL, -1, 1 } -+ ,{ "LCS-Info", RULE_OPTIONAL, -1, 1 } -+ ,{ "Teleservice-List", RULE_OPTIONAL, -1, 1 } -+ ,{ "Call-Barring-Infor-List", RULE_OPTIONAL, -1, 1 } -+ ,{ "3GPP-Charging-Characteristics", RULE_OPTIONAL, -1, 1 } -+ ,{ "AMBR", RULE_OPTIONAL, -1, 1 } -+ ,{ "APN-Configuration-Profile", RULE_OPTIONAL, -1, 1 } -+ ,{ "RAT-Frequency-Selection-Priority-ID", RULE_OPTIONAL, -1, 1 } -+ ,{ "Trace-Data", RULE_OPTIONAL, -1, 1 } -+ ,{ "GPRS-Subscription-Data", RULE_OPTIONAL, -1, 1 } -+ ,{ "CSG-Subscription-Data", RULE_OPTIONAL, -1, -1 } -+ ,{ "Roaming-Restricted-Due-To-Unsupported-Feature", RULE_OPTIONAL, -1, 1 } -+ ,{ "Subscribed-Periodic-RAU-TAU-Timer", RULE_OPTIONAL, -1, 1 } -+ ,{ "MPS-Priority", RULE_OPTIONAL, -1, 1 } -+ ,{ "VPLMN-LIPA-Allowed", RULE_OPTIONAL, -1, 1 } -+ ,{ "Relay-Node-Indicator", RULE_OPTIONAL, -1, 1 } -+ ,{ "MDT-User-Consent", RULE_OPTIONAL, -1, 1 } -+ }; -+ -+ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); -+ PARSE_loc_rules( rules, avp ); -+ } -+ -+ /* S6A-Update Location Request - 3GPP TS 29.272 #7.2.3 */ -+ { -+ /* -+ -+ The Update-Location-Request (ULR) command, indicated by the -+ Command-Code field set to 316 and the "R" bit set in -+ the Command Flags field, is sent from MME or SGSN to HSS. -+ -+ < Update-Location-Request> ::= < Diameter Header: 316, REQ, PXY, 16777251 > -+ < Session-Id > -+ [ Vendor-Specific-Application-Id ] -+ { Auth-Session-State } -+ { Origin-Host } -+ { Origin-Realm } -+ [ Destination-Host ] -+ { Destination-Realm } -+ { User-Name } -+ *[ Supported-Features ] -+ [ Terminal-Information ] -+ { RAT-Type } -+ { ULR-Flags } -+ [ UE-SRVCC-Capability ] -+ { Visited-PLMN-Id } -+ [ SGSN-Number ] -+ [ Homogeneous-Support-of-IMS-Voice-Over-PS-Sessions ] -+ [ GMLC-Address ] -+ *[ Active-APN ] -+ *[ AVP ] -+ *[ Proxy-Info ] -+ *[ Route-Record ] -+ */ -+ struct dict_object * cmd; -+ struct dict_cmd_data data = { -+ 316, /* Code */ -+ "Update-Location-Request", /* Name */ -+ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ -+ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Session-Id", RULE_FIXED_HEAD, -1, 1 } -+ ,{ "Vendor-Specific-Application-Id", RULE_OPTIONAL, -1, 1 } -+ ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } -+ ,{ "Destination-Host", RULE_OPTIONAL, -1, 1 } -+ ,{ "Destination-Realm", RULE_REQUIRED, -1, 1 } -+ ,{ "User-Name", RULE_REQUIRED, -1, 1 } -+ ,{ "Supported-Features", RULE_OPTIONAL, -1, -1 } -+ ,{ "Terminal-Information", RULE_OPTIONAL, -1, 1 } -+ ,{ "RAT-Type", RULE_REQUIRED, 1, 1 } -+ ,{ "ULR-Flags", RULE_REQUIRED, 1, 1 } -+ ,{ "UE-SRVCC-Capability", RULE_OPTIONAL, -1, 1 } -+ ,{ "Visited-PLMN-Id", RULE_REQUIRED, 1, 1 } -+ ,{ "SGSN-Number", RULE_OPTIONAL, -1, 1 } -+ ,{ "Homogeneous-Support-of-IMS-Voice-Over-PSSessions", RULE_OPTIONAL, -1, 1 } -+ ,{ "GMLC-Address", RULE_OPTIONAL, -1, 1 } -+ ,{ "Active-APN", RULE_OPTIONAL, -1, -1 } -+ ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } -+ ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } -+ }; -+ -+ CHECK_dict_new( DICT_COMMAND, &data, s6a_dict, &cmd); -+ PARSE_loc_rules( rules, cmd ); -+ } -+ -+ /* S6A-Update Location Answer - 3GPP TS 29.272 #7.2.4 */ -+ { -+ /* -+ -+ The Update-Location-Answer (ULA) command, indicated by the -+ Command-Code field set to 316 and the 'R' bit cleared -+ in the Command Flags field, is sent from HSS to MME or SGSN. -+ -+ < Update-Location-Answer> ::= < Diameter Header: 316, PXY, 16777251 > -+ < Session-Id > -+ [ Vendor-Specific-Application-Id ] -+ [ Result-Code ] -+ [ Experimental-Result ] -+ [ Error-Diagnostic ] -+ { Auth-Session-State } -+ { Origin-Host } -+ { Origin-Realm } -+ *[ Supported-Features ] -+ [ ULA-Flags ] -+ [ Subscription-Data ] -+ *[ AVP ] -+ *[ Failed-AVP ] -+ *[ Proxy-Info ] -+ *[ Route-Record ] -+ */ -+ struct dict_object * cmd; -+ struct dict_cmd_data data = { -+ 316, /* Code */ -+ "Update-Location-Answer", /* Name */ -+ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ -+ CMD_FLAG_PROXIABLE /* Fixed flag values */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Session-Id", RULE_FIXED_HEAD, -1, 1 } -+ ,{ "Vendor-Specific-Application-Id", RULE_OPTIONAL, -1, 1 } -+ ,{ "Result-Code", RULE_OPTIONAL, -1, 1 } -+ ,{ "Experimental-Result", RULE_OPTIONAL, -1, 1 } -+ ,{ "Error-Diagnostic", RULE_OPTIONAL, -1, 1 } -+ ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } -+ ,{ "Supported-Features", RULE_OPTIONAL, -1, -1 } -+ ,{ "ULA-Flags", RULE_OPTIONAL, -1, 1 } -+ ,{ "Subscription-Data", RULE_OPTIONAL, -1, 1 } -+ ,{ "Failed-AVP", RULE_OPTIONAL, -1, -1 } -+ ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } -+ ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } -+ }; -+ -+ CHECK_dict_new( DICT_COMMAND, &data, s6a_dict, &cmd); -+ PARSE_loc_rules( rules, cmd ); -+ } -+ -+ /* S6A-Cancel-Location-Request - 3GPP TS 29.272 #7.2.7 */ -+ { -+ /* -+ -+ The Cancel-Location-Request (CLR) command, indicated by the -+ Command-Code field set to 317 and the 'R' bit set in -+ the Command Flags field, is sent from HSS to MME or SGSN. -+ -+ < Cancel-Location-Request> ::= < Diameter Header: 317, REQ, PXY, 16777251 > -+ < Session-Id > -+ [ Vendor-Specific-Application-Id ] -+ { Auth-Session-State } -+ { Origin-Host } -+ { Origin-Realm } -+ { Destination-Host } -+ { Destination-Realm } -+ { User-Name } -+ *[Supported-Features ] -+ { Cancellation-Type } -+ *[ AVP ] -+ *[ Proxy-Info ] -+ *[ Route-Record ] -+ */ -+ struct dict_object * cmd; -+ struct dict_cmd_data data = { -+ 317, /* Code */ -+ "Cancel-Location-Request", /* Name */ -+ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ -+ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Session-Id", RULE_FIXED_HEAD, -1, 1 } -+ ,{ "Vendor-Specific-Application-Id", RULE_OPTIONAL, -1, 1 } -+ ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } -+ ,{ "Destination-Host", RULE_OPTIONAL, -1, 1 } -+ ,{ "Destination-Realm", RULE_REQUIRED, -1, 1 } -+ ,{ "User-Name", RULE_REQUIRED, -1, 1 } -+ ,{ "Supported-Features", RULE_OPTIONAL, -1, -1 } -+ ,{ "Cancellation-Type", RULE_REQUIRED, -1, 1 } -+ ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } -+ ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } -+ }; -+ -+ CHECK_dict_new( DICT_COMMAND, &data, s6a_dict, &cmd); -+ PARSE_loc_rules( rules, cmd ); -+ } -+ -+ /* S6A-Cancel-Location-Answer - 3GPP TS 29.272 #7.2.8 */ -+ { -+ /* -+ -+ The Cancel-Location-Answer (CLA) command, indicated by the -+ Command-Code field set to 317 and the 'R' bit cleared -+ in the Command Flags field, is sent from MME or SGSN to HSS. -+ -+ < Cancel-Location-Answer> ::= < Diameter Header: 317, PXY, 16777251 > -+ < Session-Id > -+ [ Vendor-Specific-Application-Id ] -+ *[ Supported-Features ] -+ [ Result-Code ] -+ [ Experimental-Result ] -+ { Auth-Session-State } -+ { Origin-Host } -+ { Origin-Realm } -+ *[ AVP ] -+ *[ Failed-AVP ] -+ *[ Proxy-Info ] -+ *[ Route-Record ] -+ */ -+ struct dict_object * cmd; -+ struct dict_cmd_data data = { -+ 317, /* Code */ -+ "Cancel-Location-Answer", /* Name */ -+ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ -+ CMD_FLAG_PROXIABLE /* Fixed flag values */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Session-Id", RULE_FIXED_HEAD, -1, 1 } -+ ,{ "Vendor-Specific-Application-Id", RULE_OPTIONAL, -1, 1 } -+ ,{ "Supported-Features", RULE_OPTIONAL, -1, -1 } -+ ,{ "Result-Code", RULE_OPTIONAL, -1, 1 } -+ ,{ "Experimental-Result", RULE_OPTIONAL, -1, 1 } -+ ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } -+ ,{ "Failed-AVP", RULE_OPTIONAL, -1, -1 } -+ ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } -+ ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } -+ }; -+ -+ CHECK_dict_new( DICT_COMMAND, &data, s6a_dict, &cmd); -+ PARSE_loc_rules( rules, cmd ); -+ } -+ -+ /* S6A-Authentication-Information-Request - 3GPP TS 29.272 #7.2.4 */ -+ { -+ /* -+ -+ The Authentication-Information-Request (AIR) command, indicated by -+ the Command-Code field set to 318 and the 'R' -+ bit set in the Command Flags field, is sent from MME or SGSN to HSS. -+ -+ < Authentication-Information-Request> ::= < Diameter Header: 318, REQ, PXY, 16777251 > -+ < Session-Id > -+ [ Vendor-Specific-Application-Id ] -+ { Auth-Session-State } -+ { Origin-Host } -+ { Origin-Realm } -+ [ Destination-Host ] -+ { Destination-Realm } -+ { User-Name } -+ *[ Supported-Features ] -+ [ Requested-EUTRAN-Authentication-Info ] -+ [ Requested-UTRAN-GERAN-Authentication-Info ] -+ { Visited-PLMN-Id } -+ *[ AVP ] -+ *[ Proxy-Info ] -+ *[ Route-Record ] -+ */ -+ struct dict_object * cmd; -+ struct dict_cmd_data data = { -+ 318, /* Code */ -+ "Authentication-Information-Request", /* Name */ -+ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ -+ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Session-Id", RULE_FIXED_HEAD, -1, 1 } -+ ,{ "Vendor-Specific-Application-Id", RULE_OPTIONAL, -1, 1 } -+ ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } -+ ,{ "Destination-Host", RULE_OPTIONAL, -1, 1 } -+ ,{ "Destination-Realm", RULE_REQUIRED, -1, 1 } -+ ,{ "User-Name", RULE_REQUIRED, -1, 1 } -+ ,{ "Supported-Features", RULE_OPTIONAL, -1, -1 } -+ ,{ "Requested-EUTRAN-Authentication-Info", RULE_OPTIONAL, -1, 1 } -+ ,{ "Requested-UTRAN-GERAN-Authentication-Info", RULE_OPTIONAL, -1, 1 } -+ ,{ "Visited-PLMN-Id", RULE_REQUIRED, -1, 1 } -+ ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } -+ ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } -+ }; -+ -+ CHECK_dict_new( DICT_COMMAND, &data, s6a_dict, &cmd); -+ PARSE_loc_rules( rules, cmd ); -+ } -+ -+ /* S6A-Authentication-Information-Answer - 3GPP TS 29.272 #7.2.6 */ -+ { -+ /* -+ -+ The Authentication-Information-Answer (AIA) command, indicated by -+ the Command-Code field set to318 and the 'R' bit cleared in the -+ Command Flags field, is sent from HSS to MME or SGSN. -+ -+ < Authentication-Information-Answer> ::= < Diameter Header: 318, PXY, 16777251 > -+ < Session-Id > -+ [ Vendor-Specific-Application-Id ] -+ [ Result-Code ] -+ [ Experimental-Result ] -+ [ Error-Diagnostic ] -+ { Auth-Session-State } -+ { Origin-Host } -+ { Origin-Realm } -+ *[ Supported-Features ] -+ [ Authentication-Info ] -+ *[ AVP ] -+ *[ Failed-AVP ] -+ *[ Proxy-Info ] -+ *[ Route-Record ] -+ */ -+ struct dict_object * cmd; -+ struct dict_cmd_data data = { -+ 318, /* Code */ -+ "Authentication-Information-Answer", /* Name */ -+ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ -+ CMD_FLAG_PROXIABLE /* Fixed flag values */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Session-Id", RULE_FIXED_HEAD, -1, 1 } -+ ,{ "Vendor-Specific-Application-Id", RULE_OPTIONAL, -1, 1 } -+ ,{ "Result-Code", RULE_OPTIONAL, -1, 1 } -+ ,{ "Experimental-Result", RULE_OPTIONAL, -1, 1 } -+ ,{ "Error-Diagnostic", RULE_OPTIONAL, -1, 1 } -+ ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } -+ ,{ "Supported-Features", RULE_OPTIONAL, -1, -1 } -+ ,{ "Authentication-Info", RULE_OPTIONAL, -1, 1 } -+ ,{ "Failed-AVP", RULE_OPTIONAL, -1, -1 } -+ ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } -+ ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } -+ }; -+ -+ CHECK_dict_new( DICT_COMMAND, &data, s6a_dict, &cmd); -+ PARSE_loc_rules( rules, cmd ); -+ } -+ -+ /* Insert-Subscriber-Data-Request IDR Command - 3GPP TS 29.272 #7.2.9 */ -+ { -+ /* -+ -+ The Insert-Subscriber-Data-Request (IDR) command, indicated by the -+ Command-Code field set to 319 and the 'R' bit set in the Command -+ Flags field, is sent from HSS to MME or SGSN. -+ -+ < Insert-Subscriber-Data-Request> ::= < Diameter Header: 319, REQ, PXY, 16777251 > -+ < Session-Id > -+ [ Vendor-Specific-Application-Id ] -+ { Auth-Session-State } -+ { Origin-Host } -+ { Origin-Realm } -+ { Destination-Host } -+ { Destination-Realm } -+ { User-Name } -+ *[ Supported-Features] -+ { Subscription-Data} -+ [IDR- Flags ] -+ *[ AVP ] -+ *[ Proxy-Info ] -+ *[ Route-Record ] -+ */ -+ struct dict_object * cmd; -+ struct dict_cmd_data data = { -+ 319, /* Code */ -+ "Insert-Subscriber-Data-Request", /* Name */ -+ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ -+ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Session-Id", RULE_FIXED_HEAD, -1, 1 } -+ ,{ "Vendor-Specific-Application-Id", RULE_OPTIONAL, -1, 1 } -+ ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } -+ ,{ "Destination-Host", RULE_REQUIRED, -1, 1 } -+ ,{ "Destination-Realm", RULE_REQUIRED, -1, 1 } -+ ,{ "User-Name", RULE_REQUIRED, -1, 1 } -+ ,{ "Supported-Features", RULE_OPTIONAL, -1, -1 } -+ ,{ "Subscription-Data", RULE_REQUIRED, -1, 1 } -+ ,{ "IDR-Flags", RULE_OPTIONAL, -1, 1 } -+ ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } -+ ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } -+ }; -+ -+ CHECK_dict_new( DICT_COMMAND, &data, s6a_dict, &cmd); -+ PARSE_loc_rules( rules, cmd ); -+ } -+ -+ /* Insert-Subscriber-Data-Answer IDA Command - 3GPP TS 29.272 #7.2.10 */ -+ { -+ /* -+ -+ The Insert-Subscriber-Data-Request (IDR) command, indicated by the -+ Command-Code field set to 319 and the 'R' bit set in the Command -+ Flags field, is sent from HSS to MME or SGSN. -+ -+ < Insert-Subscriber-Data-Answer> ::= < Diameter Header: 319, PXY, 16777251 > -+ < Session-Id > -+ [ Vendor-Specific-Application-Id ] -+ *[ Supported-Features ] -+ [ Result-Code ] -+ [ Experimental-Result ] -+ { Auth-Session-State } -+ { Origin-Host } -+ { Origin-Realm } -+ [ IMS-Voice-Over-PS-Sessions-Supported ] -+ [ Last-UE-Activity-Time ] -+ [ RAT-Type ] -+ [ IDA-Flags ] -+ [ EPS-User-State ] -+ [ EPS-Location-Information ] -+ *[ AVP ] -+ *[ Failed-AVP ] -+ *[ Proxy-Info ] -+ *[ Route-Record ] -+ */ -+ struct dict_object * cmd; -+ struct dict_cmd_data data = { -+ 319, /* Code */ -+ "Insert-Subscriber-Data-Answer", /* Name */ -+ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ -+ CMD_FLAG_PROXIABLE /* Fixed flag values */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Session-Id", RULE_FIXED_HEAD, -1, 1 } -+ ,{ "Vendor-Specific-Application-Id", RULE_OPTIONAL, -1, 1 } -+ ,{ "Supported-Features", RULE_OPTIONAL, -1, -1 } -+ ,{ "Result-Code", RULE_OPTIONAL, -1, 1 } -+ ,{ "Experimental-Result", RULE_OPTIONAL, -1, 1 } -+ ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } -+ ,{ "IMS-Voice-Over-PS-Sessions-Supported", RULE_OPTIONAL, -1, 1 } -+ ,{ "Last-UE-Activity-Time", RULE_OPTIONAL, -1, 1 } -+ ,{ "RAT-Type", RULE_OPTIONAL, -1, 1 } -+ ,{ "IDA-Flags", RULE_OPTIONAL, -1, 1 } -+ ,{ "EPS-User-State", RULE_OPTIONAL, -1, 1 } -+ ,{ "EPS-Location-Information", RULE_OPTIONAL, -1, 1 } -+ ,{ "Failed-AVP", RULE_OPTIONAL, -1, -1 } -+ ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } -+ ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } -+ }; -+ -+ CHECK_dict_new( DICT_COMMAND, &data, s6a_dict, &cmd); -+ PARSE_loc_rules( rules, cmd ); -+ } -+ -+ /* Delete-Subscriber-Data-Request (DSR) Command - 3GPP TS 29.272 #7.2.11 */ -+ { -+ /* -+ -+ The Delete-SubscriberData-Request (DSR) command, indicated by -+ the Command-Code field set to 320 and the 'R' bit -+ set in the Command Flags field, is sent from HSS to MME or SGSN. -+ -+ < Delete-Subscriber-Data-Request > ::= < Diameter Header: 320, REQ, PXY, 16777251 > -+ < Session-Id > -+ [ Vendor-Specific-Application-Id ] -+ { Auth-Session-State } -+ { Origin-Host } -+ { Origin-Realm } -+ { Destination-Host } -+ { Destination-Realm } -+ { User-Name } -+ *[ Supported-Features ] -+ { DSR-Flags } -+ *[ Context-Identifier ] -+ [ Trace-Reference ] -+ *[ TS-Code ] -+ *[ SS-Code ] -+ *[ AVP ] -+ *[ Proxy-Info ] -+ *[ Route-Record ] -+ */ -+ struct dict_object * cmd; -+ struct dict_cmd_data data = { -+ 320, /* Code */ -+ "Delete-SubscriberData-Request", /* Name */ -+ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ -+ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Session-Id", RULE_FIXED_HEAD, -1, 1 } -+ ,{ "Vendor-Specific-Application-Id", RULE_OPTIONAL, -1, 1 } -+ ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } -+ ,{ "Destination-Host", RULE_REQUIRED, -1, 1 } -+ ,{ "Destination-Realm", RULE_REQUIRED, -1, 1 } -+ ,{ "User-Name", RULE_REQUIRED, -1, 1 } -+ ,{ "Supported-Features", RULE_OPTIONAL, -1, -1 } -+ ,{ "DSR-Flags", RULE_REQUIRED, -1, 1 } -+ ,{ "Context-Identifier", RULE_OPTIONAL, -1, -1 } -+ ,{ "Trace-Reference", RULE_OPTIONAL, -1, 1 } -+ ,{ "TS-Code", RULE_OPTIONAL, -1, -1 } -+ ,{ "SS-Code", RULE_OPTIONAL, -1, -1 } -+ ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } -+ ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } -+ }; -+ -+ CHECK_dict_new( DICT_COMMAND, &data, s6a_dict, &cmd); -+ PARSE_loc_rules( rules, cmd ); -+ } -+ -+ /* Delete-Subscriber-Data-Answer (DSA) Command - 3GPP TS 29.272 #7.2.12 */ -+ { -+ /* -+ -+ The Delete-SubscriberData-Answer (DSA) command, indicated by the -+ Command-Code field set to 320 and the 'R' bit -+ cleared in the Command Flags field, is sent from MME or SGSN to HSS. -+ -+ < Delete-Subscriber-Data-Answer> ::= < Diameter Header: 320, PXY, 16777251 > -+ < Session-Id > -+ [ Vendor-Specific-Application-Id ] -+ *[ Supported-Features ] -+ [ Result-Code ] -+ [ Experimental-Result ] -+ { Auth-Session-State } -+ { Origin-Host } -+ { Origin-Realm } -+ [ DSA-Flags ] -+ *[ AVP ] -+ *[ Failed-AVP ] -+ *[ Proxy-Info ] -+ *[ Route-Record ] -+ */ -+ struct dict_object * cmd; -+ struct dict_cmd_data data = { -+ 320, /* Code */ -+ "Delete-SubscriberData-Answer", /* Name */ -+ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ -+ CMD_FLAG_PROXIABLE /* Fixed flag values */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Session-Id", RULE_FIXED_HEAD, -1, 1 } -+ ,{ "Vendor-Specific-Application-Id", RULE_OPTIONAL, -1, 1 } -+ ,{ "Supported-Features", RULE_OPTIONAL, -1, -1 } -+ ,{ "Result-Code", RULE_OPTIONAL, -1, 1 } -+ ,{ "Experimental-Result", RULE_OPTIONAL, -1, 1 } -+ ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } -+ ,{ "DSA-Flags", RULE_OPTIONAL, -1, 1 } -+ ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } -+ ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } -+ }; -+ -+ CHECK_dict_new( DICT_COMMAND, &data, s6a_dict, &cmd); -+ PARSE_loc_rules( rules, cmd ); -+ } -+ -+ /* Purge-UE-Request (PUR) Command - 3GPP TS 29.272 #7.2.13 */ -+ { -+ /* -+ -+ The Delete-SubscriberData-Request (DSR) command, indicated by -+ the Command-Code field set to 320 and the 'R' bit -+ set in the Command Flags field, is sent from HSS to MME or SGSN. -+ -+ < Purge-UE-Request> ::= < Diameter Header: 321, REQ, PXY, 16777251 > -+ < Session-Id > -+ [ Vendor-Specific-Application-Id ] -+ { Auth-Session-State } -+ { Origin-Host } -+ { Origin-Realm } -+ [ Destination-Host ] -+ { Destination-Realm } -+ { User-Name } -+ [ PUR-Flags ] -+ *[ Supported-Features ] -+ *[ AVP ] -+ *[ Proxy-Info ] -+ *[ Route-Record ] -+ */ -+ struct dict_object * cmd; -+ struct dict_cmd_data data = { -+ 321, /* Code */ -+ "Purge-UE-Request", /* Name */ -+ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ -+ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Session-Id", RULE_FIXED_HEAD, -1, 1 } -+ ,{ "Vendor-Specific-Application-Id", RULE_OPTIONAL, -1, 1 } -+ ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } -+ ,{ "Destination-Host", RULE_OPTIONAL, -1, 1 } -+ ,{ "Destination-Realm", RULE_REQUIRED, -1, 1 } -+ ,{ "User-Name", RULE_REQUIRED, -1, 1 } -+ ,{ "PUR-Flags", RULE_OPTIONAL, -1, 1 } -+ ,{ "Supported-Features", RULE_OPTIONAL, -1, -1 } -+ ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } -+ ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } -+ }; -+ -+ CHECK_dict_new( DICT_COMMAND, &data, s6a_dict, &cmd); -+ PARSE_loc_rules( rules, cmd ); -+ } -+ -+ /* Purge-UE-Answer (PUA) Command - 3GPP TS 29.272 #7.2.14 */ -+ { -+ /* -+ -+ The Purge-UE-Answer (PUA) command, indicated by the Command-Code -+ field set to 321 and the 'R' bit cleared in the -+ Command Flags field, is sent from HSS to MME or SGSN. -+ -+ < Purge-UE-Answer> ::= < Diameter Header: 321, PXY, 16777251 > -+ < Session-Id > -+ [ Vendor-Specific-Application-Id ] -+ *[ Supported-Features ] -+ [ Result-Code ] -+ [ Experimental-Result ] -+ { Auth-Session-State } -+ { Origin-Host } -+ { Origin-Realm } -+ [ PUA-Flags ] -+ *[ AVP ] -+ *[ Failed-AVP ] -+ *[ Proxy-Info ] -+ *[ Route-Record ] -+ */ -+ struct dict_object * cmd; -+ struct dict_cmd_data data = { -+ 321, /* Code */ -+ "Purge-UE-Answer", /* Name */ -+ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ -+ CMD_FLAG_PROXIABLE /* Fixed flag values */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Session-Id", RULE_FIXED_HEAD, -1, 1 } -+ ,{ "Vendor-Specific-Application-Id", RULE_OPTIONAL, -1, 1 } -+ ,{ "Supported-Features", RULE_OPTIONAL, -1, -1 } -+ ,{ "Result-Code", RULE_OPTIONAL, -1, 1 } -+ ,{ "Experimental-Result", RULE_OPTIONAL, -1, 1 } -+ ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } -+ ,{ "PUA-Flags", RULE_OPTIONAL, -1, 1 } -+ ,{ "Failed-AVP", RULE_OPTIONAL, -1, -1 } -+ ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } -+ ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } -+ }; -+ -+ CHECK_dict_new( DICT_COMMAND, &data, s6a_dict, &cmd); -+ PARSE_loc_rules( rules, cmd ); -+ } -+ -+ /* Reset-Request (RSR) Command - 3GPP TS 29.272 #7.2.15 */ -+ { -+ /* -+ -+ The Reset-Request (RSR) command, indicated by the Command-Code -+ field set to 322 and the 'R' bit set in the -+ Command Flags field, is sent from HSS to MME or SGSN. -+ -+ < Reset-Request> ::= < Diameter Header: 322, REQ, PXY, 16777251 > -+ < Session-Id > -+ [ Vendor-Specific-Application-Id ] -+ { Auth-Session-State } -+ { Origin-Host } -+ { Origin-Realm } -+ { Destination-Host } -+ { Destination-Realm } -+ *[ Supported-Features ] -+ *[ User-Id ] -+ *[ AVP ] -+ *[ Proxy-Info ] -+ *[ Route-Record ] -+ */ -+ struct dict_object * cmd; -+ struct dict_cmd_data data = { -+ 322, /* Code */ -+ "Reset-Request", /* Name */ -+ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ -+ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Session-Id", RULE_FIXED_HEAD, -1, 1 } -+ ,{ "Vendor-Specific-Application-Id", RULE_OPTIONAL, -1, 1 } -+ ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } -+ ,{ "Destination-Host", RULE_REQUIRED, -1, 1 } -+ ,{ "Destination-Realm", RULE_REQUIRED, -1, 1 } -+ ,{ "Supported-Features", RULE_OPTIONAL, -1, -1 } -+ ,{ "User-Id", RULE_OPTIONAL, -1, -1 } -+ ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } -+ ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } -+ }; -+ -+ CHECK_dict_new( DICT_COMMAND, &data, s6a_dict, &cmd); -+ PARSE_loc_rules( rules, cmd ); -+ } -+ -+ /* Reset-Answer (RSA) Command - 3GPP TS 29.272 #7.2.16 */ -+ { -+ /* -+ -+ The Authentication-Information-Answer (RSA) command, indicated by -+ the Command-Code field set to 322 and the 'R' -+ bit cleared in the Command Flags field, is sent from MME or SGSN to HSS. -+ -+ < Reset-Answer> ::= < Diameter Header: 322, PXY, 16777251 > -+ < Session-Id > -+ [ Vendor-Specific-Application-Id ] -+ *[ Supported-Features ] -+ [ Result-Code ] -+ [ Experimental-Result ] -+ { Auth-Session-State } -+ { Origin-Host } -+ { Origin-Realm } -+ *[ AVP ] -+ *[ Failed-AVP ] -+ *[ Proxy-Info ] -+ *[ Route-Record ] -+ */ -+ struct dict_object * cmd; -+ struct dict_cmd_data data = { -+ 322, /* Code */ -+ "Reset-Anwer", /* Name */ -+ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ -+ CMD_FLAG_PROXIABLE /* Fixed flag values */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Session-Id", RULE_FIXED_HEAD, -1, 1 } -+ ,{ "Vendor-Specific-Application-Id", RULE_OPTIONAL, -1, 1 } -+ ,{ "Supported-Features", RULE_OPTIONAL, -1, -1 } -+ ,{ "Result-Code", RULE_OPTIONAL, -1, 1 } -+ ,{ "Experimental-Result", RULE_OPTIONAL, -1, 1 } -+ ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } -+ ,{ "Failed-AVP", RULE_OPTIONAL, -1, -1 } -+ ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } -+ ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } -+ }; -+ -+ CHECK_dict_new( DICT_COMMAND, &data, s6a_dict, &cmd); -+ PARSE_loc_rules( rules, cmd ); -+ } -+ -+ /* Notify-Request (NOR) Command - 3GPP TS 29.272 #7.2.17 */ -+ { -+ /* -+ -+ The Notify-Request (NOR) command, indicated by the Command-Code -+ field set to 323 and the 'R' bit set in the Command Flags field, -+ is sent from MME or SGSN to HSS. -+ -+ < Notify-Request> ::= < Diameter Header: 323, REQ, PXY, 16777251 > -+ < Session-Id > -+ [ Vendor-Specific-Application-Id ] -+ { Auth-Session-State } -+ { Origin-Host } -+ { Origin-Realm } -+ [ Destination-Host ] -+ { Destination-Realm } -+ { User-Name } -+ *[ Supported-Features ] -+ [ Terminal-Information ] -+ [ MIP6-Agent-Info ] -+ [ Visited-Network-Identifier ] -+ [ Context-Identifier ] -+ [ Service-Selection ] -+ [ Alert-Reason ] -+ [ UE-SRVCC-Capability ] -+ [ NOR-Flags ] -+ *[ AVP ] -+ *[ Proxy-Info ] -+ *[ Route-Record ] -+ */ -+ struct dict_object * cmd; -+ struct dict_cmd_data data = { -+ 323, /* Code */ -+ "Notify-Request", /* Name */ -+ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ -+ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Session-Id", RULE_FIXED_HEAD, -1, 1 } -+ ,{ "Vendor-Specific-Application-Id", RULE_OPTIONAL, -1, 1 } -+ ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } -+ ,{ "Destination-Host", RULE_OPTIONAL, -1, 1 } -+ ,{ "Destination-Realm", RULE_REQUIRED, -1, 1 } -+ ,{ "User-Name", RULE_REQUIRED, -1, 1 } -+ ,{ "Supported-Features", RULE_OPTIONAL, -1, -1 } -+ ,{ "Terminal-Information", RULE_OPTIONAL, -1, 1 } -+ ,{ "MIP6-Agent-Info", RULE_OPTIONAL, -1, 1 } -+ ,{ "Visited-Network-Identifier", RULE_OPTIONAL, -1, 1 } -+ ,{ "Context-Identifier", RULE_OPTIONAL, -1, 1 } -+ ,{ "Service-Selection", RULE_OPTIONAL, -1, 1 } -+ ,{ "Alert-Reason", RULE_OPTIONAL, -1, 1 } -+ ,{ "UE-SRVCC-Capability", RULE_OPTIONAL, -1, 1 } -+ ,{ "NOR-Flags", RULE_OPTIONAL, -1, 1 } -+ ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } -+ ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } -+ }; -+ -+ CHECK_dict_new( DICT_COMMAND, &data, s6a_dict, &cmd); -+ PARSE_loc_rules( rules, cmd ); -+ } -+ -+ /* Notify-Answer (NOA) Command - 3GPP TS 29.272 #7.2.18 */ -+ { -+ /* -+ -+ The Notify-Answer (NOA) command, indicated by the Command-Code -+ field set to 323 and the 'R' bit cleared in the -+ Command Flags field, is sent from HSS to MME or SGSN. -+ -+ < Notify-Answer> ::= < Diameter Header: 323, PXY, 16777251 > -+ < Session-Id > -+ [ Vendor-Specific-Application-Id ] -+ [ Result-Code ] -+ [ Experimental-Result ] -+ { Auth-Session-State } -+ { Origin-Host } -+ { Origin-Realm } -+ *[ Supported-Features ] -+ *[ AVP ] -+ *[ Failed-AVP ] -+ *[ Proxy-Info ] -+ *[ Route-Record ] -+ */ -+ struct dict_object * cmd; -+ struct dict_cmd_data data = { -+ 323, /* Code */ -+ "Notify-Answer", /* Name */ -+ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ -+ CMD_FLAG_PROXIABLE /* Fixed flag values */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Session-Id", RULE_FIXED_HEAD, -1, 1 } -+ ,{ "Vendor-Specific-Application-Id", RULE_OPTIONAL, -1, 1 } -+ ,{ "Result-Code", RULE_OPTIONAL, -1, 1 } -+ ,{ "Experimental-Result", RULE_OPTIONAL, -1, 1 } -+ ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } -+ ,{ "Supported-Features", RULE_OPTIONAL, -1, -1 } -+ ,{ "Failed-AVP", RULE_OPTIONAL, -1, -1 } -+ ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } -+ ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } -+ }; -+ -+ CHECK_dict_new( DICT_COMMAND, &data, s6a_dict, &cmd); -+ PARSE_loc_rules( rules, cmd ); -+ } -+ -+ /* ME-Identity-Check-Request (ECR) Command - 3GPP TS 29.272 #7.2.19 */ -+ { -+ /* -+ -+ The ME-Identity-Check-Request (ECR) command, indicated by the -+ Command-Code field set to 324 and the 'R' bit set -+ in the Command Flags field, is sent from MME or SGSN to EIR. -+ -+ < ME-Identity-Check-Request > ::= < Diameter Header: 324, REQ, PXY, 16777252 > -+ < Session-Id > -+ [ Vendor-Specific-Application-Id ] -+ { Auth-Session-State } -+ { Origin-Host } -+ { Origin-Realm } -+ [ Destination-Host ] -+ { Destination-Realm } -+ { Terminal-Information } -+ [ User-Name ] -+ *[ AVP ] -+ *[ Proxy-Info ] -+ *[ Route-Record ] -+ */ -+ struct dict_object * cmd; -+ struct dict_cmd_data data = { -+ 324, /* Code */ -+ "ME-Identity-Check-Request", /* Name */ -+ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ -+ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Session-Id", RULE_FIXED_HEAD, -1, 1 } -+ ,{ "Vendor-Specific-Application-Id", RULE_OPTIONAL, -1, 1 } -+ ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } -+ ,{ "Destination-Host", RULE_OPTIONAL, -1, 1 } -+ ,{ "Destination-Realm", RULE_REQUIRED, -1, 1 } -+ ,{ "Terminal-Information", RULE_REQUIRED, -1, 1 } -+ ,{ "User-Name", RULE_OPTIONAL, -1, 1 } -+ ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } -+ ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } -+ }; -+ -+ CHECK_dict_new( DICT_COMMAND, &data, s6a_dict, &cmd); -+ PARSE_loc_rules( rules, cmd ); -+ } -+ -+ /* ME-Identity-Check-Answer (ECA) Command - 3GPP TS 29.272 #7.2.20 */ -+ { -+ /* -+ -+ The ME-Identity-Check-Answer (ECA) command, indicated by the -+ Command-Code field set to 324 and the 'R' bit -+ cleared in the Command Flags field, is sent from EIR to MME or SGSN. -+ -+ < ME-Identity-Check-Answer> ::= < Diameter Header: 324, PXY, 16777252 > -+ < Session-Id > -+ [ Vendor-Specific-Application-Id ] -+ [ Result-Code ] -+ [ Experimental-Result ] -+ { Auth-Session-State } -+ { Origin-Host } -+ { Origin-Realm } -+ [ Equipment-Status ] -+ *[ AVP ] -+ *[ Failed-AVP ] -+ *[ Proxy-Info ] -+ *[ Route-Record ] -+ */ -+ struct dict_object * cmd; -+ struct dict_cmd_data data = { -+ 324, /* Code */ -+ "ME-Identity-Check-Answer", /* Name */ -+ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ -+ CMD_FLAG_PROXIABLE /* Fixed flag values */ -+ }; -+ -+ struct local_rules_definition rules[] = -+ { -+ { "Session-Id", RULE_FIXED_HEAD, -1, 1 } -+ ,{ "Vendor-Specific-Application-Id", RULE_OPTIONAL, -1, 1 } -+ ,{ "Result-Code", RULE_OPTIONAL, -1, 1 } -+ ,{ "Experimental-Result", RULE_OPTIONAL, -1, 1 } -+ ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } -+ ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } -+ ,{ "Equipment-Status", RULE_OPTIONAL, -1, 1 } -+ ,{ "User-Name", RULE_OPTIONAL, -1, 1 } -+ ,{ "Failed-AVP", RULE_OPTIONAL, -1, -1 } -+ ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } -+ ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } -+ }; -+ -+ CHECK_dict_new( DICT_COMMAND, &data, s6a_dict, &cmd); -+ PARSE_loc_rules( rules, cmd ); -+ } -+ } -+ -+ TRACE_DEBUG(INFO, "Dictionary Extension 'S6A from 3GPP standard v.10.5' initialized"); -+ return 0; -+} -+EXTENSION_ENTRY("dict_s6a", dict_s6a_init, "dict_nas_mipv6"); diff --git a/openair-cn/S6A/freediameter/install_freediameter.sh b/openair-cn/S6A/freediameter/install_freediameter.sh deleted file mode 100755 index 9a9c4899cf..0000000000 --- a/openair-cn/S6A/freediameter/install_freediameter.sh +++ /dev/null @@ -1,113 +0,0 @@ -# !/bin/sh -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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 . -# -# Contact Information -# OpenAirInterface Admin: openair_admin@eurecom.fr -# OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr -# -# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. -# -################################################################################ - -CURRENT_PATH=`pwd` - -sudo apt-get install autoconf automake gawk cmake make gcc flex bison libsctp1 libsctp-dev libidn2-0-dev \ -libidn11-dev libmysqlclient-dev libxml2-dev swig python-dev cmake-curses-gui \ -valgrind guile-2.0-dev libgmp-dev libgcrypt11-dev gdb unzip libtasn1-3-dev g++ \ -linux-headers-`uname -r` build-essential -y -source ../../SCRIPTS/utils.bash - -if [ -f install_log.txt ] - then - rm -f install_log.txt -fi - -if [ ! -d /usr/local/src/ ] - then - echo "/usr/local/src/ doesn't exist please create one" - exit -1 -fi - -if [ ! -w /usr/local/src/ ] - then - echo "You don't have permissions to write to /usr/local/src/" -# exit -1 -fi - -cd /usr/local/src/ - -# L.GAUTHIER: GNUTLS 3.1.23 compiles on 14.04 x64 with nettle comming with ubuntu -# see http://www.bauer-power.net/2014/06/how-to-install-gnutls-3123-from-source.html#.VD6LI4VxOPI -# if we have ubuntu 14.10 the default packages are ok - -[ -f /etc/os-release ] && source /etc/os-release -if echo $NAME $VERSION_ID | awk '{version=$2+0; if (version>14 && $1=="Ubuntu") exit 0} {exit 1}' - then - apt-get install -y gnutls-bin nettle-bin nettle-dev libssl-dev -else - echo "Downloading nettle archive" - - rm -rf nettle-2.5.tar.gz nettle-2.5.tar nettle-2.5 2> /dev/null - wget ftp://ftp.lysator.liu.se/pub/security/lsh/nettle-2.5.tar.gz > install_log.txt - echo "Uncompressing nettle archive" - tar xf nettle-2.5.tar.gz - cd nettle-2.5/ - ./configure --disable-openssl --enable-shared --prefix=/usr > install_log.txt || exit -1 - echo "Compiling nettle" - make -j4 > install_log.txt 2>&1 - make check > install_log.txt - sudo make install > install_log.txt - cd ../ - - echo "Downloading gnutls archive" - rm -rf gnutls-3.1.0.tar.xz gnutls-3.1.0 2> /dev/null - wget ftp://ftp.gnutls.org/gcrypt/gnutls/stable/gnutls-3.1.0.tar.xz > install_log.txt - echo "Uncompressing gnutls archive" - tar xf gnutls-3.1.0.tar.xz - cd gnutls-3.1.0/ - ./configure --prefix=/usr || exit -1 - echo "Compiling gnutls" - make -j2 > install_log.txt 2>&1 - sudo make install > install_log.txt - cd ../ -fi - -echo "Downloading freeDiameter archive" -apt-get install -y mercurial -rm -rf latest.tar.gz freeDiameter -wget http://www.freediameter.net/latest.tar.gz -echo "Uncompressing freeDiameter archive" -tar -xzf latest.tar.gz -cd freeDiameter -hg update 1.1.5 -patch -p1 < $OPENAIRCN_DIR/S6A/freediameter/freediameter-1.1.5.patch > install_log.txt -mkdir build -cd build -cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr ../ > install_log.txt || exit -1 -echo "Compiling freeDiameter" -sudo make -j2 > install_log.txt 2>&1 -#make help -sudo make test > install_log.txt -sudo make install > install_log.txt - -cd $CURRENT_PATH -./make_certs.sh diff --git a/openair-cn/S6A/freediameter/make_certs.sh b/openair-cn/S6A/freediameter/make_certs.sh deleted file mode 100755 index cf176940d3..0000000000 --- a/openair-cn/S6A/freediameter/make_certs.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/bash -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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 . -# -# Contact Information -# OpenAirInterface Admin: openair_admin@eurecom.frARG is -# OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr -# -# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. -# -################################################################################ - -# ARG is REALM -# BY DEFAULT REALM IS "eur" - -DEFAULTREALMVALUE="eur" -REALM=${1:-$DEFAULTREALMVALUE} - -rm -rf demoCA -mkdir demoCA -echo 01 > demoCA/serial -touch demoCA/index.txt - -user=$(whoami) -HOSTNAME=$(hostname -f) - -echo "Creating MME certificate for user '$HOSTNAME'.'$REALM'" - -# CA self certificate -openssl req -new -batch -x509 -days 3650 -nodes -newkey rsa:1024 -out mme.cacert.pem -keyout mme.cakey.pem -subj /CN=$REALM/C=FR/ST=PACA/L=Aix/O=Eurecom/OU=CM - -openssl genrsa -out mme.key.pem 1024 -openssl req -new -batch -out mme.csr.pem -key mme.key.pem -subj /CN=$HOSTNAME.$REALM/C=FR/ST=PACA/L=Aix/O=Eurecom/OU=CM -openssl ca -cert mme.cacert.pem -keyfile mme.cakey.pem -in mme.csr.pem -out mme.cert.pem -outdir . -batch - -if [ ! -d /usr/local/etc/freeDiameter ] -then - echo "Creating non existing directory: /usr/local/etc/freeDiameter/" - sudo mkdir /usr/local/etc/freeDiameter/ -fi - -sudo cp -uv mme.key.pem mme.cert.pem mme.cacert.pem mme.cakey.pem /usr/local/etc/freeDiameter/ - -# openssl genrsa -out ubuntu.key.pem 1024 -# openssl req -new -batch -x509 -out ubuntu.csr.pem -key ubuntu.key.pem -subj /CN=ubuntu.localdomain/C=FR/ST=BdR/L=Aix/O=fD/OU=Tests -# openssl ca -cert cacert.pem -keyfile cakey.pem -in ubuntu.csr.pem -out ubuntu.cert.pem -outdir . -batch diff --git a/openair-cn/S6A/freediameter/s6a.conf b/openair-cn/S6A/freediameter/s6a.conf deleted file mode 100644 index fbf1fdf345..0000000000 --- a/openair-cn/S6A/freediameter/s6a.conf +++ /dev/null @@ -1,61 +0,0 @@ -# -------- Local --------- - -# Uncomment if the framework cannot resolv it. -Identity = "roux.test.fr"; -Realm = "test.fr"; - -# TLS configuration (see previous section) -TLS_Cred = "/homes/roux/lte-epc/openair3/OPENAIRHSS/conf/roux.cert.pem", -"/homes/roux/lte-epc/openair3/OPENAIRHSS/conf/roux.key.pem"; -TLS_CA = "/homes/roux/lte-epc/openair3/OPENAIRHSS/conf/cacert.pem"; - -# Disable use of TCP protocol (only listen and connect in SCTP) -# Default : TCP enabled -No_TCP; -#No_SCTP; - -# Limit the number of SCTP streams -SCTP_streams = 15; - -NoRelay; -TLS_old_method; -AppServThreads = 1; - -# -------- Extensions --------- - -# Uncomment (and create rtd.conf) to specify routing table for this peer. -#LoadExtension = "rt_default.fdx" : "rtd.conf"; - -# Uncomment (and create acl.conf) to allow incoming connections from other peers. -#LoadExtension = "acl_wl.fdx" : "acl.conf"; - -# Uncomment to display periodic state information -#LoadExtension = "dbg_monitor.fdx"; - -# Uncomment to enable an interactive Python interpreter session. -# (see doc/dbg_interactive.py.sample for more information) -#LoadExtension = "dbg_interactive.fdx"; - -# Load the RFC4005 dictionary objects -#LoadExtension = "dict_nasreq.fdx"; - -LoadExtension = "dict_nas_mipv6.fdx"; -LoadExtension = "dict_s6a.fdx"; - -# Load RFC4072 dictionary objects -#LoadExtension = "dict_eap.fdx"; - -# Load the Diameter EAP server extension (requires diameap.conf) -#LoadExtension = "app_diameap.fdx" : "diameap.conf"; - -# Load the Accounting Server extension (requires app_acct.conf) -#LoadExtension = "app_acct.fdx" : "app_acct.conf"; - -# -------- Peers --------- - -# The framework will actively attempt to establish and maintain a connection -# with the peers listed here. -# For only accepting incoming connections, see the acl_wl.fx extension. - -# ConnectPeer = "hss.test.fr" { ConnectTo = "192.168.56.101"; No_IPv6; No_TCP; Port = 3868; Realm = "test.fr"; }; -# ConnectPeer = "hss.test.fr" { ConnectTo = "192.168.56.1"; No_TLS; }; diff --git a/openair-cn/S6A/s6a_apn_conf.c b/openair-cn/S6A/s6a_apn_conf.c deleted file mode 100644 index cfa84e8777..0000000000 --- a/openair-cn/S6A/s6a_apn_conf.c +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ diff --git a/openair-cn/S6A/s6a_auth_info.c b/openair-cn/S6A/s6a_auth_info.c deleted file mode 100644 index 499eacb4ee..0000000000 --- a/openair-cn/S6A/s6a_auth_info.c +++ /dev/null @@ -1,454 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -#include -#include - -#include "mme_config.h" - -#include "assertions.h" -#include "conversions.h" - -#include "intertask_interface.h" -#include "security_types.h" -#include "s6a_defs.h" -#include "s6a_messages.h" -#include "msc.h" - -static -int s6a_parse_rand(struct avp_hdr *hdr, uint8_t *rand_p) -{ - int ret = 0; - DevCheck(hdr->avp_value->os.len == RAND_LENGTH_OCTETS, RAND_LENGTH_OCTETS, - hdr->avp_value->os.len, 0); - DevAssert(rand_p != NULL); - - STRING_TO_RAND(hdr->avp_value->os.data, rand_p, ret); - return ret; -} - -static -int s6a_parse_xres(struct avp_hdr *hdr, res_t *xres) -{ - int ret = 0; - DevCheck(hdr->avp_value->os.len >= XRES_LENGTH_MIN && - hdr->avp_value->os.len <= XRES_LENGTH_MAX, XRES_LENGTH_MIN, - XRES_LENGTH_MAX, hdr->avp_value->os.len); - DevAssert(xres != NULL); - - STRING_TO_XRES(hdr->avp_value->os.data, hdr->avp_value->os.len, xres, ret); - return ret; -} - -static -int s6a_parse_autn(struct avp_hdr *hdr, uint8_t *autn) -{ - int ret = 0; - DevCheck(hdr->avp_value->os.len == AUTN_LENGTH_OCTETS, AUTN_LENGTH_OCTETS, - hdr->avp_value->os.len, 0); - DevAssert(autn != NULL); - - STRING_TO_AUTN(hdr->avp_value->os.data, autn, ret); - return ret; -} - -static -int s6a_parse_kasme(struct avp_hdr *hdr, uint8_t *kasme) -{ - int ret = 0; - DevCheck(hdr->avp_value->os.len == KASME_LENGTH_OCTETS, KASME_LENGTH_OCTETS, - hdr->avp_value->os.len, 0); - DevAssert(kasme != NULL); - - STRING_TO_KASME(hdr->avp_value->os.data, kasme, ret); - return ret; -} - -static inline -int s6a_parse_e_utran_vector(struct avp *avp_vector, eutran_vector_t *vector) -{ - int ret = 0x0f; - struct avp *avp; - struct avp_hdr *hdr; - - CHECK_FCT(fd_msg_avp_hdr(avp_vector, &hdr)); - - DevCheck(hdr->avp_code == AVP_CODE_E_UTRAN_VECTOR, - hdr->avp_code, AVP_CODE_E_UTRAN_VECTOR, 0); - - CHECK_FCT(fd_msg_browse(avp_vector, MSG_BRW_FIRST_CHILD, &avp, NULL)); - - while(avp) { - CHECK_FCT(fd_msg_avp_hdr(avp, &hdr)); - - switch(hdr->avp_code) { - case AVP_CODE_RAND: - CHECK_FCT(s6a_parse_rand(hdr, vector->rand)); - ret &= ~0x01; - break; - - case AVP_CODE_XRES: - CHECK_FCT(s6a_parse_xres(hdr, &vector->xres)); - ret &= ~0x02; - break; - - case AVP_CODE_AUTN: - CHECK_FCT(s6a_parse_autn(hdr, vector->autn)); - ret &= ~0x04; - break; - - case AVP_CODE_KASME: - CHECK_FCT(s6a_parse_kasme(hdr, vector->kasme)); - ret &= ~0x08; - break; - - default: - /* Unexpected AVP */ - S6A_ERROR("Unexpected AVP with code %d\n", hdr->avp_code); - return -1; - } - - /* Go to next AVP in the grouped AVP */ - CHECK_FCT(fd_msg_browse(avp, MSG_BRW_NEXT, &avp, NULL)); - } - - if (ret) { - S6A_ERROR("Missing AVP for E-UTRAN vector: %c%c%c%c\n", - ret & 0x01 ? 'R':'-', ret & 0x02 ? 'X':'-', - ret & 0x04 ? 'A':'-', ret & 0x08 ? 'K':'-'); - return -1; - } - - return 0; -} - -static inline -int s6a_parse_authentication_info_avp(struct avp *avp_auth_info, - authentication_info_t *authentication_info) -{ - struct avp *avp; - struct avp_hdr *hdr; - - CHECK_FCT(fd_msg_avp_hdr(avp_auth_info, &hdr)); - - DevCheck(hdr->avp_code == AVP_CODE_AUTHENTICATION_INFO, - hdr->avp_code, AVP_CODE_AUTHENTICATION_INFO, 0); - - authentication_info->nb_of_vectors = 0; - - CHECK_FCT(fd_msg_browse(avp_auth_info, MSG_BRW_FIRST_CHILD, &avp, NULL)); - - while(avp) { - CHECK_FCT(fd_msg_avp_hdr(avp, &hdr)); - - switch(hdr->avp_code) { - case AVP_CODE_E_UTRAN_VECTOR: { - DevAssert(authentication_info->nb_of_vectors == 0); - CHECK_FCT(s6a_parse_e_utran_vector(avp, &authentication_info->eutran_vector)); - authentication_info->nb_of_vectors ++; - } - break; - - default: - /* We should only receive E-UTRAN-Vectors */ - S6A_ERROR("Unexpected AVP with code %d\n", hdr->avp_code); - return -1; - } - - /* Go to next AVP in the grouped AVP */ - CHECK_FCT(fd_msg_browse(avp, MSG_BRW_NEXT, &avp, NULL)); - } - - return 0; -} - -int s6a_aia_cb(struct msg **msg, struct avp *paramavp, - struct session *sess, void *opaque, - enum disp_action *act) -{ - struct msg *ans = NULL; - struct msg *qry = NULL; - struct avp *avp = NULL; - struct avp_hdr *hdr = NULL; - - MessageDef *message_p = NULL; - s6a_auth_info_ans_t *s6a_auth_info_ans_p = NULL; - - int skip_auth_res = 0; - - DevAssert(msg != NULL); - - ans = *msg; - /* Retrieve the original query associated with the asnwer */ - CHECK_FCT(fd_msg_answ_getq(ans, &qry)); - - DevAssert(qry != NULL); - - message_p = itti_alloc_new_message(TASK_S6A, S6A_AUTH_INFO_ANS); - s6a_auth_info_ans_p = &message_p->ittiMsg.s6a_auth_info_ans; - - S6A_DEBUG("Received S6A Authentication Information Answer (AIA)\n"); - - CHECK_FCT(fd_msg_search_avp(qry, s6a_fd_cnf.dataobj_s6a_user_name, &avp)); - - if (avp) { - CHECK_FCT(fd_msg_avp_hdr(avp, &hdr)); - sprintf(s6a_auth_info_ans_p->imsi, "%*s", (int)hdr->avp_value->os.len, - hdr->avp_value->os.data); - } else { - DevMessage("Query has been freed before we received the answer\n"); - } - - /* Retrieve the result-code */ - CHECK_FCT(fd_msg_search_avp(ans, s6a_fd_cnf.dataobj_s6a_result_code, &avp)); - - if (avp) { - CHECK_FCT(fd_msg_avp_hdr(avp, &hdr)); - - s6a_auth_info_ans_p->result.present = S6A_RESULT_BASE; - s6a_auth_info_ans_p->result.choice.base = hdr->avp_value->u32; - - MSC_LOG_TX_MESSAGE( - MSC_S6A_MME, - MSC_MMEAPP_MME, - NULL,0, - "0 S6A_AUTH_INFO_ANS imsi %s %s", - s6a_auth_info_ans_p->imsi, - retcode_2_string(s6a_auth_info_ans_p->result.choice.base)); - - if (hdr->avp_value->u32 != ER_DIAMETER_SUCCESS) { - S6A_ERROR("Got error %u:%s\n", hdr->avp_value->u32, - retcode_2_string(hdr->avp_value->u32)); - goto err; - } else { - S6A_DEBUG("Received S6A Result code %u:%s\n", - s6a_auth_info_ans_p->result.choice.base, - retcode_2_string(s6a_auth_info_ans_p->result.choice.base)); - } - } else { - /* The result-code is not present, may be it is an experimental result - * avp indicating a 3GPP specific failure. - */ - CHECK_FCT(fd_msg_search_avp(ans, s6a_fd_cnf.dataobj_s6a_experimental_result, &avp)); - - if (avp) { - /* The procedure has failed within the HSS. - * NOTE: contrary to result-code, the experimental-result is a grouped - * AVP and requires parsing its childs to get the code back. - */ - s6a_auth_info_ans_p->result.present = S6A_RESULT_EXPERIMENTAL; - s6a_parse_experimental_result(avp, &s6a_auth_info_ans_p->result.choice.experimental); - - MSC_LOG_TX_MESSAGE( - MSC_S6A_MME, - MSC_MMEAPP_MME, - NULL,0, - "0 S6A_AUTH_INFO_ANS imsi %s %s", - s6a_auth_info_ans_p->imsi, - experimental_retcode_2_string(s6a_auth_info_ans_p->result.choice.experimental)); - - skip_auth_res = 1; - } else { - /* Neither result-code nor experimental-result is present -> - * totally incorrect behaviour here. - */ - MSC_LOG_TX_MESSAGE_FAILED( - MSC_S6A_MME, - MSC_MMEAPP_MME, - NULL,0, - "0 S6A_AUTH_INFO_ANS imsi %s", - s6a_auth_info_ans_p->imsi); - - S6A_ERROR("Experimental-Result and Result-Code are absent: " - "This is not a correct behaviour\n"); - goto err; - } - } - - if (skip_auth_res == 0) { - CHECK_FCT(fd_msg_search_avp(ans, s6a_fd_cnf.dataobj_s6a_authentication_info, &avp)); - - if (avp) { - CHECK_FCT(s6a_parse_authentication_info_avp(avp, &s6a_auth_info_ans_p->auth_info)); - } else { - DevMessage("We requested E-UTRAN vectors with an immediate response...\n"); - } - } - itti_send_msg_to_task(TASK_MME_APP, INSTANCE_DEFAULT, message_p); -err: - return 0; -} - -int s6a_generate_authentication_info_req(s6a_auth_info_req_t *air_p) -{ - struct avp *avp; - struct msg *msg; - struct session *sess; - - union avp_value value; - - DevAssert(air_p != NULL); - - /* Create the new update location request message */ - CHECK_FCT(fd_msg_new(s6a_fd_cnf.dataobj_s6a_air, 0, &msg)); - - /* Create a new session */ - CHECK_FCT(fd_sess_new(&sess, fd_g_config->cnf_diamid, - fd_g_config->cnf_diamid_len, (os0_t)"apps6a", 6)); - { - os0_t sid; - size_t sidlen; - CHECK_FCT(fd_sess_getsid(sess, &sid, &sidlen)); - CHECK_FCT(fd_msg_avp_new(s6a_fd_cnf.dataobj_s6a_session_id, 0, &avp)); - value.os.data = sid; - value.os.len = sidlen; - CHECK_FCT(fd_msg_avp_setvalue(avp, &value)); - CHECK_FCT(fd_msg_avp_add(msg, MSG_BRW_FIRST_CHILD, avp)); - } - - CHECK_FCT(fd_msg_avp_new(s6a_fd_cnf.dataobj_s6a_auth_session_state, 0, &avp)); - /* No State maintained */ - value.i32 = 1; - CHECK_FCT(fd_msg_avp_setvalue(avp, &value)); - CHECK_FCT(fd_msg_avp_add(msg, MSG_BRW_LAST_CHILD, avp)); - - /* Add Origin_Host & Origin_Realm */ - CHECK_FCT(fd_msg_add_origin(msg, 0)); - - config_read_lock(&mme_config); - - /* Destination Host */ - { - char host[100]; - size_t hostlen; - - memset(host, 0, 100); - strcat(host, mme_config.s6a_config.hss_host_name); - strcat(host, "."); - strcat(host, mme_config.realm); - - hostlen = strlen(host); - - CHECK_FCT(fd_msg_avp_new(s6a_fd_cnf.dataobj_s6a_destination_host, 0, &avp)); - value.os.data = (unsigned char *)host; - value.os.len = hostlen; - CHECK_FCT(fd_msg_avp_setvalue(avp, &value)); - - CHECK_FCT(fd_msg_avp_add(msg, MSG_BRW_LAST_CHILD, avp)); - } - /* Destination_Realm */ - { - char *realm = mme_config.realm; - size_t realmlen = strlen(realm); - - CHECK_FCT(fd_msg_avp_new(s6a_fd_cnf.dataobj_s6a_destination_realm, 0, &avp)); - value.os.data = (unsigned char *)realm; - value.os.len = realmlen; - CHECK_FCT(fd_msg_avp_setvalue(avp, &value)); - - CHECK_FCT(fd_msg_avp_add(msg, MSG_BRW_LAST_CHILD, avp)); - } - - config_unlock(&mme_config); - - /* Adding the User-Name (IMSI) */ - CHECK_FCT(fd_msg_avp_new(s6a_fd_cnf.dataobj_s6a_user_name, 0, &avp)); - value.os.data = (unsigned char *)air_p->imsi; - value.os.len = strlen(air_p->imsi); - CHECK_FCT(fd_msg_avp_setvalue(avp, &value)); - CHECK_FCT(fd_msg_avp_add(msg, MSG_BRW_LAST_CHILD, avp)); - - /* Adding the visited plmn id */ - { - uint8_t plmn[3] = { 0x00, 0x00, 0x00 }; //{ 0x02, 0xF8, 0x29 }; - - CHECK_FCT(fd_msg_avp_new(s6a_fd_cnf.dataobj_s6a_visited_plmn_id, 0, &avp)); - - - PLMN_T_TO_TBCD(air_p->visited_plmn, - plmn, - mme_config_find_mnc_length(air_p->visited_plmn.MCCdigit1, - air_p->visited_plmn.MCCdigit2, - air_p->visited_plmn.MCCdigit3, - air_p->visited_plmn.MNCdigit1, - air_p->visited_plmn.MNCdigit2, - air_p->visited_plmn.MNCdigit3 - ) - ); - value.os.data = plmn; - value.os.len = 3; - CHECK_FCT(fd_msg_avp_setvalue(avp, &value)); - - CHECK_FCT(fd_msg_avp_add(msg, MSG_BRW_LAST_CHILD, avp)); - S6A_DEBUG("%s plmn: %02X%02X%02X\n", - __FUNCTION__, - plmn[0], - plmn[1], - plmn[2]); - S6A_DEBUG("%s visited_plmn: %02X%02X%02X\n", - __FUNCTION__, - value.os.data[0], - value.os.data[1], - value.os.data[2]); - } - /* Adding the requested E-UTRAN authentication info AVP */ - { - struct avp *child_avp; - CHECK_FCT(fd_msg_avp_new(s6a_fd_cnf.dataobj_s6a_req_eutran_auth_info, 0, &avp)); - - /* Add the number of requested vectors */ - CHECK_FCT(fd_msg_avp_new(s6a_fd_cnf.dataobj_s6a_number_of_requested_vectors, 0, &child_avp)); - value.u32 = air_p->nb_of_vectors; - CHECK_FCT(fd_msg_avp_setvalue(child_avp, &value)); - CHECK_FCT(fd_msg_avp_add(avp, MSG_BRW_LAST_CHILD, child_avp)); - - /* We want to use the vectors immediately in HSS so we have to add - * the Immediate-Response-Preferred AVP. - * Value of this AVP is not significant. - */ - CHECK_FCT(fd_msg_avp_new(s6a_fd_cnf.dataobj_s6a_immediate_response_pref, 0, &child_avp)); - value.u32 = 0; - CHECK_FCT(fd_msg_avp_setvalue(child_avp, &value)); - CHECK_FCT(fd_msg_avp_add(avp, MSG_BRW_LAST_CHILD, child_avp)); - - /* Re-synchronization information containing the AUTS computed at USIM */ - if (air_p->re_synchronization) { - CHECK_FCT(fd_msg_avp_new(s6a_fd_cnf.dataobj_s6a_re_synchronization_info, 0, &child_avp)); - value.os.len = AUTS_LENGTH; - value.os.data = air_p->auts; - CHECK_FCT(fd_msg_avp_setvalue(child_avp, &value)); - CHECK_FCT(fd_msg_avp_add(avp, MSG_BRW_LAST_CHILD, child_avp)); - } - - CHECK_FCT(fd_msg_avp_add(msg, MSG_BRW_LAST_CHILD, avp)); - } - CHECK_FCT(fd_msg_send(&msg, NULL, NULL)); - - return 0; -} diff --git a/openair-cn/S6A/s6a_defs.h b/openair-cn/S6A/s6a_defs.h deleted file mode 100644 index c1a138b23e..0000000000 --- a/openair-cn/S6A/s6a_defs.h +++ /dev/null @@ -1,203 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -#if HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include - -#include "mme_config.h" -#include "queue.h" - -#ifndef S6A_DEFS_H_ -#define S6A_DEFS_H_ - -#ifndef S6A_DEBUG -# define S6A_DEBUG(x, args...) do { fprintf(stdout, "[S6A] [D]"x, ##args); } while(0) -#endif -#ifndef S6A_ERROR -# define S6A_ERROR(x, args...) do { fprintf(stderr, "[S6A] [E]"x, ##args); } while(0) -#endif - -#define VENDOR_3GPP (10415) -#define APP_S6A (16777251) - -/* Errors that fall within the Permanent Failures category shall be used to - * inform the peer that the request has failed, and should not be attempted - * again. The Result-Code AVP values defined in Diameter Base Protocol RFC 3588 - * shall be applied. When one of the result codes defined here is included in a - * response, it shall be inside an Experimental-Result AVP and the Result-Code - * AVP shall be absent. - */ -#define DIAMETER_ERROR_USER_UNKNOWN (5001) -#define DIAMETER_ERROR_ROAMING_NOT_ALLOWED (5004) -#define DIAMETER_ERROR_UNKNOWN_EPS_SUBSCRIPTION (5420) -#define DIAMETER_ERROR_RAT_NOT_ALLOWED (5421) -#define DIAMETER_ERROR_EQUIPMENT_UNKNOWN (5422) -#define DIAMETER_ERROR_UNKOWN_SERVING_NODE (5423) - -/* Result codes that fall within the transient failures category shall be used - * to inform a peer that the request could not be satisfied at the time it was - * received, but may be able to satisfy the request in the future. The - * Result-Code AVP values defined in Diameter Base Protocol RFC 3588 shall be - * applied. When one of the result codes defined here is included in a response, - * it shall be inside an Experimental-Result AVP and the Result-Code AVP shall - * be absent. - */ -#define DIAMETER_AUTHENTICATION_DATA_UNAVAILABLE (4181) - -#define DIAMETER_ERROR_IS_VENDOR(x) \ - ((x == DIAMETER_ERROR_USER_UNKNOWN) || \ - (x == DIAMETER_ERROR_ROAMING_NOT_ALLOWED) || \ - (x == DIAMETER_ERROR_UNKNOWN_EPS_SUBSCRIPTION) || \ - (x == DIAMETER_ERROR_RAT_NOT_ALLOWED) || \ - (x == DIAMETER_ERROR_EQUIPMENT_UNKNOWN) || \ - (x == DIAMETER_AUTHENTICATION_DATA_UNAVAILABLE) || \ - (x == DIAMETER_ERROR_UNKOWN_SERVING_NODE)) - -typedef struct { - struct dict_object *dataobj_s6a_vendor; /* s6a vendor object */ - struct dict_object *dataobj_s6a_app; /* s6a application object */ - - /* Commands */ - struct dict_object *dataobj_s6a_air; /* s6a authentication request */ - struct dict_object *dataobj_s6a_aia; /* s6a authentication answer */ - struct dict_object *dataobj_s6a_ulr; /* s6a update location request */ - struct dict_object *dataobj_s6a_ula; /* s6a update location asnwer */ - struct dict_object *dataobj_s6a_pur; /* s6a purge ue request */ - struct dict_object *dataobj_s6a_pua; /* s6a purge ue answer */ - struct dict_object *dataobj_s6a_clr; /* s6a Cancel Location req */ - struct dict_object *dataobj_s6a_cla; /* s6a Cancel Location ans */ - - /* Some standard basic AVPs */ - struct dict_object *dataobj_s6a_destination_host; - struct dict_object *dataobj_s6a_destination_realm; - struct dict_object *dataobj_s6a_user_name; - struct dict_object *dataobj_s6a_session_id; - struct dict_object *dataobj_s6a_auth_session_state; - struct dict_object *dataobj_s6a_result_code; - struct dict_object *dataobj_s6a_experimental_result; - - /* S6A specific AVPs */ - struct dict_object *dataobj_s6a_visited_plmn_id; - struct dict_object *dataobj_s6a_rat_type; - struct dict_object *dataobj_s6a_ulr_flags; - struct dict_object *dataobj_s6a_ula_flags; - struct dict_object *dataobj_s6a_subscription_data; - struct dict_object *dataobj_s6a_req_eutran_auth_info; - struct dict_object *dataobj_s6a_number_of_requested_vectors; - struct dict_object *dataobj_s6a_immediate_response_pref; - struct dict_object *dataobj_s6a_authentication_info; - struct dict_object *dataobj_s6a_re_synchronization_info; - struct dict_object *dataobj_s6a_service_selection; - struct dict_object *dataobj_s6a_ue_srvcc_cap; - - /* Handlers */ - struct disp_hdl *aia_hdl; /* Authentication Information Answer Handle */ - struct disp_hdl *ula_hdl; /* Update Location Answer Handle */ - struct disp_hdl *pua_hdl; /* Purge UE Answer Handle */ - struct disp_hdl *clr_hdl; /* Cancel Location Request Handle */ -} s6a_fd_cnf_t; - -extern s6a_fd_cnf_t s6a_fd_cnf; - -#define ULR_SINGLE_REGISTRATION_IND (1U) -#define ULR_S6A_S6D_INDICATOR (1U << 1) -#define ULR_SKIP_SUBSCRIBER_DATA (1U << 2) -#define ULR_GPRS_SUBSCRIPTION_DATA_IND (1U << 3) -#define ULR_NODE_TYPE_IND (1U << 4) -#define ULR_INITIAL_ATTACH_IND (1U << 5) -#define ULR_PS_LCS_SUPPORTED_BY_UE (1U << 6) - -#define ULA_SEPARATION_IND (1U) - -#define FLAG_IS_SET(x, flag) \ - ((x) & (flag)) - -#define FLAGS_SET(x, flags) \ - ((x) |= (flags)) - -#define FLAGS_CLEAR(x, flags) \ - ((x) = (x) & ~(flags)) - -/* IANA defined IP address type */ -#define IANA_IPV4 (0x1) -#define IANA_IPV6 (0x2) - -#define AVP_CODE_VENDOR_ID (266) -#define AVP_CODE_EXPERIMENTAL_RESULT (297) -#define AVP_CODE_EXPERIMENTAL_RESULT_CODE (298) -#define AVP_CODE_SERVICE_SELECTION (493) -#define AVP_CODE_BANDWIDTH_UL (516) -#define AVP_CODE_BANDWIDTH_DL (515) -#define AVP_CODE_MSISDN (701) -#define AVP_CODE_SERVED_PARTY_IP_ADDRESS (848) -#define AVP_CODE_QCI (1028) -#define AVP_CODE_ALLOCATION_RETENTION_PRIORITY (1034) -#define AVP_CODE_PRIORITY_LEVEL (1046) -#define AVP_CODE_PRE_EMPTION_CAPABILITY (1047) -#define AVP_CODE_PRE_EMPTION_VULNERABILITY (1048) -#define AVP_CODE_SUBSCRIPTION_DATA (1400) -#define AVP_CODE_AUTHENTICATION_INFO (1413) -#define AVP_CODE_E_UTRAN_VECTOR (1414) -#define AVP_CODE_NETWORK_ACCESS_MODE (1417) -#define AVP_CODE_CONTEXT_IDENTIFIER (1423) -#define AVP_CODE_SUBSCRIBER_STATUS (1424) -#define AVP_CODE_ACCESS_RESTRICTION_DATA (1426) -#define AVP_CODE_ALL_APN_CONFIG_INC_IND (1428) -#define AVP_CODE_APN_CONFIGURATION_PROFILE (1429) -#define AVP_CODE_APN_CONFIGURATION (1430) -#define AVP_CODE_EPS_SUBSCRIBED_QOS_PROFILE (1431) -#define AVP_CODE_AMBR (1435) -#define AVP_CODE_RAND (1447) -#define AVP_CODE_XRES (1448) -#define AVP_CODE_AUTN (1449) -#define AVP_CODE_KASME (1450) -#define AVP_CODE_PDN_TYPE (1456) -#define AVP_CODE_SUBSCRIBED_PERIODIC_RAU_TAU_TIMER (1619) - -int s6a_init(const mme_config_t *mme_config); - -int s6a_fd_new_peer(void); - -void s6a_peer_connected_cb(struct peer_info *info, void *arg); - -int s6a_fd_init_dict_objs(void); - -int s6a_parse_subscription_data(struct avp *avp_subscription_data, - subscription_data_t *subscription_data); - -int s6a_parse_experimental_result(struct avp *avp, s6a_experimental_result_t *ptr); -char *experimental_retcode_2_string(uint32_t ret_code); -char *retcode_2_string(uint32_t ret_code); - - -#endif /* S6A_DEFS_H_ */ diff --git a/openair-cn/S6A/s6a_dict.c b/openair-cn/S6A/s6a_dict.c deleted file mode 100644 index 20a43a67e5..0000000000 --- a/openair-cn/S6A/s6a_dict.c +++ /dev/null @@ -1,182 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -#if HAVE_CONFIG_H -# include "config.h" -#endif - -#include "intertask_interface.h" -#include "s6a_defs.h" -#include "s6a_messages.h" -#include "assertions.h" - -#define CHECK_FD_FCT(fCT) DevAssert(fCT == 0); - -/*! \file s6a_dict.c - * \brief Initialize s6a dictionnary and setup callbacks for procedures - * \author Sebastien ROUX - * \date 2013 - * \version 0.1 - */ - -int s6a_fd_init_dict_objs(void) -{ - struct disp_when when; - - vendor_id_t vendor_3gpp = VENDOR_3GPP; - application_id_t app_s6a = APP_S6A; - - /* Pre-loading vendor object */ - CHECK_FD_FCT(fd_dict_search(fd_g_config->cnf_dict, - DICT_VENDOR, - VENDOR_BY_ID, - (void *)&vendor_3gpp, - &s6a_fd_cnf.dataobj_s6a_vendor, - ENOENT)); - - /* Pre-loading application object */ - CHECK_FD_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_APPLICATION, - APPLICATION_BY_ID, (void *)&app_s6a, - &s6a_fd_cnf.dataobj_s6a_app, ENOENT)); - - /* Pre-loading commands objects */ - CHECK_FD_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_COMMAND, - CMD_BY_NAME, "Authentication-Information-Request", - &s6a_fd_cnf.dataobj_s6a_air, ENOENT)); - CHECK_FD_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_COMMAND, - CMD_BY_NAME, "Authentication-Information-Answer", - &s6a_fd_cnf.dataobj_s6a_aia, ENOENT)); - - CHECK_FD_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_COMMAND, - CMD_BY_NAME, "Update-Location-Request", - &s6a_fd_cnf.dataobj_s6a_ulr, ENOENT)); - CHECK_FD_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_COMMAND, - CMD_BY_NAME, "Update-Location-Answer", - &s6a_fd_cnf.dataobj_s6a_ula, ENOENT)); - - CHECK_FD_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_COMMAND, - CMD_BY_NAME, "Purge-UE-Request", - &s6a_fd_cnf.dataobj_s6a_pur, ENOENT)); - CHECK_FD_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_COMMAND, - CMD_BY_NAME, "Purge-UE-Answer", - &s6a_fd_cnf.dataobj_s6a_pua, ENOENT)); - - CHECK_FD_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_COMMAND, - CMD_BY_NAME, "Cancel-Location-Request", - &s6a_fd_cnf.dataobj_s6a_clr, ENOENT)); - CHECK_FD_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_COMMAND, - CMD_BY_NAME, "Cancel-Location-Answer", - &s6a_fd_cnf.dataobj_s6a_cla, ENOENT)); - - /* Pre-loading base avps */ - CHECK_FD_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME, "Destination-Host", - &s6a_fd_cnf.dataobj_s6a_destination_host, ENOENT)); - CHECK_FD_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME, "Destination-Realm", - &s6a_fd_cnf.dataobj_s6a_destination_realm, ENOENT)); - CHECK_FD_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME, "User-Name", - &s6a_fd_cnf.dataobj_s6a_user_name, ENOENT)); - CHECK_FD_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME, "Session-Id", - &s6a_fd_cnf.dataobj_s6a_session_id, ENOENT)); - CHECK_FD_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME, "Auth-Session-State", - &s6a_fd_cnf.dataobj_s6a_auth_session_state, ENOENT)); - CHECK_FD_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME, "Result-Code", - &s6a_fd_cnf.dataobj_s6a_result_code, ENOENT)); - CHECK_FD_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME, "Experimental-Result", - &s6a_fd_cnf.dataobj_s6a_experimental_result, ENOENT)); - - /* Pre-loading S6A specifics AVPs */ - CHECK_FD_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "Visited-PLMN-Id", - &s6a_fd_cnf.dataobj_s6a_visited_plmn_id, ENOENT)); - CHECK_FD_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "RAT-Type", - &s6a_fd_cnf.dataobj_s6a_rat_type, ENOENT)); - CHECK_FD_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "ULR-Flags", - &s6a_fd_cnf.dataobj_s6a_ulr_flags, ENOENT)); - CHECK_FD_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "ULA-Flags", - &s6a_fd_cnf.dataobj_s6a_ula_flags, ENOENT)); - CHECK_FD_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "Subscription-Data", - &s6a_fd_cnf.dataobj_s6a_subscription_data, ENOENT)); - CHECK_FD_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "Requested-EUTRAN-Authentication-Info", - &s6a_fd_cnf.dataobj_s6a_req_eutran_auth_info, ENOENT)); - CHECK_FD_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "Number-Of-Requested-Vectors", - &s6a_fd_cnf.dataobj_s6a_number_of_requested_vectors, ENOENT)); - CHECK_FD_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "Immediate-Response-Preferred", - &s6a_fd_cnf.dataobj_s6a_immediate_response_pref, ENOENT)); - CHECK_FD_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "Authentication-Info", - &s6a_fd_cnf.dataobj_s6a_authentication_info, ENOENT)); - CHECK_FD_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "Re-Synchronization-Info", - &s6a_fd_cnf.dataobj_s6a_re_synchronization_info, ENOENT)); - CHECK_FD_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "Service-Selection", - &s6a_fd_cnf.dataobj_s6a_service_selection, ENOENT)); - CHECK_FD_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, - AVP_BY_NAME_ALL_VENDORS, "UE-SRVCC-Capability", - &s6a_fd_cnf.dataobj_s6a_ue_srvcc_cap, ENOENT)); - - /* Register callbacks */ - memset(&when, 0, sizeof(when)); - - when.command = s6a_fd_cnf.dataobj_s6a_ula; - when.app = s6a_fd_cnf.dataobj_s6a_app; - - /* Register the callback for Update Location Answer S6A Application */ - CHECK_FD_FCT(fd_disp_register(s6a_ula_cb, DISP_HOW_CC, &when, NULL, - &s6a_fd_cnf.ula_hdl)); - DevAssert(s6a_fd_cnf.ula_hdl != NULL); - - when.command = s6a_fd_cnf.dataobj_s6a_aia; - when.app = s6a_fd_cnf.dataobj_s6a_app; - - /* Register the callback for Authentication Information Answer S6A Application */ - CHECK_FD_FCT(fd_disp_register(s6a_aia_cb, DISP_HOW_CC, &when, NULL, - &s6a_fd_cnf.aia_hdl)); - DevAssert(s6a_fd_cnf.aia_hdl != NULL); - - /* Advertise the support for the test application in the peer */ - CHECK_FD_FCT(fd_disp_app_support(s6a_fd_cnf.dataobj_s6a_app, - s6a_fd_cnf.dataobj_s6a_vendor, 1, 0)); - - return 0; -} diff --git a/openair-cn/S6A/s6a_error.c b/openair-cn/S6A/s6a_error.c deleted file mode 100644 index 28bf5dd4e2..0000000000 --- a/openair-cn/S6A/s6a_error.c +++ /dev/null @@ -1,129 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -#include - -#include "common_types.h" -#include "s6a_defs.h" - -#include "assertions.h" - -int s6a_parse_experimental_result(struct avp *avp, s6a_experimental_result_t *ptr) -{ - struct avp_hdr *hdr; - struct avp *child_avp = NULL; - - if (!avp) { - return EINVAL; - } - - CHECK_FCT(fd_msg_avp_hdr(avp, &hdr)); - DevAssert(hdr->avp_code == AVP_CODE_EXPERIMENTAL_RESULT); - CHECK_FCT(fd_msg_browse(avp, MSG_BRW_FIRST_CHILD, &child_avp, NULL)); - - while(child_avp) { - CHECK_FCT(fd_msg_avp_hdr(child_avp, &hdr)); - - switch(hdr->avp_code) { - case AVP_CODE_EXPERIMENTAL_RESULT_CODE: - S6A_ERROR("Got experimental error %u:%s\n", hdr->avp_value->u32, - experimental_retcode_2_string(hdr->avp_value->u32)); - - if (ptr) { - *ptr = (s6a_experimental_result_t)hdr->avp_value->u32; - } - - break; - - case AVP_CODE_VENDOR_ID: - DevCheck(hdr->avp_value->u32 == 10415, hdr->avp_value->u32, - AVP_CODE_VENDOR_ID, 10415); - break; - - default: - return -1; - } - - /* Go to next AVP in the grouped AVP */ - CHECK_FCT(fd_msg_browse(child_avp, MSG_BRW_NEXT, &child_avp, NULL)); - } - - return 0; -} - -char *experimental_retcode_2_string(uint32_t ret_code) -{ - switch(ret_code) { - /* Experimental-Result-Codes */ - case DIAMETER_ERROR_USER_UNKNOWN: - return "DIAMETER_ERROR_USER_UNKNOWN"; - - case DIAMETER_ERROR_ROAMING_NOT_ALLOWED: - return "DIAMETER_ERROR_ROAMING_NOT_ALLOWED"; - - case DIAMETER_ERROR_UNKNOWN_EPS_SUBSCRIPTION: - return "DIAMETER_ERROR_UNKNOWN_EPS_SUBSCRIPTION"; - - case DIAMETER_ERROR_RAT_NOT_ALLOWED: - return "DIAMETER_ERROR_RAT_NOT_ALLOWED"; - - case DIAMETER_ERROR_EQUIPMENT_UNKNOWN: - return "DIAMETER_ERROR_EQUIPMENT_UNKNOWN"; - - case DIAMETER_ERROR_UNKOWN_SERVING_NODE: - return "DIAMETER_ERROR_UNKOWN_SERVING_NODE"; - - case DIAMETER_AUTHENTICATION_DATA_UNAVAILABLE: - return "DIAMETER_AUTHENTICATION_DATA_UNAVAILABLE"; - - default: - break; - } - - return "DIAMETER_AVP_UNSUPPORTED"; -} - -char *retcode_2_string(uint32_t ret_code) -{ - switch(ret_code) { - case ER_DIAMETER_SUCCESS: - return "DIAMETER_SUCCESS"; - - case ER_DIAMETER_MISSING_AVP: - return "DIAMETER_MISSING_AVP"; - - case ER_DIAMETER_INVALID_AVP_VALUE: - return "DIAMETER_INVALID_AVP_VALUE"; - - default: - break; - } - - return "DIAMETER_AVP_UNSUPPORTED"; -} diff --git a/openair-cn/S6A/s6a_messages.h b/openair-cn/S6A/s6a_messages.h deleted file mode 100644 index f98b4f827a..0000000000 --- a/openair-cn/S6A/s6a_messages.h +++ /dev/null @@ -1,46 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -#ifndef S6A_MESSAGES_H_ -#define S6A_MESSAGES_H_ - -int s6a_generate_update_location(s6a_update_location_req_t *ulr_p); -int s6a_generate_authentication_info_req(s6a_auth_info_req_t *uar_p); - -int s6a_ula_cb(struct msg **msg, struct avp *paramavp, - struct session *sess, void *opaque, - enum disp_action *act); -int s6a_aia_cb(struct msg **msg, struct avp *paramavp, - struct session *sess, void *opaque, - enum disp_action *act); - -int s6a_parse_subscription_data(struct avp *avp_subscription_data, - subscription_data_t *subscription_data); - -#endif /* S6A_MESSAGES_H_ */ diff --git a/openair-cn/S6A/s6a_peer.c b/openair-cn/S6A/s6a_peer.c deleted file mode 100644 index c611cb6981..0000000000 --- a/openair-cn/S6A/s6a_peer.c +++ /dev/null @@ -1,149 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -/*! \file s6a_peers.c - * \brief Add a new entity to the list of peers to connect - * \author Sebastien ROUX - * \date 2013 - * \version 0.1 - */ - -#include -#include - -#include "common_types.h" -#include "intertask_interface.h" -#include "s6a_defs.h" -#include "s6a_messages.h" - -#include "assertions.h" - -void s6a_peer_connected_cb(struct peer_info *info, void *arg) -{ - if (info == NULL) { - S6A_ERROR("Failed to connect to HSS entity\n"); - } else { - MessageDef *message_p; - - S6A_DEBUG("Peer %*s is now connected...\n", - (int)info->pi_diamidlen, info->pi_diamid); - - /* Inform S1AP that connection to HSS is established */ - message_p = itti_alloc_new_message(TASK_S6A, ACTIVATE_MESSAGE); - - itti_send_msg_to_task(TASK_S1AP, INSTANCE_DEFAULT, message_p); - - } - - /* For test */ -#if 0 - s6a_auth_info_req_t s6a_air; - - memset(&s6a_air, 0, sizeof(s6a_auth_info_req_t)); - sprintf(s6a_air.imsi, "%14llu", 20834123456789ULL); - - s6a_air.nb_of_vectors = 1; - s6a_air.visited_plmn.MCCdigit2 = 0, - s6a_air.visited_plmn.MCCdigit1 = 8, - s6a_air.visited_plmn.MCCdigit3 = 2, - s6a_air.visited_plmn.MNCdigit1 = 0, - s6a_air.visited_plmn.MNCdigit2 = 3, - s6a_air.visited_plmn.MNCdigit3 = 4, - - s6a_generate_authentication_info_req(&s6a_air); - // #else - // s6a_update_location_req_t s6a_ulr; - // - // memset(&s6a_ulr, 0, sizeof(s6a_update_location_req_t)); - // - // sprintf(s6a_ulr.imsi, "%14llu", 20834123456789ULL); - // s6a_ulr.initial_attach = INITIAL_ATTACH; - // s6a_ulr.rat_type = RAT_EUTRAN; - // s6a_generate_update_location(&s6a_ulr); -#endif -} - -int s6a_fd_new_peer(void) -{ - char host_name[100]; - size_t host_name_len; - char *hss_name; - - int ret = 0; - struct peer_info info; - - memset(&info, 0, sizeof(struct peer_info)); - - if (config_read_lock(&mme_config) != 0) { - S6A_ERROR("Failed to lock configuration for reading\n"); - return -1; - } - - if(fd_g_config->cnf_diamid != NULL) { - free(fd_g_config->cnf_diamid); - fd_g_config->cnf_diamid_len = 0; - } - - DevAssert(gethostname(host_name, 100) == 0); - - host_name_len = strlen(host_name); - host_name[host_name_len] = '.'; - host_name[host_name_len+1] = '\0'; - - strcat(host_name, mme_config.realm); - fd_g_config->cnf_diamid = strdup(host_name); - fd_g_config->cnf_diamid_len = strlen(fd_g_config->cnf_diamid); - - S6A_DEBUG("Diameter identity of MME: %s with length: %zd\n", - fd_g_config->cnf_diamid, fd_g_config->cnf_diamid_len); - - hss_name = calloc(1,100); - strcat(hss_name, mme_config.s6a_config.hss_host_name); - strcat(hss_name, "."); - strcat(hss_name, mme_config.realm); - info.pi_diamid = hss_name; - info.pi_diamidlen = strlen(info.pi_diamid); - - S6A_DEBUG("Diameter identity of HSS: %s with length: %zd\n", - info.pi_diamid, info.pi_diamidlen); - - info.config.pic_flags.sec = PI_SEC_NONE; - info.config.pic_flags.pro4 = PI_P4_SCTP; - - info.config.pic_flags.persist = PI_PRST_NONE; - - CHECK_FCT(fd_peer_add(&info, "", s6a_peer_connected_cb, NULL)); - - if (config_unlock(&mme_config) != 0) { - S6A_ERROR("Failed to unlock configuration\n"); - return -1; - } - - return ret; -} diff --git a/openair-cn/S6A/s6a_subscription_data.c b/openair-cn/S6A/s6a_subscription_data.c deleted file mode 100644 index 75aed74b69..0000000000 --- a/openair-cn/S6A/s6a_subscription_data.c +++ /dev/null @@ -1,446 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -#include - -#include "common_types.h" -#include "s6a_defs.h" - -#include "assertions.h" - -static inline -int s6a_parse_subscriber_status(struct avp_hdr *hdr_sub_status, - subscriber_status_t *sub_status) -{ - DevCheck(hdr_sub_status->avp_value->u32 < SS_MAX, - hdr_sub_status->avp_value->u32, SS_MAX, 0); - - *sub_status = hdr_sub_status->avp_value->u32; - - return 0; -} - -static inline -int s6a_parse_msisdn(struct avp_hdr *hdr_msisdn, char *msisdn, uint8_t *length) -{ - int ret; - - DevCheck(hdr_msisdn->avp_value->os.len <= MSISDN_LENGTH, - hdr_msisdn->avp_value->os.len, MSISDN_LENGTH, 0); - - if (hdr_msisdn->avp_value->os.len == 0) - return 0; - - ret = sprintf(msisdn, "%*s", (int)hdr_msisdn->avp_value->os.len, - hdr_msisdn->avp_value->os.data); - - *length = ret; - - return 0; -} - -static inline -int s6a_parse_network_access_mode(struct avp_hdr *hdr_network_am, - network_access_mode_t *access_mode) -{ - DevCheck(hdr_network_am->avp_value->u32 < NAM_MAX && - hdr_network_am->avp_value->u32 != NAM_RESERVED, - hdr_network_am->avp_value->u32, NAM_MAX, NAM_RESERVED); - - *access_mode = hdr_network_am->avp_value->u32; - - return 0; -} - -static inline -int s6a_parse_access_restriction_data(struct avp_hdr *hdr_access_restriction, - access_restriction_t *access_restriction) -{ - DevCheck(hdr_access_restriction->avp_value->u32 < ARD_MAX, - hdr_access_restriction->avp_value->u32, ARD_MAX, 0); - *access_restriction = hdr_access_restriction->avp_value->u32; - return 0; -} - -static inline -int s6a_parse_bitrate(struct avp_hdr *hdr_bitrate, bitrate_t *bitrate) -{ - *bitrate = hdr_bitrate->avp_value->u32; - return 0; -} - -static inline -int s6a_parse_ambr(struct avp *avp_ambr, ambr_t *ambr) -{ - struct avp *avp = NULL; - struct avp_hdr *hdr; - - CHECK_FCT(fd_msg_browse(avp_ambr, MSG_BRW_FIRST_CHILD, &avp, NULL)); - - if (!avp) { - /* Child avps for ambr are mandatory */ - return -1; - } - - while(avp) { - CHECK_FCT(fd_msg_avp_hdr(avp, &hdr)); - - switch(hdr->avp_code) { - case AVP_CODE_BANDWIDTH_UL: - CHECK_FCT(s6a_parse_bitrate(hdr, &ambr->br_ul)); - break; - - case AVP_CODE_BANDWIDTH_DL: - CHECK_FCT(s6a_parse_bitrate(hdr, &ambr->br_dl)); - break; - - default: - return -1; - } - - /* Go to next AVP in the grouped AVP */ - CHECK_FCT(fd_msg_browse(avp, MSG_BRW_NEXT, &avp, NULL)); - } - - return 0; -} - -static inline -int s6a_parse_all_apn_conf_inc_ind(struct avp_hdr *hdr, all_apn_conf_ind_t *ptr) -{ - DevCheck(hdr->avp_value->u32 < ALL_APN_MAX, - hdr->avp_value->u32, ALL_APN_MAX, 0); - *ptr = hdr->avp_value->u32; - return 0; -} - -static inline -int s6a_parse_pdn_type(struct avp_hdr *hdr, pdn_type_t *pdn_type) -{ - DevCheck(hdr->avp_value->u32 < IP_MAX, - hdr->avp_value->u32, IP_MAX, 0); - *pdn_type = hdr->avp_value->u32; - return 0; -} - -static inline -int s6a_parse_service_selection(struct avp_hdr *hdr_service_selection, - char *service_selection, int *length) -{ - DevCheck(hdr_service_selection->avp_value->os.len <= APN_MAX_LENGTH, - hdr_service_selection->avp_value->os.len, APN_MAX_LENGTH, 0); - *length = sprintf(service_selection, "%*s", - (int)hdr_service_selection->avp_value->os.len, - hdr_service_selection->avp_value->os.data); - return 0; -} - -static inline -int s6a_parse_qci(struct avp_hdr *hdr, qci_t *qci) -{ - DevCheck(hdr->avp_value->u32 < QCI_MAX, - hdr->avp_value->u32, QCI_MAX, 0); - *qci = hdr->avp_value->u32; - return 0; -} - -static inline -int s6a_parse_priority_level(struct avp_hdr *hdr, priority_level_t *priority_level) -{ - DevCheck(hdr->avp_value->u32 <= PRIORITY_LEVEL_MAX && - hdr->avp_value->u32 >= PRIORITY_LEVEL_MIN, hdr->avp_value->u32, - PRIORITY_LEVEL_MAX, PRIORITY_LEVEL_MIN); - *priority_level = (priority_level_t)hdr->avp_value->u32; - return 0; -} - -static inline -int s6a_parse_pre_emp_capability(struct avp_hdr *hdr, pre_emp_capability_t *pre_emp_capability) -{ - DevCheck(hdr->avp_value->u32 < PRE_EMPTION_CAPABILITY_MAX, hdr->avp_value->u32, - PRE_EMPTION_CAPABILITY_MAX, 0); - *pre_emp_capability = hdr->avp_value->u32; - return 0; -} - -static inline -int s6a_parse_pre_emp_vulnerability(struct avp_hdr *hdr, pre_emp_vulnerability_t *pre_emp_vulnerability) -{ - DevCheck(hdr->avp_value->u32 < PRE_EMPTION_VULNERABILITY_MAX, hdr->avp_value->u32, - PRE_EMPTION_VULNERABILITY_MAX, 0); - *pre_emp_vulnerability = hdr->avp_value->u32; - return 0; -} - -static inline -int s6a_parse_allocation_retention_priority(struct avp *avp_arp, - allocation_retention_priority_t *ptr) -{ - struct avp *avp = NULL; - struct avp_hdr *hdr; - - /* If the Pre-emption-Capability AVP is not present in the - * Allocation-Retention-Priority AVP, the default value shall be - * PRE-EMPTION_CAPABILITY_DISABLED (1). - */ - ptr->pre_emp_capability = PRE_EMPTION_CAPABILITY_DISABLED; - - /* If the Pre-emption-Vulnerability AVP is not present in the - * Allocation-Retention-Priority AVP, the default value shall be - * PRE-EMPTION_VULNERABILITY_ENABLED (0). - */ - ptr->pre_emp_vulnerability = PRE_EMPTION_VULNERABILITY_ENABLED; - - CHECK_FCT(fd_msg_browse(avp_arp, MSG_BRW_FIRST_CHILD, &avp, NULL)); - - while(avp) { - CHECK_FCT(fd_msg_avp_hdr(avp, &hdr)); - - switch(hdr->avp_code) { - case AVP_CODE_PRIORITY_LEVEL: - CHECK_FCT(s6a_parse_priority_level(hdr, &ptr->priority_level)); - break; - - case AVP_CODE_PRE_EMPTION_CAPABILITY: - CHECK_FCT(s6a_parse_pre_emp_capability(hdr, &ptr->pre_emp_capability)); - break; - - case AVP_CODE_PRE_EMPTION_VULNERABILITY: - CHECK_FCT(s6a_parse_pre_emp_vulnerability(hdr, &ptr->pre_emp_vulnerability)); - break; - - default: - return -1; - } - - /* Go to next AVP in the grouped AVP */ - CHECK_FCT(fd_msg_browse(avp, MSG_BRW_NEXT, &avp, NULL)); - } - - return 0; -} - -static inline -int s6a_parse_eps_subscribed_qos_profile(struct avp *avp_qos, - eps_subscribed_qos_profile_t *ptr) -{ - struct avp *avp = NULL; - struct avp_hdr *hdr; - - CHECK_FCT(fd_msg_browse(avp_qos, MSG_BRW_FIRST_CHILD, &avp, NULL)); - - while(avp) { - CHECK_FCT(fd_msg_avp_hdr(avp, &hdr)); - - switch(hdr->avp_code) { - case AVP_CODE_QCI: - CHECK_FCT(s6a_parse_qci(hdr, &ptr->qci)); - break; - - case AVP_CODE_ALLOCATION_RETENTION_PRIORITY: - CHECK_FCT(s6a_parse_allocation_retention_priority(avp, &ptr->allocation_retention_priority)); - break; - - default: - return -1; - } - - /* Go to next AVP in the grouped AVP */ - CHECK_FCT(fd_msg_browse(avp, MSG_BRW_NEXT, &avp, NULL)); - } - - return 0; -} - -static inline -int s6a_parse_ip_address(struct avp_hdr *hdr, ip_address_t *ip_address) -{ - uint16_t ip_type; - - DevCheck(hdr->avp_value->os.len >= 2, hdr->avp_value->os.len, 2, 0); - - ip_type = (hdr->avp_value->os.data[0] << 8) | (hdr->avp_value->os.data[1]); - - if (ip_type == IANA_IPV4) { - /* This is an IPv4 address */ - ip_address->pdn_type = IPv4; - DevCheck(hdr->avp_value->os.len == 6, hdr->avp_value->os.len, 6, ip_type); - memcpy(ip_address->address.ipv4_address, &hdr->avp_value->os.data[2], 4); - } else if (ip_type == IANA_IPV6) { - /* This is an IPv6 address */ - ip_address->pdn_type = IPv6; - DevCheck(hdr->avp_value->os.len == 18, hdr->avp_value->os.len, 18, ip_type); - memcpy(ip_address->address.ipv6_address, &hdr->avp_value->os.data[2], 16); - } else { - /* unhandled case... */ - return -1; - } - - return 0; -} - -static inline -int s6a_parse_apn_configuration(struct avp *avp_apn_conf_prof, apn_configuration_t *apn_config) -{ - struct avp *avp = NULL; - struct avp_hdr *hdr; - - CHECK_FCT(fd_msg_browse(avp_apn_conf_prof, MSG_BRW_FIRST_CHILD, &avp, NULL)); - - while(avp) { - CHECK_FCT(fd_msg_avp_hdr(avp, &hdr)); - - switch(hdr->avp_code) { - case AVP_CODE_CONTEXT_IDENTIFIER: - apn_config->context_identifier = hdr->avp_value->u32; - break; - - case AVP_CODE_SERVED_PARTY_IP_ADDRESS: - if (apn_config->nb_ip_address == 2) { - DevMessage("Only two IP addresses can be provided"); - } - - CHECK_FCT(s6a_parse_ip_address(hdr, &apn_config->ip_address[apn_config->nb_ip_address])); - apn_config->nb_ip_address++; - break; - - case AVP_CODE_PDN_TYPE: - CHECK_FCT(s6a_parse_pdn_type(hdr, &apn_config->pdn_type)); - break; - - case AVP_CODE_SERVICE_SELECTION: - CHECK_FCT(s6a_parse_service_selection(hdr, apn_config->service_selection, - &apn_config->service_selection_length)); - break; - - case AVP_CODE_EPS_SUBSCRIBED_QOS_PROFILE: - CHECK_FCT(s6a_parse_eps_subscribed_qos_profile(avp, &apn_config->subscribed_qos)); - break; - - case AVP_CODE_AMBR: - CHECK_FCT(s6a_parse_ambr(avp, &apn_config->ambr)); - break; - } - - /* Go to next AVP in the grouped AVP */ - CHECK_FCT(fd_msg_browse(avp, MSG_BRW_NEXT, &avp, NULL)); - } - - return 0; -} - -static inline -int s6a_parse_apn_configuration_profile(struct avp *avp_apn_conf_prof, - apn_config_profile_t *apn_config_profile) -{ - struct avp *avp = NULL; - struct avp_hdr *hdr; - - CHECK_FCT(fd_msg_browse(avp_apn_conf_prof, MSG_BRW_FIRST_CHILD, &avp, NULL)); - - while(avp) { - CHECK_FCT(fd_msg_avp_hdr(avp, &hdr)); - - switch(hdr->avp_code) { - case AVP_CODE_CONTEXT_IDENTIFIER: - apn_config_profile->context_identifier = hdr->avp_value->u32; - break; - - case AVP_CODE_ALL_APN_CONFIG_INC_IND: - CHECK_FCT(s6a_parse_all_apn_conf_inc_ind(hdr, &apn_config_profile->all_apn_conf_ind)); - break; - - case AVP_CODE_APN_CONFIGURATION: { - DevCheck(apn_config_profile->nb_apns < MAX_APN_PER_UE, - apn_config_profile->nb_apns, MAX_APN_PER_UE, 0); - CHECK_FCT(s6a_parse_apn_configuration( - avp, &apn_config_profile->apn_configuration[apn_config_profile->nb_apns])); - apn_config_profile->nb_apns++; - } - break; - } - - /* Go to next AVP in the grouped AVP */ - CHECK_FCT(fd_msg_browse(avp, MSG_BRW_NEXT, &avp, NULL)); - } - - return 0; -} - -int s6a_parse_subscription_data(struct avp *avp_subscription_data, - subscription_data_t *subscription_data) -{ - struct avp *avp = NULL; - struct avp_hdr *hdr; - - CHECK_FCT(fd_msg_browse(avp_subscription_data, MSG_BRW_FIRST_CHILD, &avp, NULL)); - - while(avp) { - CHECK_FCT(fd_msg_avp_hdr(avp, &hdr)); - - switch(hdr->avp_code) { - case AVP_CODE_SUBSCRIBER_STATUS: - CHECK_FCT(s6a_parse_subscriber_status(hdr, &subscription_data->subscriber_status)); - break; - - case AVP_CODE_MSISDN: - CHECK_FCT(s6a_parse_msisdn(hdr, subscription_data->msisdn, - &subscription_data->msisdn_length)); - break; - - case AVP_CODE_NETWORK_ACCESS_MODE: - CHECK_FCT(s6a_parse_network_access_mode(hdr, &subscription_data->access_mode)); - break; - - case AVP_CODE_ACCESS_RESTRICTION_DATA: - CHECK_FCT(s6a_parse_access_restriction_data(hdr, &subscription_data->access_restriction)); - break; - - case AVP_CODE_AMBR: - CHECK_FCT(s6a_parse_ambr(avp, &subscription_data->subscribed_ambr)); - break; - - case AVP_CODE_APN_CONFIGURATION_PROFILE: - CHECK_FCT(s6a_parse_apn_configuration_profile(avp, &subscription_data->apn_config_profile)); - break; - - case AVP_CODE_SUBSCRIBED_PERIODIC_RAU_TAU_TIMER: - subscription_data->rau_tau_timer = hdr->avp_value->u32; - break; - - default: - return -1; - } - - /* Go to next AVP in the grouped AVP */ - CHECK_FCT(fd_msg_browse(avp, MSG_BRW_NEXT, &avp, NULL)); - } - - return 0; -} diff --git a/openair-cn/S6A/s6a_task.c b/openair-cn/S6A/s6a_task.c deleted file mode 100644 index 2ee79ac3ab..0000000000 --- a/openair-cn/S6A/s6a_task.c +++ /dev/null @@ -1,187 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -#include -#include -#include -#include -#include - -#if HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include - -#include "intertask_interface.h" -#include "s6a_defs.h" -#include "s6a_messages.h" - -#include "assertions.h" -#include "msc.h" - -#if defined(DISABLE_USE_HSS) -# error "Disabling HSS support is currently not supported \ -Reconfigure with --enable-hss option to disable this error" -#endif - -static int gnutls_debug = 0; -struct session_handler *ts_sess_hdl; - -s6a_fd_cnf_t s6a_fd_cnf; - -void *s6a_thread(void *args); -static void fd_gnutls_debug(int level, const char *str); - -static void fd_gnutls_debug(int level, const char *str) -{ - S6A_DEBUG("[GTLS] %s", str); -} - -void *s6a_thread(void *args) -{ - itti_mark_task_ready(TASK_S6A); - MSC_START_USE(); - - while(1) { - MessageDef *received_message_p = NULL; - /* Trying to fetch a message from the message queue. - * If the queue is empty, this function will block till a - * message is sent to the task. - */ - itti_receive_msg(TASK_S6A, &received_message_p); - DevAssert(received_message_p != NULL); - - switch (ITTI_MSG_ID(received_message_p)) - { - case S6A_UPDATE_LOCATION_REQ: { - s6a_generate_update_location(&received_message_p->ittiMsg.s6a_update_location_req); - } break; - case S6A_AUTH_INFO_REQ: { - s6a_generate_authentication_info_req(&received_message_p->ittiMsg.s6a_auth_info_req); - } break; - case TERMINATE_MESSAGE: { - itti_exit_task(); - } break; - default: { - S6A_DEBUG("Unkwnon message ID %d: %s\n", - ITTI_MSG_ID(received_message_p), ITTI_MSG_NAME(received_message_p)); - } break; - } - itti_free(ITTI_MSG_ORIGIN_ID(received_message_p), received_message_p); - received_message_p = NULL; - } - return NULL; -} - -int s6a_init(const mme_config_t *mme_config_p) -{ - int ret; - - S6A_DEBUG("Initializing S6a interface\n"); - - memset(&s6a_fd_cnf, 0, sizeof(s6a_fd_cnf_t)); - - /*if (strcmp(fd_core_version(), FREE_DIAMETER_MINIMUM_VERSION) != 0) { - S6A_ERROR("Freediameter version %s found, expecting %s\n", fd_core_version(), - FREE_DIAMETER_MINIMUM_VERSION); - return -1; - } else { - S6A_DEBUG("Freediameter version %s\n", fd_core_version()); - }*/ - - - /* Initializing freeDiameter core */ - S6A_DEBUG("Initializing freeDiameter core...\n"); - ret = fd_core_initialize(); - if (ret != 0) { - S6A_ERROR("An error occurred during freeDiameter core library initialization: %d\n",ret); - return ret; - } else { - S6A_DEBUG("Initializing freeDiameter core done\n"); - } - - - - S6A_DEBUG("Default ext path: %s\n", DEFAULT_EXTENSIONS_PATH); - - ret = fd_core_parseconf(mme_config_p->s6a_config.conf_file); - if (ret != 0) { - S6A_ERROR("An error occurred during fd_core_parseconf file : %s.\n", mme_config_p->s6a_config.conf_file); - return ret; - } else { - S6A_DEBUG("fd_core_parseconf done\n"); - } - - /* Set gnutls debug level ? */ - if (gnutls_debug) { - gnutls_global_set_log_function((gnutls_log_func)fd_gnutls_debug); - gnutls_global_set_log_level (gnutls_debug); - S6A_DEBUG("Enabled GNUTLS debug at level %d", gnutls_debug); - } - - /* Starting freeDiameter core */ - ret = fd_core_start(); - if (ret != 0) { - S6A_ERROR("An error occurred during freeDiameter core library start\n"); - return ret; - } else { - S6A_DEBUG("fd_core_start done\n"); - } - - - - ret = fd_core_waitstartcomplete(); - if (ret != 0) { - S6A_ERROR("An error occurred during fd_core_waitstartcomplete.\n"); - return ret; - } else { - S6A_DEBUG("fd_core_waitstartcomplete done\n"); - } - - ret = s6a_fd_init_dict_objs(); - if (ret != 0) { - S6A_ERROR("An error occurred during s6a_fd_init_dict_objs.\n"); - return ret; - } else { - S6A_DEBUG("s6a_fd_init_dict_objs done\n"); - } - - /* Trying to connect to peers */ - CHECK_FCT(s6a_fd_new_peer()); - - if (itti_create_task(TASK_S6A, &s6a_thread, NULL) < 0) { - S6A_ERROR("s6a create task\n"); - return -1; - } - S6A_DEBUG("Initializing S6a interface: DONE\n"); - - return 0; -} diff --git a/openair-cn/S6A/s6a_up_loc.c b/openair-cn/S6A/s6a_up_loc.c deleted file mode 100644 index d1d2931d70..0000000000 --- a/openair-cn/S6A/s6a_up_loc.c +++ /dev/null @@ -1,317 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -#include -#include - -#include "mme_config.h" - -#include "assertions.h" -#include "conversions.h" - -#include "intertask_interface.h" -#include "s6a_defs.h" -#include "s6a_messages.h" -#include "msc.h" - - -int s6a_ula_cb( - struct msg **msg_pP, - struct avp *paramavp_pP, - struct session *sess_pP, - void *opaque_pP, - enum disp_action *act_pP) -{ - struct msg *ans_p = NULL; - struct msg *qry_p = NULL; - struct avp *avp_p = NULL; - struct avp_hdr *hdr_p = NULL; - MessageDef *message_p = NULL; - s6a_update_location_ans_t *s6a_update_location_ans_p = NULL; - - DevAssert(msg_pP != NULL); - - ans_p = *msg_pP; - /* Retrieve the original query associated with the asnwer */ - CHECK_FCT(fd_msg_answ_getq(ans_p, &qry_p)); - - DevAssert(qry_p != NULL); - - message_p = itti_alloc_new_message(TASK_S6A, S6A_UPDATE_LOCATION_ANS); - - s6a_update_location_ans_p = &message_p->ittiMsg.s6a_update_location_ans; - - CHECK_FCT(fd_msg_search_avp(qry_p, s6a_fd_cnf.dataobj_s6a_user_name, &avp_p)); - - if (avp_p) { - CHECK_FCT(fd_msg_avp_hdr(avp_p, &hdr_p)); - memcpy(s6a_update_location_ans_p->imsi, hdr_p->avp_value->os.data, hdr_p->avp_value->os.len); - s6a_update_location_ans_p->imsi[hdr_p->avp_value->os.len] = '\0'; - s6a_update_location_ans_p->imsi_length = hdr_p->avp_value->os.len; - S6A_DEBUG("Received s6a ula for imsi=%*s\n", - (int)hdr_p->avp_value->os.len, - hdr_p->avp_value->os.data); - } else { - DevMessage("Query has been freed before we received the answer\n"); - } - - /* Retrieve the result-code */ - CHECK_FCT(fd_msg_search_avp(ans_p, s6a_fd_cnf.dataobj_s6a_result_code, &avp_p)); - - if (avp_p) { - CHECK_FCT(fd_msg_avp_hdr(avp_p, &hdr_p)); - - s6a_update_location_ans_p->result.present = S6A_RESULT_BASE; - s6a_update_location_ans_p->result.choice.base = hdr_p->avp_value->u32; - - MSC_LOG_TX_MESSAGE( - MSC_S6A_MME, - MSC_MMEAPP_MME, - NULL,0, - "0 S6A_UPDATE_LOCATION_ANS imsi %SCNu64 %s", - s6a_update_location_ans_p->imsi, - retcode_2_string(hdr_p->avp_value->u32)); - - if (hdr_p->avp_value->u32 != ER_DIAMETER_SUCCESS) { - S6A_ERROR("Got error %u:%s\n", hdr_p->avp_value->u32, - retcode_2_string(hdr_p->avp_value->u32)); - goto err; - } - } else { - /* The result-code is not present, may be it is an experimental result - * avp_p indicating a 3GPP specific failure. - */ - CHECK_FCT(fd_msg_search_avp(ans_p, s6a_fd_cnf.dataobj_s6a_experimental_result, &avp_p)); - - if (avp_p) { - /* The procedure has failed within the HSS. - * NOTE: contrary to result-code, the experimental-result is a grouped - * AVP and requires parsing its childs to get the code back. - */ - s6a_update_location_ans_p->result.present = S6A_RESULT_EXPERIMENTAL; - s6a_parse_experimental_result(avp_p, &s6a_update_location_ans_p->result.choice.experimental); - - goto err; - } else { - /* Neither result-code nor experimental-result is present -> - * totally incorrect behaviour here. - */ - S6A_ERROR("Experimental-Result and Result-Code are absent: " - "This is not a correct behaviour\n"); - goto err; - } - } - - /* Retrieving the ULA flags */ - CHECK_FCT(fd_msg_search_avp(ans_p, s6a_fd_cnf.dataobj_s6a_ula_flags, &avp_p)); - - if (avp_p) { - CHECK_FCT(fd_msg_avp_hdr(avp_p, &hdr_p)); - - /* This bit, when set, indicates that the HSS stores SGSN number - * and MME number in separate memory. A Rel-8 HSS shall set - * the bit. - */ - if (!FLAG_IS_SET(hdr_p->avp_value->u32, ULA_SEPARATION_IND)) { - S6A_ERROR("ULA-Flags does not indicate the HSS is post Rel.8: " - "This behaviour is not compliant\n"); - goto err; - } - } else { - /* ULA-Flags is absent while the error code indicates DIAMETER_SUCCESS: - * this is not a compliant behaviour... - * TODO: handle this case. - */ - S6A_ERROR("ULA-Flags AVP is absent while result code indicates " - "DIAMETER_SUCCESS\n"); - goto err; - } - - CHECK_FCT(fd_msg_search_avp(ans_p, s6a_fd_cnf.dataobj_s6a_subscription_data, &avp_p)); - - if (avp_p) { - CHECK_FCT(s6a_parse_subscription_data(avp_p, &s6a_update_location_ans_p->subscription_data)); - -#if defined(DISABLE_USE_NAS) - -#else - // LG COMMENTED THIS (2014/04/01)-> DevParam(0, 0, 0); -#endif - } - -err: - - ans_p = NULL; - - itti_send_msg_to_task(TASK_MME_APP, INSTANCE_DEFAULT, message_p); - - S6A_DEBUG("Sending S6A_UPDATE_LOCATION_ANS to task MME_APP\n"); - - return 0; -} - - - -int s6a_generate_update_location(s6a_update_location_req_t *ulr_pP) -{ - struct avp *avp_p = NULL; - struct msg *msg_p = NULL; - struct session *sess_p = NULL; - - union avp_value value; - - DevAssert(ulr_pP != NULL); - - /* Create the new update location request message */ - CHECK_FCT(fd_msg_new(s6a_fd_cnf.dataobj_s6a_ulr, 0, &msg_p)); - - /* Create a new session */ - CHECK_FCT(fd_sess_new(&sess_p, fd_g_config->cnf_diamid, - fd_g_config->cnf_diamid_len, (os0_t)"apps6a", 6)); - { - os0_t sid; - size_t sidlen; - CHECK_FCT(fd_sess_getsid(sess_p, &sid, &sidlen)); - CHECK_FCT(fd_msg_avp_new(s6a_fd_cnf.dataobj_s6a_session_id, 0, &avp_p)); - value.os.data = sid; - value.os.len = sidlen; - CHECK_FCT(fd_msg_avp_setvalue(avp_p, &value)); - CHECK_FCT(fd_msg_avp_add(msg_p, MSG_BRW_FIRST_CHILD, avp_p)); - } - - CHECK_FCT(fd_msg_avp_new(s6a_fd_cnf.dataobj_s6a_auth_session_state, 0, &avp_p)); - /* No State maintained */ - value.i32 = 1; - CHECK_FCT(fd_msg_avp_setvalue(avp_p, &value)); - CHECK_FCT(fd_msg_avp_add(msg_p, MSG_BRW_LAST_CHILD, avp_p)); - - /* Add Origin_Host & Origin_Realm */ - CHECK_FCT(fd_msg_add_origin(msg_p, 0)); - - config_read_lock(&mme_config); - - /* Destination Host */ - { - char host[100]; - size_t hostlen; - - memset(host, 0, 100); - strcat(host, mme_config.s6a_config.hss_host_name); - strcat(host, "."); - strcat(host, mme_config.realm); - - hostlen = strlen(host); - - CHECK_FCT(fd_msg_avp_new(s6a_fd_cnf.dataobj_s6a_destination_host, 0, &avp_p)); - value.os.data = (unsigned char *)host; - value.os.len = hostlen; - CHECK_FCT(fd_msg_avp_setvalue(avp_p, &value)); - - CHECK_FCT(fd_msg_avp_add(msg_p, MSG_BRW_LAST_CHILD, avp_p)); - } - /* Destination_Realm */ - { - char *realm = mme_config.realm; - size_t realmlen = strlen(realm); - - CHECK_FCT(fd_msg_avp_new(s6a_fd_cnf.dataobj_s6a_destination_realm, 0, &avp_p)); - value.os.data = (unsigned char *)realm; - value.os.len = realmlen; - CHECK_FCT(fd_msg_avp_setvalue(avp_p, &value)); - - CHECK_FCT(fd_msg_avp_add(msg_p, MSG_BRW_LAST_CHILD, avp_p)); - } - - config_unlock(&mme_config); - - /* Adding the User-Name (IMSI) */ - CHECK_FCT(fd_msg_avp_new(s6a_fd_cnf.dataobj_s6a_user_name, 0, &avp_p)); - value.os.data = (unsigned char *)ulr_pP->imsi; - value.os.len = strlen(ulr_pP->imsi); - CHECK_FCT(fd_msg_avp_setvalue(avp_p, &value)); - CHECK_FCT(fd_msg_avp_add(msg_p, MSG_BRW_LAST_CHILD, avp_p)); - - /* Adding the visited plmn id */ - { - uint8_t plmn[3]; - - CHECK_FCT(fd_msg_avp_new(s6a_fd_cnf.dataobj_s6a_visited_plmn_id, 0, &avp_p)); - - PLMN_T_TO_TBCD(ulr_pP->visited_plmn, - plmn, - mme_config_find_mnc_length(ulr_pP->visited_plmn.MCCdigit1, - ulr_pP->visited_plmn.MCCdigit2, - ulr_pP->visited_plmn.MCCdigit3, - ulr_pP->visited_plmn.MNCdigit1, - ulr_pP->visited_plmn.MNCdigit2, - ulr_pP->visited_plmn.MNCdigit3 - ) - ); - - printf("PLMN: %3s\n", plmn); - - value.os.data = plmn; - value.os.len = 3; - CHECK_FCT(fd_msg_avp_setvalue(avp_p, &value)); - - CHECK_FCT(fd_msg_avp_add(msg_p, MSG_BRW_LAST_CHILD, avp_p)); - } - - /* Adding the RAT-Type */ - CHECK_FCT(fd_msg_avp_new(s6a_fd_cnf.dataobj_s6a_rat_type, 0, &avp_p)); - DevCheck(ulr_pP->rat_type == RAT_EUTRAN, ulr_pP->rat_type, 0, 0); - value.u32 = ulr_pP->rat_type; - CHECK_FCT(fd_msg_avp_setvalue(avp_p, &value)); - CHECK_FCT(fd_msg_avp_add(msg_p, MSG_BRW_LAST_CHILD, avp_p)); - - /* Adding ULR-Flags */ - CHECK_FCT(fd_msg_avp_new(s6a_fd_cnf.dataobj_s6a_ulr_flags, 0, &avp_p)); - value.u32 = 0; - - /* Identify the ULR as coming from S6A interface (i.e. from MME) */ - FLAGS_SET(value.u32, ULR_S6A_S6D_INDICATOR); - - /* Set the ulr-flags as indicated by upper layer */ - if (ulr_pP->skip_subscriber_data) { - FLAGS_SET(value.u32, ULR_SKIP_SUBSCRIBER_DATA); - } - - if (ulr_pP->initial_attach) { - FLAGS_SET(value.u32, ULR_INITIAL_ATTACH_IND); - } - - CHECK_FCT(fd_msg_avp_setvalue(avp_p, &value)); - CHECK_FCT(fd_msg_avp_add(msg_p, MSG_BRW_LAST_CHILD, avp_p)); - - CHECK_FCT(fd_msg_send(&msg_p, NULL, NULL)); - - S6A_DEBUG("Sending s6a ulr for imsi=%s\n", ulr_pP->imsi); - - return 0; -} diff --git a/openair-cn/SCTP/COPYING b/openair-cn/SCTP/COPYING deleted file mode 100644 index 94a9ed024d..0000000000 --- a/openair-cn/SCTP/COPYING +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program 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. - - This program 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 this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/openair-cn/SCTP/Makefile.am b/openair-cn/SCTP/Makefile.am deleted file mode 100644 index 6cdc16d869..0000000000 --- a/openair-cn/SCTP/Makefile.am +++ /dev/null @@ -1,52 +0,0 @@ -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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 . -# -# Contact Information -# OpenAirInterface Admin: openair_admin@eurecom.fr -# OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr -# -# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. -# -################################################################################ -noinst_LTLIBRARIES = libsctpserver.la libsctpclient.la -libsctpclient_la_LDFLAGS = -all-static -libsctpserver_la_LDFLAGS = -all-static - -AM_CFLAGS = \ - @ADD_CFLAGS@ \ - -I$(top_srcdir)/COMMON \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/api/network \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/include \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/ies \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/emm/msg \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/esm/msg \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/util \ - -I$(top_srcdir)/INTERTASK_INTERFACE \ - -I$(top_srcdir)/UTILS - -libsctpserver_la_SOURCES= \ - sctp_common.c sctp_common.h \ - sctp_itti_messaging.h sctp_itti_messaging.c \ - sctp_primitives_server.h sctp_primitives_server.c - -libsctpclient_la_SOURCES= \ - sctp_common.c sctp_common.h \ - sctp_primitives_client.h sctp_primitives_client.c \ No newline at end of file diff --git a/openair-cn/SCTP/Makefile.eNB b/openair-cn/SCTP/Makefile.eNB deleted file mode 100644 index c41d2911e2..0000000000 --- a/openair-cn/SCTP/Makefile.eNB +++ /dev/null @@ -1,71 +0,0 @@ -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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 . -# -# Contact Information -# OpenAirInterface Admin: openair_admin@eurecom.fr -# OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr -# -# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. -# -################################################################################ -# include $(OPENAIR_TARGETS)/SIMU/USER/Makerules - -OUTDIR = . - -libsctp_OBJECTS = \ - sctp_common.o \ - sctp_eNB_task.o \ - sctp_eNB_itti_messaging.o - -# pull in dependency info for *existing* .o files --include $(OUTDIR)/*.d - -CFLAGS = \ - -Wall \ - $(S1AP_CFLAGS) \ - -DENB_MODE \ - -Werror=uninitialized \ - -Werror=implicit-function-declaration - -$(OUTDIR)/%.o : %.c - @echo "Compiling $<" - @if [ ! -d $(dir $@) ]; then mkdir -p $(dir $@); fi; - @$(CC) -c $(CFLAGS) -o $@ $< - @$(CC) -MM $(CFLAGS) $< > $(basename $@).d - @mv -f $(basename $@).d $(basename $@).d.tmp - @sed -e 's|.*:|$@:|' < $(basename $@).d.tmp > $(basename $@).d - @sed -e 's/.*://' -e 's/\\$$//' < $(basename $@).d.tmp | fmt -1 | \ - sed -e 's/^ *//' -e 's/$$/:/' >> $(basename $@).d - @rm -f $(basename $@).d.tmp - -objsdir: - @if [ ! -d $(OUTDIR) ]; then mkdir -p $(OUTDIR); fi; - -$(OUTDIR)/libsctp.a: $(addprefix $(OUTDIR)/,$(libsctp_OBJECTS)) - @echo Creating SCTP archive - @$(AR) rcs $@ $(addprefix $(OUTDIR)/,$(libsctp_OBJECTS)) - -clean: - @$(RM_F_V) $(OUTDIR)/*.o - @$(RM_F_V) $(OUTDIR)/*.d - @$(RM_F_V) $(OUTDIR)/libsctp.a - -cleanall: clean diff --git a/openair-cn/SCTP/sctp_common.h b/openair-cn/SCTP/sctp_common.h deleted file mode 100644 index 337f1fa90c..0000000000 --- a/openair-cn/SCTP/sctp_common.h +++ /dev/null @@ -1,68 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -/*! \file sctp_common.h - * \brief eNB/MME SCTP related common procedures - * \author Sebastien ROUX - * \date 2013 - * \version 1.0 - * @ingroup _sctp - */ - -#ifndef SCTP_COMMON_H_ -#define SCTP_COMMON_H_ - -#include -#include -#include - -#if defined(ENB_MODE) -# include "UTIL/LOG/log.h" -# define SCTP_ERROR(x, args...) LOG_E(SCTP, x, ##args) -# define SCTP_WARN(x, args...) LOG_W(SCTP, x, ##args) -# define SCTP_DEBUG(x, args...) LOG_I(SCTP, x, ##args) -#else -# define SCTP_ERROR(x, args...) do { fprintf(stderr, "[SCTP][E]"x, ##args); } while(0) -# define SCTP_DEBUG(x, args...) do { fprintf(stdout, "[SCTP][D]"x, ##args); } while(0) -# define SCTP_WARN(x, args...) do { fprintf(stdout, "[SCTP][W]"x, ##args); } while(0) -#endif - -int sctp_set_init_opt(int sd, uint16_t instreams, uint16_t outstreams, - uint16_t max_attempts, uint16_t init_timeout); - -int sctp_get_sockinfo(int sock, uint16_t *instream, uint16_t *outstream, - int32_t *assoc_id); - -int sctp_get_peeraddresses(int sock, struct sockaddr **remote_addr, - int *nb_remote_addresses); - -int sctp_get_localaddresses(int sock, struct sockaddr **local_addr, - int *nb_local_addresses); - -#endif /* SCTP_COMMON_H_ */ diff --git a/openair-cn/SCTP/sctp_default_values.h b/openair-cn/SCTP/sctp_default_values.h deleted file mode 100644 index 28b6cc1fbf..0000000000 --- a/openair-cn/SCTP/sctp_default_values.h +++ /dev/null @@ -1,38 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#ifndef SCTP_DEFAULT_VALUES_H_ -#define SCTP_DEFAULT_VALUES_H_ - -#define SCTP_OUT_STREAMS (16) -#define SCTP_IN_STREAMS (16) -#define SCTP_MAX_ATTEMPTS (2) -#define SCTP_TIMEOUT (5) -#define SCTP_RECV_BUFFER_SIZE (1024) - -#endif /* SCTP_DEFAULT_VALUES_H_ */ diff --git a/openair-cn/SCTP/sctp_itti_messaging.c b/openair-cn/SCTP/sctp_itti_messaging.c deleted file mode 100644 index 9782c43d7d..0000000000 --- a/openair-cn/SCTP/sctp_itti_messaging.c +++ /dev/null @@ -1,85 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include - -#include "intertask_interface.h" - -#include "sctp_itti_messaging.h" - -int sctp_itti_send_new_association(uint32_t assoc_id, uint16_t instreams, - uint16_t outstreams) -{ - MessageDef *message_p; - sctp_new_peer_t *sctp_new_peer_p; - - message_p = itti_alloc_new_message(TASK_SCTP, SCTP_NEW_ASSOCIATION); - - sctp_new_peer_p = &message_p->ittiMsg.sctp_new_peer; - - sctp_new_peer_p->assoc_id = assoc_id; - sctp_new_peer_p->instreams = instreams; - sctp_new_peer_p->outstreams = outstreams; - - return itti_send_msg_to_task(TASK_S1AP, INSTANCE_DEFAULT, message_p); -} - -int sctp_itti_send_new_message_ind(int n, uint8_t *buffer, uint32_t assoc_id, - uint16_t stream, - uint16_t instreams, uint16_t outstreams) -{ - MessageDef *message_p; - - message_p = itti_alloc_new_message(TASK_SCTP, SCTP_DATA_IND); - - SCTP_DATA_IND(message_p).buffer = malloc(sizeof(uint8_t) * n); - - memcpy((void *)SCTP_DATA_IND(message_p).buffer, (void *)buffer, n); - - SCTP_DATA_IND(message_p).stream = stream; - SCTP_DATA_IND(message_p).buf_length = n; - SCTP_DATA_IND(message_p).assoc_id = assoc_id; - SCTP_DATA_IND(message_p).instreams = instreams; - SCTP_DATA_IND(message_p).outstreams = outstreams; - - return itti_send_msg_to_task(TASK_S1AP, INSTANCE_DEFAULT, message_p); -} - -int sctp_itti_send_com_down_ind(uint32_t assoc_id) -{ - MessageDef *message_p; - sctp_close_association_t *sctp_close_association_p; - - message_p = itti_alloc_new_message(TASK_SCTP, SCTP_CLOSE_ASSOCIATION); - - sctp_close_association_p = &message_p->ittiMsg.sctp_close_association; - - sctp_close_association_p->assoc_id = assoc_id; - - return itti_send_msg_to_task(TASK_S1AP, INSTANCE_DEFAULT, message_p); -} diff --git a/openair-cn/SCTP/sctp_itti_messaging.h b/openair-cn/SCTP/sctp_itti_messaging.h deleted file mode 100644 index 69f06cb5ef..0000000000 --- a/openair-cn/SCTP/sctp_itti_messaging.h +++ /dev/null @@ -1,41 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#ifndef SCTP_ITTI_MESSAGING_H_ -#define SCTP_ITTI_MESSAGING_H_ - -int sctp_itti_send_new_association(uint32_t assoc_id, uint16_t instreams, - uint16_t outstreams); - -int sctp_itti_send_new_message_ind(int n, uint8_t *buffer, uint32_t assoc_id, - uint16_t stream, - uint16_t instreams, uint16_t outstreams); - -int sctp_itti_send_com_down_ind(uint32_t assoc_id); - -#endif /* SCTP_ITTI_MESSAGING_H_ */ diff --git a/openair-cn/SCTP/sctp_primitives_server.c b/openair-cn/SCTP/sctp_primitives_server.c deleted file mode 100644 index 654d0b6f4d..0000000000 --- a/openair-cn/SCTP/sctp_primitives_server.c +++ /dev/null @@ -1,697 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -/*! \file sctp_primitives_server.c - * \brief Main server primitives - * \author Sebastien ROUX - * \date 2013 - * \version 1.0 - * @ingroup _sctp - */ - -#include - -#include -#include -#include -#include -#include - -#include -#include - -#include -#include - -#include - -#include "assertions.h" - -#include "intertask_interface.h" -#include "sctp_primitives_server.h" -#include "mme_config.h" -#include "conversions.h" - -#include "sctp_common.h" -#include "sctp_itti_messaging.h" -#include "msc.h" - -#define SCTP_DUMP_LIST - -#define SCTP_RC_ERROR -1 -#define SCTP_RC_NORMAL_READ 0 -#define SCTP_RC_DISCONNECT 1 - -struct sctp_association_s { - struct sctp_association_s *next_assoc; ///< Next association in the list - struct sctp_association_s *previous_assoc; ///< Previous association in the list - int sd; ///< Socket descriptor - uint32_t ppid; ///< Payload protocol Identifier - uint16_t instreams; ///< Number of input streams negociated for this connection - uint16_t outstreams; ///< Number of output strams negotiated for this connection - int32_t assoc_id; ///< SCTP association id for the connection - uint32_t messages_recv; ///< Number of messages received on this connection - uint32_t messages_sent; ///< Number of messages sent on this connection - - struct sockaddr *peer_addresses; ///< A list of peer addresses - int nb_peer_addresses; -}; - -struct sctp_descriptor_s { - // List of connected peers - struct sctp_association_s *available_connections_head; - struct sctp_association_s *available_connections_tail; - - uint32_t number_of_connections; - uint16_t nb_instreams; - uint16_t nb_outstreams; -}; - -struct sctp_arg_s { - int sd; - uint32_t ppid; -}; - -static struct sctp_descriptor_s sctp_desc; - -// Thread used to handle sctp messages -static pthread_t assoc_thread; - -// LOCAL FUNCTIONS prototypes -void *sctp_receiver_thread(void *args_p); -static int sctp_send_msg(int32_t sctp_assoc_id, uint16_t stream, - const uint8_t *buffer, const uint32_t length); - -// Association list related local functions prototypes -static struct sctp_association_s *sctp_is_assoc_in_list(int32_t assoc_id); -static struct sctp_association_s *sctp_add_new_peer(void); -static int sctp_handle_com_down(uint32_t assoc_id); -static void sctp_dump_list(void); - -static struct sctp_association_s *sctp_add_new_peer(void) -{ - struct sctp_association_s *new_sctp_descriptor = NULL; - - new_sctp_descriptor = calloc(1, sizeof(struct sctp_association_s)); - - if (new_sctp_descriptor == NULL) { - SCTP_ERROR("Failed to allocate memory for new peer (%s:%d)\n", - __FILE__, __LINE__); - return NULL; - } - - new_sctp_descriptor->next_assoc = NULL; - new_sctp_descriptor->previous_assoc = NULL; - - if (sctp_desc.available_connections_tail == NULL) { - sctp_desc.available_connections_head = new_sctp_descriptor; - sctp_desc.available_connections_tail = sctp_desc.available_connections_head; - } else { - new_sctp_descriptor->previous_assoc = sctp_desc.available_connections_tail; - sctp_desc.available_connections_tail->next_assoc = new_sctp_descriptor; - sctp_desc.available_connections_tail = new_sctp_descriptor; - } - - sctp_desc.number_of_connections++; - - sctp_dump_list(); - - return new_sctp_descriptor; -} - -static struct sctp_association_s *sctp_is_assoc_in_list(int32_t assoc_id) -{ - struct sctp_association_s *assoc_desc; - - if (assoc_id < 0) { - return NULL; - } - - for (assoc_desc = sctp_desc.available_connections_head; - assoc_desc; - assoc_desc = assoc_desc->next_assoc) { - if (assoc_desc->assoc_id == assoc_id) { - break; - } - } - - return assoc_desc; -} - -static int sctp_remove_assoc_from_list(int32_t assoc_id) -{ - struct sctp_association_s *assoc_desc; - - /* Association not in the list */ - if ((assoc_desc = sctp_is_assoc_in_list(assoc_id)) == NULL) { - return -1; - } - - if (assoc_desc->next_assoc == NULL) { - if (assoc_desc->previous_assoc == NULL) { - /* Head and tail */ - sctp_desc.available_connections_head = sctp_desc.available_connections_tail = NULL; - } else { - /* Not head but tail */ - sctp_desc.available_connections_tail = assoc_desc->previous_assoc; - assoc_desc->previous_assoc->next_assoc = NULL; - } - } else { - if (assoc_desc->previous_assoc == NULL) { - /* Head but not tail */ - sctp_desc.available_connections_head = assoc_desc->next_assoc; - assoc_desc->next_assoc->previous_assoc = NULL; - } else { - /* Not head and not tail */ - assoc_desc->previous_assoc->next_assoc = assoc_desc->next_assoc; - assoc_desc->next_assoc->previous_assoc = assoc_desc->previous_assoc; - } - } - - free(assoc_desc); - assoc_desc = NULL; - sctp_desc.number_of_connections --; - return 0; -} - -static void sctp_dump_assoc(struct sctp_association_s *sctp_assoc_p) -{ -#if defined(SCTP_DUMP_LIST) - int i; - - if (sctp_assoc_p == NULL) { - return; - } - - SCTP_DEBUG("sd : %d\n", sctp_assoc_p->sd); - SCTP_DEBUG("input streams: %d\n", sctp_assoc_p->instreams); - SCTP_DEBUG("out streams : %d\n", sctp_assoc_p->outstreams); - SCTP_DEBUG("assoc_id : %d\n", sctp_assoc_p->assoc_id); - SCTP_DEBUG("peer address :\n"); - - for (i = 0; i < sctp_assoc_p->nb_peer_addresses; i++) { - char address[40]; - - memset(address, 0, sizeof(address)); - - if (inet_ntop(sctp_assoc_p->peer_addresses[i].sa_family, - sctp_assoc_p->peer_addresses[i].sa_data, address, sizeof(address)) != NULL) { - SCTP_DEBUG(" - [%s]\n", address); - } - } - -#else - sctp_assoc_p = sctp_assoc_p; -#endif -} - -static void sctp_dump_list(void) -{ -#if defined(SCTP_DUMP_LIST) - struct sctp_association_s *sctp_assoc_p; - - sctp_assoc_p = sctp_desc.available_connections_head; - - SCTP_DEBUG("SCTP list contains %d associations\n", sctp_desc.number_of_connections); - - while (sctp_assoc_p != NULL) { - sctp_dump_assoc(sctp_assoc_p); - sctp_assoc_p = sctp_assoc_p->next_assoc; - } - -#else - sctp_dump_assoc(NULL); -#endif -} - -static int sctp_send_msg(int32_t sctp_assoc_id, uint16_t stream, - const uint8_t *buffer, const uint32_t length) -{ - struct sctp_association_s *assoc_desc = NULL; - - DevAssert(buffer != NULL); - - if ((assoc_desc = sctp_is_assoc_in_list(sctp_assoc_id)) == NULL) { - SCTP_DEBUG("This assoc id has not been fount in list (%d)\n", - sctp_assoc_id); - return -1; - } - - if (assoc_desc->sd == -1) { - /* The socket is invalid may be closed. - */ - return -1; - } - - SCTP_DEBUG("[%d][%d] Sending buffer %p of %d bytes on stream %d with ppid %d\n", - assoc_desc->sd, sctp_assoc_id, buffer, - length, stream, assoc_desc->ppid); - - /* Send message_p on specified stream of the sd association */ - if (sctp_sendmsg(assoc_desc->sd, - (const void *)buffer, - length, - NULL, - 0, - assoc_desc->ppid, 0, stream, 0, 0) < 0) { - SCTP_ERROR("send: %s:%d", strerror(errno), errno); - return -1; - } - - assoc_desc->messages_sent++; - - SCTP_DEBUG("Successfully sent %d bytes on stream %d\n", length, stream); - - return 0; -} - -static int sctp_create_new_listener(SctpInit *init_p) -{ - struct sctp_event_subscribe event; - struct sockaddr *addr; - - struct sctp_arg_s *sctp_arg_p; - - uint16_t i = 0, j; - int sd; - int used_addresses = 0; - - DevAssert(init_p != NULL); - - if (init_p->ipv4 == 0 && init_p->ipv6 == 0) { - SCTP_ERROR("Illegal IP configuration upper layer should request at" - "least ipv4 and/or ipv6 config\n"); - return -1; - } - - if ((used_addresses = init_p->nb_ipv4_addr + init_p->nb_ipv6_addr) == 0) { - SCTP_WARN("No address provided...\n"); - return -1; - } - - addr = calloc(used_addresses, sizeof(struct sockaddr)); - - SCTP_DEBUG("Creating new listen socket on port %u with\n", init_p->port); - - if (init_p->ipv4 == 1) { - struct sockaddr_in *ip4_addr; - - SCTP_DEBUG("ipv4 addresses:\n"); - - for (i = 0; i < init_p->nb_ipv4_addr; i++) { - SCTP_DEBUG("\t- "IPV4_ADDR"\n", - IPV4_ADDR_FORMAT(init_p->ipv4_address[i])); - ip4_addr = (struct sockaddr_in *)&addr[i]; - ip4_addr->sin_family = AF_INET; - ip4_addr->sin_port = htons(init_p->port); - ip4_addr->sin_addr.s_addr = init_p->ipv4_address[i]; - } - } - - if (init_p->ipv6 == 1) { - struct sockaddr_in6 *ip6_addr; - - SCTP_DEBUG("ipv6 addresses:\n"); - - for (j = 0; j < init_p->nb_ipv6_addr; j++) { - SCTP_DEBUG("\t- %s\n", init_p->ipv6_address[j]); - ip6_addr = (struct sockaddr_in6 *)&addr[i + j]; - ip6_addr->sin6_family = AF_INET6; - ip6_addr->sin6_port = htons(init_p->port); - - if (inet_pton(AF_INET6, init_p->ipv6_address[j], - ip6_addr->sin6_addr.s6_addr) <= 0) { - SCTP_WARN("Provided ipv6 address %s is not valid\n", - init_p->ipv6_address[j]); - } - } - } - - if ((sd = socket(AF_INET6, SOCK_STREAM, IPPROTO_SCTP)) < 0) { - SCTP_ERROR("socket: %s:%d\n", strerror(errno), errno); - return -1; - } - - memset((void *)&event, 1, sizeof(struct sctp_event_subscribe)); - - if (setsockopt(sd, IPPROTO_SCTP, SCTP_EVENTS, &event, - sizeof(struct sctp_event_subscribe)) < 0) { - SCTP_ERROR("setsockopt: %s:%d\n", strerror(errno), errno); - return -1; - } - - /* Some pre-bind socket configuration */ - if (sctp_set_init_opt(sd, sctp_desc.nb_instreams, sctp_desc.nb_outstreams, - 0, 0) < 0) { - goto err; - } - - if (sctp_bindx(sd, addr, used_addresses, SCTP_BINDX_ADD_ADDR) != 0) { - SCTP_ERROR("sctp_bindx: %s:%d\n", strerror(errno), errno); - return -1; - } - - if (listen(sd, 5) < 0) { - SCTP_ERROR("listen: %s:%d\n", strerror(errno), errno); - return -1; - } - - if ((sctp_arg_p = malloc(sizeof(struct sctp_arg_s))) == NULL) { - return -1; - } - - sctp_arg_p->sd = sd; - sctp_arg_p->ppid = init_p->ppid; - - if (pthread_create(&assoc_thread, NULL, &sctp_receiver_thread, - (void *)sctp_arg_p) < 0) { - SCTP_ERROR("pthread_create: %s:%d\n", strerror(errno), errno); - return -1; - } - - return sd; -err: - - if (sd != -1) { - close(sd); - sd = -1; - } - - return -1; -} - -static -inline int sctp_read_from_socket(int sd, int ppid) -{ - int flags = 0, n; - socklen_t from_len; - struct sctp_sndrcvinfo sinfo; - - struct sockaddr_in addr; - uint8_t buffer[SCTP_RECV_BUFFER_SIZE]; - - if (sd < 0) { - return -1; - } - - memset((void *)&addr, 0, sizeof(struct sockaddr_in)); - from_len = (socklen_t)sizeof(struct sockaddr_in); - memset((void *)&sinfo, 0, sizeof(struct sctp_sndrcvinfo)); - n = sctp_recvmsg(sd, (void *)buffer, SCTP_RECV_BUFFER_SIZE, - (struct sockaddr *)&addr, &from_len, - &sinfo, &flags); - - if (n < 0) { - SCTP_DEBUG("An error occured during read\n"); - SCTP_ERROR("sctp_recvmsg: %s:%d\n", strerror(errno), errno); - return SCTP_RC_ERROR; - } - - if (flags & MSG_NOTIFICATION) { - union sctp_notification *snp; - snp = (union sctp_notification *)buffer; - - /* Client deconnection */ - if (SCTP_SHUTDOWN_EVENT == snp->sn_header.sn_type) { - SCTP_DEBUG("SCTP_SHUTDOWN_EVENT received\n"); - return sctp_handle_com_down(snp->sn_shutdown_event.sse_assoc_id); - } - /* Association has changed. */ - else if (SCTP_ASSOC_CHANGE == snp->sn_header.sn_type) { - struct sctp_assoc_change *sctp_assoc_changed; - sctp_assoc_changed = &snp->sn_assoc_change; - - SCTP_DEBUG("Client association changed: %d\n", sctp_assoc_changed->sac_state); - - /* New physical association requested by a peer */ - switch (sctp_assoc_changed->sac_state) { - case SCTP_COMM_UP: { - struct sctp_association_s *new_association; - - sctp_get_sockinfo(sd, NULL, NULL, NULL); - - SCTP_DEBUG("New connection\n"); - - if ((new_association = sctp_add_new_peer()) == NULL) { - // TODO: handle this case - DevMessage("Unexpected error...\n"); - return SCTP_RC_ERROR; - } else { - new_association->sd = sd; - new_association->ppid = ppid; - new_association->instreams = sctp_assoc_changed->sac_inbound_streams; - new_association->outstreams = sctp_assoc_changed->sac_outbound_streams; - new_association->assoc_id = sctp_assoc_changed->sac_assoc_id; - - sctp_get_localaddresses(sd, NULL, NULL); - sctp_get_peeraddresses(sd, &new_association->peer_addresses, - &new_association->nb_peer_addresses); - - if (sctp_itti_send_new_association( - new_association->assoc_id, new_association->instreams, - new_association->outstreams) < 0) { - SCTP_ERROR("Failed to send message to S1AP\n"); - return SCTP_RC_ERROR; - } - } - } - break; - - default: - break; - } - } - } else { - /* Data payload received */ - struct sctp_association_s *association; - - if ((association = sctp_is_assoc_in_list(sinfo.sinfo_assoc_id)) == NULL) { - // TODO: handle this case - return SCTP_RC_ERROR; - } - - association->messages_recv++; - - if (ntohl(sinfo.sinfo_ppid) != association->ppid) { - /* Mismatch in Payload Protocol Identifier, - * may be we received unsollicited traffic from stack other than S1AP. - */ - SCTP_ERROR("Received data from peer with unsollicited PPID %d, expecting %d\n", - ntohl(sinfo.sinfo_ppid), association->ppid); - return SCTP_RC_ERROR; - } - - SCTP_DEBUG("[%d][%d] Msg of length %d received from port %u, on stream %d, PPID %d\n", - sinfo.sinfo_assoc_id, sd, n, ntohs(addr.sin_port), - sinfo.sinfo_stream, ntohl(sinfo.sinfo_ppid)); - - sctp_itti_send_new_message_ind(n, buffer, sinfo.sinfo_assoc_id, sinfo.sinfo_stream, - association->instreams, association->outstreams); - } - - return SCTP_RC_NORMAL_READ; -} - -static int sctp_handle_com_down(uint32_t assoc_id) -{ - SCTP_DEBUG("Sending close connection for assoc_id %u\n", assoc_id); - - if (sctp_itti_send_com_down_ind(assoc_id) < 0) { - SCTP_ERROR("Failed to send message to TASK_S1AP\n"); - } - - if (sctp_remove_assoc_from_list(assoc_id) < 0) { - SCTP_ERROR("Failed to find client in list\n"); - } - - return SCTP_RC_DISCONNECT; -} - -void *sctp_receiver_thread(void *args_p) -{ - struct sctp_arg_s *sctp_arg_p; - - /* maximum file descriptor number */ - int fdmax, clientsock, i; - /* master file descriptor list */ - fd_set master; - /* temp file descriptor list for select() */ - fd_set read_fds; - - if ((sctp_arg_p = (struct sctp_arg_s *)args_p) == NULL) { - pthread_exit(NULL); - } - - /* clear the master and temp sets */ - FD_ZERO(&master); - FD_ZERO(&read_fds); - - FD_SET(sctp_arg_p->sd, &master); - fdmax = sctp_arg_p->sd; /* so far, it's this one*/ - MSC_START_USE(); - - while(1) { - - memcpy(&read_fds, &master, sizeof(master)); - - if (select(fdmax+1, &read_fds, NULL, NULL, NULL) == -1) { - SCTP_ERROR("[%d] Select() error: %s", - sctp_arg_p->sd, strerror(errno)); - free(args_p); - args_p = NULL; - pthread_exit(NULL); - } - - for (i = 0; i <= fdmax; i++) { - if (FD_ISSET(i, &read_fds)) { - if (i == sctp_arg_p->sd) { - /* There is data to read on listener socket. This means we have to accept - * the connection. - */ - if ((clientsock = accept(sctp_arg_p->sd, NULL, NULL)) < 0) { - SCTP_ERROR("[%d] accept: %s:%d\n", sctp_arg_p->sd, strerror(errno), errno); - free(args_p); - args_p = NULL; - pthread_exit(NULL); - } else { - FD_SET(clientsock, &master); /* add to master set */ - - if(clientsock > fdmax) { - /* keep track of the maximum */ - fdmax = clientsock; - } - } - } else { - int ret; - - /* Read from socket */ - ret = sctp_read_from_socket(i, sctp_arg_p->ppid); - - /* When the socket is disconnected we have to update - * the fd_set. - */ - if (ret == SCTP_RC_DISCONNECT) { - /* Remove the socket from the FD set and update the max sd */ - FD_CLR(i, &master); - - if (i == fdmax) { - while (FD_ISSET(fdmax, &master) == FALSE) - fdmax -= 1; - } - } - } - } - } - } - - free(args_p); - args_p = NULL; - return NULL; -} - -static void *sctp_intertask_interface(void *args_p) -{ - itti_mark_task_ready(TASK_SCTP); - MSC_START_USE(); - - while(1) { - MessageDef *received_message_p; - itti_receive_msg(TASK_SCTP, &received_message_p); - - switch (ITTI_MSG_ID(received_message_p)) { - case SCTP_INIT_MSG: { - SCTP_DEBUG("Received SCTP_INIT_MSG\n"); - - /* We received a new connection request */ - if (sctp_create_new_listener(&received_message_p->ittiMsg.sctpInit) < 0) { - /* SCTP socket creation or bind failed... */ - SCTP_ERROR("Failed to create new SCTP listener\n"); - } - } - break; - - case SCTP_CLOSE_ASSOCIATION: { - - } break; - - case SCTP_DATA_REQ: { - if (sctp_send_msg(SCTP_DATA_REQ(received_message_p).assocId, - SCTP_DATA_REQ(received_message_p).stream, - SCTP_DATA_REQ(received_message_p).buffer, - SCTP_DATA_REQ(received_message_p).bufLen) < 0) { - SCTP_ERROR("Failed to send message over SCTP\n"); - } - } - break; - - case MESSAGE_TEST: { - // int i = 10000; - // while(i--); - } break; - - case TERMINATE_MESSAGE: { - itti_exit_task(); - } - break; - - default: { - SCTP_DEBUG("Unkwnon message ID %d:%s\n", - ITTI_MSG_ID(received_message_p), - ITTI_MSG_NAME(received_message_p)); - } - break; - } - - itti_free(ITTI_MSG_ORIGIN_ID(received_message_p), received_message_p); - received_message_p = NULL; - } - - return NULL; -} - -int sctp_init(const mme_config_t *mme_config_p) -{ - SCTP_DEBUG("Initializing SCTP task interface\n"); - - memset(&sctp_desc, 0, sizeof(struct sctp_descriptor_s)); - - /* Number of streams from configuration */ - sctp_desc.nb_instreams = mme_config_p->sctp_config.in_streams; - sctp_desc.nb_outstreams = mme_config_p->sctp_config.out_streams; - - if (itti_create_task(TASK_SCTP, &sctp_intertask_interface, - NULL) < 0) { - SCTP_ERROR("create task failed"); - SCTP_DEBUG("Initializing SCTP task interface: FAILED\n"); - return -1; - } - - SCTP_DEBUG("Initializing SCTP task interface: DONE\n"); - return 0; -} diff --git a/openair-cn/SCTP/sctp_primitives_server.h b/openair-cn/SCTP/sctp_primitives_server.h deleted file mode 100644 index 60d3178dc9..0000000000 --- a/openair-cn/SCTP/sctp_primitives_server.h +++ /dev/null @@ -1,69 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ - -/*! \file sctp_primitives_server.c - * \brief Main server primitives - * \author Sebastien ROUX - * \date 2013 - * \version 1.0 - * @ingroup _sctp - * @{ - */ - -#if HAVE_CONFIG_H -# include "config.h" -#endif - -#include "mme_config.h" - -#if !defined(HAVE_LIBSCTP) -# error "You must install libsctp-dev" -#endif - -#include -#include - -#ifndef SCTP_PRIMITIVES_SERVER_H_ -#define SCTP_PRIMITIVES_SERVER_H_ - -/** \brief SCTP data received callback - \param buffer pointer to buffer received - \param length pointer to the length of buffer - **/ -typedef void (*sctp_recv_callback)(uint8_t *buffer, uint32_t length); - -/** \brief SCTP Init function. Initialize SCTP layer - \param mme_config The global MME configuration structure - @returns -1 on error, 0 otherwise. - **/ -int sctp_init(const mme_config_t *mme_config_p); - -#endif /* SCTP_PRIMITIVES_SERVER_H_ */ - -/* @} */ diff --git a/openair-cn/SECU/COPYING b/openair-cn/SECU/COPYING deleted file mode 100644 index 94a9ed024d..0000000000 --- a/openair-cn/SECU/COPYING +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program 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. - - This program 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 this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/openair-cn/SECU/Makefile.am b/openair-cn/SECU/Makefile.am deleted file mode 100644 index 5fd67b18fe..0000000000 --- a/openair-cn/SECU/Makefile.am +++ /dev/null @@ -1,48 +0,0 @@ -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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 . -# -# Contact Information -# OpenAirInterface Admin: openair_admin@eurecom.fr -# OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr -# -# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. -# -################################################################################ -AM_CFLAGS = @ADD_CFLAGS@ \ - -I$(top_srcdir)/UTILS \ - -I$(top_srcdir)/INTERTASK_INTERFACE \ - -I$(top_srcdir)/COMMON - -noinst_LTLIBRARIES = libsecu.la - -libsecu_la_LDFLAGS = -all-static -lm -libsecu_la_SOURCES = \ - kdf.c \ - key_nas_deriver.c \ - nas_stream_eea1.c \ - nas_stream_eia1.c \ - nas_stream_eea2.c \ - nas_stream_eia2.c \ - rijndael.c \ - rijndael.h \ - snow3g.c \ - snow3g.h \ - secu_defs.h \ No newline at end of file diff --git a/openair-cn/SECU/Makefile.eNB b/openair-cn/SECU/Makefile.eNB deleted file mode 100644 index cd8ba01189..0000000000 --- a/openair-cn/SECU/Makefile.eNB +++ /dev/null @@ -1,77 +0,0 @@ -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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 . -# -# Contact Information -# OpenAirInterface Admin: openair_admin@eurecom.fr -# OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr -# -# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. -# -################################################################################ -# include $(OPENAIR_TARGETS)/SIMU/USER/Makerules - -OUTDIR = . - - -libsecu_OBJECTS = \ - kdf.o \ - rijndael.o \ - snow3g.o \ - key_nas_deriver.o \ - nas_stream_eea1.o \ - nas_stream_eia1.o \ - nas_stream_eea2.o \ - nas_stream_eia2.o - -# pull in dependency info for *existing* .o files --include $(OUTDIR)/*.d - -CFLAGS = \ - -Wall \ - $(SECU_CFLAGS) \ - -DENB_MODE \ - -Werror=uninitialized \ - -Werror=implicit-function-declaration - -$(OUTDIR)/%.o : %.c - @echo "Compiling $<" - @if [ ! -d $(dir $@) ]; then mkdir -p $(dir $@); fi; - @$(CC) -c $(CFLAGS) -o $@ $< - @$(CC) -MM $(CFLAGS) $< > $(basename $@).d - @mv -f $(basename $@).d $(basename $@).d.tmp - @sed -e 's|.*:|$@:|' < $(basename $@).d.tmp > $(basename $@).d - @sed -e 's/.*://' -e 's/\\$$//' < $(basename $@).d.tmp | fmt -1 | \ - sed -e 's/^ *//' -e 's/$$/:/' >> $(basename $@).d - @rm -f $(basename $@).d.tmp - -objsdir: - @if [ ! -d $(OUTDIR) ]; then mkdir -p $(OUTDIR); fi; - -$(OUTDIR)/libsecu.a: $(addprefix $(OUTDIR)/,$(libsecu_OBJECTS)) - @echo Creating SECU archive - @$(AR) rcs $@ $(addprefix $(OUTDIR)/,$(libsecu_OBJECTS)) - -clean: - @$(RM_F_V) $(OUTDIR)/*.o - @$(RM_F_V) $(OUTDIR)/*.d - @$(RM_F_V) $(OUTDIR)/libsecu.a - -cleanall: clean diff --git a/openair-cn/SGW-LITE/COPYING b/openair-cn/SGW-LITE/COPYING deleted file mode 100644 index 94a9ed024d..0000000000 --- a/openair-cn/SGW-LITE/COPYING +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program 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. - - This program 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 this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/openair-cn/SGW-LITE/Makefile.am b/openair-cn/SGW-LITE/Makefile.am deleted file mode 100644 index 54a36c14c7..0000000000 --- a/openair-cn/SGW-LITE/Makefile.am +++ /dev/null @@ -1,53 +0,0 @@ -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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 . -# -# Contact Information -# OpenAirInterface Admin: openair_admin@eurecom.fr -# OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr -# -# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. -# -################################################################################ -AM_CFLAGS = @ADD_CFLAGS@ \ - -I$(top_srcdir)/COMMON \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/api/network \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/include \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/ies \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/emm/msg \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/esm/msg \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/util \ - -I$(top_srcdir)/INTERTASK_INTERFACE \ - -I$(top_srcdir)/GTPV1-U \ - -I$(top_srcdir)/MME_APP \ - -I$(top_srcdir)/UTILS \ - -I$(top_srcdir)/UTILS/HASHTABLE - -noinst_LTLIBRARIES = libsgw_lite.la -libsgw_lite_la_LDFLAGS = -all-static -lconfig - -libsgw_lite_la_SOURCES= \ - spgw_config.c spgw_config.h \ - s11_causes.c s11_causes.h \ - sgw_lite_task.c \ - sgw_lite_handlers.c sgw_lite_handlers.h \ - sgw_lite_context_manager.c sgw_lite_context_manager.h \ - sgw_lite.h sgw_lite_defs.h sgw_lite_ie_defs.h \ - pgw_lite_paa.c pgw_lite_paa.h diff --git a/openair-cn/SGW-LITE/pgw_lite_paa.c b/openair-cn/SGW-LITE/pgw_lite_paa.c deleted file mode 100755 index 9a681162af..0000000000 --- a/openair-cn/SGW-LITE/pgw_lite_paa.c +++ /dev/null @@ -1,188 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/*! \file pgw_lite_paa.c -* \brief -* \author Lionel Gauthier -* \company Eurecom -* \email: lionel.gauthier@eurecom.fr -*/ -#include -#include -#include -#include -#include -#include - -#include "intertask_interface.h" -#include "assertions.h" -#include "queue.h" - -#include "pgw_lite_paa.h" -#include "sgw_lite_defs.h" -#include "spgw_config.h" -#include "sgw_lite.h" - - -//#define PGW_LITE_FREE_ADDR_POOL_CONFIG 1 - -extern pgw_app_t pgw_app; - - -// Load in PGW pool, configured PAA address pool -void pgw_lite_load_pool_ip_addresses(void) -{ - struct pgw_lite_conf_ipv4_list_elm_s *conf_ipv4_p = NULL; - struct pgw_lite_ipv4_list_elm_s *ipv4_p = NULL; - - struct pgw_lite_conf_ipv6_list_elm_s *conf_ipv6_p = NULL; - struct pgw_lite_ipv6_list_elm_s *ipv6_p = NULL; - char print_buffer[INET6_ADDRSTRLEN]; - - STAILQ_INIT(&pgw_app.pgw_lite_ipv4_list_free); - STAILQ_INIT(&pgw_app.pgw_lite_ipv4_list_allocated); - STAILQ_INIT(&pgw_app.pgw_lite_ipv6_list_free); - STAILQ_INIT(&pgw_app.pgw_lite_ipv6_list_allocated); - - STAILQ_FOREACH(conf_ipv4_p, &spgw_config.pgw_config.pgw_lite_ipv4_pool_list, ipv4_entries) { - ipv4_p = calloc(1, sizeof(struct pgw_lite_ipv4_list_elm_s)); - ipv4_p->addr.s_addr = ntohl(conf_ipv4_p->addr.s_addr); - STAILQ_INSERT_TAIL(&pgw_app.pgw_lite_ipv4_list_free, ipv4_p, ipv4_entries); - //SPGW_APP_DEBUG("Loaded IPv4 PAA address in pool: %s\n", - // inet_ntoa(conf_ipv4_p->addr)); - } - STAILQ_FOREACH(conf_ipv6_p, &spgw_config.pgw_config.pgw_lite_ipv6_pool_list, ipv6_entries) { - ipv6_p = calloc(1, sizeof(struct pgw_lite_ipv6_list_elm_s)); - ipv6_p->addr = conf_ipv6_p->addr; - ipv6_p->prefix_len = conf_ipv6_p->prefix_len; - ipv6_p->num_allocated = 0; - STAILQ_INSERT_TAIL(&pgw_app.pgw_lite_ipv6_list_free, ipv6_p, ipv6_entries); - - if (inet_ntop(AF_INET6, &ipv6_p->addr, print_buffer, INET6_ADDRSTRLEN) == NULL) { - SPGW_APP_ERROR("Could not Load IPv6 PAA address in pool: %s\n", strerror(errno)); - } /*else { - - SPGW_APP_DEBUG("Loaded IPv6 PAA prefix in pool: %s\n",print_buffer); - }*/ - } -#if defined(PGW_LITE_FREE_ADDR_POOL_CONFIG) - - while ((conf_ipv4_p = STAILQ_FIRST(&spgw_config.pgw_config.pgw_lite_ipv4_pool_list))) { - STAILQ_REMOVE_HEAD(&spgw_config.pgw_config.pgw_lite_ipv4_pool_list, ipv4_entries); - free(conf_ipv4_p); - } - - while ((conf_ipv6_p = STAILQ_FIRST(&spgw_config.pgw_config.pgw_lite_ipv6_pool_list))) { - STAILQ_REMOVE_HEAD(&spgw_config.pgw_config.pgw_lite_ipv6_pool_list, ipv6_entries); - free(conf_ipv6_p); - } - -#endif - -} - - - -int pgw_lite_get_free_ipv4_paa_address(struct in_addr * const addr_pP) -{ - struct pgw_lite_ipv4_list_elm_s *ipv4_p = NULL; - - if (STAILQ_EMPTY(&pgw_app.pgw_lite_ipv4_list_free)) { - addr_pP->s_addr = INADDR_ANY; - return -1; - } - - ipv4_p = STAILQ_FIRST(&pgw_app.pgw_lite_ipv4_list_free); - STAILQ_REMOVE(&pgw_app.pgw_lite_ipv4_list_free, ipv4_p, pgw_lite_ipv4_list_elm_s, ipv4_entries); - STAILQ_INSERT_TAIL(&pgw_app.pgw_lite_ipv4_list_allocated, ipv4_p, ipv4_entries); - addr_pP->s_addr = ipv4_p->addr.s_addr; - return 0; -} - -int pgw_lite_release_free_ipv4_paa_address(const struct in_addr * const addr_pP) -{ - struct pgw_lite_ipv4_list_elm_s *ipv4_p = NULL; - - STAILQ_FOREACH(ipv4_p, &pgw_app.pgw_lite_ipv4_list_allocated, ipv4_entries) { - if (ipv4_p->addr.s_addr == addr_pP->s_addr) { - STAILQ_REMOVE(&pgw_app.pgw_lite_ipv4_list_allocated, ipv4_p, pgw_lite_ipv4_list_elm_s, ipv4_entries); - STAILQ_INSERT_TAIL(&pgw_app.pgw_lite_ipv4_list_free, ipv4_p, ipv4_entries); - return 0; - } - } - return -1; -} - -int pgw_lite_get_free_ipv6_paa_prefix(struct in6_addr * const addr_pP) -{ - struct pgw_lite_ipv6_list_elm_s *ipv6_p = NULL; - - if (STAILQ_EMPTY(&pgw_app.pgw_lite_ipv6_list_free)) { - *addr_pP = in6addr_any; - return -1; - } - - ipv6_p = STAILQ_FIRST(&pgw_app.pgw_lite_ipv6_list_free); - ipv6_p->num_allocated += 1; - ipv6_p->num_free -= 1; - - if (ipv6_p->num_free == 0) { - STAILQ_REMOVE(&pgw_app.pgw_lite_ipv6_list_free, ipv6_p, pgw_lite_ipv6_list_elm_s, ipv6_entries); - STAILQ_INSERT_TAIL(&pgw_app.pgw_lite_ipv6_list_allocated, ipv6_p, ipv6_entries); - } - - *addr_pP = ipv6_p->addr; - return 0; -} - -int pgw_lite_release_free_ipv6_paa_prefix(const struct in6_addr * const addr_pP) -{ - struct pgw_lite_ipv6_list_elm_s *ipv6_p = NULL; - - ipv6_p = STAILQ_FIRST(&pgw_app.pgw_lite_ipv6_list_free); - - if (IN6_ARE_ADDR_EQUAL(&ipv6_p->addr, addr_pP)) { - ipv6_p->num_allocated -= 1; - ipv6_p->num_free += 1; - } - - STAILQ_FOREACH(ipv6_p, &pgw_app.pgw_lite_ipv6_list_allocated, ipv6_entries) { - if (IN6_ARE_ADDR_EQUAL(&ipv6_p->addr, addr_pP)) { - STAILQ_REMOVE(&pgw_app.pgw_lite_ipv6_list_allocated, ipv6_p, pgw_lite_ipv6_list_elm_s, ipv6_entries); - ipv6_p->num_allocated -= 1; - ipv6_p->num_free += 1; - STAILQ_INSERT_TAIL(&pgw_app.pgw_lite_ipv6_list_free, ipv6_p, ipv6_entries); - return 0; - } - } - return -1; -} - - - - diff --git a/openair-cn/SGW-LITE/pgw_lite_paa.h b/openair-cn/SGW-LITE/pgw_lite_paa.h deleted file mode 100755 index 0bab08514b..0000000000 --- a/openair-cn/SGW-LITE/pgw_lite_paa.h +++ /dev/null @@ -1,44 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/*! \file pgw_lite_paa.h -* \brief -* \author Lionel Gauthier -* \company Eurecom -* \email: lionel.gauthier@eurecom.fr -*/ -#ifndef PGW_LITE_PAA_H_ -#define PGW_LITE_PAA_H_ - -void pgw_lite_load_pool_ip_addresses (void); -int pgw_lite_get_free_ipv4_paa_address (struct in_addr * const addr_P); -int pgw_lite_release_free_ipv4_paa_address (const struct in_addr * const addr_P); -int pgw_lite_get_free_ipv6_paa_prefix (struct in6_addr * const addr_pP); -int pgw_lite_release_free_ipv6_paa_prefix (const struct in6_addr * const addr_pP); - -#endif diff --git a/openair-cn/SGW-LITE/s11_causes.c b/openair-cn/SGW-LITE/s11_causes.c deleted file mode 100644 index b74d9bf987..0000000000 --- a/openair-cn/SGW-LITE/s11_causes.c +++ /dev/null @@ -1,96 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/*! \file s11_causes.c -* \brief -* \author Sebastien ROUX, Lionel Gauthier -* \company Eurecom -* \email: lionel.gauthier@eurecom.fr -*/ -#define SGW_LITE -#define S11_CAUSES_C - -#include -#include -#include - -#include "s11_causes.h" -#include "common_types.h" -#include "sgw_lite_ie_defs.h" - -static const SGWCauseMapping_t causes[] = { - { LOCAL_DETACH, "Local detach", 0, 0, 0, 0 }, - { COMPLETE_DETACH, "Complete detach", 0, 0, 0, 0 }, - { RAT_CHANGE_3GPP_TO_NON_3GPP, "From 3GPP to non 3GPP RAT change", 0, 0, 0, 0 }, - { ISR_DEACTIVATION, "ISR deactivation", 0, 0, 0, 0 }, - { ERROR_IND_FROM_RNC_ENB_SGSN, "Error ind received from RNC/eNB/SGSN", 0, 0, 0, 0 }, - { IMSI_DETACH_ONLY, "IMSI detach only", 0, 0, 0, 0 }, - { REQUEST_ACCEPTED, "Request accepted", 1, 1, 1, 1 }, - { REQUEST_ACCEPTED_PARTIALLY, "Request accepted partially", 1, 1, 1, 0 }, - { NEW_PDN_TYPE_NW_PREF, "New PDN type network preference", 1, 0, 0, 0 }, - { NEW_PDN_TYPE_SAB_ONLY, "New PDN type single address bearer only", 1, 0, 0, 0 }, - { CONTEXT_NOT_FOUND, "Context not found", 0, 1, 1, 1 }, - { INVALID_MESSAGE_FORMAT, "Invalid message format", 1, 1, 1, 1 }, - { INVALID_LENGTH, "Invalid length", 1, 1, 1, 0 }, - { SERVICE_NOT_SUPPORTED, "Service not supported", 0, 0, 1, 0 }, - { SYSTEM_FAILURE, "System failure", 1, 1, 1, 0 }, - { NO_RESOURCES_AVAILABLE, "No resources available", 1, 0, 0, 0 }, - { MISSING_OR_UNKNOWN_APN, "Missing or unknown APN", 1, 0, 0, 0 }, - { GRE_KEY_NOT_FOUND, "GRE KEY not found", 1, 0, 0, 0 }, - { DENIED_IN_RAT, "Denied in RAT", 1, 1, 0, 0 }, - { UE_NOT_RESPONDING, "UE not responding", 0, 1, 0, 0 }, - { SERVICE_DENIED, "Service Denied", 0, 0, 0, 0 }, - { UNABLE_TO_PAGE_UE, "Unable to page UE", 0, 1, 0, 0 }, - { NO_MEMORY_AVAILABLE, "No memory available", 1, 1, 1, 0 }, - { REQUEST_REJECTED, "Request rejected", 1, 1, 1, 0 }, - { INVALID_PEER, "Invalid peer", 0, 0, 0, 1 }, - { TEMP_REJECT_HO_IN_PROGRESS, "Temporarily rejected due to HO in progress",0, 0, 0, 0 }, - { M_PDN_APN_NOT_ALLOWED, "Multiple PDN for a given APN not allowed", 1, 0, 0, 0 }, - { 0, NULL, 0, 0, 0, 0 }, -}; - -static int compare_cause_id(const void *m1, const void *m2) -{ - struct SGWCauseMapping_e *scm1 = (struct SGWCauseMapping_e*)m1; - struct SGWCauseMapping_e *scm2 = (struct SGWCauseMapping_e*)m2; - - return (scm1->value - scm2->value); -} - -char *sgw_cause_2_string(uint8_t cause_value) -{ - SGWCauseMapping_t *res, key; - key.value = cause_value; - res = bsearch(&key, causes, sizeof(causes), sizeof(SGWCauseMapping_t), compare_cause_id); - - if (res == NULL) { - return "Unknown cause"; - } else { - return res->name; - } -} diff --git a/openair-cn/SGW-LITE/s11_causes.h b/openair-cn/SGW-LITE/s11_causes.h deleted file mode 100644 index 2ae49d0cd7..0000000000 --- a/openair-cn/SGW-LITE/s11_causes.h +++ /dev/null @@ -1,51 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/*! \file s11_causes.h -* \brief -* \author Sebastien ROUX, Lionel Gauthier -* \company Eurecom -* \email: lionel.gauthier@eurecom.fr -*/ -#ifndef S11_CAUSES_H_ -#define S11_CAUSES_H_ - -typedef struct SGWCauseMapping_e { - uint8_t value; - /* Displayable cause name */ - char *name; - /* Possible cause in message? */ - unsigned create_session_response:1; - unsigned create_bearer_response:1; - unsigned modify_bearer_response:1; - unsigned delete_session_response:1; -} SGWCauseMapping_t; - -char *sgw_cause_2_string(uint8_t cause_value); - -#endif /* S11_CAUSES_H_ */ diff --git a/openair-cn/SGW-LITE/sgw_lite.h b/openair-cn/SGW-LITE/sgw_lite.h deleted file mode 100755 index d71db77257..0000000000 --- a/openair-cn/SGW-LITE/sgw_lite.h +++ /dev/null @@ -1,93 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/*! \file sgw_lite.h -* \brief -* \author Lionel Gauthier -* \company Eurecom -* \email: lionel.gauthier@eurecom.fr -*/ - -#ifndef SGW_LITE_H_ -#define SGW_LITE_H_ -#include -#include "hashtable.h" -#include "tree.h" -#include "commonDef.h" -#include "common_types.h" -#include "sgw_lite_context_manager.h" - -typedef struct sgw_app_s { - - char *sgw_interface_name_for_S1u_S12_S4_up; - uint32_t sgw_ip_address_for_S1u_S12_S4_up; - - char *sgw_interface_name_for_S11_S4; // unused now - uint32_t sgw_ip_address_for_S11_S4; // unused now - - uint32_t sgw_ip_address_for_S5_S8_up; // unused now - - // key is S11 S-GW local teid - hash_table_t *s11teid2mme_hashtable; - - // key is S1-U S-GW local teid - hash_table_t *s1uteid2enb_hashtable; - - // the key of this hashtable is the S11 s-gw local teid. - hash_table_t *s11_bearer_context_information_hashtable; - - -} sgw_app_t; - - -struct pgw_lite_ipv4_list_elm_s { - STAILQ_ENTRY(pgw_lite_ipv4_list_elm_s) ipv4_entries; - struct in_addr addr; -}; - - -struct pgw_lite_ipv6_list_elm_s { - STAILQ_ENTRY(pgw_lite_ipv6_list_elm_s) ipv6_entries; - struct in6_addr addr; - int prefix_len; - int num_allocated; - int num_free; -} ; - - -typedef struct pgw_app_s { - - STAILQ_HEAD(pgw_lite_ipv4_list_free_head_s, pgw_lite_ipv4_list_elm_s) pgw_lite_ipv4_list_free; - STAILQ_HEAD(pgw_lite_ipv4_list_allocated_head_s, pgw_lite_ipv4_list_elm_s) pgw_lite_ipv4_list_allocated; - - STAILQ_HEAD(pgw_lite_ipv6_list_free_head_s, pgw_lite_ipv6_list_elm_s) pgw_lite_ipv6_list_free; - STAILQ_HEAD(pgw_lite_ipv6_list_allocated_head_s, pgw_lite_ipv6_list_elm_s) pgw_lite_ipv6_list_allocated; -} pgw_app_t; - -#endif - diff --git a/openair-cn/SGW-LITE/sgw_lite_context_manager.c b/openair-cn/SGW-LITE/sgw_lite_context_manager.c deleted file mode 100644 index 8f8fddea8c..0000000000 --- a/openair-cn/SGW-LITE/sgw_lite_context_manager.c +++ /dev/null @@ -1,386 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/*! \file sgw_lite_context_manager.c -* \brief -* \author Lionel Gauthier -* \company Eurecom -* \email: lionel.gauthier@eurecom.fr -*/ -#define SGW_LITE -#define SGW_LITE_CONTEXT_MANAGER_C - -#include -#include -#include -#include - -#include "tree.h" -#include "hashtable.h" - -#include "intertask_interface.h" -#include "mme_config.h" -#include "sgw_lite_defs.h" -#include "sgw_lite_context_manager.h" -#include "sgw_lite.h" - -extern sgw_app_t sgw_app; - - -//----------------------------------------------------------------------------- -static void sgw_lite_display_s11teid2mme_mapping(uint64_t keyP, void *dataP, void* unusedParameterP) -//----------------------------------------------------------------------------- -{ - mme_sgw_tunnel_t * mme_sgw_tunnel= NULL; - - if (dataP != NULL) { - mme_sgw_tunnel = (mme_sgw_tunnel_t *)dataP; - SPGW_APP_DEBUG("| %u\t<------------->\t%u\n", mme_sgw_tunnel->remote_teid, mme_sgw_tunnel->local_teid); - } else { - SPGW_APP_DEBUG("INVALID S11 TEID MAPPING FOUND\n"); - } -} -//----------------------------------------------------------------------------- -void sgw_lite_display_s11teid2mme_mappings(void) -//----------------------------------------------------------------------------- -{ - SPGW_APP_DEBUG("+--------------------------------------+\n"); - SPGW_APP_DEBUG("| MME <--- S11 TE ID MAPPINGS ---> SGW |\n"); - SPGW_APP_DEBUG("+--------------------------------------+\n"); - hashtable_apply_funct_on_elements(sgw_app.s11teid2mme_hashtable, sgw_lite_display_s11teid2mme_mapping, NULL); - SPGW_APP_DEBUG("+--------------------------------------+\n"); -} -//----------------------------------------------------------------------------- -static void sgw_lite_display_pdn_connection_sgw_eps_bearers(uint64_t keyP, void *dataP, void* unusedParameterP) -//----------------------------------------------------------------------------- -{ - sgw_eps_bearer_entry_t *eps_bearer_entry = NULL; - - if (dataP != NULL) { - eps_bearer_entry = (sgw_eps_bearer_entry_t *)dataP; - SPGW_APP_DEBUG("|\t\t\t\t%"PRId64"\t<-> ebi: %u, enb_teid_for_S1u: %u, s_gw_teid_for_S1u_S12_S4_up: %u (tbc)\n", - keyP, - eps_bearer_entry->eps_bearer_id, - eps_bearer_entry->enb_teid_for_S1u, - eps_bearer_entry->s_gw_teid_for_S1u_S12_S4_up); - } else { - SPGW_APP_DEBUG("\t\t\t\tINVALID eps_bearer_entry FOUND\n"); - } -} - -//----------------------------------------------------------------------------- -static void sgw_lite_display_s11_bearer_context_information(uint64_t keyP, void *dataP, void* unusedParameterP) -//----------------------------------------------------------------------------- -{ - s_plus_p_gw_eps_bearer_context_information_t * sp_context_information= NULL; - hashtable_rc_t hash_rc; - - if (dataP != NULL) { - sp_context_information = (s_plus_p_gw_eps_bearer_context_information_t *)dataP; - SPGW_APP_DEBUG("| KEY %"PRId64": \n", keyP); - SPGW_APP_DEBUG("|\tsgw_eps_bearer_context_information: |\n"); - //Imsi_t imsi; ///< IMSI (International Mobile Subscriber Identity) is the subscriber permanent identity. - SPGW_APP_DEBUG("|\t\timsi_unauthenticated_indicator:\t%u\n", sp_context_information->sgw_eps_bearer_context_information.imsi_unauthenticated_indicator); - //char msisdn[MSISDN_LENGTH]; ///< The basic MSISDN of the UE. The presence is dictated by its storage in the HSS. - SPGW_APP_DEBUG("|\t\tmme_teid_for_S11: \t%u\n", sp_context_information->sgw_eps_bearer_context_information.mme_teid_for_S11); - //ip_address_t mme_ip_address_for_S11; ///< MME IP address the S11 interface. - SPGW_APP_DEBUG("|\t\ts_gw_teid_for_S11_S4: \t%u\n", sp_context_information->sgw_eps_bearer_context_information.s_gw_teid_for_S11_S4); - //ip_address_t s_gw_ip_address_for_S11_S4; ///< S-GW IP address for the S11 interface and the S4 Interface (control plane). - //cgi_t last_known_cell_Id; ///< This is the last location of the UE known by the network - - SPGW_APP_DEBUG("|\t\tpdn_connection:\n"); - SPGW_APP_DEBUG("|\t\t\tapn_in_use: %s\n", sp_context_information->sgw_eps_bearer_context_information.pdn_connection.apn_in_use); - SPGW_APP_DEBUG("|\t\t\tdefault_bearer: %u\n", sp_context_information->sgw_eps_bearer_context_information.pdn_connection.default_bearer); - SPGW_APP_DEBUG("|\t\t\teps_bearers:\n"); - - hash_rc = hashtable_apply_funct_on_elements(sp_context_information->sgw_eps_bearer_context_information.pdn_connection.sgw_eps_bearers, - sgw_lite_display_pdn_connection_sgw_eps_bearers, - NULL); - - if (hash_rc != HASH_TABLE_OK) { - SPGW_APP_DEBUG("Invalid sgw_eps_bearers hashtable for display\n"); - } - - //void *trxn; - //uint32_t peer_ip; - } else { - SPGW_APP_DEBUG("INVALID s_plus_p_gw_eps_bearer_context_information FOUND\n"); - } -} -//----------------------------------------------------------------------------- -void sgw_lite_display_s11_bearer_context_information_mapping(void) -//----------------------------------------------------------------------------- -{ - SPGW_APP_DEBUG("+-----------------------------------------+\n"); - SPGW_APP_DEBUG("| S11 BEARER CONTEXT INFORMATION MAPPINGS |\n"); - SPGW_APP_DEBUG("+-----------------------------------------+\n"); - hashtable_apply_funct_on_elements(sgw_app.s11_bearer_context_information_hashtable, sgw_lite_display_s11_bearer_context_information, NULL); - SPGW_APP_DEBUG("+--------------------------------------+\n"); -} -//----------------------------------------------------------------------------- -void pgw_lite_cm_free_apn(pgw_apn_t *apnP) -//----------------------------------------------------------------------------- -{ - if (apnP != NULL) { - if (apnP->pdn_connections != NULL) { - obj_hashtable_destroy(apnP->pdn_connections); - } - } -} -//----------------------------------------------------------------------------- -Teid_t sgw_lite_get_new_S11_tunnel_id(void) -//----------------------------------------------------------------------------- -{ - // TO DO: RANDOM - static Teid_t tunnel_id = 0; - tunnel_id += 1; - return tunnel_id; -} - -//----------------------------------------------------------------------------- -mme_sgw_tunnel_t *sgw_lite_cm_create_s11_tunnel(Teid_t remote_teid, Teid_t local_teid) -//----------------------------------------------------------------------------- -{ - - mme_sgw_tunnel_t *new_tunnel; - - new_tunnel = malloc(sizeof(mme_sgw_tunnel_t)); - - if (new_tunnel == NULL) { - /* Malloc failed, may be ENOMEM error */ - SPGW_APP_ERROR("Failed to create tunnel for remote_teid %u\n", remote_teid); - return NULL; - } - - new_tunnel->remote_teid = remote_teid; - new_tunnel->local_teid = local_teid; - - /* Trying to insert the new tunnel into the tree. - * If collision_p is not NULL (0), it means tunnel is already present. - */ - hashtable_insert(sgw_app.s11teid2mme_hashtable, local_teid, new_tunnel); - - return new_tunnel; -} - -//----------------------------------------------------------------------------- -int sgw_lite_cm_remove_s11_tunnel(Teid_t local_teid) -//----------------------------------------------------------------------------- -{ - int temp; - - temp = hashtable_remove(sgw_app.s11teid2mme_hashtable, local_teid); - - return temp; -} - -//----------------------------------------------------------------------------- -sgw_eps_bearer_entry_t * sgw_lite_cm_create_eps_bearer_entry(void) -//----------------------------------------------------------------------------- -{ - sgw_eps_bearer_entry_t *eps_bearer_entry; - - eps_bearer_entry = malloc(sizeof(sgw_eps_bearer_entry_t)); - - if (eps_bearer_entry == NULL) { - /* Malloc failed, may be ENOMEM error */ - SPGW_APP_ERROR("Failed to create new EPS bearer object\n"); - return NULL; - } - - return eps_bearer_entry; -} - - -//----------------------------------------------------------------------------- -sgw_pdn_connection_t * sgw_lite_cm_create_pdn_connection(void) -//----------------------------------------------------------------------------- -{ - sgw_pdn_connection_t *pdn_connection; - - pdn_connection = malloc(sizeof(sgw_pdn_connection_t)); - - if (pdn_connection == NULL) { - /* Malloc failed, may be ENOMEM error */ - SPGW_APP_ERROR("Failed to create new PDN connection object\n"); - return NULL; - } - - memset(pdn_connection, 0, sizeof(sgw_pdn_connection_t)); - - pdn_connection->sgw_eps_bearers = hashtable_create(12, NULL, NULL); - - if ( pdn_connection->sgw_eps_bearers == NULL) { - SPGW_APP_ERROR("Failed to create eps bearers collection object\n"); - free(pdn_connection); - pdn_connection = NULL; - return NULL; - } - - return pdn_connection; -} -//----------------------------------------------------------------------------- -void sgw_lite_cm_free_pdn_connection(sgw_pdn_connection_t *pdn_connectionP) -//----------------------------------------------------------------------------- -{ - if (pdn_connectionP != NULL) { - if (pdn_connectionP->sgw_eps_bearers != NULL) { - hashtable_destroy(pdn_connectionP->sgw_eps_bearers); - } - } -} -//----------------------------------------------------------------------------- -void sgw_lite_cm_free_s_plus_p_gw_eps_bearer_context_information(s_plus_p_gw_eps_bearer_context_information_t *contextP) -//----------------------------------------------------------------------------- -{ - if (contextP == NULL) { - return; - } - - /*if (contextP->sgw_eps_bearer_context_information.pdn_connections != NULL) { - obj_hashtable_destroy(contextP->sgw_eps_bearer_context_information.pdn_connections); - }*/ - if (contextP->sgw_eps_bearer_context_information.pdn_connection.sgw_eps_bearers != NULL) { - hashtable_destroy(contextP->sgw_eps_bearer_context_information.pdn_connection.sgw_eps_bearers); - } - - if (contextP->pgw_eps_bearer_context_information.apns != NULL) { - obj_hashtable_destroy(contextP->pgw_eps_bearer_context_information.apns); - } - - free(contextP); -} - -//----------------------------------------------------------------------------- -s_plus_p_gw_eps_bearer_context_information_t * sgw_lite_cm_create_bearer_context_information_in_collection(Teid_t teid) -//----------------------------------------------------------------------------- -{ - s_plus_p_gw_eps_bearer_context_information_t *new_bearer_context_information; - - new_bearer_context_information = malloc(sizeof(s_plus_p_gw_eps_bearer_context_information_t)); - - if (new_bearer_context_information == NULL) { - /* Malloc failed, may be ENOMEM error */ - SPGW_APP_ERROR("Failed to create new bearer context information object for S11 remote_teid %u\n", teid); - return NULL; - } - - memset(new_bearer_context_information, 0, sizeof(s_plus_p_gw_eps_bearer_context_information_t)); - SPGW_APP_DEBUG("sgw_lite_cm_create_bearer_context_information_in_collection %d\n", teid); - - /*new_bearer_context_information->sgw_eps_bearer_context_information.pdn_connections = obj_hashtable_create(32, NULL, NULL, sgw_lite_cm_free_pdn_connection); - - if ( new_bearer_context_information->sgw_eps_bearer_context_information.pdn_connections == NULL) { - SPGW_APP_ERROR("Failed to create PDN connections collection object entry for EPS bearer teid %u \n", teid); - sgw_lite_cm_free_s_plus_p_gw_eps_bearer_context_information(new_bearer_context_information); - return NULL; - }*/ - - new_bearer_context_information->pgw_eps_bearer_context_information.apns = obj_hashtable_create(32, NULL, NULL, pgw_lite_cm_free_apn); - - if ( new_bearer_context_information->pgw_eps_bearer_context_information.apns == NULL) { - SPGW_APP_ERROR("Failed to create APN collection object entry for EPS bearer S11 teid %u \n", teid); - sgw_lite_cm_free_s_plus_p_gw_eps_bearer_context_information(new_bearer_context_information); - return NULL; - } - - /* Trying to insert the new tunnel into the tree. - * If collision_p is not NULL (0), it means tunnel is already present. - */ - hashtable_insert(sgw_app.s11_bearer_context_information_hashtable, teid, new_bearer_context_information); - SPGW_APP_DEBUG("Added new s_plus_p_gw_eps_bearer_context_information_t in s11_bearer_context_information_hashtable key teid %u\n", teid); - - return new_bearer_context_information; -} - -int sgw_lite_cm_remove_bearer_context_information(Teid_t teid) -{ - int temp; - temp = hashtable_remove(sgw_app.s11_bearer_context_information_hashtable, teid); - return temp; -} - -//--- EPS Bearer Entry - -//----------------------------------------------------------------------------- -sgw_eps_bearer_entry_t * sgw_lite_cm_create_eps_bearer_entry_in_collection(hash_table_t *eps_bearersP, ebi_t eps_bearer_idP) -//----------------------------------------------------------------------------- -{ - sgw_eps_bearer_entry_t *new_eps_bearer_entry; - hashtable_rc_t hash_rc = HASH_TABLE_OK; - - if (eps_bearersP == NULL) { - SPGW_APP_ERROR("Failed to create EPS bearer entry for EPS bearer id %u. reason eps bearer hashtable is NULL \n", eps_bearer_idP); - return NULL; - } - - new_eps_bearer_entry = malloc(sizeof(sgw_eps_bearer_entry_t)); - - if (new_eps_bearer_entry == NULL) { - /* Malloc failed, may be ENOMEM error */ - SPGW_APP_ERROR("Failed to create EPS bearer entry for EPS bearer id %u \n", eps_bearer_idP); - return NULL; - } - - memset(new_eps_bearer_entry, 0, sizeof(sgw_eps_bearer_entry_t)); - - new_eps_bearer_entry->eps_bearer_id = eps_bearer_idP; - - hash_rc = hashtable_insert(eps_bearersP, eps_bearer_idP, new_eps_bearer_entry); - SPGW_APP_DEBUG("Inserted new EPS bearer entry for EPS bearer id %u status %s\n", eps_bearer_idP, hashtable_rc_code2string(hash_rc)); - - hash_rc = hashtable_apply_funct_on_elements(eps_bearersP, - sgw_lite_display_pdn_connection_sgw_eps_bearers, - NULL); - - if (hash_rc != HASH_TABLE_OK) { - SPGW_APP_DEBUG("Invalid sgw_eps_bearers hashtable for display\n"); - } - - /* CHECK DUPLICATES IN HASH TABLES ? if (temp == 1) { - SPGW_APP_WARN("This EPS bearer entry already exists: %u\n", eps_bearer_idP); - free(new_eps_bearer_entry); - new_eps_bearer_entry = collision_p; - }*/ - return new_eps_bearer_entry; -} -//----------------------------------------------------------------------------- -int sgw_lite_cm_remove_eps_bearer_entry(hash_table_t *eps_bearersP, ebi_t eps_bearer_idP) -//----------------------------------------------------------------------------- -{ - int temp; - - if (eps_bearersP == NULL) { - return -1; - } - - temp = hashtable_remove(eps_bearersP, eps_bearer_idP); - - return temp; -} - diff --git a/openair-cn/SGW-LITE/sgw_lite_context_manager.h b/openair-cn/SGW-LITE/sgw_lite_context_manager.h deleted file mode 100644 index 7cdd2676f4..0000000000 --- a/openair-cn/SGW-LITE/sgw_lite_context_manager.h +++ /dev/null @@ -1,241 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/*! \file sgw_lite_context_manager.h -* \brief -* \author Lionel Gauthier -* \company Eurecom -* \email: lionel.gauthier@eurecom.fr -*/ -#ifndef SGW_LITE_CONTEXT_MANAGER_H_ -#define SGW_LITE_CONTEXT_MANAGER_H_ - -#include "commonDef.h" -#include "common_types.h" -#include "mme_app_ue_context.h" // for cgi_t -#include "hashtable.h" -#include "obj_hashtable.h" - -/******************************** -* P-GW contexts * -*********************************/ -typedef struct pgw_eps_bearer_entry_gtp_based_S5_S8_only_s { - ebi_t eps_bearer_id; ///< An EPS bearer identity uniquely identifies an EPS bearer for one UE accessing via E-UTRAN - // TO DO traffic_flow_template_t tft; ///< Traffic Flow Template - - ip_address_t s_gw_address_in_use_up; ///< The IP address of the S-GW currently used for sending user plane traffic. - Teid_t s_gw_teid_for_S5_S8_up; ///< S-GW Tunnel Endpoint Identifier for the S5/S8 interface for the user plane. - - ip_address_t p_gw_ip_address_for_S5_S8_up; ///< P-GW IP address for user plane data received from PDN GW. - Teid_t p_gw_teid_for_S5_S8_up; ///< P-GW Tunnel Endpoint Identifier for the GTP Based S5/S8 interface for user plane. - - // TO BE CHECKED - BearerQOS_t eps_bearer_qos; ///< ARP, GBR, MBR, QCI. - // NOT NEEDED charging_id ///< Charging identifier, identifies charging records generated by S-GW and PDN GW. - -} pgw_eps_bearer_entry_t; - -typedef struct pgw_pdn_connection_s { - //ip_addresses; ///< IPv4 address and/or IPv6 prefix - pdn_type_t pdn_type; ///< IPv4, IPv6, or IPv4v6 - ip_address_t s_gw_address_in_use_cp; ///< The IP address of the S-GW currently used for sending control plane signalling. - Teid_t s_gw_teid_for_S5_S8_cp; ///< S-GW Tunnel Endpoint Identifier for the S5/S8 interface for the control plane. (For GTP-based S5/S8 only). - ip_address_t s_gw_address_in_use_up; ///< The IP address of the S-GW currently used for sending user plane traffic. (For PMIP-based S5/S8 only). - // NOT NEEDED s_gw_gre_key_for_dl_traffic_up ///< Serving GW assigned GRE Key for the S5/S8 interface for the user plane for downlink traffic. (For PMIP-based S5/S8 only). - ip_address_t p_gw_ip_address_for_S5_S8_cp; ///< P-GW IP address for the S5/S8 for the control plane signalling. - Teid_t p_gw_teid_for_S5_S8_cp; ///< P-GW Tunnel Endpoint Identifier for the S5/S8 control plane interface. (For GTP-based S5/S8 only). - ip_address_t p_gw_address_in_use_up; ///< The IP address of the P-GW currently used for sending user plane traffic. (For PMIP-based S5/S8 only). - // NOT NEEDED p_gw_gre_key_for_uplink_traffic_up ///< PDN GW assigned GRE Key for the S5/S8 interface for the user plane for uplink traffic. (For PMIP-based S5/S8 only). - // NOT NEEDED MS Info Change Reporting Action ///< Denotes whether the MME and/or the SGSN is/are requested to send changes in User Location Information change for this bearer. - // NOT NEEDED CSG Information Reporting Action ///< Denotes whether the MME and/or the SGSN is/are requested to send changes in User CSG Information change for this bearer. - /// This field denotes separately whether the MME/SGSN are requested to send changes in User CSG Information for (a) CSG cells, - /// (b) hybrid cells in which the subscriber is a CSG member, and (c) hybrid cells in which the subscriber is not a CSG member, or any combination of the above. - ebi_t - default_bearer; ///< Identifies the default bearer within the PDN connection by its EPS Bearer Id. The default bearer is the one which is established first within the PDN connection. (For GTP based - /// S5/S8 or for PMIP based S5/S8 if multiple PDN connections to the same APN are supported). - - hash_table_t *pgw_eps_bearers; -} pgw_pdn_connection_t; - - -typedef struct pgw_apn_s { - APN_t apn_in_use; ///< The APN currently used, as received from the S-GW. - ambr_t apn_ambr; ///< The maximum aggregated uplink and downlink MBR values to be shared across all Non-GBR bearers, - /// which are established for this APN. - obj_hash_table_t *pdn_connections; ///< For each PDN Connection within the APN - -} pgw_apn_t; - - -// The PDN GW maintains the following EPS bearer context information for UEs. -// For emergency attached UEs which are not authenticated, IMEI is stored in context. -typedef struct pgw_eps_bearer_context_information_s { - Imsi_t imsi; ///< IMSI (International Mobile Subscriber Identity) is the subscriber permanent identity. - int8_t imsi_unauthenticated_indicator; ///< This is an IMSI indicator to show the IMSI is unauthenticated. - // TO BE CHECKED me_identity_t me_identity; ///< Mobile Equipment Identity (e.g. IMEI/IMEISV). - char msisdn[MSISDN_LENGTH]; ///< The basic MSISDN of the UE. The presence is dictated by its storage in the HSS. - // NOT NEEDED selected_cn_operator_id ///< Selected core network operator identity (to support networksharing as defined in TS 23.251 - rat_type_t rat_type; ///< Current RAT - // NOT NEEDED Trace reference ///< Identifies a record or a collection of records for a particular trace. - // NOT NEEDED Trace type ///< Indicates the type of trace - // NOT NEEDED Trigger id ///< Identifies the entity that initiated the trace - // NOT NEEDED OMC identity ///< Identifies the OMC that shall receive the trace record(s). - - // TO BE CONTINUED... - obj_hash_table_t *apns; -} pgw_eps_bearer_context_information_t; - -/******************************** -* S-GW contexts * -*********************************/ -//-------------------------------- -// EPS Bearer entry -//-------------------------------- - -// A primary key for a EPS Bearer entry can be a tuple (eps bearer id, imsi) -typedef struct sgw_eps_bearer_entry_s { - PAA_t paa; - ebi_t eps_bearer_id; ///< An EPS bearer identity uniquely identifies an EPS bearer for one UE accessing via E-UTRAN - // TO DO traffic_flow_template_t tft; ///< Traffic Flow Template - - ip_address_t p_gw_address_in_use_up; ///< The IP address of the P-GW currently used for sending user plane traffic. (For GTP-based S5/S8 only). - Teid_t p_gw_teid_for_S5_S8_up; ///< P-GW Tunnel Endpoint Identifier for the S5/S8 interface for the user plane. (For GTP-based S5/S8 only). - - ip_address_t s_gw_ip_address_for_S5_S8_up; ///< S-GW IP address for user plane data received from PDN GW. (For GTP-based S5/S8 only). - Teid_t s_gw_teid_for_S5_S8_up; ///< S-GW Tunnel Endpoint Identifier for the S5/S8 interface for the user plane. (For GTP-based S5/S8 only). - - ip_address_t - s_gw_ip_address_for_S1u_S12_S4_up; ///< S-GW IP address for the S1-u interface (Used by the eNodeB), for the S12 interface (used by the RNC) and for the S4 interface (used by the SGSN). - Teid_t - s_gw_teid_for_S1u_S12_S4_up; ///< S-GW Tunnel Endpoint Identifier for the S1-u interface, for the S12 interface (used by the RNC) and for the S4 interface (used by the SGSN). - - ip_address_t enb_ip_address_for_S1u; ///< eNodeB IP address for the S1-u interface (Used by the S-GW). - Teid_t enb_teid_for_S1u; ///< eNodeB Tunnel Endpoint Identifier for the S1-u interface. - - // TO BE CHECKED - BearerQOS_t eps_bearer_qos; ///< ARP, GBR, MBR, QCI. - // NOT NEEDED charging_id ///< Charging identifier, identifies charging records generated by S-GW and PDN GW. - -} sgw_eps_bearer_entry_t; - - -typedef struct sgw_pdn_connection_s { - APN_t apn_in_use; ///< The APN currently used, as received from the MME or S4 SGSN. - // NOT NEEDED NOW eps_pdn_charging ///< The charging characteristics of this PDN connection, e.g.normal, prepaid, flat-rate and/or hot billing. - // NOT IMPLEMENTED NOW - ip_address_t p_gw_address_in_use_cp; ///< The IP address of the P-GW currently used for sending control plane signalling. - // NOT IMPLEMENTED NOW - Teid_t p_gw_teid_for_S5_S8_cp; ///< P-GW Tunnel Endpoint Identifier for the S5/S8 interface for the control plane. (For GTP-based S5/S8 only). - // NOT IMPLEMENTED NOW - ip_address_t p_gw_address_in_use_up; ///< The IP address of the P-GW currently used for sending user plane traffic. (For PMIP-based S5/S8 only) - // NOT NEEDED p_gw_gre_key_for_uplink_traffic_up ///< PDN GW assigned GRE Key for the S5/S8 interface for the user plane for uplink traffic. (For PMIP-based S5/S8 only) - ip_address_t s_gw_ip_address_for_S5_S8_cp; ///< S-GW IP address for the S5/S8 for the control plane signalling. - Teid_t s_gw_teid_for_S5_S8_cp; ///< S-GW Tunnel Endpoint Identifier for the S5/S8 control plane interface. (For GTP-based S5/S8 only). - ip_address_t s_gw_address_in_use_up; ///< The IP address of the S-GW currently used for sending user plane traffic. (For PMIP-based S5/S8 only) - // NOT NEEDED s_gw_gre_key_for_dl_traffic_up ///< user plane for downlink traffic. (For PMIP-based S5/S8 only) - ebi_t default_bearer; ///< Identifies the default bearer within the PDN connection by its EPS Bearer Id. (For PMIP based S5/S8.) - - // eps bearers - hash_table_t *sgw_eps_bearers; - -} sgw_pdn_connection_t; - -// The Serving GW maintains the following EPS bearer context information for UEs. -// Struct sgw_eps_bearer_context_information_t contain the context fields for one UE. -typedef struct sgw_eps_bearer_context_information_s { - Imsi_t imsi; ///< IMSI (International Mobile Subscriber Identity) is the subscriber permanent identity. - int8_t imsi_unauthenticated_indicator; /// This is an IMSI indicator to show the IMSI is unauthenticated. - // TO BE CHECKED me_identity_t me_identity; ///< Mobile Equipment Identity (e.g. IMEI/IMEISV). - char msisdn[MSISDN_LENGTH]; ///< The basic MSISDN of the UE. The presence is dictated by its storage in the HSS. - // NOT NEEDED selected_cn_operator_id ///< Selected core network operator identity (to support networksharing as defined in TS 23.251 - Teid_t mme_teid_for_S11; ///< MME Tunnel Endpoint Identifier for the S11 interface - ip_address_t mme_ip_address_for_S11; ///< MME IP address the S11 interface. - Teid_t s_gw_teid_for_S11_S4; ///< S-GW Tunnel Endpoint Identifier for the S11 Interface and the S4 Interface (control plane) - ip_address_t s_gw_ip_address_for_S11_S4; ///< S-GW IP address for the S11 interface and the S4 Interface (control plane). - // NOT NEEDED Trace reference ///< Identifies a record or a collection of records for a particular trace. - // NOT NEEDED Trace type ///< Indicates the type of trace - // NOT NEEDED Trigger id ///< Identifies the entity that initiated the trace - // NOT NEEDED OMC identity ///< Identifies the OMC that shall receive the trace record(s). - cgi_t last_known_cell_Id; ///< This is the last location of the UE known by the network - // NOT NEEDED NOW Last known Cell Id age ///< This is the age of the above UE location information - - // ONLY ONE PDN CONNECTION - // Do not know now what is the key for this hashtable - //obj_hash_table_t *pdn_connections; - sgw_pdn_connection_t pdn_connection; - - /* S11 specific parameter. Not used in standalone mode */ - void *trxn; - uint32_t peer_ip; - - SgwCreateSessionRequest saved_message; -} sgw_eps_bearer_context_information_t; - -/******************************** -* Paired contexts * -*********************************/ -// data entry for s11_bearer_context_information_hashtable -// like this if needed in future, the split of S and P GW should be easier. -typedef struct s_plus_p_gw_eps_bearer_context_information_s { - sgw_eps_bearer_context_information_t sgw_eps_bearer_context_information; - pgw_eps_bearer_context_information_t pgw_eps_bearer_context_information; -} s_plus_p_gw_eps_bearer_context_information_t; - - -// data entry for s11teid2mme_hashtable -typedef struct mme_sgw_tunnel_s { - uint32_t local_teid; ///< Tunnel endpoint Identifier - uint32_t remote_teid; ///< Tunnel endpoint Identifier -} mme_sgw_tunnel_t; - -// data entry for s1uteid2enb_hashtable -typedef struct enb_sgw_s1u_tunnel_s { - uint32_t local_teid; ///< S-GW Tunnel endpoint Identifier - uint32_t remote_teid; ///< eNB Tunnel endpoint Identifier - ip_address_t enb_ip_address_for_S11; ///< eNB IP address the S1U interface. -} enb_sgw_s1u_tunnel_t; - - -void sgw_lite_display_s11teid2mme_mappings(void); -void sgw_lite_display_s11_bearer_context_information_mapping(void); -void pgw_lite_cm_free_apn(pgw_apn_t *apnP); - - -Teid_t sgw_lite_get_new_S11_tunnel_id(void); -mme_sgw_tunnel_t * sgw_lite_cm_create_s11_tunnel(Teid_t remote_teid, Teid_t local_teid); -int sgw_lite_cm_remove_s11_tunnel(Teid_t local_teid); -sgw_eps_bearer_entry_t * sgw_lite_cm_create_eps_bearer_entry(void); -sgw_pdn_connection_t * sgw_lite_cm_create_pdn_connection(void); -void sgw_lite_cm_free_pdn_connection(sgw_pdn_connection_t *pdn_connectionP); -s_plus_p_gw_eps_bearer_context_information_t * sgw_lite_cm_create_bearer_context_information_in_collection(Teid_t teid); -void sgw_lite_cm_free_s_plus_p_gw_eps_bearer_context_information(s_plus_p_gw_eps_bearer_context_information_t *contextP); -int sgw_lite_cm_remove_bearer_context_information(Teid_t teid); -sgw_eps_bearer_entry_t * sgw_lite_cm_create_eps_bearer_entry_in_collection(hash_table_t *eps_bearersP, ebi_t eps_bearer_idP); -int sgw_lite_cm_remove_eps_bearer_entry(hash_table_t *eps_bearersP, ebi_t eps_bearer_idP); - -#endif /* SGW_LITE_CONTEXT_MANAGER_H_ */ diff --git a/openair-cn/SGW-LITE/sgw_lite_defs.h b/openair-cn/SGW-LITE/sgw_lite_defs.h deleted file mode 100644 index 5233fa927b..0000000000 --- a/openair-cn/SGW-LITE/sgw_lite_defs.h +++ /dev/null @@ -1,59 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/*! \file sgw_lite_defs.h -* \brief -* \author Lionel Gauthier -* \company Eurecom -* \email: lionel.gauthier@eurecom.fr -*/ - -#ifndef SGW_LITE_DEFS_H_ -#define SGW_LITE_DEFS_H_ - - - -#if defined(ENB_MODE) -# include "UTIL/LOG/log.h" -# define SPGW_APP_ERROR(x, args...) LOG_E(SPGW, x, ##args) -# define SPGW_APP_WARN(x, args...) LOG_W(SPGW, x, ##args) -# define SPGW_APP_TRACE(x, args...) LOG_T(SPGW, x, ##args) -# define SPGW_APP_INFO(x, args...) LOG_I(SPGW, x, ##args) -# define SPGW_APP_DEBUG(x, args...) LOG_I(SPGW, x, ##args) -#else -# define SPGW_APP_ERROR(x, args...) do { fprintf(stdout, "[SPGW-APP][E]"x, ##args); } while(0) -# define SPGW_APP_WARN(x, args...) do { fprintf(stdout, "[SPGW-APP][W]"x, ##args); } while(0) -# define SPGW_APP_TRACE(x, args...) do { fprintf(stdout, "[SPGW-APP][T]"x, ##args); } while(0) -# define SPGW_APP_INFO(x, args...) do { fprintf(stdout, "[SPGW-APP][I]"x, ##args); } while(0) -# define SPGW_APP_DEBUG(x, args...) do { fprintf(stdout, "[SPGW-APP][D]"x, ##args); } while(0) -#endif - - -int sgw_lite_init(char* config_file_name_pP); - -#endif /* SGW_LITE_DEFS_H_ */ diff --git a/openair-cn/SGW-LITE/sgw_lite_handlers.c b/openair-cn/SGW-LITE/sgw_lite_handlers.c deleted file mode 100644 index 66db5a9675..0000000000 --- a/openair-cn/SGW-LITE/sgw_lite_handlers.c +++ /dev/null @@ -1,1237 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/*! \file sgw_lite_handlers.c -* \brief -* \author Lionel Gauthier -* \company Eurecom -* \email: lionel.gauthier@eurecom.fr -*/ -#define SGW_LITE -#define SGW_LITE_HANDLERS_C - -#include -#include -#include -#include -#include - -#include "assertions.h" -#include "conversions.h" -#include "common_types.h" -#include "intertask_interface.h" -#include "mme_config.h" -#include "msc.h" - -#include "sgw_lite_defs.h" -#include "sgw_lite_handlers.h" -#include "sgw_lite_context_manager.h" -#include "sgw_lite.h" -#include "sgw_lite_ie_defs.h" -#include "pgw_lite_paa.h" -#include "spgw_config.h" - -extern sgw_app_t sgw_app; -extern spgw_config_t spgw_config; - -static uint32_t g_gtpv1u_teid = 0; - -uint32_t sgw_get_new_teid(void) -{ - g_gtpv1u_teid = g_gtpv1u_teid + 1; - return g_gtpv1u_teid; -} - -int -sgw_lite_handle_create_session_request( - const SgwCreateSessionRequest * const session_req_pP) -{ - mme_sgw_tunnel_t* new_endpoint_p = NULL; - s_plus_p_gw_eps_bearer_context_information_t* s_plus_p_gw_eps_bearer_ctxt_info_p = NULL; - sgw_eps_bearer_entry_t* eps_bearer_entry_p = NULL; - MessageDef* message_p = NULL; - - /* Upon reception of create session request from MME, - * S-GW should create UE, eNB and MME contexts and forward message to P-GW. - */ - if (session_req_pP->rat_type != RAT_EUTRAN) { - SPGW_APP_WARN("Received session request with RAT != RAT_TYPE_EUTRAN: type %d\n", - session_req_pP->rat_type); - } - - /* As we are abstracting GTP-C transport, FTeid ip address is useless. - * We just use the teid to identify MME tunnel. Normally we received either: - * - ipv4 address if ipv4 flag is set - * - ipv6 address if ipv6 flag is set - * - ipv4 and ipv6 if both flags are set - * Communication between MME and S-GW involves S11 interface so we are expecting - * S11_MME_GTP_C (11) as interface_type. - */ - if ((session_req_pP->sender_fteid_for_cp.teid == 0) && - (session_req_pP->sender_fteid_for_cp.interface_type != S11_MME_GTP_C)) { - /* MME sent request with teid = 0. This is not valid... */ - SPGW_APP_WARN("F-TEID parameter mismatch\n"); - return -1; - } - - new_endpoint_p = sgw_lite_cm_create_s11_tunnel( - session_req_pP->sender_fteid_for_cp.teid, - sgw_lite_get_new_S11_tunnel_id()); - - if (new_endpoint_p == NULL) { - SPGW_APP_WARN("Could not create new tunnel endpoint between S-GW and MME " - "for S11 abstraction\n"); - return -1; - } - - SPGW_APP_DEBUG("Rx CREATE-SESSION-REQUEST MME S11 teid %u S-GW S11 teid %u APN %s EPS bearer Id %d\n", - new_endpoint_p->remote_teid, - new_endpoint_p->local_teid, - session_req_pP->apn, - session_req_pP->bearer_to_create.eps_bearer_id); - SPGW_APP_DEBUG(" IMSI %c%c%c%c%c%c%c%c%c%c%c%c%c%c%c\n", - IMSI(&session_req_pP->imsi)); - - s_plus_p_gw_eps_bearer_ctxt_info_p = sgw_lite_cm_create_bearer_context_information_in_collection(new_endpoint_p->local_teid); - - if (s_plus_p_gw_eps_bearer_ctxt_info_p != NULL) { - /* We try to create endpoint for S11 interface. A NULL endpoint means that - * either the teid is already in list of known teid or ENOMEM error has been - * raised during malloc. - */ - - //-------------------------------------------------- - // copy informations from create session request to bearer context information - //-------------------------------------------------- - memcpy(s_plus_p_gw_eps_bearer_ctxt_info_p->sgw_eps_bearer_context_information.imsi.digit, session_req_pP->imsi.digit, IMSI_DIGITS_MAX); - memcpy(s_plus_p_gw_eps_bearer_ctxt_info_p->pgw_eps_bearer_context_information.imsi.digit, session_req_pP->imsi.digit, IMSI_DIGITS_MAX); - s_plus_p_gw_eps_bearer_ctxt_info_p->sgw_eps_bearer_context_information.imsi_unauthenticated_indicator = 1; - s_plus_p_gw_eps_bearer_ctxt_info_p->pgw_eps_bearer_context_information.imsi_unauthenticated_indicator = 1; - - s_plus_p_gw_eps_bearer_ctxt_info_p->sgw_eps_bearer_context_information.mme_teid_for_S11 = session_req_pP->sender_fteid_for_cp.teid; - s_plus_p_gw_eps_bearer_ctxt_info_p->sgw_eps_bearer_context_information.s_gw_teid_for_S11_S4 = new_endpoint_p->local_teid; - s_plus_p_gw_eps_bearer_ctxt_info_p->sgw_eps_bearer_context_information.trxn = session_req_pP->trxn; - s_plus_p_gw_eps_bearer_ctxt_info_p->sgw_eps_bearer_context_information.peer_ip = session_req_pP->peer_ip; - // may use ntohl or reverse, will see - - FTEID_T_2_IP_ADDRESS_T( - (&session_req_pP->sender_fteid_for_cp) , - (&s_plus_p_gw_eps_bearer_ctxt_info_p->sgw_eps_bearer_context_information.mme_ip_address_for_S11)); - - //-------------------------------------- - // PDN connection - //-------------------------------------- - /*pdn_connection = sgw_lite_cm_create_pdn_connection(); - - if (pdn_connection == NULL) { - // Malloc failed, may be ENOMEM error - SPGW_APP_ERROR("Failed to create new PDN connection\n"); - return -1; - }*/ - memset(&s_plus_p_gw_eps_bearer_ctxt_info_p->sgw_eps_bearer_context_information.pdn_connection, 0, sizeof(sgw_pdn_connection_t)); - s_plus_p_gw_eps_bearer_ctxt_info_p->sgw_eps_bearer_context_information.pdn_connection.sgw_eps_bearers = hashtable_create(12, NULL, NULL); - - if ( s_plus_p_gw_eps_bearer_ctxt_info_p->sgw_eps_bearer_context_information.pdn_connection.sgw_eps_bearers == NULL) { - SPGW_APP_ERROR("Failed to create eps bearers collection object\n"); - DevMessage("Failed to create eps bearers collection object\n"); - return -1; - } - - if (session_req_pP->apn) { - s_plus_p_gw_eps_bearer_ctxt_info_p->sgw_eps_bearer_context_information.pdn_connection.apn_in_use = strdup(session_req_pP->apn); - } else { - s_plus_p_gw_eps_bearer_ctxt_info_p->sgw_eps_bearer_context_information.pdn_connection.apn_in_use = "NO APN"; - } - - s_plus_p_gw_eps_bearer_ctxt_info_p->sgw_eps_bearer_context_information.pdn_connection.default_bearer = session_req_pP->bearer_to_create.eps_bearer_id; - - //obj_hashtable_insert(s_plus_p_gw_eps_bearer_ctxt_info_p->sgw_eps_bearer_context_information.pdn_connections, pdn_connection->apn_in_use, strlen(pdn_connection->apn_in_use), pdn_connection); - //-------------------------------------- - // EPS bearer entry - //-------------------------------------- - eps_bearer_entry_p = sgw_lite_cm_create_eps_bearer_entry_in_collection( - s_plus_p_gw_eps_bearer_ctxt_info_p->sgw_eps_bearer_context_information.pdn_connection.sgw_eps_bearers, - session_req_pP->bearer_to_create.eps_bearer_id); - - sgw_lite_display_s11teid2mme_mappings(); - sgw_lite_display_s11_bearer_context_information_mapping(); - - if (eps_bearer_entry_p == NULL) { - SPGW_APP_ERROR("Failed to create new EPS bearer entry\n"); - // TO DO FREE new_bearer_ctxt_info_p and by cascade... - return -1; - - } - - eps_bearer_entry_p->eps_bearer_qos = session_req_pP->bearer_to_create.bearer_level_qos; - - - //s_plus_p_gw_eps_bearer_ctxt_info_p->sgw_eps_bearer_context_informationteid = teid; - - /* Trying to insert the new tunnel into the tree. - * If collision_p is not NULL (0), it means tunnel is already present. - */ - - //s_plus_p_gw_eps_bearer_ctxt_info_p->sgw_eps_bearer_context_informations_gw_ip_address_for_S11_S4 = - - memcpy(&s_plus_p_gw_eps_bearer_ctxt_info_p->sgw_eps_bearer_context_information.saved_message, - session_req_pP, - sizeof(SgwCreateSessionRequest)); - - /* Establishing EPS bearer. Requesting S1-U (GTPV1-U) task to create a - * tunnel for S1 user plane interface. If status in response is successfull (0), - * the tunnel endpoint is locally ready. - */ - message_p = itti_alloc_new_message(TASK_SPGW_APP, GTPV1U_CREATE_TUNNEL_REQ); - - if (message_p == NULL) { - sgw_lite_cm_remove_s11_tunnel(new_endpoint_p->remote_teid); - return -1; - } - - { - Gtpv1uCreateTunnelResp createTunnelResp; - - createTunnelResp.context_teid = new_endpoint_p->local_teid; - createTunnelResp.eps_bearer_id = session_req_pP->bearer_to_create.eps_bearer_id; - createTunnelResp.status = 0x00; - createTunnelResp.S1u_teid = sgw_get_new_teid(); - sgw_lite_handle_gtpv1uCreateTunnelResp(&createTunnelResp); - } - } else { - SPGW_APP_WARN("Could not create new transaction for SESSION_CREATE message\n"); - free(new_endpoint_p); - new_endpoint_p = NULL; - return -1; - } -} - - - -int -sgw_lite_handle_sgi_endpoint_created( - const SGICreateEndpointResp * const resp_pP) -{ - task_id_t to_task; - - SgwCreateSessionResponse *create_session_response_p = NULL; - s_plus_p_gw_eps_bearer_context_information_t *new_bearer_ctxt_info_p = NULL; - MessageDef *message_p = NULL; - hashtable_rc_t hash_rc; - - - - - SPGW_APP_DEBUG("Rx SGI_CREATE_ENDPOINT_RESPONSE,Context: S11 teid %u, SGW S1U teid %u EPS bearer id %u\n", - resp_pP->context_teid, resp_pP->sgw_S1u_teid, resp_pP->eps_bearer_id); - hash_rc = hashtable_get(sgw_app.s11_bearer_context_information_hashtable, resp_pP->context_teid, (void**)&new_bearer_ctxt_info_p); - -#if defined(ENABLE_STANDALONE_EPC) - to_task = TASK_MME_APP; -#else - to_task = TASK_S11; -#endif - - message_p = itti_alloc_new_message(TASK_SPGW_APP, SGW_CREATE_SESSION_RESPONSE); - - if (message_p == NULL) { - return -1; - } - - create_session_response_p = &message_p->ittiMsg.sgwCreateSessionResponse; - memset(create_session_response_p, 0, sizeof(SgwCreateSessionResponse)); - - if (hash_rc == HASH_TABLE_OK) { - create_session_response_p->teid = new_bearer_ctxt_info_p->sgw_eps_bearer_context_information.mme_teid_for_S11; - - /* Preparing to send create session response on S11 abstraction interface. - * we set the cause value regarding the S1-U bearer establishment result status. - */ - if (resp_pP->status == 0) { - uint32_t address = sgw_app.sgw_ip_address_for_S1u_S12_S4_up; - create_session_response_p->bearer_context_created.s1u_sgw_fteid.teid = resp_pP->sgw_S1u_teid; - create_session_response_p->bearer_context_created.s1u_sgw_fteid.interface_type = S1_U_SGW_GTP_U; - create_session_response_p->bearer_context_created.s1u_sgw_fteid.ipv4 = 1; - /* Should be filled in with S-GW S1-U local address. Running everything on localhost for now */ - create_session_response_p->bearer_context_created.s1u_sgw_fteid.ipv4_address = address; - - - create_session_response_p->ambr.br_dl = 100000000; - create_session_response_p->ambr.br_ul = 40000000; - - { - sgw_eps_bearer_entry_t* eps_bearer_entry_p = NULL; - hash_rc = hashtable_get (new_bearer_ctxt_info_p->sgw_eps_bearer_context_information.pdn_connection.sgw_eps_bearers, - resp_pP->eps_bearer_id, - (void**)&eps_bearer_entry_p); - - if ((hash_rc == HASH_TABLE_KEY_NOT_EXISTS) || (hash_rc == HASH_TABLE_BAD_PARAMETER_HASHTABLE)) { - SPGW_APP_ERROR("ERROR UNABLE TO GET EPS BEARER ENTRY\n"); - } else { - AssertFatal(sizeof(eps_bearer_entry_p->paa) == sizeof(resp_pP->paa), "Mismatch in lengths"); // sceptic mode - memcpy(&eps_bearer_entry_p->paa, - &resp_pP->paa, - sizeof(PAA_t)); - } - } - memcpy(&create_session_response_p->paa, - &resp_pP->paa, - sizeof(PAA_t)); - - memcpy(&create_session_response_p->pco, - &resp_pP->pco, - sizeof(pco_flat_t)); - - /* Set the Cause information from bearer context created. - * "Request accepted" is returned when the GTPv2 entity has accepted a control plane request. - */ - create_session_response_p->cause = REQUEST_ACCEPTED; - create_session_response_p->bearer_context_created.cause = REQUEST_ACCEPTED; - } else { - create_session_response_p->cause = M_PDN_APN_NOT_ALLOWED; - create_session_response_p->bearer_context_created.cause = M_PDN_APN_NOT_ALLOWED; - } - - create_session_response_p->s11_sgw_teid.teid = resp_pP->context_teid; - create_session_response_p->bearer_context_created.eps_bearer_id = resp_pP->eps_bearer_id; - create_session_response_p->trxn = new_bearer_ctxt_info_p->sgw_eps_bearer_context_information.trxn; - create_session_response_p->peer_ip = new_bearer_ctxt_info_p->sgw_eps_bearer_context_information.peer_ip; - } else { - create_session_response_p->cause = CONTEXT_NOT_FOUND; - create_session_response_p->bearer_context_created.cause = CONTEXT_NOT_FOUND; - } - - SPGW_APP_DEBUG("Tx CREATE-SESSION-RESPONSE MME -> %s, S11 MME teid %u S11 S-GW teid %u S1U teid %u S1U addr 0x%x EPS bearer id %u status %d\n", - to_task == TASK_MME_APP ? "TASK_MME_APP" : "TASK_S11", - create_session_response_p->teid, - create_session_response_p->s11_sgw_teid.teid, - create_session_response_p->bearer_context_created.s1u_sgw_fteid.teid, - create_session_response_p->bearer_context_created.s1u_sgw_fteid.ipv4_address, - create_session_response_p->bearer_context_created.eps_bearer_id, - create_session_response_p->bearer_context_created.cause); - - MSC_LOG_TX_MESSAGE( - MSC_SP_GWAPP_MME, - (to_task == TASK_MME_APP) ? MSC_MMEAPP_MME:MSC_S11_MME, - NULL,0, - "0 SGW_CREATE_SESSION_RESPONSE S11 MME teid %u S11 S-GW teid %u S1U teid %u S1U@ 0x%x ebi %u status %d", - create_session_response_p->teid, - create_session_response_p->s11_sgw_teid.teid, - create_session_response_p->bearer_context_created.s1u_sgw_fteid.teid, - create_session_response_p->bearer_context_created.s1u_sgw_fteid.ipv4_address, - create_session_response_p->bearer_context_created.eps_bearer_id, - create_session_response_p->bearer_context_created.cause); - - return itti_send_msg_to_task(to_task, INSTANCE_DEFAULT, message_p); -} - - - -int -sgw_lite_handle_gtpv1uCreateTunnelResp( - const Gtpv1uCreateTunnelResp * const endpoint_created_pP) -{ - task_id_t to_task; - - SgwCreateSessionResponse *create_session_response_p = NULL; - s_plus_p_gw_eps_bearer_context_information_t *new_bearer_ctxt_info_p = NULL; - SGICreateEndpointReq *sgi_create_endpoint_req_p = NULL; - MessageDef *message_p = NULL; - sgw_eps_bearer_entry_t *eps_bearer_entry_p = NULL; - hashtable_rc_t hash_rc; - struct in_addr inaddr ; - struct in6_addr in6addr = IN6ADDR_ANY_INIT; - SGICreateEndpointResp sgi_create_endpoint_resp; - - unsigned int pco_in_index = 0; - unsigned int pco_out_index = 0; - signed int length_in_pco = 0; - uint16_t pi_or_ci = 0; // protocol identifier or container identifier; - uint8_t length_pi_or_ci = 0; - uint8_t length_out_pi_or_ci = 0; - - uint16_t ipcp_length = 0; - uint16_t ipcp_out_length = 0; - signed int ipcp_remaining_length = 0; - uint8_t ipcp_option = 0; - uint8_t ipcp_option_length = 0; - uint8_t ipcp_code = 0; - uint8_t ipcp_out_code = IPCP_CODE_CONFIGURE_ACK; - uint8_t ipcp_identifier = 0; - uint32_t ipcp_dns_prim_ipv4_addr = 0xFFFFFFFF; - uint32_t ipcp_dns_sec_ipv4_addr = 0xFFFFFFFF; - uint32_t ipcp_out_dns_prim_ipv4_addr = 0xFFFFFFFF; - uint32_t ipcp_out_dns_sec_ipv4_addr = 0xFFFFFFFF; - pco_flat_t *in_pco_p = NULL; - pco_flat_t out_pco ; - - uint8_t address_allocation_via_nas_signalling = FALSE; - uint8_t address_allocation_via_dhcpv4 = FALSE; - - -#if defined(ENABLE_STANDALONE_EPC) - to_task = TASK_MME_APP; -#else - to_task = TASK_S11; -#endif - - SPGW_APP_DEBUG("Rx GTPV1U_CREATE_TUNNEL_RESP, Context S-GW S11 teid %u, S-GW S1U teid %u EPS bearer id %u status %d\n", - endpoint_created_pP->context_teid, - endpoint_created_pP->S1u_teid, - endpoint_created_pP->eps_bearer_id, - endpoint_created_pP->status); - hash_rc = hashtable_get( - sgw_app.s11_bearer_context_information_hashtable, - endpoint_created_pP->context_teid, - (void**)&new_bearer_ctxt_info_p); - - if (hash_rc == HASH_TABLE_OK) { - - hash_rc = hashtable_get ( - new_bearer_ctxt_info_p->sgw_eps_bearer_context_information.pdn_connection.sgw_eps_bearers, - endpoint_created_pP->eps_bearer_id, - (void**)&eps_bearer_entry_p); - - DevAssert(hash_rc == HASH_TABLE_OK); - - SPGW_APP_DEBUG("Updated eps_bearer_entry_p eps_b_id %u with SGW S1U teid %u\n", - endpoint_created_pP->eps_bearer_id, - endpoint_created_pP->S1u_teid); - eps_bearer_entry_p->s_gw_teid_for_S1u_S12_S4_up = endpoint_created_pP->S1u_teid; - - sgw_lite_display_s11_bearer_context_information_mapping(); - - memset(&sgi_create_endpoint_resp, 0, sizeof(SGICreateEndpointResp)); - - - //-------------------------------------------------------------------------- - // PCO processing - //-------------------------------------------------------------------------- - in_pco_p = &new_bearer_ctxt_info_p->sgw_eps_bearer_context_information.saved_message.pco; - - length_in_pco = in_pco_p->byte[1]; - if ((length_in_pco+1+1) != in_pco_p->length) { - SPGW_APP_DEBUG("PCO: mismatch in lengths length_pco+1+1 %u != in_pco_p->length %u\n", - length_in_pco+1+1, in_pco_p->length); - } - sgi_create_endpoint_resp.pco.byte[0] = in_pco_p->byte[0]; - pco_out_index = 2; - - if ((length_in_pco > 0) && (in_pco_p->byte[2] & 0x80)) { - sgi_create_endpoint_resp.pco.byte[pco_out_index++] = in_pco_p->byte[2]; - - pco_in_index = PCO_MIN_LENGTH; - while (length_in_pco >= 3) { - SPGW_APP_DEBUG("PCO: Protocol identifier in length_in_pco %d\n", length_in_pco); - pi_or_ci = (((uint16_t)in_pco_p->byte[pco_in_index]) << 8) | (uint16_t)in_pco_p->byte[pco_in_index+1]; - pco_in_index += 2; - length_pi_or_ci = in_pco_p->byte[pco_in_index++]; - switch (pi_or_ci) { - case PCO_PI_LCP: - case PCO_PI_PAP: - case PCO_PI_CHAP: - pco_in_index += length_pi_or_ci; - SPGW_APP_WARN("PCO: Protocol identifier 0x%X not supported now\n", pi_or_ci); - break; - - case PCO_PI_IPCP: - ipcp_code = in_pco_p->byte[pco_in_index++]; - ipcp_identifier = in_pco_p->byte[pco_in_index++]; - ipcp_length = (((uint16_t)in_pco_p->byte[pco_in_index]) << 8) | ((uint16_t)in_pco_p->byte[pco_in_index+1]); - SPGW_APP_DEBUG("PCO: Protocol identifier IPCP (0x%x) code 0x%x identifier 0x%x length %u\n", - pi_or_ci, ipcp_code, ipcp_identifier, ipcp_length); - pco_in_index += 2; - ipcp_remaining_length = ipcp_length - 1 - 1 - 2; - ipcp_out_length = 1 + 1 + 2; - - // Protocol Id: Internet Protocol Control Protocol ... - sgi_create_endpoint_resp.pco.byte[pco_out_index++] = (uint8_t)(pi_or_ci >> 8); - sgi_create_endpoint_resp.pco.byte[pco_out_index++] = (uint8_t)(pi_or_ci & 0x00FF); - - while (ipcp_remaining_length >= 2) { - ipcp_option = in_pco_p->byte[pco_in_index]; - ipcp_option_length = in_pco_p->byte[pco_in_index+1]; - ipcp_remaining_length = ipcp_remaining_length - ipcp_option_length; - SPGW_APP_DEBUG("PCO: Protocol identifier IPCP ipcp_option %u ipcp_option_length %u ipcp_remaining_length %u pco_in_index %u\n", - ipcp_option, ipcp_option_length, ipcp_remaining_length, pco_in_index); - - switch (ipcp_option) { - case IPCP_OPTION_PRIMARY_DNS_SERVER_IP_ADDRESS: - SPGW_APP_DEBUG("PCO: Protocol identifier IPCP option PRIMARY_DNS_SERVER_IP_ADDRESS length %u\n", ipcp_option_length); - if (ipcp_option_length >= 6) { - ipcp_dns_prim_ipv4_addr = (((uint32_t)in_pco_p->byte[pco_in_index+2]) << 24 ) | - (((uint32_t)in_pco_p->byte[pco_in_index+3]) << 16 ) | - (((uint32_t)in_pco_p->byte[pco_in_index+4]) << 8 ) | - (((uint32_t)in_pco_p->byte[pco_in_index+5]) ); - - SPGW_APP_DEBUG("PCO: Protocol identifier IPCP option SECONDARY_DNS_SERVER_IP_ADDRESS ipcp_dns_prim_ipv4_addr 0x%x\n", ipcp_dns_prim_ipv4_addr); - if ((ipcp_dns_prim_ipv4_addr == 0) || - (spgw_config.pgw_config.ipv4.default_dns_v4 != ipcp_dns_prim_ipv4_addr)){ - ipcp_out_code = IPCP_CODE_CONFIGURE_NACK; - ipcp_out_dns_prim_ipv4_addr = spgw_config.pgw_config.ipv4.default_dns_v4; - } else { - ipcp_out_dns_prim_ipv4_addr = ipcp_dns_prim_ipv4_addr; - } - SPGW_APP_DEBUG("PCO: Protocol identifier IPCP option SECONDARY_DNS_SERVER_IP_ADDRESS ipcp_out_dns_prim_ipv4_addr 0x%x\n", ipcp_out_dns_prim_ipv4_addr); - } else { - ipcp_out_code = IPCP_CODE_CONFIGURE_NACK;// not sure - } - ipcp_out_length += 6; - break; - case IPCP_OPTION_SECONDARY_DNS_SERVER_IP_ADDRESS: - SPGW_APP_DEBUG("PCO: Protocol identifier IPCP option SECONDARY_DNS_SERVER_IP_ADDRESS length %u\n", ipcp_option_length); - if (ipcp_option_length >= 6) { - ipcp_dns_sec_ipv4_addr = (((uint32_t)in_pco_p->byte[pco_in_index+2]) << 24 ) | - (((uint32_t)in_pco_p->byte[pco_in_index+3]) << 16 ) | - (((uint32_t)in_pco_p->byte[pco_in_index+4]) << 8 ) | - (((uint32_t)in_pco_p->byte[pco_in_index+5]) ); - SPGW_APP_DEBUG("PCO: Protocol identifier IPCP option SECONDARY_DNS_SERVER_IP_ADDRESS ipcp_dns_sec_ipv4_addr 0x%x\n", ipcp_dns_sec_ipv4_addr); - if ((ipcp_dns_prim_ipv4_addr == 0) || - (spgw_config.pgw_config.ipv4.default_dns_sec_v4 != ipcp_dns_sec_ipv4_addr)){ - ipcp_out_code = IPCP_CODE_CONFIGURE_NACK; - ipcp_out_dns_sec_ipv4_addr = spgw_config.pgw_config.ipv4.default_dns_sec_v4; - } else { - ipcp_out_dns_sec_ipv4_addr = ipcp_dns_sec_ipv4_addr; - } - SPGW_APP_DEBUG("PCO: Protocol identifier IPCP option SECONDARY_DNS_SERVER_IP_ADDRESS ipcp_out_dns_sec_ipv4_addr 0x%x\n", ipcp_out_dns_sec_ipv4_addr); - } else { - ipcp_out_code = IPCP_CODE_CONFIGURE_NACK; // not sure - } - ipcp_out_length += 6; - break; - default: - SPGW_APP_WARN("PCO: Protocol identifier IPCP option 0x%04X unknown\n", ipcp_option); - } - pco_in_index += ipcp_option_length; - } - // ... continuing Protocol Id: Internet Protocol Control Protocol - sgi_create_endpoint_resp.pco.byte[pco_out_index++] = ipcp_out_length; // option length - - break; - - case PCO_CI_P_CSCF_IPV6_ADDRESS_REQUEST: - case PCO_CI_DNS_SERVER_IPV6_ADDRESS_REQUEST: - case PCO_CI_MS_SUPPORT_OF_NETWORK_REQUESTED_BEARER_CONTROL_INDICATOR: - case PCO_CI_DSMIPV6_HOME_AGENT_ADDRESS_REQUEST: - case PCO_CI_DSMIPV6_HOME_NETWORK_PREFIX_REQUEST: - case PCO_CI_DSMIPV6_IPV4_HOME_AGENT_ADDRESS_REQUEST: - case PCO_CI_P_CSCF_IPV4_ADDRESS_REQUEST: - case PCO_CI_MSISDN_REQUEST: - case PCO_CI_IFOM_SUPPORT_REQUEST: - pco_in_index += length_pi_or_ci; - SPGW_APP_WARN("PCO: Container identifier 0x%X not supported now\n", pi_or_ci); - break; - - case PCO_CI_DNS_SERVER_IPV4_ADDRESS_REQUEST: - // PPP IP Control Protocol - sgi_create_endpoint_resp.pco.byte[pco_out_index++] = ipcp_out_code; - sgi_create_endpoint_resp.pco.byte[pco_out_index++] = ipcp_identifier; - sgi_create_endpoint_resp.pco.byte[pco_out_index++] = (uint8_t)(ipcp_out_length >> 8); - sgi_create_endpoint_resp.pco.byte[pco_out_index++] = (uint8_t)(ipcp_out_length & 0x00FF); - - if (ipcp_out_dns_prim_ipv4_addr != 0xFFFFFFFF) { - sgi_create_endpoint_resp.pco.byte[pco_out_index++] = IPCP_OPTION_PRIMARY_DNS_SERVER_IP_ADDRESS; - sgi_create_endpoint_resp.pco.byte[pco_out_index++] = 6; - sgi_create_endpoint_resp.pco.byte[pco_out_index++] = (uint8_t)(ipcp_out_dns_prim_ipv4_addr & 0x000000FF); - sgi_create_endpoint_resp.pco.byte[pco_out_index++] = (uint8_t)((ipcp_out_dns_prim_ipv4_addr >> 8 ) & 0x000000FF); - sgi_create_endpoint_resp.pco.byte[pco_out_index++] = (uint8_t)((ipcp_out_dns_prim_ipv4_addr >> 16 ) & 0x000000FF); - sgi_create_endpoint_resp.pco.byte[pco_out_index++] = (uint8_t)((ipcp_out_dns_prim_ipv4_addr >> 24 ) & 0x000000FF); - } - if (ipcp_out_dns_sec_ipv4_addr != 0xFFFFFFFF) { - sgi_create_endpoint_resp.pco.byte[pco_out_index++] = IPCP_OPTION_SECONDARY_DNS_SERVER_IP_ADDRESS; - sgi_create_endpoint_resp.pco.byte[pco_out_index++] = 6; - sgi_create_endpoint_resp.pco.byte[pco_out_index++] = (uint8_t)(ipcp_out_dns_sec_ipv4_addr & 0x000000FF); - sgi_create_endpoint_resp.pco.byte[pco_out_index++] = (uint8_t)((ipcp_out_dns_sec_ipv4_addr >> 8 ) & 0x000000FF); - sgi_create_endpoint_resp.pco.byte[pco_out_index++] = (uint8_t)((ipcp_out_dns_sec_ipv4_addr >> 16 ) & 0x000000FF); - sgi_create_endpoint_resp.pco.byte[pco_out_index++] = (uint8_t)((ipcp_out_dns_sec_ipv4_addr >> 24 ) & 0x000000FF); - } - break; - - case PCO_CI_IP_ADDRESS_ALLOCATION_VIA_NAS_SIGNALLING: - address_allocation_via_nas_signalling = TRUE; - break; - - case PCO_CI_IPV4_ADDRESS_ALLOCATION_VIA_DHCPV4: - address_allocation_via_dhcpv4 = TRUE; - break; - - case PCO_CI_IPV4_LINK_MTU_REQUEST: - SPGW_APP_WARN("PCO: Container identifier IPV4_LINK_MTU_REQUEST TODO\n"); - break; - } - length_in_pco = length_in_pco - (length_pi_or_ci + 2 + 1); - SPGW_APP_DEBUG("PCO: Protocol identifier out length_in_pco %d\n", length_in_pco); - } // while (length_in_pco >= 3) { - } // if ((length_in_pco > 0) && (in_pco_p->byte[2] & 0x80)) { - sgi_create_endpoint_resp.pco.length = pco_out_index; - sgi_create_endpoint_resp.pco.byte[1] = pco_out_index - 2; - //-------------------------------------------------------------------------- - - - // IP forward will forward packets to this teid - sgi_create_endpoint_resp.context_teid = endpoint_created_pP->context_teid; - sgi_create_endpoint_resp.sgw_S1u_teid = endpoint_created_pP->S1u_teid; - sgi_create_endpoint_resp.eps_bearer_id = endpoint_created_pP->eps_bearer_id; - - // TO DO NOW - sgi_create_endpoint_resp.paa.pdn_type = new_bearer_ctxt_info_p->sgw_eps_bearer_context_information.saved_message.pdn_type; - - switch (sgi_create_endpoint_resp.paa.pdn_type) { - case IPv4_OR_v6: - if (pgw_lite_get_free_ipv4_paa_address(&inaddr) == 0) { - IN_ADDR_TO_BUFFER(inaddr, sgi_create_endpoint_resp.paa.ipv4_address); - } else { - SPGW_APP_WARN("Failed to allocate IPv4 PAA for PDN type IPv4_OR_v6\n"); - - if (pgw_lite_get_free_ipv6_paa_prefix(&in6addr) == 0) { - IN6_ADDR_TO_BUFFER(in6addr, sgi_create_endpoint_resp.paa.ipv6_address); - } else { - SPGW_APP_ERROR("Failed to allocate IPv6 PAA for PDN type IPv4_OR_v6\n"); - } - } - - break; - - case IPv4: - if (address_allocation_via_nas_signalling == TRUE) { - if (pgw_lite_get_free_ipv4_paa_address(&inaddr) == 0) { - IN_ADDR_TO_BUFFER(inaddr, sgi_create_endpoint_resp.paa.ipv4_address); - } else { - SPGW_APP_ERROR("Failed to allocate IPv4 PAA for PDN type IPv4\n"); - } - } /*else { - // TODO - }*/ - - break; - - case IPv6: - if (pgw_lite_get_free_ipv6_paa_prefix(&in6addr) == 0) { - IN6_ADDR_TO_BUFFER(in6addr, sgi_create_endpoint_resp.paa.ipv6_address); - } else { - SPGW_APP_ERROR("Failed to allocate IPv6 PAA for PDN type IPv6\n"); - } - - break; - - case IPv4_AND_v6: - if (pgw_lite_get_free_ipv4_paa_address(&inaddr) == 0) { - IN_ADDR_TO_BUFFER(inaddr, sgi_create_endpoint_resp.paa.ipv4_address); - } else { - SPGW_APP_ERROR("Failed to allocate IPv4 PAA for PDN type IPv4_AND_v6\n"); - } - - if (pgw_lite_get_free_ipv6_paa_prefix(&in6addr) == 0) { - IN6_ADDR_TO_BUFFER(in6addr, sgi_create_endpoint_resp.paa.ipv6_address); - } else { - SPGW_APP_ERROR("Failed to allocate IPv6 PAA for PDN type IPv4_AND_v6\n"); - } - - break; - - default: - AssertFatal(0,"BAD paa.pdn_type %d", sgi_create_endpoint_resp.paa.pdn_type); - break; - } - - sgi_create_endpoint_resp.status = SGI_STATUS_OK; - sgw_lite_handle_sgi_endpoint_created(&sgi_create_endpoint_resp); - } else { // if (hash_rc == HASH_TABLE_OK) { - SPGW_APP_DEBUG("Rx SGW_S1U_ENDPOINT_CREATED, Context: teid %u NOT FOUND\n", endpoint_created_pP->context_teid); - message_p = itti_alloc_new_message(TASK_SPGW_APP, SGW_CREATE_SESSION_RESPONSE); - - if (message_p == NULL) { - return -1; - } - - create_session_response_p = &message_p->ittiMsg.sgwCreateSessionResponse; - memset(create_session_response_p, 0, sizeof(SgwCreateSessionResponse)); - create_session_response_p->cause = CONTEXT_NOT_FOUND; - create_session_response_p->bearer_context_created.cause = CONTEXT_NOT_FOUND; - - - MSC_LOG_TX_MESSAGE( - MSC_SP_GWAPP_MME, - (to_task == TASK_MME_APP) ? MSC_MMEAPP_MME:MSC_S11_MME, - NULL,0, - "0 SGW_CREATE_SESSION_RESPONSE teid %u CONTEXT_NOT_FOUND", endpoint_created_pP->context_teid); - return itti_send_msg_to_task(to_task, INSTANCE_DEFAULT, message_p); - } -} - - - -int -sgw_lite_handle_gtpv1uUpdateTunnelResp( - const Gtpv1uUpdateTunnelResp * const endpoint_updated_pP) -{ - SgwModifyBearerResponse *modify_response_p = NULL; - SGIUpdateEndpointReq *update_request_p = NULL; - s_plus_p_gw_eps_bearer_context_information_t *new_bearer_ctxt_info_p = NULL; - MessageDef *message_p = NULL; - sgw_eps_bearer_entry_t *eps_bearer_entry_p = NULL; - hashtable_rc_t hash_rc; - task_id_t to_task; - -#if defined(ENABLE_STANDALONE_EPC) - to_task = TASK_MME_APP; -#else - to_task = TASK_S11; -#endif - - SPGW_APP_DEBUG("Rx GTPV1U_UPDATE_TUNNEL_RESP, Context teid %u, SGW S1U teid %u, eNB S1U teid %u, EPS bearer id %u, status %d\n", - endpoint_updated_pP->context_teid, - endpoint_updated_pP->sgw_S1u_teid, - endpoint_updated_pP->enb_S1u_teid, - endpoint_updated_pP->eps_bearer_id, - endpoint_updated_pP->status); - - - hash_rc = hashtable_get(sgw_app.s11_bearer_context_information_hashtable, endpoint_updated_pP->context_teid, (void**)&new_bearer_ctxt_info_p); - - if (hash_rc == HASH_TABLE_OK) { - hash_rc = hashtable_get (new_bearer_ctxt_info_p->sgw_eps_bearer_context_information.pdn_connection.sgw_eps_bearers, endpoint_updated_pP->eps_bearer_id, (void**)&eps_bearer_entry_p); - - if ((hash_rc == HASH_TABLE_KEY_NOT_EXISTS) || (hash_rc == HASH_TABLE_BAD_PARAMETER_HASHTABLE)) { - SPGW_APP_DEBUG("Sending SGW_MODIFY_BEARER_RESPONSE trxn %p bearer %u CONTEXT_NOT_FOUND (sgw_eps_bearers)\n", - new_bearer_ctxt_info_p->sgw_eps_bearer_context_information.trxn, - endpoint_updated_pP->eps_bearer_id); - - message_p = itti_alloc_new_message(TASK_SPGW_APP, SGW_MODIFY_BEARER_RESPONSE); - - if (message_p == NULL) { - return -1; - } - - modify_response_p = &message_p->ittiMsg.sgwModifyBearerResponse; - memset(modify_response_p, 0, sizeof(SgwModifyBearerResponse)); - modify_response_p->bearer_present = MODIFY_BEARER_RESPONSE_REM; - modify_response_p->bearer_choice.bearer_for_removal.eps_bearer_id = endpoint_updated_pP->eps_bearer_id; - modify_response_p->bearer_choice.bearer_for_removal.cause = CONTEXT_NOT_FOUND; - modify_response_p->cause = CONTEXT_NOT_FOUND; - modify_response_p->trxn = new_bearer_ctxt_info_p->sgw_eps_bearer_context_information.trxn; - - return itti_send_msg_to_task(to_task, INSTANCE_DEFAULT, message_p); - } else if (hash_rc == HASH_TABLE_OK) { - - message_p = itti_alloc_new_message(TASK_SPGW_APP, SGI_UPDATE_ENDPOINT_REQUEST); - - if (message_p == NULL) { - return -1; - } - - update_request_p = &message_p->ittiMsg.sgiUpdateEndpointReq; - memset(update_request_p, 0, sizeof(SGIUpdateEndpointReq)); - update_request_p->context_teid = endpoint_updated_pP->context_teid; - update_request_p->sgw_S1u_teid = endpoint_updated_pP->sgw_S1u_teid; - update_request_p->enb_S1u_teid = endpoint_updated_pP->enb_S1u_teid; - update_request_p->eps_bearer_id = endpoint_updated_pP->eps_bearer_id; - - return itti_send_msg_to_task(TASK_FW_IP, INSTANCE_DEFAULT, message_p); - } - } else { - SPGW_APP_DEBUG("Sending SGW_MODIFY_BEARER_RESPONSE trxn %p bearer %u CONTEXT_NOT_FOUND (s11_bearer_context_information_hashtable)\n", - new_bearer_ctxt_info_p->sgw_eps_bearer_context_information.trxn, - endpoint_updated_pP->eps_bearer_id); - - message_p = itti_alloc_new_message(TASK_SPGW_APP, SGW_MODIFY_BEARER_RESPONSE); - - if (message_p == NULL) { - return -1; - } - - modify_response_p = &message_p->ittiMsg.sgwModifyBearerResponse; - memset(modify_response_p, 0, sizeof(SgwModifyBearerResponse)); - - modify_response_p->bearer_present = MODIFY_BEARER_RESPONSE_REM; - modify_response_p->bearer_choice.bearer_for_removal.eps_bearer_id = endpoint_updated_pP->eps_bearer_id; - modify_response_p->bearer_choice.bearer_for_removal.cause = CONTEXT_NOT_FOUND; - modify_response_p->cause = CONTEXT_NOT_FOUND; - modify_response_p->trxn = new_bearer_ctxt_info_p->sgw_eps_bearer_context_information.trxn; - - MSC_LOG_TX_MESSAGE( - MSC_SP_GWAPP_MME, - (to_task == TASK_MME_APP) ? MSC_MMEAPP_MME:MSC_S11_MME, - NULL,0, - "0 SGW_MODIFY_BEARER_RESPONSE ebi %u CONTEXT_NOT_FOUND trxn %u", - modify_response_p->bearer_choice.bearer_for_removal.eps_bearer_id, - modify_response_p->trxn); - - return itti_send_msg_to_task(to_task, INSTANCE_DEFAULT, message_p); - } - - return -1; -} - - - -int -sgw_lite_handle_sgi_endpoint_updated( - const SGIUpdateEndpointResp * const resp_pP) -{ - SgwModifyBearerResponse *modify_response_p = NULL; - s_plus_p_gw_eps_bearer_context_information_t *new_bearer_ctxt_info_p = NULL; - MessageDef *message_p = NULL; - sgw_eps_bearer_entry_t *eps_bearer_entry_p = NULL; - hashtable_rc_t hash_rc; - task_id_t to_task; - static uint8_t iptable_uplink_remove_gtpu = FALSE; - char cmd[256]; - int ret; - -#if defined(ENABLE_STANDALONE_EPC) - to_task = TASK_MME_APP; -#else - to_task = TASK_S11; -#endif - - SPGW_APP_DEBUG("Rx SGI_UPDATE_ENDPOINT_RESPONSE, Context teid %u, SGW S1U teid %u, eNB S1U teid %u, EPS bearer id %u, status %d\n", - resp_pP->context_teid, - resp_pP->sgw_S1u_teid, - resp_pP->enb_S1u_teid, - resp_pP->eps_bearer_id, - resp_pP->status); - - message_p = itti_alloc_new_message(TASK_SPGW_APP, SGW_MODIFY_BEARER_RESPONSE); - - if (message_p == NULL) { - return -1; - } - - modify_response_p = &message_p->ittiMsg.sgwModifyBearerResponse; - memset(modify_response_p, 0, sizeof(SgwModifyBearerResponse)); - - hash_rc = hashtable_get(sgw_app.s11_bearer_context_information_hashtable, - resp_pP->context_teid, - (void**)&new_bearer_ctxt_info_p); - - - if (hash_rc == HASH_TABLE_OK) { - hash_rc = hashtable_get (new_bearer_ctxt_info_p->sgw_eps_bearer_context_information.pdn_connection.sgw_eps_bearers, - resp_pP->eps_bearer_id, - (void**)&eps_bearer_entry_p); - - if ((hash_rc == HASH_TABLE_KEY_NOT_EXISTS) || (hash_rc == HASH_TABLE_BAD_PARAMETER_HASHTABLE)) { - SPGW_APP_DEBUG("Rx SGI_UPDATE_ENDPOINT_RESPONSE: CONTEXT_NOT_FOUND (pdn_connection.sgw_eps_bearers context)\n"); - modify_response_p->teid = resp_pP->context_teid; // TO BE CHECKED IF IT IS THIS TEID - modify_response_p->bearer_present = MODIFY_BEARER_RESPONSE_REM; - modify_response_p->bearer_choice.bearer_for_removal.eps_bearer_id = resp_pP->eps_bearer_id; - modify_response_p->bearer_choice.bearer_for_removal.cause = CONTEXT_NOT_FOUND; - modify_response_p->cause = CONTEXT_NOT_FOUND; - modify_response_p->trxn = 0; - - MSC_LOG_TX_MESSAGE( - MSC_SP_GWAPP_MME, - (to_task == TASK_MME_APP) ? MSC_MMEAPP_MME:MSC_S11_MME, - NULL,0, - "0 SGW_MODIFY_BEARER_RESPONSE ebi %u CONTEXT_NOT_FOUND trxn %u", - modify_response_p->bearer_choice.bearer_for_removal.eps_bearer_id, - modify_response_p->trxn); - - return itti_send_msg_to_task(to_task, INSTANCE_DEFAULT, message_p); - } else if (hash_rc == HASH_TABLE_OK) { - SPGW_APP_DEBUG("Rx SGI_UPDATE_ENDPOINT_RESPONSE: REQUEST_ACCEPTED\n"); - - // accept anyway - modify_response_p->teid = resp_pP->context_teid; // TO BE CHECKED IF IT IS THIS TEID - modify_response_p->bearer_present = MODIFY_BEARER_RESPONSE_MOD; - modify_response_p->bearer_choice.bearer_contexts_modified.eps_bearer_id = resp_pP->eps_bearer_id; - modify_response_p->bearer_choice.bearer_contexts_modified.cause = REQUEST_ACCEPTED; - modify_response_p->cause = REQUEST_ACCEPTED; - modify_response_p->trxn = new_bearer_ctxt_info_p->sgw_eps_bearer_context_information.trxn; - // if default bearer -#warning "TODO define constant for default eps_bearer id" - - //if ((resp_pP->eps_bearer_id == 5) && (spgw_config.pgw_config.pgw_masquerade_SGI == 0)) { - if (resp_pP->eps_bearer_id == 5) { - ret = snprintf(cmd, - 256, // mangle -I - "iptables -t mangle -A %s -d %u.%u.%u.%u -m mark --mark 0 -j GTPUSP --own-ip %u.%u.%u.%u --own-tun %u --peer-ip %u.%u.%u.%u --peer-tun %u --action add", - (spgw_config.sgw_config.local_to_eNB) ? "FORWARD":"FORWARD", // test - eps_bearer_entry_p->paa.ipv4_address[0], - eps_bearer_entry_p->paa.ipv4_address[1], - eps_bearer_entry_p->paa.ipv4_address[2], - eps_bearer_entry_p->paa.ipv4_address[3], - sgw_app.sgw_ip_address_for_S1u_S12_S4_up & 0x000000FF, - (sgw_app.sgw_ip_address_for_S1u_S12_S4_up & 0x0000FF00) >> 8, - (sgw_app.sgw_ip_address_for_S1u_S12_S4_up & 0x00FF0000) >> 16, - (sgw_app.sgw_ip_address_for_S1u_S12_S4_up & 0xFF000000) >> 24, - eps_bearer_entry_p->s_gw_teid_for_S1u_S12_S4_up, - eps_bearer_entry_p->enb_ip_address_for_S1u.address.ipv4_address[0], - eps_bearer_entry_p->enb_ip_address_for_S1u.address.ipv4_address[1], - eps_bearer_entry_p->enb_ip_address_for_S1u.address.ipv4_address[2], - eps_bearer_entry_p->enb_ip_address_for_S1u.address.ipv4_address[3], - eps_bearer_entry_p->enb_teid_for_S1u - ); - - if ((ret < 0) || (ret > 256)) { - SPGW_APP_ERROR("ERROR in preparing default downlink tunnel, tune string length\n"); - exit (-1); - } - //use API when prototype validated - ret = spgw_system(cmd, SPGW_ABORT_ON_ERROR, __FILE__, __LINE__); - if (ret < 0) { - SPGW_APP_ERROR("ERROR in setting up default downlink TUNNEL\n"); - } - } - //------------------------- - ret = snprintf(cmd, - 256, - "iptables -t mangle -I %s -d %u.%u.%u.%u -m mark --mark %u -j GTPUSP --own-ip %u.%u.%u.%u --own-tun %u --peer-ip %u.%u.%u.%u --peer-tun %u --action add", - (spgw_config.sgw_config.local_to_eNB) ? "FORWARD":"FORWARD", // test - eps_bearer_entry_p->paa.ipv4_address[0], - eps_bearer_entry_p->paa.ipv4_address[1], - eps_bearer_entry_p->paa.ipv4_address[2], - eps_bearer_entry_p->paa.ipv4_address[3], - eps_bearer_entry_p->s_gw_teid_for_S1u_S12_S4_up, - sgw_app.sgw_ip_address_for_S1u_S12_S4_up & 0x000000FF, - (sgw_app.sgw_ip_address_for_S1u_S12_S4_up & 0x0000FF00) >> 8, - (sgw_app.sgw_ip_address_for_S1u_S12_S4_up & 0x00FF0000) >> 16, - (sgw_app.sgw_ip_address_for_S1u_S12_S4_up & 0xFF000000) >> 24, - eps_bearer_entry_p->s_gw_teid_for_S1u_S12_S4_up, - eps_bearer_entry_p->enb_ip_address_for_S1u.address.ipv4_address[0], - eps_bearer_entry_p->enb_ip_address_for_S1u.address.ipv4_address[1], - eps_bearer_entry_p->enb_ip_address_for_S1u.address.ipv4_address[2], - eps_bearer_entry_p->enb_ip_address_for_S1u.address.ipv4_address[3], - eps_bearer_entry_p->enb_teid_for_S1u - ); - - if ((ret < 0) || (ret > 256)) { - SPGW_APP_ERROR("ERROR in preparing downlink tunnel, tune string length\n"); - exit (-1); - } - - //use API when prototype validated - ret = spgw_system(cmd, SPGW_ABORT_ON_ERROR, __FILE__, __LINE__); - - if (ret < 0) { - SPGW_APP_ERROR("ERROR in setting up downlink TUNNEL\n"); - } - - } - MSC_LOG_TX_MESSAGE( - MSC_SP_GWAPP_MME, - (to_task == TASK_MME_APP) ? MSC_MMEAPP_MME:MSC_S11_MME, - NULL,0, - "0 SGW_MODIFY_BEARER_RESPONSE ebi %u trxn %u", - modify_response_p->bearer_choice.bearer_contexts_modified.eps_bearer_id, - modify_response_p->trxn); - - return itti_send_msg_to_task(to_task, INSTANCE_DEFAULT, message_p); - } else { - SPGW_APP_DEBUG("Rx SGI_UPDATE_ENDPOINT_RESPONSE: CONTEXT_NOT_FOUND (S11 context)\n"); - - modify_response_p->teid = resp_pP->context_teid; // TO BE CHECKED IF IT IS THIS TEID - modify_response_p->bearer_present = MODIFY_BEARER_RESPONSE_REM; - modify_response_p->bearer_choice.bearer_for_removal.eps_bearer_id = resp_pP->eps_bearer_id; - modify_response_p->bearer_choice.bearer_for_removal.cause = CONTEXT_NOT_FOUND; - modify_response_p->cause = CONTEXT_NOT_FOUND; - modify_response_p->trxn = 0; - - MSC_LOG_TX_MESSAGE( - MSC_SP_GWAPP_MME, - (to_task == TASK_MME_APP) ? MSC_MMEAPP_MME:MSC_S11_MME, - NULL,0, - "0 SGW_MODIFY_BEARER_RESPONSE ebi %u CONTEXT_NOT_FOUND trxn %u", - modify_response_p->bearer_choice.bearer_contexts_modified.eps_bearer_id, - modify_response_p->trxn); - return itti_send_msg_to_task(to_task, INSTANCE_DEFAULT, message_p); - } -} - - - -int -sgw_lite_handle_modify_bearer_request( - const SgwModifyBearerRequest * const modify_bearer_pP) -{ - SgwModifyBearerResponse *modify_response_p = NULL; - Gtpv1uUpdateTunnelReq *gtpv1u_update_tunnel_req_p = NULL; - s_plus_p_gw_eps_bearer_context_information_t *new_bearer_ctxt_info_p = NULL; - MessageDef *message_p = NULL; - sgw_eps_bearer_entry_t *eps_bearer_entry_p = NULL; - hashtable_rc_t hash_rc; - task_id_t to_task; - -#if defined(ENABLE_STANDALONE_EPC) - to_task = TASK_MME_APP; -#else - to_task = TASK_S11; -#endif - - SPGW_APP_DEBUG("Rx MODIFY_BEARER_REQUEST, teid %u, EPS bearer id %u\n", - modify_bearer_pP->teid, - modify_bearer_pP->bearer_context_to_modify.eps_bearer_id); - - sgw_lite_display_s11teid2mme_mappings(); - sgw_lite_display_s11_bearer_context_information_mapping(); - - hash_rc = hashtable_get( - sgw_app.s11_bearer_context_information_hashtable, - modify_bearer_pP->teid, - (void**)&new_bearer_ctxt_info_p); - - if (hash_rc == HASH_TABLE_OK) { - - new_bearer_ctxt_info_p->sgw_eps_bearer_context_information.pdn_connection.default_bearer = modify_bearer_pP->bearer_context_to_modify.eps_bearer_id; - new_bearer_ctxt_info_p->sgw_eps_bearer_context_information.trxn = modify_bearer_pP->trxn; - - hash_rc = hashtable_is_key_exists ( - new_bearer_ctxt_info_p->sgw_eps_bearer_context_information.pdn_connection.sgw_eps_bearers, - modify_bearer_pP->bearer_context_to_modify.eps_bearer_id); - - if (hash_rc == HASH_TABLE_KEY_NOT_EXISTS) { - message_p = itti_alloc_new_message(TASK_SPGW_APP, SGW_MODIFY_BEARER_RESPONSE); - - if (message_p == NULL) { - return -1; - } - - modify_response_p = &message_p->ittiMsg.sgwModifyBearerResponse; - memset(modify_response_p, 0, sizeof(SgwModifyBearerResponse)); - modify_response_p->bearer_present = MODIFY_BEARER_RESPONSE_REM; - modify_response_p->bearer_choice.bearer_for_removal.eps_bearer_id = modify_bearer_pP->bearer_context_to_modify.eps_bearer_id; - modify_response_p->bearer_choice.bearer_for_removal.cause = CONTEXT_NOT_FOUND; - modify_response_p->cause = CONTEXT_NOT_FOUND; - modify_response_p->trxn = modify_bearer_pP->trxn; - SPGW_APP_DEBUG("Rx MODIFY_BEARER_REQUEST, eps_bearer_id %u CONTEXT_NOT_FOUND\n", - modify_bearer_pP->bearer_context_to_modify.eps_bearer_id); - - MSC_LOG_TX_MESSAGE( - MSC_SP_GWAPP_MME, - (to_task == TASK_MME_APP) ? MSC_MMEAPP_MME:MSC_S11_MME, - NULL,0, - "0 SGW_MODIFY_BEARER_RESPONSE ebi %u CONTEXT_NOT_FOUND trxn %u", - modify_response_p->bearer_choice.bearer_for_removal.eps_bearer_id, - modify_response_p->trxn); - - return itti_send_msg_to_task(to_task, INSTANCE_DEFAULT, message_p); - } else if (hash_rc == HASH_TABLE_OK) { - // TO DO - hash_rc = hashtable_get ( - new_bearer_ctxt_info_p->sgw_eps_bearer_context_information.pdn_connection.sgw_eps_bearers, - modify_bearer_pP->bearer_context_to_modify.eps_bearer_id, - (void**)&eps_bearer_entry_p); - - FTEID_T_2_IP_ADDRESS_T( (&modify_bearer_pP->bearer_context_to_modify.s1_eNB_fteid) , (&eps_bearer_entry_p->enb_ip_address_for_S1u) ); - eps_bearer_entry_p->enb_teid_for_S1u = modify_bearer_pP->bearer_context_to_modify.s1_eNB_fteid.teid; - - { - SGIUpdateEndpointResp sgi_update_end_point_resp; - sgi_update_end_point_resp.context_teid = modify_bearer_pP->teid; - sgi_update_end_point_resp.sgw_S1u_teid = eps_bearer_entry_p->s_gw_teid_for_S1u_S12_S4_up; - sgi_update_end_point_resp.enb_S1u_teid = eps_bearer_entry_p->enb_teid_for_S1u; - sgi_update_end_point_resp.eps_bearer_id = eps_bearer_entry_p->eps_bearer_id; - sgi_update_end_point_resp.status = 0x00; - sgw_lite_handle_sgi_endpoint_updated(&sgi_update_end_point_resp); - } - } - } else { - message_p = itti_alloc_new_message(TASK_SPGW_APP, SGW_MODIFY_BEARER_RESPONSE); - - if (message_p == NULL) { - return -1; - } - - modify_response_p = &message_p->ittiMsg.sgwModifyBearerResponse; - - modify_response_p->bearer_present = MODIFY_BEARER_RESPONSE_REM; - modify_response_p->bearer_choice.bearer_for_removal.eps_bearer_id = modify_bearer_pP->bearer_context_to_modify.eps_bearer_id; - modify_response_p->bearer_choice.bearer_for_removal.cause = CONTEXT_NOT_FOUND; - modify_response_p->cause = CONTEXT_NOT_FOUND; - modify_response_p->trxn = modify_bearer_pP->trxn; - - SPGW_APP_DEBUG("Rx MODIFY_BEARER_REQUEST, teid %u CONTEXT_NOT_FOUND\n", - modify_bearer_pP->teid); - return itti_send_msg_to_task(to_task, INSTANCE_DEFAULT, message_p); - } - - return -1; -} - - - -int -sgw_lite_handle_delete_session_request( - const SgwDeleteSessionRequest * const delete_session_req_pP) -{ - task_id_t to_task; - hashtable_rc_t hash_rc; - - SgwDeleteSessionResponse *delete_session_resp_p = NULL; - MessageDef *message_p = NULL; - s_plus_p_gw_eps_bearer_context_information_t *ctx_p = NULL; - -#if defined(ENABLE_STANDALONE_EPC) - to_task = TASK_MME_APP; -#else - to_task = TASK_S11; -#endif - - message_p = itti_alloc_new_message(TASK_SPGW_APP, SGW_DELETE_SESSION_RESPONSE); - - if (message_p == NULL) { - return -1; - } - - delete_session_resp_p = &message_p->ittiMsg.sgwDeleteSessionResponse; - - SPGW_APP_WARN("Delete session handler needs to be completed...\n"); - - if (delete_session_req_pP->indication_flags & OI_FLAG) { - SPGW_APP_DEBUG("OI flag is set for this message indicating the request" - "should be forwarded to P-GW entity\n"); - } - - hash_rc = hashtable_get(sgw_app.s11_bearer_context_information_hashtable, - delete_session_req_pP->teid, - (void**)&ctx_p); - - if (hash_rc == HASH_TABLE_OK) { - if ((delete_session_req_pP->sender_fteid_for_cp.ipv4 != 0) && - (delete_session_req_pP->sender_fteid_for_cp.ipv6 != 0)) { - /* Sender F-TEID IE present */ - if (delete_session_resp_p->teid != ctx_p->sgw_eps_bearer_context_information.mme_teid_for_S11) { - delete_session_resp_p->teid = ctx_p->sgw_eps_bearer_context_information.mme_teid_for_S11; - delete_session_resp_p->cause = INVALID_PEER; - SPGW_APP_DEBUG("Mismatch in MME Teid for CP\n"); - } else { - delete_session_resp_p->teid = delete_session_req_pP->sender_fteid_for_cp.teid; - } - } else { - delete_session_resp_p->cause = REQUEST_ACCEPTED; - delete_session_resp_p->teid = ctx_p->sgw_eps_bearer_context_information.mme_teid_for_S11; - } - - delete_session_resp_p->trxn = delete_session_req_pP->trxn; - delete_session_resp_p->peer_ip = delete_session_req_pP->peer_ip; - - MSC_LOG_TX_MESSAGE( - MSC_SP_GWAPP_MME, - (to_task == TASK_MME_APP) ? MSC_MMEAPP_MME:MSC_S11_MME, - NULL,0, - "0 SGW_DELETE_SESSION_RESPONSE teid %u cause %u trxn %u", - delete_session_resp_p->teid, - delete_session_resp_p->cause, - delete_session_resp_p->trxn); - - - return itti_send_msg_to_task(to_task, INSTANCE_DEFAULT, message_p); - } else { - /* Context not found... set the cause to CONTEXT_NOT_FOUND - * 3GPP TS 29.274 #7.2.10.1 - */ - message_p = itti_alloc_new_message(TASK_SPGW_APP, SGW_DELETE_SESSION_RESPONSE); - - if (message_p == NULL) { - return -1; - } - - delete_session_resp_p = &message_p->ittiMsg.sgwDeleteSessionResponse; - - if ((delete_session_req_pP->sender_fteid_for_cp.ipv4 == 0) && - (delete_session_req_pP->sender_fteid_for_cp.ipv6 == 0)) { - delete_session_resp_p->teid = 0; - } else { - delete_session_resp_p->teid = delete_session_req_pP->sender_fteid_for_cp.teid; - } - - delete_session_resp_p->cause = CONTEXT_NOT_FOUND; - delete_session_resp_p->trxn = delete_session_req_pP->trxn; - delete_session_resp_p->peer_ip = delete_session_req_pP->peer_ip; - - MSC_LOG_TX_MESSAGE( - MSC_SP_GWAPP_MME, - (to_task == TASK_MME_APP) ? MSC_MMEAPP_MME:MSC_S11_MME, - NULL,0, - "0 SGW_DELETE_SESSION_RESPONSE CONTEXT_NOT_FOUND trxn %u", - delete_session_resp_p->trxn); - - return itti_send_msg_to_task(to_task, INSTANCE_DEFAULT, message_p); - } - - return -1; -} - - -int -sgw_lite_handle_release_access_bearers_request( - const SgwReleaseAccessBearersRequest * const release_access_bearers_req_pP) -{ - task_id_t to_task; - hashtable_rc_t hash_rc; - SgwReleaseAccessBearersResponse *release_access_bearers_resp_p = NULL; - MessageDef *message_p = NULL; - s_plus_p_gw_eps_bearer_context_information_t *ctx_p = NULL; - -#if defined(ENABLE_STANDALONE_EPC) - to_task = TASK_MME_APP; -#else - to_task = TASK_S11; -#endif - message_p = itti_alloc_new_message(TASK_SPGW_APP, SGW_RELEASE_ACCESS_BEARERS_RESPONSE); - - if (message_p == NULL) { - return -1; - } - - release_access_bearers_resp_p = &message_p->ittiMsg.sgwReleaseAccessBearersResponse; - - - hash_rc = hashtable_get(sgw_app.s11_bearer_context_information_hashtable, - release_access_bearers_req_pP->teid, - (void**)&ctx_p); - - if (hash_rc == HASH_TABLE_OK) { - release_access_bearers_resp_p->cause = REQUEST_ACCEPTED; - release_access_bearers_resp_p->teid = ctx_p->sgw_eps_bearer_context_information.mme_teid_for_S11; - -#warning "TODO Here the release (sgw_lite_handle_release_access_bearers_request)" - - MSC_LOG_TX_MESSAGE( - MSC_SP_GWAPP_MME, - (to_task == TASK_MME_APP) ? MSC_MMEAPP_MME:MSC_S11_MME, - NULL,0, - "0 SGW_RELEASE_ACCESS_BEARERS_RESPONSE S11 MME teid %u cause REQUEST_ACCEPTED", - release_access_bearers_resp_p->teid); - - return itti_send_msg_to_task(to_task, INSTANCE_DEFAULT, message_p); - } else { - release_access_bearers_resp_p->cause = CONTEXT_NOT_FOUND; - release_access_bearers_resp_p->teid = 0; - MSC_LOG_TX_MESSAGE( - MSC_SP_GWAPP_MME, - (to_task == TASK_MME_APP) ? MSC_MMEAPP_MME:MSC_S11_MME, - NULL,0, - "0 SGW_RELEASE_ACCESS_BEARERS_RESPONSE cause CONTEXT_NOT_FOUND"); - - return itti_send_msg_to_task(to_task, INSTANCE_DEFAULT, message_p); - } - return -1; -} - diff --git a/openair-cn/SGW-LITE/sgw_lite_handlers.h b/openair-cn/SGW-LITE/sgw_lite_handlers.h deleted file mode 100644 index 1f74f802bd..0000000000 --- a/openair-cn/SGW-LITE/sgw_lite_handlers.h +++ /dev/null @@ -1,47 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/*! \file sgw_lite_handlers.h -* \brief -* \author Lionel Gauthier -* \company Eurecom -* \email: lionel.gauthier@eurecom.fr -*/ - -#ifndef SGW_LITE_HANDLERS_H_ -#define SGW_LITE_HANDLERS_H_ - -int sgw_lite_handle_create_session_request(const SgwCreateSessionRequest * const session_req_p); -int sgw_lite_handle_sgi_endpoint_created (const SGICreateEndpointResp * const resp_p); -int sgw_lite_handle_sgi_endpoint_updated (const SGIUpdateEndpointResp * const resp_p); -int sgw_lite_handle_gtpv1uCreateTunnelResp(const Gtpv1uCreateTunnelResp * const endpoint_created_p); -int sgw_lite_handle_gtpv1uUpdateTunnelResp(const Gtpv1uUpdateTunnelResp * const endpoint_updated_p); -int sgw_lite_handle_modify_bearer_request (const SgwModifyBearerRequest * const modify_bearer_p); -int sgw_lite_handle_delete_session_request(const SgwDeleteSessionRequest * const delete_session_p); -int sgw_lite_handle_release_access_bearers_request(const SgwReleaseAccessBearersRequest * const release_access_bearers_req_pP); -#endif /* SGW_LITE_HANDLERS_H_ */ diff --git a/openair-cn/SGW-LITE/sgw_lite_ie_defs.h b/openair-cn/SGW-LITE/sgw_lite_ie_defs.h deleted file mode 100644 index 68683272fb..0000000000 --- a/openair-cn/SGW-LITE/sgw_lite_ie_defs.h +++ /dev/null @@ -1,641 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/*! \file sgw_lite_ie_defs.h -* \brief -* \author Lionel Gauthier -* \company Eurecom -* \email: lionel.gauthier@eurecom.fr -*/ - -#include "common_types.h" - -#ifndef SGW_LITE_IE_DEFS_H_ -#define SGW_LITE_IE_DEFS_H_ - -typedef uint8_t EBI_t; -typedef uint8_t APNRestriction_t; -typedef uint8_t DelayValue_t; -typedef uint32_t Teid_t; -typedef uint32_t SequenceNumber_t; - -/* Only one type of address can be present at the same time - * This type is applicable to IP address Information Element defined - * in 3GPP TS 29.274 #8.9 - */ -typedef struct { -#define GTP_IP_ADDR_v4 0x0 -#define GTP_IP_ADDR_v6 0x1 - unsigned present:1; - union { - uint8_t v4[4]; - uint8_t v6[16]; - } address; -} gtp_ip_address_t; - -/* 3GPP TS 29.274 Figure 8.12 */ - -typedef uint32_t indication_flags_t; - -/* Bit mask for octet 7 in indication IE */ -#if defined(UPDATE_RELEASE_10) -# define S6AF_FLAG (1U << 20) -# define S4AF_FLAG (1U << 19) -# define MBMDT_FLAG (1U << 18) -#endif -#define ISRAU_FLAG (1U << 17) -#define CCRSI_FLAG (1U << 16) - -/* Bit mask for octet 6 in indication IE */ -#define SQSI_FLAG (1U << 15) -#define UIMSI_FLAG (1U << 14) -#define CFSI_FLAG (1U << 13) -#define CRSI_FLAG (1U << 12) -#define P_FLAG (1U << 11) -#define PT_FLAG (1U << 10) -#define SI_FLAG (1U << 9) -#define MSV_FLAG (1U << 8) - -/* Bit mask for octet 5 in indication IE */ -#define DAF_FLAG (1U << 7) -#define DTF_FLAG (1U << 6) -#define HI_FLAG (1U << 5) -#define DFI_FLAG (1U << 4) -#define OI_FLAG (1U << 3) -#define ISRSI_FLAG (1U << 2) -#define ISRAI_FLAG (1U << 1) -#define SGW_CI_FLAG (1U << 0) - -typedef struct { - pdn_type_t pdn_type; - uint8_t ipv4_address[4]; - uint8_t ipv6_address[16]; - /* Note in rel.8 the ipv6 prefix length has a fixed value of /64 */ - uint8_t ipv6_prefix_length; -} PAA_t; - -/* Protocol configuration options from ts124008*/ -#define PCO_MIN_LENGTH 3 -#define PCO_MAX_LENGTH 253 -#define PCO_CONFIGURATION_PROTOCOL_PPP_FOR_USE_WITH_IP_PDP_TYPE_OR_IP_PDN_TYPE 000b - -#define PCO_PI_LCP (0xC021) -#define PCO_PI_PAP (0xC023) -#define PCO_PI_CHAP (0xC223) -#define PCO_PI_IPCP (0x8021) - -#define IPCP_CODE_CONFIGURE_REQUEST (0x01) -#define IPCP_CODE_CONFIGURE_ACK (0x02) -#define IPCP_CODE_CONFIGURE_NACK (0x03) -#define IPCP_CODE_CONFIGURE_REJECT (0x04) -#define IPCP_CODE_TERMINATE_REQUEST (0x05) -#define IPCP_CODE_TERMINATE_ACK (0x06) -#define IPCP_CODE_REJECT (0x07) - -#define IPCP_OPTION_PRIMARY_DNS_SERVER_IP_ADDRESS (0x81) -#define IPCP_OPTION_SECONDARY_DNS_SERVER_IP_ADDRESS (0x83) - -/* CONTAINER IDENTIFIER MS to network direction:*/ -#define PCO_CI_P_CSCF_IPV6_ADDRESS_REQUEST (0x0001) -#define PCO_CI_DNS_SERVER_IPV6_ADDRESS_REQUEST (0x0003) -#define PCO_CI_MS_SUPPORT_OF_NETWORK_REQUESTED_BEARER_CONTROL_INDICATOR (0x0005) -#define PCO_CI_DSMIPV6_HOME_AGENT_ADDRESS_REQUEST (0x0007) -#define PCO_CI_DSMIPV6_HOME_NETWORK_PREFIX_REQUEST (0x0008) -#define PCO_CI_DSMIPV6_IPV4_HOME_AGENT_ADDRESS_REQUEST (0x0009) -#define PCO_CI_IP_ADDRESS_ALLOCATION_VIA_NAS_SIGNALLING (0x000A) -#define PCO_CI_IPV4_ADDRESS_ALLOCATION_VIA_DHCPV4 (0x000B) -#define PCO_CI_P_CSCF_IPV4_ADDRESS_REQUEST (0x000C) -#define PCO_CI_DNS_SERVER_IPV4_ADDRESS_REQUEST (0x000D) -#define PCO_CI_MSISDN_REQUEST (0x000E) -#define PCO_CI_IFOM_SUPPORT_REQUEST (0x000F) -#define PCO_CI_IPV4_LINK_MTU_REQUEST (0x0010) - -/* CONTAINER IDENTIFIER Network to MS direction:*/ -#define PCO_CI_P_CSCF_IPV6_ADDRESS (0x0001) -#define PCO_CI_IM_CN_SUBSYSTEM_SIGNALING_FLAG (0x0002) -#define PCO_CI_DNS_SERVER_IPV6_ADDRESS (0x0003) -#define PCO_CI_POLICY_CONTROL_REJECTION_CODE (0x0004) -#define PCO_CI_SELECTED_BEARER_CONTROL_MODE (0x0005) -#define PCO_CI_DSMIPV6_HOME_AGENT_ADDRESS (0x0007) -#define PCO_CI_DSMIPV6_HOME_NETWORK_PREFIX (0x0008) -#define PCO_CI_DSMIPV6_IPV4_HOME_AGENT_ADDRESS (0x0009) -#define PCO_CI_P_CSCF_IPV4_ADDRESS (0x000C) -#define PCO_CI_DNS_SERVER_IPV4_ADDRESS (0x000D) -#define PCO_CI_MSISDN (0x000E) -#define PCO_CI_IFOM_SUPPORT (0x000F) -#define PCO_CI_IPV4_LINK_MTU (0x0010) - -/* Both directions:*/ -#define PCO_CI_IM_CN_SUBSYSTEM_SIGNALING_FLAG (0x0002) - -typedef struct pco_flat_s{ - uint8_t byte[PCO_MAX_LENGTH]; - uint8_t length; -} pco_flat_t; - - -#define IMSI(imsi) \ - (imsi)->digit[0], \ - (imsi)->digit[1], \ - (imsi)->digit[2], \ - (imsi)->digit[3], \ - (imsi)->digit[4], \ - (imsi)->digit[5], \ - (imsi)->digit[6], \ - (imsi)->digit[7], \ - (imsi)->digit[8], \ - (imsi)->digit[9], \ - (imsi)->digit[10], \ - (imsi)->digit[11], \ - (imsi)->digit[12], \ - (imsi)->digit[13], \ - (imsi)->digit[14] - -typedef struct { - uint8_t digit[IMSI_DIGITS_MAX+1]; // +1 for '\0` macro sprintf changed in snprintf - uint8_t length; -} Imsi_t; - -typedef struct { - uint8_t digit[MSISDN_LENGTH]; - uint8_t length; -} Msisdn_t; - -#define MEI_IMEI 0x0 -#define MEI_IMEISV 0x1 - -typedef struct { - uint8_t present; - union { - unsigned imei:15; - unsigned imeisv:16; - } choice; -} Mei_t; - -typedef struct { - uint8_t mcc[3]; - uint8_t mnc[3]; - uint16_t lac; - uint16_t ci; -} Cgi_t; - -typedef struct { - uint8_t mcc[3]; - uint8_t mnc[3]; - uint16_t lac; - uint16_t sac; -} Sai_t; - -typedef struct { - uint8_t mcc[3]; - uint8_t mnc[3]; - uint16_t lac; - uint16_t rac; -} Rai_t; - -typedef struct { - uint8_t mcc[3]; - uint8_t mnc[3]; - uint16_t tac; -} Tai_t; - -typedef struct { - uint8_t mcc[3]; - uint8_t mnc[3]; - uint32_t eci; -} Ecgi_t; - -typedef struct { - uint8_t mcc[3]; - uint8_t mnc[3]; - uint16_t lac; -} Lai_t; - -#define ULI_CGI 0x01 -#define ULI_SAI 0x02 -#define ULI_RAI 0x04 -#define ULI_TAI 0x08 -#define ULI_ECGI 0x10 -#define ULI_LAI 0x20 - -typedef struct { - uint8_t present; - struct { - Cgi_t cgi; - Sai_t sai; - Rai_t rai; - Tai_t tai; - Ecgi_t ecgi; - Lai_t lai; - } s; -} Uli_t; - -typedef struct { - uint8_t mcc[3]; - uint8_t mnc[3]; -} ServingNetwork_t; -/* -typedef enum RatType_e { - RAT_TYPE_UTRAN = 1, - RAT_TYPE_GERAN, - RAT_TYPE_WLAN, - RAT_TYPE_GAN, - RAT_TYPE_HSPA_EVOLUTION, - RAT_TYPE_EUTRAN, -} RatType_t;*/ - -/* WARNING: not complete... */ -typedef enum InterfaceType_e { - S1_U_ENODEB_GTP_U = 0, - S1_U_SGW_GTP_U = 1, - S12_RNC_GTP_U = 2, - S12_SGW_GTP_U = 3, - S5_S8_SGW_GTP_U = 4, - S5_S8_PGW_GTP_U = 5, - S5_S8_SGW_GTP_C = 6, - S5_S8_PGW_GTP_C = 7, - S11_MME_GTP_C = 10, - S11_SGW_GTP_C = 11, -} InterfaceType_t; - -typedef struct { - unsigned ipv4:1; - unsigned ipv6:1; - InterfaceType_t interface_type; - Teid_t teid; ///< TEID or GRE Key - uint32_t ipv4_address; - uint8_t ipv6_address[16]; -} FTeid_t; -/* - * typedef struct { - pdn_type_t pdn_type; - union { - uint8_t ipv4_address[4]; - uint8_t ipv6_address[16]; - } address; - } ip_address_t; - - */ -#define FTEID_T_2_IP_ADDRESS_T(fte_p,ip_p) \ -do { \ - if (fte_p->ipv4) { \ - ip_p->pdn_type = IPv4; \ - ip_p->address.ipv4_address[0] = (uint8_t)(fte_p->ipv4_address & 0x000000FF); \ - ip_p->address.ipv4_address[1] = (uint8_t)((fte_p->ipv4_address & 0x0000FF00) >> 8); \ - ip_p->address.ipv4_address[2] = (uint8_t)((fte_p->ipv4_address & 0x00FF0000) >> 16); \ - ip_p->address.ipv4_address[3] = (uint8_t)((fte_p->ipv4_address & 0xFF000000) >> 24); \ - } \ - if (fte_p->ipv6) { \ - if (fte_p->ipv4) { \ - ip_p->pdn_type = IPv4_AND_v6; \ - } else { \ - ip_p->pdn_type = IPv6; \ - } \ - memcpy(ip_p->address.ipv6_address, fte_p->ipv6_address, 16); \ - } \ -} while (0) - -typedef enum { - TARGET_ID_RNC_ID = 0, - TARGET_ID_MACRO_ENB_ID = 1, - TARGET_ID_CELL_ID = 2, - TARGET_ID_HOME_ENB_ID = 3 - /* Other values are spare */ -} target_type_t; - -typedef struct { - uint16_t lac; - uint8_t rac; - - /* Length of RNC Id can be 2 bytes if length of element is 8 - * or 4 bytes long if length is 10. - */ - uint32_t rnc_id; -} rnc_id_t; - -typedef struct { - unsigned enb_id:20; - uint16_t tac; -} macro_enb_id_t; - -typedef struct { - unsigned enb_id:28; - uint16_t tac; -} home_enb_id_t; - -typedef struct { - /* Common part */ - uint8_t target_type; - - uint8_t mcc[3]; - uint8_t mnc[3]; - union { - rnc_id_t rnc_id; - macro_enb_id_t macro_enb_id; - home_enb_id_t home_enb_id; - } target_id; -} target_identification_t; - -typedef enum SelectionMode_e { - MS_O_N_P_APN_S_V = 0, ///< MS or network provided APN, subscribed verified - MS_P_APN_S_N_V = 1, ///< MS provided APN, subscription not verified - N_P_APN_S_N_V = 2, ///< Network provided APN, subscription not verified -} SelectionMode_t; - -typedef struct { - uint32_t uplink_ambr; - uint32_t downlink_ambr; -} AMBR_t; - -typedef enum node_id_type_e { - GLOBAL_UNICAST_IPv4 = 0, - GLOBAL_UNICAST_IPv6 = 1, - TYPE_EXOTIC = 2, ///< (MCC * 1000 + MNC) << 12 + Integer value assigned to MME by operator -} node_id_type_t; - -typedef struct { - node_id_type_t node_id_type; - uint16_t csid; ///< Connection Set Identifier - union { - uint32_t unicast_ipv4; - uint8_t unicast_ipv6[16]; - struct { - uint16_t mcc; - uint16_t mnc; - uint16_t operator_specific_id; - } exotic; - } node_id; -} FQ_CSID_t; - -typedef struct { - uint8_t time_zone; - unsigned daylight_saving_time:2; -} UETimeZone_t; - -typedef enum AccessMode_e { - CLOSED_MODE = 0, - HYBRID_MODE = 1, -} AccessMode_t; - -typedef struct { - uint8_t mcc[3]; - uint8_t mnc[3]; - uint32_t csg_id; - AccessMode_t access_mode; - unsigned lcsg:1; - unsigned cmi:1; -} UCI_t; - -typedef struct { - /* PPC (Prohibit Payload Compression): - * This flag is used to determine whether an SGSN should attempt to - * compress the payload of user data when the users asks for it - * to be compressed (PPC = 0), or not (PPC = 1). - */ - unsigned ppc:1; - - /* VB (Voice Bearer): - * This flag is used to indicate a voice bearer when doing PS-to-CS - * SRVCC handover. - */ - unsigned vb:1; -} bearer_flags_t; - -#define PRE_EMPTION_CAPABILITY_ENABLED (0x0) -#define PRE_EMPTION_CAPABILITY_DISABLED (0x1) -#define PRE_EMPTION_VULNERABILITY_ENABLED (0x0) -#define PRE_EMPTION_VULNERABILITY_DISABLED (0x1) - -typedef struct { - /* PCI (Pre-emption Capability) - * The following values are defined: - * - PRE-EMPTION_CAPABILITY_ENABLED (0) - * This value indicates that the service data flow or bearer is allowed - * to get resources that were already assigned to another service data - * flow or bearer with a lower priority level. - * - PRE-EMPTION_CAPABILITY_DISABLED (1) - * This value indicates that the service data flow or bearer is not - * allowed to get resources that were already assigned to another service - * data flow or bearer with a lower priority level. - * Default value: PRE-EMPTION_CAPABILITY_DISABLED - */ - unsigned pci:1; - /* PL (Priority Level): defined in 3GPP TS.29.212 #5.3.45 - * Values 1 to 15 are defined, with value 1 as the highest level of priority. - * Values 1 to 8 should only be assigned for services that are authorized to - * receive prioritized treatment within an operator domain. Values 9 to 15 - * may be assigned to resources that are authorized by the home network and - * thus applicable when a UE is roaming. - */ - unsigned pl:4; - /* PVI (Pre-emption Vulnerability): defined in 3GPP TS.29.212 #5.3.47 - * Defines whether a service data flow can lose the resources assigned to it - * in order to admit a service data flow with higher priority level. - * The following values are defined: - * - PRE-EMPTION_VULNERABILITY_ENABLED (0) - * This value indicates that the resources assigned to the service data - * flow or bearer can be pre-empted and allocated to a service data flow - * or bearer with a higher priority level. - * - PRE-EMPTION_VULNERABILITY_DISABLED (1) - * This value indicates that the resources assigned to the service data - * flow or bearer shall not be pre-empted and allocated to a service data - * flow or bearer with a higher priority level. - * Default value: EMPTION_VULNERABILITY_ENABLED - */ - unsigned pvi:1; - uint8_t qci; - ambr_t gbr; ///< Guaranteed bit rate - ambr_t mbr; ///< Maximum bit rate -} BearerQOS_t; - -/* TFT operation Code */ -typedef enum { - /* 0 = spare */ - - CREATE_NEW_TFT = 0x1, - DELETE_EXISTING_TFT = 0x2, - ADD_PACKET_FILTERS_TO_EXISTING_TFT = 0x3, - REPLACE_PACKET_FILTERS_IN_EXISTING_TFT = 0x4, - DELETE_PACKET_FILTERS_FROM_EXISTING_TFT = 0x5, - NO_TFT_OPERATION = 0x6, - - TFT_OPERATION_CODE_MAX - - /* Other Values Reserved */ -} tft_operation_code_t; - -/* Defined in 3GPP TS 24.008 Table 10.5.162 */ -typedef enum { - PACKET_FILTER_PRE_REL_7 = 0, - PACKET_FILTER_DIRECTION_DL_ONLY = 1, - PACKET_FILTER_DIRECTION_UL_ONLY = 2, - PACKET_FILTER_BIDIRECTIONAL = 3, -} packet_filter_direction_t; - -/* The Traffic Flow Template is specified in 3GPP TS 24.008 #10.5.6.12 - */ -typedef struct { - /* The TFT operation code "No TFT operation" shall be used - * if a parameters list is included but no packet filter - * list is included in the traffic flow template information - * element. - */ - tft_operation_code_t tft_operation_code; - - /* The E bit indicates if a parameters list is included - * in the TFT IE and it is encoded as follows: - * - 0 parameters list is not included - * - 1 parameters list is included - */ - unsigned e_bit:1; - - /* For the "delete existing TFT" operation and for the "no TFT - * operation", the number of packet filters shall be coded - * as 0. For all other operations, the number of packet filters - * shall be greater than 0 and less than or equal to 15. - */ - uint8_t number_of_packet_filters; - - /* TODO: add packet filter list as defined in 3GPP TS 29.274 Table 10.5.162 */ -} tft_t; - -typedef enum node_type_e { - NODE_TYPE_MME = 0, - NODE_TYPE_SGSN = 1 -} node_type_t; - - -/* Cause as defined in 3GPP TS 29.274 #8.4 */ -typedef enum SGWCause_e { - /* Request / Initial message */ - LOCAL_DETACH = 2, - COMPLETE_DETACH = 3, - RAT_CHANGE_3GPP_TO_NON_3GPP = 4, ///< RAT changed from 3GPP to Non-3GPP - ISR_DEACTIVATION = 5, - ERROR_IND_FROM_RNC_ENB_SGSN = 6, - IMSI_DETACH_ONLY = 7, - /* Acceptance in a Response/Triggered message */ - REQUEST_ACCEPTED = 16, - REQUEST_ACCEPTED_PARTIALLY = 17, - NEW_PDN_TYPE_NW_PREF = 18, ///< New PDN type due to network preference - NEW_PDN_TYPE_SAB_ONLY = 19, ///< New PDN type due to single address bearer only - /* Rejection in a Response triggered message. */ - CONTEXT_NOT_FOUND = 64, - INVALID_MESSAGE_FORMAT = 65, - INVALID_LENGTH = 67, - SERVICE_NOT_SUPPORTED = 68, - MANDATORY_IE_INCORRECT = 69, - MANDATORY_IE_MISSING = 70, - SYSTEM_FAILURE = 72, - NO_RESOURCES_AVAILABLE = 73, - SEMANTIC_ERROR_IN_TFT = 74, - SYNTACTIC_ERROR_IN_TFT = 75, - SEMANTIC_ERRORS_IN_PF = 76, - SYNTACTIC_ERRORS_IN_PF = 77, - MISSING_OR_UNKNOWN_APN = 78, - GRE_KEY_NOT_FOUND = 80, - RELOCATION_FAILURE = 81, - DENIED_IN_RAT = 82, - UE_NOT_RESPONDING = 87, - UE_REFUSES = 88, - SERVICE_DENIED = 89, - UNABLE_TO_PAGE_UE = 90, - NO_MEMORY_AVAILABLE = 91, - REQUEST_REJECTED = 94, - DATA_FORWARDING_NOT_SUPPORTED = 106, - INVALID_REPLY_FROM_REMOTE_PEER = 107, - FALLBACK_TO_GTPV1 = 108, - INVALID_PEER = 109, - TEMP_REJECT_HO_IN_PROGRESS = 110, ///< Temporarily rejected due to handover procedure in progress - REJECTED_FOR_PMIPv6_REASON = 112, ///< Request rejected for a PMIPv6 reason (see 3GPP TS 29.275 [26]). - M_PDN_APN_NOT_ALLOWED = 116, ///< Multiple PDN connections for a given APN not allowed. - SGW_CAUSE_MAX -} SGWCause_t; - -typedef struct { - uint8_t cause_value; - uint8_t pce:1; - uint8_t bce:1; - uint8_t cs:1; - - uint8_t offending_ie_type; - uint16_t offending_ie_length; - uint8_t offending_ie_instance; -} gtp_cause_t; - -typedef struct { - uint8_t eps_bearer_id; ///< EPS Bearer ID - BearerQOS_t bearer_level_qos; - tft_t tft; ///< Bearer TFT -} bearer_to_create_t; - -typedef struct { - uint8_t eps_bearer_id; ///< EPS Bearer ID - SGWCause_t cause; - - /* This parameter is used on S11 interface only */ - FTeid_t s1u_sgw_fteid; ///< S1-U SGW F-TEID - - /* This parameter is used on S4 interface only */ - FTeid_t s4u_sgw_fteid; ///< S4-U SGW F-TEID - - /* This parameter is used on S11 and S5/S8 interface only for a - * GTP-based S5/S8 interface and during: - * - E-UTRAN Inintial attch - * - PDP Context Activation - * - UE requested PDN connectivity - */ - FTeid_t s5_s8_u_pgw_fteid; ///< S4-U SGW F-TEID - - /* This parameter is used on S4 interface only and when S12 interface is used */ - FTeid_t s12_sgw_fteid; ///< S12 SGW F-TEID - - /* This parameter is received only if the QoS parameters have been modified */ - BearerQOS_t *bearer_level_qos; - - tft_t tft; ///< Bearer TFT -} bearer_context_created_t; - -typedef struct { - uint8_t eps_bearer_id; ///< EPS Bearer ID - SGWCause_t cause; - FTeid_t s1u_sgw_fteid; ///< Sender F-TEID for user plane -} bearer_context_modified_t; - -typedef struct { - uint8_t eps_bearer_id; ///< EPS bearer ID - SGWCause_t cause; -} bearer_for_removal_t; - -typedef struct { - uint8_t eps_bearer_id; ///< EPS Bearer ID - FTeid_t s1_eNB_fteid; ///< S1 eNodeB F-TEID -} bearer_context_to_modify_t; - -#endif /* SGW_LITE_IE_DEFS_H_ */ - diff --git a/openair-cn/SGW-LITE/sgw_lite_task.c b/openair-cn/SGW-LITE/sgw_lite_task.c deleted file mode 100644 index 27f5836bb4..0000000000 --- a/openair-cn/SGW-LITE/sgw_lite_task.c +++ /dev/null @@ -1,229 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/*! \file sgw_lite_task.c -* \brief -* \author Lionel Gauthier -* \company Eurecom -* \email: lionel.gauthier@eurecom.fr -*/ -#define SGW_LITE -#define SGW_LITE_TASK_C - -#include -#include -#include -#include -#include - -#include "intertask_interface.h" -#include "mme_config.h" -#include "sgw_lite_defs.h" -#include "sgw_lite_handlers.h" -#include "sgw_lite.h" -#include "hashtable.h" -#include "spgw_config.h" -#include "pgw_lite_paa.h" -#include "msc.h" - -spgw_config_t spgw_config; -sgw_app_t sgw_app; -pgw_app_t pgw_app; - -static void *sgw_lite_intertask_interface(void *args_p) -{ - itti_mark_task_ready(TASK_SPGW_APP); - MSC_START_USE(); - - while(1) { - MessageDef *received_message_p; - itti_receive_msg(TASK_SPGW_APP, &received_message_p); - - switch (ITTI_MSG_ID(received_message_p)) { - case SGW_CREATE_SESSION_REQUEST: { - /* We received a create session request from MME (with GTP abstraction here) - * procedures might be: - * E-UTRAN Initial Attach - * UE requests PDN connectivity - */ - sgw_lite_handle_create_session_request(&received_message_p->ittiMsg.sgwCreateSessionRequest); - } - break; - - case SGW_MODIFY_BEARER_REQUEST: { - sgw_lite_handle_modify_bearer_request(&received_message_p->ittiMsg.sgwModifyBearerRequest); - } - break; - - case SGW_RELEASE_ACCESS_BEARERS_REQUEST: { - sgw_lite_handle_release_access_bearers_request(&received_message_p->ittiMsg.sgwReleaseAccessBearersRequest); - } - break; - - case SGW_DELETE_SESSION_REQUEST: { - sgw_lite_handle_delete_session_request(&received_message_p->ittiMsg.sgwDeleteSessionRequest); - } - break; - - case GTPV1U_CREATE_TUNNEL_RESP: { - SPGW_APP_DEBUG("Received teid for S1-U: %u and status: %s\n", - received_message_p->ittiMsg.gtpv1uCreateTunnelResp.S1u_teid , - received_message_p->ittiMsg.gtpv1uCreateTunnelResp.status == 0 ? "Success" : - "Failure"); - sgw_lite_handle_gtpv1uCreateTunnelResp(&received_message_p->ittiMsg.gtpv1uCreateTunnelResp); - } - break; - - case GTPV1U_UPDATE_TUNNEL_RESP: { - sgw_lite_handle_gtpv1uUpdateTunnelResp(&received_message_p->ittiMsg.gtpv1uUpdateTunnelResp); - } - break; - - case SGI_CREATE_ENDPOINT_RESPONSE: { - sgw_lite_handle_sgi_endpoint_created(&received_message_p->ittiMsg.sgiCreateEndpointResp); - } - break; - - case SGI_UPDATE_ENDPOINT_RESPONSE: { - sgw_lite_handle_sgi_endpoint_updated(&received_message_p->ittiMsg.sgiUpdateEndpointResp); - } - break; - - case TERMINATE_MESSAGE: { - itti_exit_task(); - } - break; - - default: { - SPGW_APP_DEBUG("Unkwnon message ID %d:%s\n", - ITTI_MSG_ID(received_message_p), - ITTI_MSG_NAME(received_message_p)); - } - break; - } - - itti_free(ITTI_MSG_ORIGIN_ID(received_message_p), received_message_p); - received_message_p = NULL; - } - - return NULL; -} - - - -int sgw_lite_init(char* config_file_name_pP) -{ - SPGW_APP_DEBUG("Initializing SPGW-APP task interface\n"); - spgw_system("modprobe ip_tables", SPGW_ABORT_ON_ERROR, __FILE__, __LINE__); - spgw_system("modprobe x_tables", SPGW_ABORT_ON_ERROR, __FILE__, __LINE__); - spgw_system("iptables -P INPUT ACCEPT", SPGW_WARN_ON_ERROR, __FILE__, __LINE__); - spgw_system("iptables -F INPUT", SPGW_WARN_ON_ERROR, __FILE__, __LINE__); - spgw_system("iptables -P OUTPUT ACCEPT", SPGW_WARN_ON_ERROR, __FILE__, __LINE__); - spgw_system("iptables -F OUTPUT", SPGW_WARN_ON_ERROR, __FILE__, __LINE__); - spgw_system("iptables -P FORWARD ACCEPT", SPGW_WARN_ON_ERROR, __FILE__, __LINE__); - spgw_system("iptables -F FORWARD", SPGW_WARN_ON_ERROR, __FILE__, __LINE__); - spgw_system("iptables -t nat -F", SPGW_WARN_ON_ERROR, __FILE__, __LINE__); - spgw_system("iptables -t mangle -F", SPGW_WARN_ON_ERROR, __FILE__, __LINE__); - spgw_system("iptables -t filter -F", SPGW_WARN_ON_ERROR, __FILE__, __LINE__); - spgw_system("iptables -t raw -F", SPGW_WARN_ON_ERROR, __FILE__, __LINE__); - spgw_system("iptables -t nat -Z", SPGW_WARN_ON_ERROR, __FILE__, __LINE__); - spgw_system("iptables -t mangle -Z", SPGW_WARN_ON_ERROR, __FILE__, __LINE__); - spgw_system("iptables -t filter -Z", SPGW_WARN_ON_ERROR, __FILE__, __LINE__); - spgw_system("iptables -t raw -Z", SPGW_WARN_ON_ERROR, __FILE__, __LINE__); - spgw_system("ip route flush cache", SPGW_WARN_ON_ERROR, __FILE__, __LINE__); - spgw_system("rmmod iptable_raw > /dev/null 2>&1", SPGW_WARN_ON_ERROR, __FILE__, __LINE__); - spgw_system("rmmod iptable_mangle > /dev/null 2>&1", SPGW_WARN_ON_ERROR, __FILE__, __LINE__); - spgw_system("rmmod iptable_nat > /dev/null 2>&1", SPGW_WARN_ON_ERROR, __FILE__, __LINE__); - spgw_system("rmmod iptable_filter > /dev/null 2>&1", SPGW_WARN_ON_ERROR, __FILE__, __LINE__); - spgw_system("rmmod ip_tables > /dev/null 2>&1", SPGW_WARN_ON_ERROR, __FILE__, __LINE__); - spgw_system("rmmod xt_state xt_mark xt_tcpudp xt_connmark ipt_LOG ipt_MASQUERADE > /dev/null 2>&1", SPGW_WARN_ON_ERROR, __FILE__, __LINE__); - spgw_system("rmmod x_tables > /dev/null 2>&1", SPGW_WARN_ON_ERROR, __FILE__, __LINE__); - spgw_system("rmmod nf_conntrack_netlink nfnetlink nf_nat nf_conntrack_ipv4 nf_conntrack > /dev/null 2>&1", SPGW_WARN_ON_ERROR, __FILE__, __LINE__); - spgw_system("modprobe ip_tables", SPGW_ABORT_ON_ERROR, __FILE__, __LINE__); - spgw_system("modprobe iptable_filter", SPGW_ABORT_ON_ERROR, __FILE__, __LINE__); - spgw_system("modprobe iptable_mangle", SPGW_ABORT_ON_ERROR, __FILE__, __LINE__); - spgw_system("modprobe iptable_nat", SPGW_ABORT_ON_ERROR, __FILE__, __LINE__); - spgw_system("modprobe iptable_raw", SPGW_ABORT_ON_ERROR, __FILE__, __LINE__); - spgw_system("modprobe ipt_MASQUERADE", SPGW_ABORT_ON_ERROR, __FILE__, __LINE__); - spgw_system("modprobe ipt_LOG", SPGW_ABORT_ON_ERROR, __FILE__, __LINE__); - spgw_system("modprobe nf_conntrack", SPGW_ABORT_ON_ERROR, __FILE__, __LINE__); - spgw_system("modprobe nf_conntrack_ipv4", SPGW_ABORT_ON_ERROR, __FILE__, __LINE__); - spgw_system("modprobe nf_nat", SPGW_ABORT_ON_ERROR, __FILE__, __LINE__); - spgw_system("modprobe x_tables", SPGW_ABORT_ON_ERROR, __FILE__, __LINE__); - spgw_system("sysctl -w net.ipv4.ip_forward=1", SPGW_WARN_ON_ERROR, __FILE__, __LINE__); - spgw_system("sysctl -w net.ipv4.conf.all.accept_local=1",SPGW_WARN_ON_ERROR, __FILE__, __LINE__); - spgw_system("sysctl -w net.ipv4.conf.all.log_martians=1",SPGW_WARN_ON_ERROR, __FILE__, __LINE__); - spgw_system("sysctl -w net.ipv4.conf.all.route_localnet=1",SPGW_WARN_ON_ERROR, __FILE__, __LINE__); - spgw_system("sysctl -w net.ipv4.conf.all.rp_filter=0",SPGW_WARN_ON_ERROR, __FILE__, __LINE__); - spgw_system("sync", SPGW_ABORT_ON_ERROR, __FILE__, __LINE__); - - spgw_config_init(config_file_name_pP, &spgw_config); - pgw_lite_load_pool_ip_addresses(); - - sgw_app.s11teid2mme_hashtable = hashtable_create (8192, NULL, NULL); - - if (sgw_app.s11teid2mme_hashtable == NULL) { - perror("hashtable_create"); - SPGW_APP_DEBUG("Initializing SPGW-APP task interface: ERROR\n"); - return -1; - } - - sgw_app.s1uteid2enb_hashtable = hashtable_create (8192, NULL, NULL); - - if (sgw_app.s1uteid2enb_hashtable == NULL) { - perror("hashtable_create"); - SPGW_APP_DEBUG("Initializing SPGW-APP task interface: ERROR\n"); - return -1; - } - - - sgw_app.s11_bearer_context_information_hashtable = hashtable_create (8192, NULL, sgw_lite_cm_free_s_plus_p_gw_eps_bearer_context_information); - - if (sgw_app.s11_bearer_context_information_hashtable == NULL) { - perror("hashtable_create"); - SPGW_APP_DEBUG("Initializing SPGW-APP task interface: ERROR\n"); - return -1; - } - - sgw_app.sgw_interface_name_for_S1u_S12_S4_up = spgw_config.sgw_config.ipv4.sgw_interface_name_for_S1u_S12_S4_up; - sgw_app.sgw_ip_address_for_S1u_S12_S4_up = spgw_config.sgw_config.ipv4.sgw_ipv4_address_for_S1u_S12_S4_up; - sgw_app.sgw_interface_name_for_S11_S4 = spgw_config.sgw_config.ipv4.sgw_interface_name_for_S11; - sgw_app.sgw_ip_address_for_S11_S4 = spgw_config.sgw_config.ipv4.sgw_ipv4_address_for_S11; - //sgw_app.sgw_ip_address_for_S5_S8_cp = spgw_config.sgw_config.ipv4.sgw_ip_address_for_S5_S8_cp; - sgw_app.sgw_ip_address_for_S5_S8_up = spgw_config.sgw_config.ipv4.sgw_ipv4_address_for_S5_S8_up; - - if (itti_create_task(TASK_SPGW_APP, - &sgw_lite_intertask_interface, NULL) < 0) { - perror("pthread_create"); - SPGW_APP_DEBUG("Initializing SPGW-APP task interface: ERROR\n"); - return -1; - } - - SPGW_APP_DEBUG("Initializing SPGW-APP task interface: DONE\n"); - return 0; -} diff --git a/openair-cn/SGW-LITE/spgw_config.c b/openair-cn/SGW-LITE/spgw_config.c deleted file mode 100755 index 6a490e772d..0000000000 --- a/openair-cn/SGW-LITE/spgw_config.c +++ /dev/null @@ -1,601 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/*! \file spgw_config.c -* \brief -* \author Lionel Gauthier -* \company Eurecom -* \email: lionel.gauthier@eurecom.fr -*/ -#define SGW_LITE -#define SPGW_CONFIG_C - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "log.h" -#include "assertions.h" -#include "spgw_config.h" -#include "sgw_lite_defs.h" -#include "intertask_interface.h" - -#ifdef LIBCONFIG_LONG -#define libconfig_int long -#else -#define libconfig_int int -#endif - -#define NIPADDR(addr) \ - (uint8_t)(addr & 0x000000FF), \ - (uint8_t)((addr & 0x0000FF00) >> 8), \ - (uint8_t)((addr & 0x00FF0000) >> 16), \ - (uint8_t)((addr & 0xFF000000) >> 24) - -#define HIPADDR(addr) \ - (uint8_t)((addr & 0xFF000000) >> 24),\ - (uint8_t)((addr & 0x00FF0000) >> 16),\ - (uint8_t)((addr & 0x0000FF00) >> 8), \ - (uint8_t)(addr & 0x000000FF) - -#define NIP6ADDR(addr) \ - ntohs((addr)->s6_addr16[0]), \ - ntohs((addr)->s6_addr16[1]), \ - ntohs((addr)->s6_addr16[2]), \ - ntohs((addr)->s6_addr16[3]), \ - ntohs((addr)->s6_addr16[4]), \ - ntohs((addr)->s6_addr16[5]), \ - ntohs((addr)->s6_addr16[6]), \ - ntohs((addr)->s6_addr16[7]) - -#define IN6_ARE_ADDR_MASKED_EQUAL(a,b,m) \ - (((((__const uint32_t *) (a))[0] & (((__const uint32_t *) (m))[0])) == (((__const uint32_t *) (b))[0] & (((__const uint32_t *) (m))[0]))) \ - && ((((__const uint32_t *) (a))[1] & (((__const uint32_t *) (m))[1])) == (((__const uint32_t *) (b))[1] & (((__const uint32_t *) (m))[1]))) \ - && ((((__const uint32_t *) (a))[2] & (((__const uint32_t *) (m))[2])) == (((__const uint32_t *) (b))[2] & (((__const uint32_t *) (m))[2]))) \ - && ((((__const uint32_t *) (a))[3] & (((__const uint32_t *) (m))[3])) == (((__const uint32_t *) (b))[3] & (((__const uint32_t *) (m))[3])))) - -void trim(char* srcP, int sizeP); -void sgw_ipv6_mask_in6_addr( struct in6_addr *addr6_pP, int maskP); - - -void -trim( - char* srcP, - int sizeP) -{ - if(srcP == NULL) - return; - - const char* current = srcP; - unsigned int i = 0; - - while((*current) != '\0' && (i < (sizeP-1))) { - if((*current != ' ') && (*current != '\t')) { - srcP[i++] = *current; - } - - ++current; - } - - srcP[i] = '\0'; -} - - - -void -sgw_ipv6_mask_in6_addr( - struct in6_addr *addr6_pP, - int maskP) -{ - int addr8_idx; - - addr8_idx = maskP / 8; - maskP = maskP % 8; - - if (maskP > 0) { - addr6_pP->s6_addr[addr8_idx] = addr6_pP->s6_addr[addr8_idx] & (0xFF << (8 - maskP)); - addr8_idx += 1; - } - - while (addr8_idx < 16) { - addr6_pP->s6_addr[addr8_idx++] = 0; - } -} - - -int spgw_system(char *command_pP, spgw_system_abort_control_e abort_on_errorP, const char * const file_nameP, const int line_numberP) -{ - int ret = -1; - - if (command_pP) { - SPGW_APP_INFO("system command: %s\n",command_pP); - ret = system(command_pP); - - if (ret != 0) { - SPGW_APP_ERROR("ERROR in system command %s: %d at %s:%u\n", - command_pP,ret, file_nameP, line_numberP); - - if (abort_on_errorP) { - exit(-1); // may be not exit - } - } - } - - return ret; -} - -int spgw_config_process(spgw_config_t* config_pP) -{ - char system_cmd[256]; - struct in_addr inaddr; - int ret = 0; - - inaddr.s_addr = config_pP->sgw_config.ipv4.sgw_ipv4_address_for_S1u_S12_S4_up; - - if (strncasecmp("lo",config_pP->sgw_config.ipv4.sgw_interface_name_for_S1u_S12_S4_up, strlen("lo")) == 0) { - config_pP->sgw_config.local_to_eNB = TRUE; - - } else { - config_pP->sgw_config.local_to_eNB = FALSE; - - if (snprintf(system_cmd, 256, - "insmod $OPENAIR_TARGETS/bin/xt_GTPUSP.ko gtpu_enb_port=2152 gtpu_sgw_port=%u sgw_addr=\"%s\" ", - config_pP->sgw_config.sgw_udp_port_for_S1u_S12_S4_up, - inet_ntoa(inaddr)) > 0) { - ret += spgw_system(system_cmd, SPGW_WARN_ON_ERROR, __FILE__, __LINE__); - } else { - SPGW_APP_ERROR("GTPUSP kernel module\n"); - ret = -1; - } - } - - if (config_pP->sgw_config.local_to_eNB == TRUE) { - - if (snprintf(system_cmd, 256, - "iptables -t filter -I INPUT -i lo -d %s --protocol sctp -j DROP", - inet_ntoa(inaddr)) > 0) { - ret += spgw_system(system_cmd, SPGW_ABORT_ON_ERROR, __FILE__, __LINE__); - } else { - SPGW_APP_ERROR("Drop SCTP traffic on S1U\n"); - ret = -1; - } - - if (snprintf(system_cmd, 256, - "iptables -t filter -I INPUT -i lo -s %s --protocol sctp -j DROP", - inet_ntoa(inaddr)) > 0) { - ret += spgw_system(system_cmd, SPGW_ABORT_ON_ERROR, __FILE__, __LINE__); - } else { - SPGW_APP_ERROR("Drop SCTP traffic on S1U\n"); - ret = -1; - } - - if (snprintf(system_cmd, 256, - "insmod $OPENAIR_TARGETS/bin/xt_GTPUSP.ko gtpu_enb_port=2153 gtpu_sgw_port=%u sgw_addr=\"%s\" ", - config_pP->sgw_config.sgw_udp_port_for_S1u_S12_S4_up, - inet_ntoa(inaddr)) > 0) { - ret += spgw_system(system_cmd, SPGW_WARN_ON_ERROR, __FILE__, __LINE__); - } else { - SPGW_APP_ERROR("GTPUSP kernel module\n"); - ret = -1; - } - } - - - ret += spgw_system("echo 0 > /proc/sys/net/ipv4/conf/all/send_redirects", SPGW_ABORT_ON_ERROR, __FILE__, __LINE__); - - - if (snprintf(system_cmd, 256, - "ethtool -K %s tso off gso off gro off", - config_pP->pgw_config.ipv4.pgw_interface_name_for_SGI) > 0) { - SPGW_APP_INFO("Disable tcp segmentation offload, generic segmentation offload: %s\n",system_cmd); - ret += spgw_system(system_cmd, SPGW_WARN_ON_ERROR, __FILE__, __LINE__); - } else { - SPGW_APP_ERROR("Disable tcp segmentation offload, generic segmentation offload\n"); - ret = -1; - } - - return ret; -} - - -int spgw_config_init(char* lib_config_file_name_pP, spgw_config_t* config_pP) -{ - - config_t cfg; - config_setting_t *setting_sgw = NULL; - char *sgw_interface_name_for_S1u_S12_S4_up = NULL; - char *sgw_ipv4_address_for_S1u_S12_S4_up = NULL; - char *sgw_interface_name_for_S5_S8_up = NULL; - char *sgw_ipv4_address_for_S5_S8_up = NULL; - char *sgw_interface_name_for_S11 = NULL; - char *sgw_ipv4_address_for_S11 = NULL; - char *sgw_drop_uplink_s1u_traffic = NULL; - char *sgw_drop_downlink_s1u_traffic = NULL; - libconfig_int sgw_udp_port_for_S1u_S12_S4_up = 2152; - - config_setting_t *setting_pgw = NULL; - config_setting_t *subsetting = NULL; - config_setting_t *sub2setting = NULL; - char *pgw_interface_name_for_S5_S8 = NULL; - char *pgw_ipv4_address_for_S5_S8 = NULL; - char *pgw_interface_name_for_SGI = NULL; - char *pgw_ipv4_address_for_SGI = NULL; - char *pgw_masquerade_SGI = NULL; - char *pgw_default_dns_ipv4_address = NULL; - char *pgw_default_dns_sec_ipv4_address = NULL; - - char *astring = NULL; - char *atoken = NULL; - char *atoken2 = NULL; - char *address = NULL; - char *cidr = NULL; - char *mask = NULL; - int num = 0; - int i = 0; - unsigned char buf_in6_addr[sizeof(struct in6_addr)]; - struct in6_addr addr6_start; - struct in6_addr addr6_mask; - int prefix_mask = 0; - uint64_t counter64 = 0; - unsigned char buf_in_addr[sizeof(struct in_addr)]; - struct in_addr addr_start,in_addr_var; - struct in_addr addr_mask; - pgw_lite_conf_ipv4_list_elm_t *ip4_ref = NULL; - pgw_lite_conf_ipv6_list_elm_t *ip6_ref = NULL; - char system_cmd[256]; - - memset((char*)config_pP, 0 , sizeof(spgw_config_t)); - STAILQ_INIT(&config_pP->pgw_config.pgw_lite_ipv4_pool_list); - STAILQ_INIT(&config_pP->pgw_config.pgw_lite_ipv6_pool_list); - - config_init(&cfg); - - if(lib_config_file_name_pP != NULL) { - /* Read the file. If there is an error, report it and exit. */ - if(! config_read_file(&cfg, lib_config_file_name_pP)) { - SPGW_APP_ERROR("%s:%d - %s\n", lib_config_file_name_pP, config_error_line(&cfg), config_error_text(&cfg)); - config_destroy(&cfg); - AssertFatal (1 == 0, "Failed to parse SP-GW configuration file %s!\n", lib_config_file_name_pP); - } - } else { - SPGW_APP_ERROR("No SP-GW configuration file provided!\n"); - config_destroy(&cfg); - AssertFatal (0, "No SP-GW configuration file provided!\n"); - } - - SPGW_APP_INFO("Parsing configuration file provided %s\n", lib_config_file_name_pP); - - setting_sgw = config_lookup(&cfg, SGW_CONFIG_STRING_SGW_CONFIG); - - if(setting_sgw != NULL) { - subsetting = config_setting_get_member (setting_sgw, SGW_CONFIG_STRING_NETWORK_INTERFACES_CONFIG); - - if(subsetting != NULL) { - if( ( - config_setting_lookup_string( subsetting, SGW_CONFIG_STRING_SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP, (const char **)&sgw_interface_name_for_S1u_S12_S4_up) - && config_setting_lookup_string( subsetting, SGW_CONFIG_STRING_SGW_IPV4_ADDRESS_FOR_S1U_S12_S4_UP, (const char **)&sgw_ipv4_address_for_S1u_S12_S4_up) - && config_setting_lookup_string( subsetting, SGW_CONFIG_STRING_SGW_INTERFACE_NAME_FOR_S5_S8_UP, (const char **)&sgw_interface_name_for_S5_S8_up) - && config_setting_lookup_string( subsetting, SGW_CONFIG_STRING_SGW_IPV4_ADDRESS_FOR_S5_S8_UP, (const char **)&sgw_ipv4_address_for_S5_S8_up) - && config_setting_lookup_string( subsetting, SGW_CONFIG_STRING_SGW_INTERFACE_NAME_FOR_S11, (const char **)&sgw_interface_name_for_S11) - && config_setting_lookup_string( subsetting, SGW_CONFIG_STRING_SGW_IPV4_ADDRESS_FOR_S11, (const char **)&sgw_ipv4_address_for_S11) - ) - ) { - config_pP->sgw_config.ipv4.sgw_interface_name_for_S1u_S12_S4_up = strdup(sgw_interface_name_for_S1u_S12_S4_up); - cidr = strdup(sgw_ipv4_address_for_S1u_S12_S4_up); - address = strtok(cidr, "/"); - mask = strtok(NULL, "/"); - IPV4_STR_ADDR_TO_INT_NWBO ( address, config_pP->sgw_config.ipv4.sgw_ipv4_address_for_S1u_S12_S4_up, "BAD IP ADDRESS FORMAT FOR S1u_S12_S4 !\n" ) - config_pP->sgw_config.ipv4.sgw_ip_netmask_for_S1u_S12_S4_up = atoi(mask); - free(cidr); - - in_addr_var.s_addr = config_pP->sgw_config.ipv4.sgw_ipv4_address_for_S1u_S12_S4_up; - SPGW_APP_INFO("Parsing configuration file found sgw_ipv4_address_for_S1u_S12_S4_up: %s/%d on %s\n", - inet_ntoa(in_addr_var), - config_pP->sgw_config.ipv4.sgw_ip_netmask_for_S1u_S12_S4_up, - config_pP->sgw_config.ipv4.sgw_interface_name_for_S1u_S12_S4_up); - - - config_pP->sgw_config.ipv4.sgw_interface_name_for_S5_S8_up = strdup(sgw_interface_name_for_S5_S8_up); - cidr = strdup(sgw_ipv4_address_for_S5_S8_up); - address = strtok(cidr, "/"); - mask = strtok(NULL, "/"); - IPV4_STR_ADDR_TO_INT_NWBO ( address, config_pP->sgw_config.ipv4.sgw_ipv4_address_for_S5_S8_up, "BAD IP ADDRESS FORMAT FOR S5_S8 !\n" ) - config_pP->sgw_config.ipv4.sgw_ip_netmask_for_S5_S8_up = atoi(mask); - free(cidr); - in_addr_var.s_addr = config_pP->sgw_config.ipv4.sgw_ipv4_address_for_S5_S8_up; - SPGW_APP_INFO("Parsing configuration file found sgw_ipv4_address_for_S5_S8_up: %s/%d on %s\n", - inet_ntoa(in_addr_var), - config_pP->sgw_config.ipv4.sgw_ip_netmask_for_S5_S8_up, - config_pP->sgw_config.ipv4.sgw_interface_name_for_S5_S8_up); - - config_pP->sgw_config.ipv4.sgw_interface_name_for_S11 = strdup(sgw_interface_name_for_S11); - cidr = strdup(sgw_ipv4_address_for_S11); - address = strtok(cidr, "/"); - mask = strtok(NULL, "/"); - IPV4_STR_ADDR_TO_INT_NWBO ( address, config_pP->sgw_config.ipv4.sgw_ipv4_address_for_S11, "BAD IP ADDRESS FORMAT FOR S11 !\n" ) - config_pP->sgw_config.ipv4.sgw_ip_netmask_for_S11 = atoi(mask); - free(cidr); - in_addr_var.s_addr = config_pP->sgw_config.ipv4.sgw_ipv4_address_for_S11; - SPGW_APP_INFO("Parsing configuration file found sgw_ipv4_address_for_S11: %s/%d on %s\n", - inet_ntoa(in_addr_var), - config_pP->sgw_config.ipv4.sgw_ip_netmask_for_S11, - config_pP->sgw_config.ipv4.sgw_interface_name_for_S11); - } - - - if(config_setting_lookup_int( - subsetting, - SGW_CONFIG_STRING_SGW_PORT_FOR_S1U_S12_S4_UP, - &sgw_udp_port_for_S1u_S12_S4_up) - ) { - config_pP->sgw_config.sgw_udp_port_for_S1u_S12_S4_up = sgw_udp_port_for_S1u_S12_S4_up; - } else { - config_pP->sgw_config.sgw_udp_port_for_S1u_S12_S4_up = sgw_udp_port_for_S1u_S12_S4_up; - } - - } - } - - setting_pgw = config_lookup(&cfg, PGW_CONFIG_STRING_PGW_CONFIG); - - if(setting_pgw != NULL) { - subsetting = config_setting_get_member (setting_pgw, PGW_CONFIG_STRING_NETWORK_INTERFACES_CONFIG); - - if(subsetting != NULL) { - if( ( - config_setting_lookup_string(subsetting, - PGW_CONFIG_STRING_PGW_INTERFACE_NAME_FOR_S5_S8, - (const char **)&pgw_interface_name_for_S5_S8) - && config_setting_lookup_string(subsetting, - PGW_CONFIG_STRING_PGW_IPV4_ADDRESS_FOR_S5_S8, - (const char **)&pgw_ipv4_address_for_S5_S8) - && config_setting_lookup_string(subsetting, - PGW_CONFIG_STRING_PGW_INTERFACE_NAME_FOR_SGI, - (const char **)&pgw_interface_name_for_SGI) - && config_setting_lookup_string(subsetting, - PGW_CONFIG_STRING_PGW_IPV4_ADDR_FOR_SGI, - (const char **)&pgw_ipv4_address_for_SGI) - && config_setting_lookup_string(subsetting, - PGW_CONFIG_STRING_PGW_MASQUERADE_SGI, - (const char **)&pgw_masquerade_SGI) - ) - ) { - config_pP->pgw_config.ipv4.pgw_interface_name_for_S5_S8 = strdup(pgw_interface_name_for_S5_S8); - cidr = strdup(pgw_ipv4_address_for_S5_S8); - address = strtok(cidr, "/"); - mask = strtok(NULL, "/"); - IPV4_STR_ADDR_TO_INT_NWBO ( address, config_pP->pgw_config.ipv4.pgw_ipv4_address_for_S5_S8, "BAD IP ADDRESS FORMAT FOR S5_S8 !\n" ) - config_pP->pgw_config.ipv4.pgw_ip_netmask_for_S5_S8 = atoi(mask); - free(cidr); - in_addr_var.s_addr = config_pP->pgw_config.ipv4.pgw_ipv4_address_for_S5_S8; - SPGW_APP_INFO("Parsing configuration file found pgw_ipv4_address_for_S5_S8: %s/%d on %s\n", - inet_ntoa(in_addr_var), - config_pP->pgw_config.ipv4.pgw_ip_netmask_for_S5_S8, - config_pP->pgw_config.ipv4.pgw_interface_name_for_S5_S8); - - config_pP->pgw_config.ipv4.pgw_interface_name_for_SGI = strdup(pgw_interface_name_for_SGI); - cidr = strdup(pgw_ipv4_address_for_SGI); - address = strtok(cidr, "/"); - mask = strtok(NULL, "/"); - IPV4_STR_ADDR_TO_INT_NWBO ( address, config_pP->pgw_config.ipv4.pgw_ipv4_address_for_SGI, "BAD IP ADDRESS FORMAT FOR SGI !\n" ) - config_pP->pgw_config.ipv4.pgw_ip_netmask_for_SGI = atoi(mask); - free(cidr); - in_addr_var.s_addr = config_pP->pgw_config.ipv4.pgw_ipv4_address_for_SGI; - SPGW_APP_INFO("Parsing configuration file found pgw_ipv4_address_for_SGI: %s/%d on %s\n", - inet_ntoa(in_addr_var), - config_pP->pgw_config.ipv4.pgw_ip_netmask_for_SGI, - config_pP->pgw_config.ipv4.pgw_interface_name_for_SGI); - - if (strcasecmp(pgw_masquerade_SGI, "yes") == 0) { - config_pP->pgw_config.pgw_masquerade_SGI=1; - } else { - config_pP->pgw_config.pgw_masquerade_SGI=0; - SPGW_APP_INFO("No masquerading for SGI\n"); - } - } else { - SPGW_APP_WARN("CONFIG P-GW / NETWORK INTERFACES parsing failed\n"); - } - } else { - SPGW_APP_WARN("CONFIG P-GW / NETWORK INTERFACES not found\n"); - } - - //!!!------------------------------------!!! - spgw_config_process(config_pP); - //!!!------------------------------------!!! - - subsetting = config_setting_get_member (setting_pgw, PGW_CONFIG_STRING_IP_ADDRESS_POOL); - - if(subsetting != NULL) { - sub2setting = config_setting_get_member (subsetting, PGW_CONFIG_STRING_IPV4_ADDRESS_LIST); - - if(sub2setting != NULL) { - num = config_setting_length(sub2setting); - - for (i = 0; i < num; i++) { - astring = config_setting_get_string_elem(sub2setting,i); - - if (astring != NULL) { - trim(astring, strlen(astring)+1); - // failure, test if there is a range specified in the string - atoken = strtok(astring, PGW_CONFIG_STRING_IPV4_PREFIX_DELIMITER); - - if (inet_pton(AF_INET, atoken, buf_in_addr) == 1) { - memcpy (&addr_start, buf_in_addr, sizeof(struct in_addr)); - // valid address - atoken2 = strtok(NULL, PGW_CONFIG_STRING_IPV4_PREFIX_DELIMITER); - prefix_mask = atoi(atoken2); - - in_addr_var.s_addr = config_pP->sgw_config.ipv4.sgw_ipv4_address_for_S1u_S12_S4_up; - - if (snprintf(system_cmd, 256, - "iptables -I PREROUTING -t mangle -i %s -d %s/%s ! --protocol sctp -j CONNMARK --restore-mark", - config_pP->pgw_config.ipv4.pgw_interface_name_for_SGI, astring, atoken2) > 0) { - spgw_system(system_cmd, SPGW_ABORT_ON_ERROR, __FILE__, __LINE__); - } else { - SPGW_APP_ERROR("Restore mark\n"); - } - - if (snprintf(system_cmd, 256, - "iptables -I OUTPUT -t mangle -s %s/%s -m mark ! --mark 0 -j CONNMARK --save-mark", - astring, atoken2) > 0) { - spgw_system(system_cmd, SPGW_ABORT_ON_ERROR, __FILE__, __LINE__); - } else { - SPGW_APP_ERROR("Save mark\n"); - } - if (snprintf(system_cmd, 256, - "ip route add %s/%s dev %s", - astring, atoken2, config_pP->sgw_config.ipv4.sgw_interface_name_for_S1u_S12_S4_up) > 0) { - spgw_system(system_cmd, SPGW_WARN_ON_ERROR, __FILE__, __LINE__); - } else { - SPGW_APP_ERROR("Route for UEs\n"); - } - - - if ((prefix_mask >= 2)&&(prefix_mask < 32)) { - memcpy (&addr_start, buf_in_addr, sizeof(struct in_addr)); - memcpy (&addr_mask, buf_in_addr, sizeof(struct in_addr)); - - addr_mask.s_addr = addr_mask.s_addr & htonl(0xFFFFFFFF << (32 - prefix_mask)); - - if (memcmp(&addr_start, &addr_mask, sizeof(struct in_addr)) != 0) { - AssertFatal(0, "BAD IPV4 ADDR CONFIG/MASK PAIRING %s/%d addr %X mask %X\n", - astring, prefix_mask, addr_start.s_addr, addr_mask.s_addr); - } - - counter64 = 0x00000000FFFFFFFF >> prefix_mask; // address Prefix_mask/0..0 not valid - counter64 = counter64 - 2; - - do { - addr_start.s_addr = addr_start.s_addr + htonl(2); - ip4_ref = calloc(1, sizeof(pgw_lite_conf_ipv4_list_elm_t)); - ip4_ref->addr = addr_start; - - STAILQ_INSERT_TAIL(&config_pP->pgw_config.pgw_lite_ipv4_pool_list, ip4_ref, ipv4_entries); - counter64 = counter64 - 1; - } while (counter64 > 0); - - //--------------- - if (config_pP->pgw_config.pgw_masquerade_SGI) { - in_addr_var.s_addr = config_pP->pgw_config.ipv4.pgw_ipv4_address_for_SGI; - - if (snprintf(system_cmd, 256, - //"iptables -t nat -I POSTROUTING -s %s/%s -o %s ! --protocol sctp -j SNAT --to-source %s", - "iptables -t nat -I POSTROUTING -s %s/%s ! --protocol sctp -j SNAT --to-source %s", - astring, - atoken2, - //config_pP->pgw_config.ipv4.pgw_interface_name_for_SGI, - inet_ntoa(in_addr_var)) > 0) { - SPGW_APP_INFO("Masquerade SGI: %s\n",system_cmd); - spgw_system(system_cmd, SPGW_ABORT_ON_ERROR, __FILE__, __LINE__); - } else { - SPGW_APP_ERROR("Masquerade SGI\n"); - } - } - } else { - SPGW_APP_ERROR("CONFIG POOL ADDR IPV4: BAD MASQ: %s\n", atoken2); - } - } - } - } - } else { - SPGW_APP_WARN("CONFIG POOL ADDR IPV4: NO IPV4 ADDRESS FOUND\n"); - } - - sub2setting = config_setting_get_member (subsetting, PGW_CONFIG_STRING_IPV6_ADDRESS_LIST); - - if(sub2setting != NULL) { - num = config_setting_length(sub2setting); - - for (i = 0; i < num; i++) { - astring = config_setting_get_string_elem(sub2setting,i); - - if (astring != NULL) { - trim(astring, strlen(astring)+1); - - if (inet_pton(AF_INET6, astring, buf_in6_addr) < 1) { - // failure, test if there is a range specified in the string - atoken = strtok(astring, PGW_CONFIG_STRING_IPV6_PREFIX_DELIMITER); - - if (inet_pton(AF_INET6, astring, buf_in6_addr) == 1) { - atoken2 = strtok(NULL, PGW_CONFIG_STRING_IPV6_PREFIX_DELIMITER); - prefix_mask = atoi(atoken2); - // arbitrary values - DevAssert((prefix_mask < 128) && (prefix_mask >= 64)); - - memcpy (&addr6_start, buf_in6_addr, sizeof(struct in6_addr)); - memcpy (&addr6_mask, buf_in6_addr, sizeof(struct in6_addr)); - sgw_ipv6_mask_in6_addr(&addr6_mask, prefix_mask); - - if (memcmp(&addr6_start, &addr6_mask, sizeof(struct in6_addr)) != 0) { - AssertFatal(0, "BAD IPV6 ADDR CONFIG/MASK PAIRING %s/%d\n", astring, prefix_mask); - } - - - ip6_ref = calloc(1, sizeof(pgw_lite_conf_ipv6_list_elm_t)); - ip6_ref->addr = addr6_start; - ip6_ref->prefix_len = prefix_mask; - STAILQ_INSERT_TAIL(&config_pP->pgw_config.pgw_lite_ipv6_pool_list, ip6_ref, ipv6_entries); - - } - } else { - SPGW_APP_WARN("CONFIG POOL ADDR IPV6: FAILED WHILE PARSING %s\n", astring); - } - } - } - } - - if( - config_setting_lookup_string(setting_pgw, - PGW_CONFIG_STRING_DEFAULT_DNS_IPV4_ADDRESS, - (const char **)&pgw_default_dns_ipv4_address) - && config_setting_lookup_string(setting_pgw, - PGW_CONFIG_STRING_DEFAULT_DNS_SEC_IPV4_ADDRESS, - (const char **)&pgw_default_dns_sec_ipv4_address)) { - config_pP->pgw_config.ipv4.pgw_interface_name_for_S5_S8 = strdup(pgw_interface_name_for_S5_S8); - IPV4_STR_ADDR_TO_INT_NWBO ( pgw_default_dns_ipv4_address, config_pP->pgw_config.ipv4.default_dns_v4, "BAD IPv4 ADDRESS FORMAT FOR DEFAULT DNS !\n" ) - IPV4_STR_ADDR_TO_INT_NWBO ( pgw_default_dns_sec_ipv4_address, config_pP->pgw_config.ipv4.default_dns_sec_v4, "BAD IPv4 ADDRESS FORMAT FOR DEFAULT DNS SEC!\n" ) - SPGW_APP_INFO("Parsing configuration file default primary DNS IPv4 address: %x\n", - config_pP->pgw_config.ipv4.default_dns_v4); - SPGW_APP_INFO("Parsing configuration file default secondary DNS IPv4 address: %x\n", - config_pP->pgw_config.ipv4.default_dns_sec_v4); - } else { - SPGW_APP_WARN("NO DNS CONFIGURATION FOUND\n"); - } - } - } else { - SPGW_APP_WARN("CONFIG P-GW not found\n"); - } - - return 0; -} diff --git a/openair-cn/SGW-LITE/spgw_config.h b/openair-cn/SGW-LITE/spgw_config.h deleted file mode 100755 index 5a201e4482..0000000000 --- a/openair-cn/SGW-LITE/spgw_config.h +++ /dev/null @@ -1,153 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/*! \file spgw_config.h -* \brief -* \author Lionel Gauthier -* \company Eurecom -* \email: lionel.gauthier@eurecom.fr -*/ - -#ifndef SPGW_CONFIG_H_ -#define SPGW_CONFIG_H_ -#include // inet_aton -#include // inet_aton -#include // inet_aton - -#include "queue.h" - -#define SGW_CONFIG_STRING_SGW_CONFIG "S-GW" -#define SGW_CONFIG_STRING_NETWORK_INTERFACES_CONFIG "NETWORK_INTERFACES" -#define SGW_CONFIG_STRING_SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP "SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP" -#define SGW_CONFIG_STRING_SGW_IPV4_ADDRESS_FOR_S1U_S12_S4_UP "SGW_IPV4_ADDRESS_FOR_S1U_S12_S4_UP" -#define SGW_CONFIG_STRING_SGW_PORT_FOR_S1U_S12_S4_UP "SGW_IPV4_PORT_FOR_S1U_S12_S4_UP" -#define SGW_CONFIG_STRING_SGW_INTERFACE_NAME_FOR_S5_S8_UP "SGW_INTERFACE_NAME_FOR_S5_S8_UP" -#define SGW_CONFIG_STRING_SGW_IPV4_ADDRESS_FOR_S5_S8_UP "SGW_IPV4_ADDRESS_FOR_S5_S8_UP" -#define SGW_CONFIG_STRING_SGW_INTERFACE_NAME_FOR_S11 "SGW_INTERFACE_NAME_FOR_S11" -#define SGW_CONFIG_STRING_SGW_IPV4_ADDRESS_FOR_S11 "SGW_IPV4_ADDRESS_FOR_S11" - -#define PGW_CONFIG_STRING_PGW_CONFIG "P-GW" -#define PGW_CONFIG_STRING_NETWORK_INTERFACES_CONFIG "NETWORK_INTERFACES" -#define PGW_CONFIG_STRING_PGW_INTERFACE_NAME_FOR_S5_S8 "PGW_INTERFACE_NAME_FOR_S5_S8" -#define PGW_CONFIG_STRING_PGW_IPV4_ADDRESS_FOR_S5_S8 "PGW_IPV4_ADDRESS_FOR_S5_S8" -#define PGW_CONFIG_STRING_PGW_INTERFACE_NAME_FOR_SGI "PGW_INTERFACE_NAME_FOR_SGI" -#define PGW_CONFIG_STRING_PGW_IPV4_ADDR_FOR_SGI "PGW_IPV4_ADDRESS_FOR_SGI" -#define PGW_CONFIG_STRING_PGW_MASQUERADE_SGI "PGW_MASQUERADE_SGI" - -#define PGW_CONFIG_STRING_IP_ADDRESS_POOL "IP_ADDRESS_POOL" -#define PGW_CONFIG_STRING_IPV4_ADDRESS_LIST "IPV4_LIST" -#define PGW_CONFIG_STRING_IPV6_ADDRESS_LIST "IPV6_LIST" -#define PGW_CONFIG_STRING_IPV4_PREFIX_DELIMITER " /" -#define PGW_CONFIG_STRING_IPV6_PREFIX_DELIMITER " /" -#define PGW_CONFIG_STRING_DEFAULT_DNS_IPV4_ADDRESS "DEFAULT_DNS_IPV4_ADDRESS" -#define PGW_CONFIG_STRING_DEFAULT_DNS_SEC_IPV4_ADDRESS "DEFAULT_DNS_SEC_IPV4_ADDRESS" - -#define PGW_CONFIG_STRING_INTERFACE_DISABLED "none" - -#define IPV4_STR_ADDR_TO_INT_NWBO(AdDr_StR,NwBo,MeSsAgE ) do {\ - struct in_addr inp;\ - if ( inet_aton(AdDr_StR, &inp ) < 0 ) {\ - AssertFatal (0, MeSsAgE);\ - } else {\ - NwBo = inp.s_addr;\ - }\ - } while (0); - -typedef struct sgw_config_s { - struct { - char *sgw_interface_name_for_S1u_S12_S4_up; - uint32_t sgw_ipv4_address_for_S1u_S12_S4_up; - int sgw_ip_netmask_for_S1u_S12_S4_up; - - char *sgw_interface_name_for_S5_S8_up; - uint32_t sgw_ipv4_address_for_S5_S8_up; - int sgw_ip_netmask_for_S5_S8_up; - - char *sgw_interface_name_for_S11; - uint32_t sgw_ipv4_address_for_S11; - int sgw_ip_netmask_for_S11; - } ipv4; - int sgw_udp_port_for_S1u_S12_S4_up; - - uint8_t sgw_drop_uplink_traffic; - uint8_t sgw_drop_downlink_traffic; - uint8_t local_to_eNB; -} sgw_config_t; - -// may be more -#define PGW_MAX_ALLOCATED_PDN_ADDRESSES 1024 - - -typedef struct pgw_lite_conf_ipv4_list_elm_s { - STAILQ_ENTRY(pgw_lite_conf_ipv4_list_elm_s) ipv4_entries; - struct in_addr addr; -} pgw_lite_conf_ipv4_list_elm_t; - - -typedef struct pgw_lite_conf_ipv6_list_elm_s { - STAILQ_ENTRY(pgw_lite_conf_ipv6_list_elm_s) ipv6_entries; - struct in6_addr addr; - int prefix_len; -} pgw_lite_conf_ipv6_list_elm_t; - - -typedef struct pgw_config_s { - struct { - char *pgw_interface_name_for_S5_S8; - uint32_t pgw_ipv4_address_for_S5_S8; - int pgw_ip_netmask_for_S5_S8; - - char *pgw_interface_name_for_SGI; - uint32_t pgw_ipv4_address_for_SGI; - int pgw_ip_netmask_for_SGI; - - uint32_t default_dns_v4; // NBO - uint32_t default_dns_sec_v4;// NBO - } ipv4; - uint8_t pgw_masquerade_SGI; - - STAILQ_HEAD(pgw_lite_ipv4_pool_head_s, pgw_lite_conf_ipv4_list_elm_s) pgw_lite_ipv4_pool_list; - STAILQ_HEAD(pgw_lite_ipv6_pool_head_s, pgw_lite_conf_ipv6_list_elm_s) pgw_lite_ipv6_pool_list; -} pgw_config_t; - -typedef struct spgw_config_s { - sgw_config_t sgw_config; - pgw_config_t pgw_config; -} spgw_config_t; - -#ifndef SGW_LITE -extern spgw_config_t spgw_config; -#endif - -typedef enum { SPGW_WARN_ON_ERROR = 0, SPGW_ABORT_ON_ERROR} spgw_system_abort_control_e; - -int spgw_system(char *command_pP, spgw_system_abort_control_e abort_on_errorP, const char * const file_nameP, const int line_numberP); -int spgw_config_process(spgw_config_t* config_pP); -int spgw_config_init(char* lib_config_file_name_pP, spgw_config_t* config_pP); - -#endif /* ENB_CONFIG_H_ */ diff --git a/openair-cn/TEST/COPYING b/openair-cn/TEST/COPYING deleted file mode 100644 index 94a9ed024d..0000000000 --- a/openair-cn/TEST/COPYING +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program 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. - - This program 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 this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/openair-cn/UDP/COPYING b/openair-cn/UDP/COPYING deleted file mode 100644 index 94a9ed024d..0000000000 --- a/openair-cn/UDP/COPYING +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program 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. - - This program 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 this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/openair-cn/UDP/Makefile.am b/openair-cn/UDP/Makefile.am deleted file mode 100644 index 907bc2099a..0000000000 --- a/openair-cn/UDP/Makefile.am +++ /dev/null @@ -1,45 +0,0 @@ -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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 . -# -# Contact Information -# OpenAirInterface Admin: openair_admin@eurecom.fr -# OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr -# -# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. -# -################################################################################ -noinst_LTLIBRARIES = libudpserver.la -libudpserver_la_LDFLAGS = -all-static - -AM_CFLAGS = \ - @ADD_CFLAGS@ \ - -I$(top_srcdir)/COMMON \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/api/network \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/include \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/ies \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/emm/msg \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/esm/msg \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/util \ - -I$(top_srcdir)/INTERTASK_INTERFACE \ - -I$(top_srcdir)/UTILS - -libudpserver_la_SOURCES = \ - udp_primitives_server.h udp_primitives_server.c \ No newline at end of file diff --git a/openair-cn/UDP/Makefile.eNB b/openair-cn/UDP/Makefile.eNB deleted file mode 100644 index 2d34681408..0000000000 --- a/openair-cn/UDP/Makefile.eNB +++ /dev/null @@ -1,69 +0,0 @@ -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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 . -# -# Contact Information -# OpenAirInterface Admin: openair_admin@eurecom.fr -# OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr -# -# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. -# -################################################################################ -# include $(OPENAIR_TARGETS)/SIMU/USER/Makerules - -OUTDIR = . - -libudp_OBJECTS = \ - udp_eNB_task.o - -# pull in dependency info for *existing* .o files --include $(OUTDIR)/*.d - -CFLAGS = \ - -Wall \ - $(UDP_CFLAGS) \ - -DENB_MODE \ - -Werror=uninitialized \ - -Werror=implicit-function-declaration - -$(OUTDIR)/%.o : %.c - @echo "Compiling $<" - @if [ ! -d $(dir $@) ]; then mkdir -p $(dir $@); fi; - @$(CC) -c $(CFLAGS) -o $@ $< - @$(CC) -MM $(CFLAGS) $< > $(basename $@).d - @mv -f $(basename $@).d $(basename $@).d.tmp - @sed -e 's|.*:|$@:|' < $(basename $@).d.tmp > $(basename $@).d - @sed -e 's/.*://' -e 's/\\$$//' < $(basename $@).d.tmp | fmt -1 | \ - sed -e 's/^ *//' -e 's/$$/:/' >> $(basename $@).d - @rm -f $(basename $@).d.tmp - -objsdir: - @if [ ! -d $(OUTDIR) ]; then mkdir -p $(OUTDIR); fi; - -$(OUTDIR)/libudp.a: $(addprefix $(OUTDIR)/,$(libudp_OBJECTS)) - @echo Creating UDP archive - @$(AR) rcs $@ $(addprefix $(OUTDIR)/,$(libudp_OBJECTS)) - -clean: - @$(RM_F_V) $(OUTDIR)/*.o - @$(RM_F_V) $(OUTDIR)/*.d - @$(RM_F_V) $(OUTDIR)/libudp.a - -cleanall: clean diff --git a/openair-cn/UDP/udp_primitives_server.c b/openair-cn/UDP/udp_primitives_server.c deleted file mode 100644 index 6639331ee8..0000000000 --- a/openair-cn/UDP/udp_primitives_server.c +++ /dev/null @@ -1,457 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/*! \file udp_primitives_server.c -* \brief -* \author Sebastien ROUX, Lionel Gauthier -* \company Eurecom -* \email: lionel.gauthier@eurecom.fr -*/ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - - -#include - -#include "intertask_interface.h" -#include "udp_primitives_server.h" - -#include "assertions.h" -#include "conversions.h" -#include "msc.h" - -#define UDP_DEBUG(x, args...) do { fprintf(stdout, "[UDP] [D]"x, ##args); } while(0) -#define UDP_ERROR(x, args...) do { fprintf(stderr, "[UDP] [E]"x, ##args); } while(0) - -//void *udp_receiver_thread(void *args_p); - -struct udp_socket_desc_s { - uint8_t buffer[4096]; - int sd; /* Socket descriptor to use */ - - pthread_t listener_thread; /* Thread affected to recv */ - - char *local_address; /* Local ipv4 address to use */ - uint16_t local_port; /* Local port to use */ - - task_id_t task_id; /* Task who has requested the new endpoint */ - - STAILQ_ENTRY(udp_socket_desc_s) entries; -}; - -static STAILQ_HEAD(udp_socket_list_s, udp_socket_desc_s) udp_socket_list; -static pthread_mutex_t udp_socket_list_mutex = PTHREAD_MUTEX_INITIALIZER; - -//----------------------------------------------------------------------------- -void udp_print_hex_octets(unsigned char* dataP, unsigned long sizeP) -//----------------------------------------------------------------------------- -{ - unsigned long octet_index = 0; - unsigned long buffer_marker = 0; - unsigned char aindex; -#define UDP_2_PRINT_BUFFER_LEN 8000 - char udp_2_print_buffer[UDP_2_PRINT_BUFFER_LEN]; - struct timeval tv; - struct timezone tz; - char timeofday[64]; - - unsigned int h,m,s; - - if (dataP == NULL) { - return; - } - - gettimeofday(&tv, &tz); - h = tv.tv_sec/3600/24; - m = (tv.tv_sec / 60) % 60; - s = tv.tv_sec % 60; - snprintf(timeofday, 64, "%02d:%02d:%02d.%06d", h,m,s,tv.tv_usec); - - UDP_DEBUG("%s------+-------------------------------------------------|\n",timeofday); - UDP_DEBUG("%s | 0 1 2 3 4 5 6 7 8 9 a b c d e f |\n",timeofday); - UDP_DEBUG("%s------+-------------------------------------------------|\n",timeofday); - - for (octet_index = 0; octet_index < sizeP; octet_index++) { - if (UDP_2_PRINT_BUFFER_LEN < (buffer_marker + 32)) { - buffer_marker+=snprintf(&udp_2_print_buffer[buffer_marker], UDP_2_PRINT_BUFFER_LEN - buffer_marker, - "... (print buffer overflow)"); - UDP_DEBUG("%s%s",timeofday,udp_2_print_buffer); - return; - } - - if ((octet_index % 16) == 0) { - if (octet_index != 0) { - buffer_marker+=snprintf(&udp_2_print_buffer[buffer_marker], UDP_2_PRINT_BUFFER_LEN - buffer_marker, " |\n"); - UDP_DEBUG("%s%s",timeofday, udp_2_print_buffer); - buffer_marker = 0; - } - - buffer_marker+=snprintf(&udp_2_print_buffer[buffer_marker], UDP_2_PRINT_BUFFER_LEN - buffer_marker, " %04ld |", octet_index); - } - - /* - * Print every single octet in hexadecimal form - */ - buffer_marker+=snprintf(&udp_2_print_buffer[buffer_marker], UDP_2_PRINT_BUFFER_LEN - buffer_marker, " %02x", dataP[octet_index]); - /* - * Align newline and pipes according to the octets in groups of 2 - */ - } - - /* - * Append enough spaces and put final pipe - */ - for (aindex = octet_index; aindex < 16; ++aindex) - buffer_marker+=snprintf(&udp_2_print_buffer[buffer_marker], UDP_2_PRINT_BUFFER_LEN - buffer_marker, " "); - - //GTPU_DEBUG(" "); - buffer_marker+=snprintf(&udp_2_print_buffer[buffer_marker], UDP_2_PRINT_BUFFER_LEN - buffer_marker, " |\n"); - UDP_DEBUG("%s%s",timeofday,udp_2_print_buffer); -} - - -static void udp_server_receive_and_process(struct udp_socket_desc_s *udp_sock_pP); - - -/* @brief Retrieve the descriptor associated with the task_id - */ -static -struct udp_socket_desc_s *udp_server_get_socket_desc(task_id_t task_id) -{ - struct udp_socket_desc_s *udp_sock_p = NULL; - - UDP_DEBUG("Looking for task %d\n", task_id); - - STAILQ_FOREACH(udp_sock_p, &udp_socket_list, entries) { - if (udp_sock_p->task_id == task_id) { - UDP_DEBUG("Found matching task desc\n"); - break; - } - } - return udp_sock_p; -} -static -struct udp_socket_desc_s *udp_server_get_socket_desc_by_sd(int sdP) -{ - struct udp_socket_desc_s *udp_sock_p = NULL; - - UDP_DEBUG("Looking for sd %d\n", sdP); - - STAILQ_FOREACH(udp_sock_p, &udp_socket_list, entries) { - if (udp_sock_p->sd == sdP) { - UDP_DEBUG("Found matching task desc\n"); - break; - } - } - return udp_sock_p; -} - -static -int udp_server_create_socket(int port, char *address, task_id_t task_id) -{ - struct sockaddr_in addr; - int sd; - - struct udp_socket_desc_s *socket_desc_p = NULL; - - UDP_DEBUG("Creating new listen socket on address "IPV4_ADDR" and port %u\n", - IPV4_ADDR_FORMAT(inet_addr(address)), port); - - /* Create UDP socket */ - if ((sd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0) { - /* Socket creation has failed... */ - UDP_ERROR("Socket creation failed (%s)\n", strerror(errno)); - return sd; - } - - memset(&addr, 0, sizeof(struct sockaddr_in)); - addr.sin_family = AF_INET; - addr.sin_port = htons(port); - addr.sin_addr.s_addr = inet_addr(address); - - if (bind(sd, (struct sockaddr *)&addr, sizeof(struct sockaddr_in)) < 0) { - /* Bind failed */ - UDP_ERROR("Socket bind failed (%s) for address "IPV4_ADDR" and port %u\n", - strerror(errno), IPV4_ADDR_FORMAT(inet_addr(address)), port); - close(sd); - return -1; - } - - /* Add the socket to list of fd monitored by ITTI */ - /* Mark the socket as non-blocking */ - if (fcntl(sd, F_SETFL, O_NONBLOCK) < 0) { - UDP_ERROR("fcntl F_SETFL O_NONBLOCK failed: %s\n", - strerror(errno)); - close(sd); - return -1; - } - - socket_desc_p = calloc(1, sizeof(struct udp_socket_desc_s)); - DevAssert(socket_desc_p != NULL); - socket_desc_p->sd = sd; - socket_desc_p->local_address = address; - socket_desc_p->local_port = port; - socket_desc_p->task_id = task_id; - UDP_DEBUG("Inserting new descriptor for task %d, sd %d\n", - socket_desc_p->task_id, socket_desc_p->sd); - pthread_mutex_lock(&udp_socket_list_mutex); - STAILQ_INSERT_TAIL(&udp_socket_list, socket_desc_p, entries); - pthread_mutex_unlock(&udp_socket_list_mutex); - - itti_subscribe_event_fd(TASK_UDP, sd); - - return sd; -} - -static void udp_server_flush_sockets(struct epoll_event *events, int nb_events) -{ - int event; - struct udp_socket_desc_s *udp_sock_p = NULL; - - UDP_DEBUG("Received %d events\n", nb_events); - - for (event = 0; event < nb_events; event++) { - if (events[event].events != 0) { - /* If the event has not been yet been processed (not an itti message) */ - pthread_mutex_lock(&udp_socket_list_mutex); - udp_sock_p = udp_server_get_socket_desc_by_sd(events[event].data.fd); - - if (udp_sock_p != NULL) { - udp_server_receive_and_process(udp_sock_p); - } else { - UDP_ERROR("Failed to retrieve the udp socket descriptor %d", - events[event].data.fd); - } - - pthread_mutex_unlock(&udp_socket_list_mutex); - } - } -} - -static void udp_server_receive_and_process(struct udp_socket_desc_s *udp_sock_pP) -{ - UDP_DEBUG("Inserting new descriptor for task %d, sd %d\n", - udp_sock_pP->task_id, udp_sock_pP->sd); - - { - int bytes_received = 0; - socklen_t from_len; - struct sockaddr_in addr; - - from_len = (socklen_t)sizeof(struct sockaddr_in); - - if ((bytes_received = recvfrom(udp_sock_pP->sd, udp_sock_pP->buffer, sizeof(udp_sock_pP->buffer), 0, - (struct sockaddr *)&addr, &from_len)) <= 0) { - UDP_ERROR("Recvfrom failed %s\n", strerror(errno)); - //break; - } else { - MessageDef *message_p = NULL; - udp_data_ind_t *udp_data_ind_p; - uint8_t *forwarded_buffer = NULL; - - AssertFatal(sizeof(udp_sock_pP->buffer) >= bytes_received, "UDP BUFFER OVERFLOW"); - - forwarded_buffer = itti_malloc(TASK_UDP, udp_sock_pP->task_id, bytes_received); - - DevAssert(forwarded_buffer != NULL); - - memcpy(forwarded_buffer, udp_sock_pP->buffer, bytes_received); - - message_p = itti_alloc_new_message(TASK_UDP, UDP_DATA_IND); - - DevAssert(message_p != NULL); - - udp_data_ind_p = &message_p->ittiMsg.udp_data_ind; - - udp_data_ind_p->buffer = forwarded_buffer; - udp_data_ind_p->buffer_length = bytes_received; - udp_data_ind_p->peer_port = htons(addr.sin_port); - udp_data_ind_p->peer_address = addr.sin_addr.s_addr; - - UDP_DEBUG("Msg of length %d received from %s:%u\n", - bytes_received, inet_ntoa(addr.sin_addr), ntohs(addr.sin_port)); - - if (itti_send_msg_to_task(udp_sock_pP->task_id, INSTANCE_DEFAULT, message_p) < 0) { - UDP_DEBUG("Failed to send message %d to task %d\n", - UDP_DATA_IND, udp_sock_pP->task_id); - //break; - } - } - } - //close(udp_sock_pP->sd); - //udp_sock_pP->sd = -1; - - //pthread_mutex_lock(&udp_socket_list_mutex); - //STAILQ_REMOVE(&udp_socket_list, udp_sock_pP, udp_socket_desc_s, entries); - //pthread_mutex_unlock(&udp_socket_list_mutex); - - //return NULL; -} - - -static void *udp_intertask_interface(void *args_p) -{ - int rc = 0; - int nb_events = 0; - struct epoll_event *events = NULL; - - itti_mark_task_ready(TASK_UDP); - MSC_START_USE(); - - while(1) { - MessageDef *received_message_p = NULL; - itti_receive_msg(TASK_UDP, &received_message_p); - - if (received_message_p != NULL) { - - switch (ITTI_MSG_ID(received_message_p)) { - case UDP_INIT: { - udp_init_t *udp_init_p; - udp_init_p = &received_message_p->ittiMsg.udp_init; - rc = udp_server_create_socket( - udp_init_p->port, - udp_init_p->address, - ITTI_MSG_ORIGIN_ID(received_message_p)); - } - break; - - case UDP_DATA_REQ: { - int udp_sd = -1; - ssize_t bytes_written; - - struct udp_socket_desc_s *udp_sock_p = NULL; - udp_data_req_t *udp_data_req_p; - struct sockaddr_in peer_addr; - - udp_data_req_p = &received_message_p->ittiMsg.udp_data_req; - - //UDP_DEBUG("-- UDP_DATA_REQ -----------------------------------------------------\n%s :\n", - // __FUNCTION__); - //udp_print_hex_octets(&udp_data_req_p->buffer[udp_data_req_p->buffer_offset], - // udp_data_req_p->buffer_length); - - memset(&peer_addr, 0, sizeof(struct sockaddr_in)); - - peer_addr.sin_family = AF_INET; - peer_addr.sin_port = htons(udp_data_req_p->peer_port); - peer_addr.sin_addr.s_addr = udp_data_req_p->peer_address; - - pthread_mutex_lock(&udp_socket_list_mutex); - udp_sock_p = udp_server_get_socket_desc(ITTI_MSG_ORIGIN_ID(received_message_p)); - - if (udp_sock_p == NULL) { - UDP_ERROR("Failed to retrieve the udp socket descriptor " - "associated with task %d\n", ITTI_MSG_ORIGIN_ID(received_message_p)); - pthread_mutex_unlock(&udp_socket_list_mutex); - - if (udp_data_req_p->buffer) { - itti_free(ITTI_MSG_ORIGIN_ID(received_message_p),udp_data_req_p->buffer); - } - - goto on_error; - } - - udp_sd = udp_sock_p->sd; - pthread_mutex_unlock(&udp_socket_list_mutex); - - UDP_DEBUG("[%d] Sending message of size %u to "IPV4_ADDR" and port %u\n", - udp_sd, udp_data_req_p->buffer_length, - IPV4_ADDR_FORMAT(udp_data_req_p->peer_address), - udp_data_req_p->peer_port); - - bytes_written = sendto(udp_sd, &udp_data_req_p->buffer[udp_data_req_p->buffer_offset], - udp_data_req_p->buffer_length, 0, - (struct sockaddr *)&peer_addr, - sizeof(struct sockaddr_in)); - - itti_free(ITTI_MSG_ORIGIN_ID(received_message_p),udp_data_req_p->buffer); - - if (bytes_written != udp_data_req_p->buffer_length) { - UDP_ERROR("There was an error while writing to socket " - "(%d:%s)\n", errno, strerror(errno)); - } - } - break; - - case TERMINATE_MESSAGE: { - itti_exit_task(); - } - break; - - case MESSAGE_TEST: { - } break; - - default: { - UDP_DEBUG("Unkwnon message ID %d:%s\n", - ITTI_MSG_ID(received_message_p), ITTI_MSG_NAME(received_message_p)); - } - break; - } - -on_error: - rc = itti_free(ITTI_MSG_ORIGIN_ID(received_message_p), received_message_p); - AssertFatal(rc == EXIT_SUCCESS, "Failed to free memory (%d)!\n", rc); - received_message_p = NULL; - } - - nb_events = itti_get_events(TASK_UDP, &events); - - if ((nb_events > 0) && (events != NULL)) { - /* Now handle notifications for other sockets */ - udp_server_flush_sockets(events, nb_events); - } - } - - return NULL; -} - -int udp_init(const mme_config_t *mme_config_p) -{ - UDP_DEBUG("Initializing UDP task interface\n"); - - STAILQ_INIT(&udp_socket_list); - - if (itti_create_task(TASK_UDP, &udp_intertask_interface, - NULL) < 0) { - UDP_ERROR("udp pthread_create (%s)\n", strerror(errno)); - return -1; - } - - UDP_DEBUG("Initializing UDP task interface: DONE\n"); - return 0; -} diff --git a/openair-cn/UDP/udp_primitives_server.h b/openair-cn/UDP/udp_primitives_server.h deleted file mode 100644 index 7ab514c068..0000000000 --- a/openair-cn/UDP/udp_primitives_server.h +++ /dev/null @@ -1,45 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/*! \file udp_primitives_server.c -* \brief -* \author Sebastien ROUX -* \company Eurecom -* \email: -*/ -#include "mme_config.h" - -#ifndef UDP_PRIMITIVES_SERVER_H_ -#define UDP_PRIMITIVES_SERVER_H_ - -/** \brief UDP task init function. - @returns -1 on error, 0 otherwise. - **/ -int udp_init(const mme_config_t *mme_config); - -#endif /* UDP_PRIMITIVES_SERVER_H_ */ diff --git a/openair-cn/UTILS/CONF/COPYING b/openair-cn/UTILS/CONF/COPYING deleted file mode 100644 index 94a9ed024d..0000000000 --- a/openair-cn/UTILS/CONF/COPYING +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program 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. - - This program 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 this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/openair-cn/UTILS/COPYING b/openair-cn/UTILS/COPYING deleted file mode 100644 index 94a9ed024d..0000000000 --- a/openair-cn/UTILS/COPYING +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program 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. - - This program 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 this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/openair-cn/UTILS/HASHTABLE/COPYING b/openair-cn/UTILS/HASHTABLE/COPYING deleted file mode 100644 index 94a9ed024d..0000000000 --- a/openair-cn/UTILS/HASHTABLE/COPYING +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program 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. - - This program 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 this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/openair-cn/UTILS/HASHTABLE/Makefile.am b/openair-cn/UTILS/HASHTABLE/Makefile.am deleted file mode 100755 index 3eb39c51e3..0000000000 --- a/openair-cn/UTILS/HASHTABLE/Makefile.am +++ /dev/null @@ -1,37 +0,0 @@ -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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 . -# -# Contact Information -# OpenAirInterface Admin: openair_admin@eurecom.fr -# OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr -# -# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. -# -################################################################################ -AM_CFLAGS = @ADD_CFLAGS@ \ - -I$(top_srcdir)/COMMON - -noinst_LTLIBRARIES = libhashtable.la -libhashtable_la_LDFLAGS = -all-static -libhashtable_la_SOURCES = \ - hashtable.c hashtable.h \ - obj_hashtable.c obj_hashtable.h - \ No newline at end of file diff --git a/openair-cn/UTILS/HASHTABLE/Makefile.eNB b/openair-cn/UTILS/HASHTABLE/Makefile.eNB deleted file mode 100755 index 795ceabdea..0000000000 --- a/openair-cn/UTILS/HASHTABLE/Makefile.eNB +++ /dev/null @@ -1,62 +0,0 @@ -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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 . -# -# Contact Information -# OpenAirInterface Admin: openair_admin@eurecom.fr -# OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr -# -# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. -# -################################################################################ -all: libhashtable.a - -libhashtable_OBJECTS = \ - hashtable.o \ - obj_hashtable.o \ - - -CFLAGS = \ - -DUSER_MODE \ - -DENABLE_USE_MME \ - -g \ - -O2 \ - -Wall \ - -Werror=implicit-function-declaration - --include .deps/*.d - -$(libhashtable_OBJECTS): %.o : %.c - $(CC) -c $(CFLAGS) -o $@ $< - @if ! test -d ".deps" ; then mkdir -p .deps/; fi - @$(CC) -MM $(CFLAGS) $*.c > .deps/$*.d - @mv -f .deps/$*.d .deps/$*.d.tmp - @sed -e 's|.*:|$*.o:|' < .deps/$*.d.tmp > .deps/$*.d - @sed -e 's/.*://' -e 's/\\$$//' < .deps/$*.d.tmp | fmt -1 | \ - sed -e 's/^ *//' -e 's/$$/:/' >> .deps/$*.d - @rm -f .deps/$*.d.tmp - -libhashtable.a: $(libhashtable_OBJECTS) - $(AR) rcvs $@ $(libhashtable_OBJECTS) - -clean: - rm -f libhashtable.a - rm -rf .deps/ - rm -f $(libhashtable_OBJECTS) \ No newline at end of file diff --git a/openair-cn/UTILS/HASHTABLE/hashtable.h b/openair-cn/UTILS/HASHTABLE/hashtable.h deleted file mode 100755 index 83b5d310b5..0000000000 --- a/openair-cn/UTILS/HASHTABLE/hashtable.h +++ /dev/null @@ -1,48 +0,0 @@ -#ifndef _UTILS_COLLECTION_HASH_TABLE_H_ -#define _UTILS_COLLECTION_HASH_TABLE_H_ -#include -#include -#include - -typedef size_t hash_size_t; - -typedef enum hashtable_return_code_e { - HASH_TABLE_OK = 0, - HASH_TABLE_INSERT_OVERWRITTEN_DATA = 1, - HASH_TABLE_KEY_NOT_EXISTS = 2, - HASH_TABLE_KEY_ALREADY_EXISTS = 3, - HASH_TABLE_BAD_PARAMETER_HASHTABLE = 4, - HASH_TABLE_SYSTEM_ERROR = 5, - HASH_TABLE_CODE_MAX -} hashtable_rc_t; - - -typedef struct hash_node_s { - uint64_t key; - void *data; - struct hash_node_s *next; -} hash_node_t; - -typedef struct hash_table_s { - hash_size_t size; - hash_size_t num_elements; - struct hash_node_s **nodes; - hash_size_t (*hashfunc)(const uint64_t); - void (*freefunc)(void*); -} hash_table_t; - -char* hashtable_rc_code2string(hashtable_rc_t rcP); -void hash_free_int_func(void* memoryP); -hash_table_t *hashtable_create (hash_size_t size, hash_size_t (*hashfunc)(const uint64_t ), void (*freefunc)(void*)); -hashtable_rc_t hashtable_destroy(hash_table_t *hashtbl); -hashtable_rc_t hashtable_is_key_exists (hash_table_t *hashtbl, const uint64_t key); -hashtable_rc_t hashtable_apply_funct_on_elements (hash_table_t *hashtblP, void funct(uint64_t keyP, void* dataP, void* parameterP), void* parameterP); -hashtable_rc_t hashtable_insert (hash_table_t *hashtbl, const uint64_t key, void *data); -hashtable_rc_t hashtable_remove (hash_table_t *hashtbl, const uint64_t key); -hashtable_rc_t hashtable_get (hash_table_t *hashtbl, const uint64_t key, void **dataP); -hashtable_rc_t hashtable_resize (hash_table_t *hashtbl, hash_size_t size); - - - -#endif - diff --git a/openair-cn/UTILS/HASHTABLE/obj_hashtable.h b/openair-cn/UTILS/HASHTABLE/obj_hashtable.h deleted file mode 100755 index d11a67e264..0000000000 --- a/openair-cn/UTILS/HASHTABLE/obj_hashtable.h +++ /dev/null @@ -1,40 +0,0 @@ -#ifndef _OBJ_HASH_TABLE_H_ -#define _OBJ_HASH_TABLE_H_ -#include -#include -#include - -#include "hashtable.h" - -typedef size_t hash_size_t; - - -typedef struct obj_hash_node_s { - int key_size; - void *key; - void *data; - struct obj_hash_node_s *next; -} obj_hash_node_t; - -typedef struct obj_hash_table_s { - hash_size_t size; - hash_size_t num_elements; - struct obj_hash_node_s **nodes; - hash_size_t (*hashfunc)(const void*, int); - void (*freekeyfunc)(void*); - void (*freedatafunc)(void*); -} obj_hash_table_t; - -obj_hash_table_t *obj_hashtable_create (hash_size_t size, hash_size_t (*hashfunc)(const void*, int ), void (*freekeyfunc)(void*), void (*freedatafunc)(void*)); -hashtable_rc_t obj_hashtable_destroy (obj_hash_table_t *hashtblP); -hashtable_rc_t obj_hashtable_is_key_exists (obj_hash_table_t *hashtblP, void* keyP, int key_sizeP); -hashtable_rc_t obj_hashtable_insert (obj_hash_table_t *hashtblP, void* keyP, int key_sizeP, void *dataP); -hashtable_rc_t obj_hashtable_remove (obj_hash_table_t *hashtblP, const void* keyP, int key_sizeP); -hashtable_rc_t obj_hashtable_get (obj_hash_table_t *hashtblP, const void* keyP, int key_sizeP, void ** dataP); -hashtable_rc_t obj_hashtable_get_keys(obj_hash_table_t *hashtblP, void ** keysP, unsigned int *sizeP); -hashtable_rc_t obj_hashtable_resize (obj_hash_table_t *hashtblP, hash_size_t sizeP); - - - -#endif - diff --git a/openair-cn/UTILS/Makefile.am b/openair-cn/UTILS/Makefile.am deleted file mode 100644 index f2a5d57fee..0000000000 --- a/openair-cn/UTILS/Makefile.am +++ /dev/null @@ -1,49 +0,0 @@ -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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 . -# -# Contact Information -# OpenAirInterface Admin: openair_admin@eurecom.fr -# OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr -# -# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. -# -################################################################################ -SUBDIRS = . HASHTABLE - -AM_CFLAGS = @ADD_CFLAGS@ \ - -I$(top_srcdir)/COMMON \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/api/network \ - -I$(top_srcdir)/NAS/EURECOM-NAS/src/include \ - -I$(top_srcdir)/SGW-LITE \ - -I$(top_srcdir)/INTERTASK_INTERFACE - -AM_YFLAGS = -d - -noinst_LTLIBRARIES = libutils.la -libutils_la_LDFLAGS = -all-static -libutils_la_SOURCES = \ - conversions.h conversions.c \ - enum_string.h enum_string.c \ - log.c log.h \ - mme_config.c mme_config.h \ - mcc_mnc_itu.c mcc_mnc_itu.h \ - mme_default_values.h \ - queue.h tree.h diff --git a/openair-cn/UTILS/enum_string.h b/openair-cn/UTILS/enum_string.h deleted file mode 100644 index 3b2c0d3621..0000000000 --- a/openair-cn/UTILS/enum_string.h +++ /dev/null @@ -1,49 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#ifndef ENUM_STRING_H_ -#define ENUM_STRING_H_ - -typedef struct { - int enum_value; - char *enum_value_name; -} enum_to_string_t; - -extern enum_to_string_t network_access_mode_to_string[NAM_MAX]; -extern enum_to_string_t rat_to_string[NUMBER_OF_RAT_TYPE]; -extern enum_to_string_t pdn_type_to_string[IP_MAX]; - -char *enum_to_string(int enum_val, enum_to_string_t *string_table, int nb_element); -#define ACCESS_MODE_TO_STRING(vAL) \ - enum_to_string((int)vAL, network_access_mode_to_string, \ - sizeof(network_access_mode_to_string) / sizeof(enum_to_string_t)) -#define PDN_TYPE_TO_STRING(vAL) \ - enum_to_string((int)vAL, pdn_type_to_string, \ - sizeof(pdn_type_to_string) / sizeof(enum_to_string_t)) - -#endif /* ENUM_STRING_H_ */ diff --git a/openair-cn/UTILS/log.c b/openair-cn/UTILS/log.c deleted file mode 100644 index 85577c35d6..0000000000 --- a/openair-cn/UTILS/log.c +++ /dev/null @@ -1,50 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#if HAVE_CONFIG_H -# include "config.h" -#endif - -#include "log.h" - -/* mme log */ -int log_enabled = 0; - -int log_init(const mme_config_t *mme_config_p, - log_specific_init_t specific_init) -{ - if (mme_config_p->verbosity_level == 1) { - log_enabled = 1; - } else if (mme_config_p->verbosity_level == 2) { - log_enabled = 1; - } else { - log_enabled = 0; - } - - return specific_init(mme_config_p->verbosity_level); -} diff --git a/openair-cn/UTILS/log.h b/openair-cn/UTILS/log.h deleted file mode 100644 index 1147d9e8c2..0000000000 --- a/openair-cn/UTILS/log.h +++ /dev/null @@ -1,44 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -#include "mme_config.h" - -#ifndef LOG_H_ -#define LOG_H_ - -/* asn1c debug */ -extern int asn_debug; -extern int asn1_xer_print; -extern int fd_g_debug_lvl; - -typedef int (*log_specific_init_t)(int log_level); - -int log_init(const mme_config_t *mme_config, - log_specific_init_t specific_init); - -#endif /* LOG_H_ */ diff --git a/openair-cn/UTILS/mcc_mnc_itu.h b/openair-cn/UTILS/mcc_mnc_itu.h deleted file mode 100755 index 84daca6a42..0000000000 --- a/openair-cn/UTILS/mcc_mnc_itu.h +++ /dev/null @@ -1,61 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ -/***************************************************************************** - -Source mcc_mnc.h - -Version 0.1 - -Date {2014/10/02 - -Product - -Subsystem - -Author Lionel GAUTHIER - -Description Defines the MCC/MNC list delivered by the ITU - -*****************************************************************************/ -#ifndef __MCC_MNC_H__ -#define __MCC_MNC_H__ - - -typedef struct mcc_mnc_list_s { - uint16_t mcc; - char mnc[4]; -} mcc_mnc_list_t; - -int find_mnc_length(const char mcc_digit1P, - const char mcc_digit2P, - const char mcc_digit3P, - const char mnc_digit1P, - const char mnc_digit2P, - const char mnc_digit3P); -#endif diff --git a/openair-cn/UTILS/tree.h b/openair-cn/UTILS/tree.h deleted file mode 100644 index 351df9dfc5..0000000000 --- a/openair-cn/UTILS/tree.h +++ /dev/null @@ -1,678 +0,0 @@ -/* - * Copyright 2002 Niels Provos - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef _SYS_TREE_H_ -#define _SYS_TREE_H_ - -/* - * This file defines data structures for different types of trees: - * splay trees and red-black trees. - * - * A splay tree is a self-organizing data structure. Every operation - * on the tree causes a splay to happen. The splay moves the requested - * node to the root of the tree and partly rebalances it. - * - * This has the benefit that request locality causes faster lookups as - * the requested nodes move to the top of the tree. On the other hand, - * every lookup causes memory writes. - * - * The Balance Theorem bounds the total access time for m operations - * and n inserts on an initially empty tree as O((m + n)lg n). The - * amortized cost for a sequence of m accesses to a splay tree is O(lg n); - * - * A red-black tree is a binary search tree with the node color as an - * extra attribute. It fulfills a set of conditions: - * - every search path from the root to a leaf consists of the - * same number of black nodes, - * - each red node (except for the root) has a black parent, - * - each leaf node is black. - * - * Every operation on a red-black tree is bounded as O(lg n). - * The maximum height of a red-black tree is 2lg (n+1). - */ - -#define SPLAY_HEAD(name, type) \ -struct name { \ - struct type *sph_root; /* root of the tree */ \ -} - -#define SPLAY_INITIALIZER(root) \ - { NULL } - -#define SPLAY_INIT(root) do { \ - (root)->sph_root = NULL; \ -} while (0) - -#define SPLAY_ENTRY(type) \ -struct { \ - struct type *spe_left; /* left element */ \ - struct type *spe_right; /* right element */ \ -} - -#define SPLAY_LEFT(elm, field) (elm)->field.spe_left -#define SPLAY_RIGHT(elm, field) (elm)->field.spe_right -#define SPLAY_ROOT(head) (head)->sph_root -#define SPLAY_EMPTY(head) (SPLAY_ROOT(head) == NULL) - -/* SPLAY_ROTATE_{LEFT,RIGHT} expect that tmp hold SPLAY_{RIGHT,LEFT} */ -#define SPLAY_ROTATE_RIGHT(head, tmp, field) do { \ - SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(tmp, field); \ - SPLAY_RIGHT(tmp, field) = (head)->sph_root; \ - (head)->sph_root = tmp; \ -} while (0) - -#define SPLAY_ROTATE_LEFT(head, tmp, field) do { \ - SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(tmp, field); \ - SPLAY_LEFT(tmp, field) = (head)->sph_root; \ - (head)->sph_root = tmp; \ -} while (0) - -#define SPLAY_LINKLEFT(head, tmp, field) do { \ - SPLAY_LEFT(tmp, field) = (head)->sph_root; \ - tmp = (head)->sph_root; \ - (head)->sph_root = SPLAY_LEFT((head)->sph_root, field); \ -} while (0) - -#define SPLAY_LINKRIGHT(head, tmp, field) do { \ - SPLAY_RIGHT(tmp, field) = (head)->sph_root; \ - tmp = (head)->sph_root; \ - (head)->sph_root = SPLAY_RIGHT((head)->sph_root, field); \ -} while (0) - -#define SPLAY_ASSEMBLE(head, node, left, right, field) do { \ - SPLAY_RIGHT(left, field) = SPLAY_LEFT((head)->sph_root, field); \ - SPLAY_LEFT(right, field) = SPLAY_RIGHT((head)->sph_root, field);\ - SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(node, field); \ - SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(node, field); \ -} while (0) - -/* Generates prototypes and inline functions */ - -#define SPLAY_PROTOTYPE(name, type, field, cmp) \ -void name##_SPLAY(struct name *, struct type *); \ -void name##_SPLAY_MINMAX(struct name *, int); \ -struct type *name##_SPLAY_INSERT(struct name *, struct type *); \ -struct type *name##_SPLAY_REMOVE(struct name *, struct type *); \ - \ -/* Finds the node with the same key as elm */ \ -static __inline struct type * \ -name##_SPLAY_FIND(struct name *head, struct type *elm) \ -{ \ - if (SPLAY_EMPTY(head)) \ - return(NULL); \ - name##_SPLAY(head, elm); \ - if ((cmp)(elm, (head)->sph_root) == 0) \ - return (head->sph_root); \ - return (NULL); \ -} \ - \ -static __inline struct type * \ -name##_SPLAY_NEXT(struct name *head, struct type *elm) \ -{ \ - name##_SPLAY(head, elm); \ - if (SPLAY_RIGHT(elm, field) != NULL) { \ - elm = SPLAY_RIGHT(elm, field); \ - while (SPLAY_LEFT(elm, field) != NULL) { \ - elm = SPLAY_LEFT(elm, field); \ - } \ - } else \ - elm = NULL; \ - return (elm); \ -} \ - \ -static __inline struct type * \ -name##_SPLAY_MIN_MAX(struct name *head, int val) \ -{ \ - name##_SPLAY_MINMAX(head, val); \ - return (SPLAY_ROOT(head)); \ -} - -/* Main splay operation. - * Moves node close to the key of elm to top - */ -#define SPLAY_GENERATE(name, type, field, cmp) \ -struct type * \ -name##_SPLAY_INSERT(struct name *head, struct type *elm) \ -{ \ - if (SPLAY_EMPTY(head)) { \ - SPLAY_LEFT(elm, field) = SPLAY_RIGHT(elm, field) = NULL; \ - } else { \ - int __comp; \ - name##_SPLAY(head, elm); \ - __comp = (cmp)(elm, (head)->sph_root); \ - if(__comp < 0) { \ - SPLAY_LEFT(elm, field) = SPLAY_LEFT((head)->sph_root, field);\ - SPLAY_RIGHT(elm, field) = (head)->sph_root; \ - SPLAY_LEFT((head)->sph_root, field) = NULL; \ - } else if (__comp > 0) { \ - SPLAY_RIGHT(elm, field) = SPLAY_RIGHT((head)->sph_root, field);\ - SPLAY_LEFT(elm, field) = (head)->sph_root; \ - SPLAY_RIGHT((head)->sph_root, field) = NULL; \ - } else \ - return ((head)->sph_root); \ - } \ - (head)->sph_root = (elm); \ - return (NULL); \ -} \ - \ -struct type * \ -name##_SPLAY_REMOVE(struct name *head, struct type *elm) \ -{ \ - struct type *__tmp; \ - if (SPLAY_EMPTY(head)) \ - return (NULL); \ - name##_SPLAY(head, elm); \ - if ((cmp)(elm, (head)->sph_root) == 0) { \ - if (SPLAY_LEFT((head)->sph_root, field) == NULL) { \ - (head)->sph_root = SPLAY_RIGHT((head)->sph_root, field);\ - } else { \ - __tmp = SPLAY_RIGHT((head)->sph_root, field); \ - (head)->sph_root = SPLAY_LEFT((head)->sph_root, field);\ - name##_SPLAY(head, elm); \ - SPLAY_RIGHT((head)->sph_root, field) = __tmp; \ - } \ - return (elm); \ - } \ - return (NULL); \ -} \ - \ -void \ -name##_SPLAY(struct name *head, struct type *elm) \ -{ \ - struct type __node, *__left, *__right, *__tmp; \ - int __comp; \ -\ - SPLAY_LEFT(&__node, field) = SPLAY_RIGHT(&__node, field) = NULL;\ - __left = __right = &__node; \ -\ - while ((__comp = (cmp)(elm, (head)->sph_root))) { \ - if (__comp < 0) { \ - __tmp = SPLAY_LEFT((head)->sph_root, field); \ - if (__tmp == NULL) \ - break; \ - if ((cmp)(elm, __tmp) < 0){ \ - SPLAY_ROTATE_RIGHT(head, __tmp, field); \ - if (SPLAY_LEFT((head)->sph_root, field) == NULL)\ - break; \ - } \ - SPLAY_LINKLEFT(head, __right, field); \ - } else if (__comp > 0) { \ - __tmp = SPLAY_RIGHT((head)->sph_root, field); \ - if (__tmp == NULL) \ - break; \ - if ((cmp)(elm, __tmp) > 0){ \ - SPLAY_ROTATE_LEFT(head, __tmp, field); \ - if (SPLAY_RIGHT((head)->sph_root, field) == NULL)\ - break; \ - } \ - SPLAY_LINKRIGHT(head, __left, field); \ - } \ - } \ - SPLAY_ASSEMBLE(head, &__node, __left, __right, field); \ -} \ - \ -/* Splay with either the minimum or the maximum element \ - * Used to find minimum or maximum element in tree. \ - */ \ -void name##_SPLAY_MINMAX(struct name *head, int __comp) \ -{ \ - struct type __node, *__left, *__right, *__tmp; \ -\ - SPLAY_LEFT(&__node, field) = SPLAY_RIGHT(&__node, field) = NULL;\ - __left = __right = &__node; \ -\ - while (1) { \ - if (__comp < 0) { \ - __tmp = SPLAY_LEFT((head)->sph_root, field); \ - if (__tmp == NULL) \ - break; \ - if (__comp < 0){ \ - SPLAY_ROTATE_RIGHT(head, __tmp, field); \ - if (SPLAY_LEFT((head)->sph_root, field) == NULL)\ - break; \ - } \ - SPLAY_LINKLEFT(head, __right, field); \ - } else if (__comp > 0) { \ - __tmp = SPLAY_RIGHT((head)->sph_root, field); \ - if (__tmp == NULL) \ - break; \ - if (__comp > 0) { \ - SPLAY_ROTATE_LEFT(head, __tmp, field); \ - if (SPLAY_RIGHT((head)->sph_root, field) == NULL)\ - break; \ - } \ - SPLAY_LINKRIGHT(head, __left, field); \ - } \ - } \ - SPLAY_ASSEMBLE(head, &__node, __left, __right, field); \ -} - -#define SPLAY_NEGINF -1 -#define SPLAY_INF 1 - -#define SPLAY_INSERT(name, x, y) name##_SPLAY_INSERT(x, y) -#define SPLAY_REMOVE(name, x, y) name##_SPLAY_REMOVE(x, y) -#define SPLAY_FIND(name, x, y) name##_SPLAY_FIND(x, y) -#define SPLAY_NEXT(name, x, y) name##_SPLAY_NEXT(x, y) -#define SPLAY_MIN(name, x) (SPLAY_EMPTY(x) ? NULL \ - : name##_SPLAY_MIN_MAX(x, SPLAY_NEGINF)) -#define SPLAY_MAX(name, x) (SPLAY_EMPTY(x) ? NULL \ - : name##_SPLAY_MIN_MAX(x, SPLAY_INF)) - -#define SPLAY_FOREACH(x, name, head) \ - for ((x) = SPLAY_MIN(name, head); \ - (x) != NULL; \ - (x) = SPLAY_NEXT(name, head, x)) - -/* Macros that define a red-back tree */ -#define RB_HEAD(name, type) \ -struct name { \ - struct type *rbh_root; /* root of the tree */ \ -} - -#define RB_INITIALIZER(root) \ - { NULL } - -#define RB_INIT(root) do { \ - (root)->rbh_root = NULL; \ -} while (0) - -#define RB_BLACK 0 -#define RB_RED 1 -#define RB_ENTRY(type) \ -struct { \ - struct type *rbe_left; /* left element */ \ - struct type *rbe_right; /* right element */ \ - struct type *rbe_parent; /* parent element */ \ - int rbe_color; /* node color */ \ -} - -#define RB_LEFT(elm, field) (elm)->field.rbe_left -#define RB_RIGHT(elm, field) (elm)->field.rbe_right -#define RB_PARENT(elm, field) (elm)->field.rbe_parent -#define RB_COLOR(elm, field) (elm)->field.rbe_color -#define RB_ROOT(head) (head)->rbh_root -#define RB_EMPTY(head) (RB_ROOT(head) == NULL) - -#define RB_SET(elm, parent, field) do { \ - RB_PARENT(elm, field) = parent; \ - RB_LEFT(elm, field) = RB_RIGHT(elm, field) = NULL; \ - RB_COLOR(elm, field) = RB_RED; \ -} while (0) - -#define RB_SET_BLACKRED(black, red, field) do { \ - RB_COLOR(black, field) = RB_BLACK; \ - RB_COLOR(red, field) = RB_RED; \ -} while (0) - -#ifndef RB_AUGMENT -#define RB_AUGMENT(x) -#endif - -#define RB_ROTATE_LEFT(head, elm, tmp, field) do { \ - (tmp) = RB_RIGHT(elm, field); \ - if ((RB_RIGHT(elm, field) = RB_LEFT(tmp, field))) { \ - RB_PARENT(RB_LEFT(tmp, field), field) = (elm); \ - } \ - RB_AUGMENT(elm); \ - if ((RB_PARENT(tmp, field) = RB_PARENT(elm, field))) { \ - if ((elm) == RB_LEFT(RB_PARENT(elm, field), field)) \ - RB_LEFT(RB_PARENT(elm, field), field) = (tmp); \ - else \ - RB_RIGHT(RB_PARENT(elm, field), field) = (tmp); \ - } else \ - (head)->rbh_root = (tmp); \ - RB_LEFT(tmp, field) = (elm); \ - RB_PARENT(elm, field) = (tmp); \ - RB_AUGMENT(tmp); \ - if ((RB_PARENT(tmp, field))) \ - RB_AUGMENT(RB_PARENT(tmp, field)); \ -} while (0) - -#define RB_ROTATE_RIGHT(head, elm, tmp, field) do { \ - (tmp) = RB_LEFT(elm, field); \ - if ((RB_LEFT(elm, field) = RB_RIGHT(tmp, field))) { \ - RB_PARENT(RB_RIGHT(tmp, field), field) = (elm); \ - } \ - RB_AUGMENT(elm); \ - if ((RB_PARENT(tmp, field) = RB_PARENT(elm, field))) { \ - if ((elm) == RB_LEFT(RB_PARENT(elm, field), field)) \ - RB_LEFT(RB_PARENT(elm, field), field) = (tmp); \ - else \ - RB_RIGHT(RB_PARENT(elm, field), field) = (tmp); \ - } else \ - (head)->rbh_root = (tmp); \ - RB_RIGHT(tmp, field) = (elm); \ - RB_PARENT(elm, field) = (tmp); \ - RB_AUGMENT(tmp); \ - if ((RB_PARENT(tmp, field))) \ - RB_AUGMENT(RB_PARENT(tmp, field)); \ -} while (0) - -/* Generates prototypes and inline functions */ -#define RB_PROTOTYPE(name, type, field, cmp) \ -void name##_RB_INSERT_COLOR(struct name *, struct type *); \ -void name##_RB_REMOVE_COLOR(struct name *, struct type *, struct type *);\ -struct type *name##_RB_REMOVE(struct name *, struct type *); \ -struct type *name##_RB_INSERT(struct name *, struct type *); \ -struct type *name##_RB_FIND(struct name *, struct type *); \ -struct type *name##_RB_NEXT(struct type *); \ -struct type *name##_RB_MINMAX(struct name *, int); \ - \ - -/* Main rb operation. - * Moves node close to the key of elm to top - */ -#define RB_GENERATE(name, type, field, cmp) \ -void \ -name##_RB_INSERT_COLOR(struct name *head, struct type *elm) \ -{ \ - struct type *parent, *gparent, *tmp; \ - while ((parent = RB_PARENT(elm, field)) && \ - RB_COLOR(parent, field) == RB_RED) { \ - gparent = RB_PARENT(parent, field); \ - if (parent == RB_LEFT(gparent, field)) { \ - tmp = RB_RIGHT(gparent, field); \ - if (tmp && RB_COLOR(tmp, field) == RB_RED) { \ - RB_COLOR(tmp, field) = RB_BLACK; \ - RB_SET_BLACKRED(parent, gparent, field);\ - elm = gparent; \ - continue; \ - } \ - if (RB_RIGHT(parent, field) == elm) { \ - RB_ROTATE_LEFT(head, parent, tmp, field);\ - tmp = parent; \ - parent = elm; \ - elm = tmp; \ - } \ - RB_SET_BLACKRED(parent, gparent, field); \ - RB_ROTATE_RIGHT(head, gparent, tmp, field); \ - } else { \ - tmp = RB_LEFT(gparent, field); \ - if (tmp && RB_COLOR(tmp, field) == RB_RED) { \ - RB_COLOR(tmp, field) = RB_BLACK; \ - RB_SET_BLACKRED(parent, gparent, field);\ - elm = gparent; \ - continue; \ - } \ - if (RB_LEFT(parent, field) == elm) { \ - RB_ROTATE_RIGHT(head, parent, tmp, field);\ - tmp = parent; \ - parent = elm; \ - elm = tmp; \ - } \ - RB_SET_BLACKRED(parent, gparent, field); \ - RB_ROTATE_LEFT(head, gparent, tmp, field); \ - } \ - } \ - RB_COLOR(head->rbh_root, field) = RB_BLACK; \ -} \ - \ -void \ -name##_RB_REMOVE_COLOR(struct name *head, struct type *parent, struct type *elm) \ -{ \ - struct type *tmp; \ - while ((elm == NULL || RB_COLOR(elm, field) == RB_BLACK) && \ - elm != RB_ROOT(head)) { \ - if (RB_LEFT(parent, field) == elm) { \ - tmp = RB_RIGHT(parent, field); \ - if (RB_COLOR(tmp, field) == RB_RED) { \ - RB_SET_BLACKRED(tmp, parent, field); \ - RB_ROTATE_LEFT(head, parent, tmp, field);\ - tmp = RB_RIGHT(parent, field); \ - } \ - if ((RB_LEFT(tmp, field) == NULL || \ - RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) &&\ - (RB_RIGHT(tmp, field) == NULL || \ - RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK)) {\ - RB_COLOR(tmp, field) = RB_RED; \ - elm = parent; \ - parent = RB_PARENT(elm, field); \ - } else { \ - if (RB_RIGHT(tmp, field) == NULL || \ - RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK) {\ - struct type *oleft; \ - if ((oleft = RB_LEFT(tmp, field)))\ - RB_COLOR(oleft, field) = RB_BLACK;\ - RB_COLOR(tmp, field) = RB_RED; \ - RB_ROTATE_RIGHT(head, tmp, oleft, field);\ - tmp = RB_RIGHT(parent, field); \ - } \ - RB_COLOR(tmp, field) = RB_COLOR(parent, field);\ - RB_COLOR(parent, field) = RB_BLACK; \ - if (RB_RIGHT(tmp, field)) \ - RB_COLOR(RB_RIGHT(tmp, field), field) = RB_BLACK;\ - RB_ROTATE_LEFT(head, parent, tmp, field);\ - elm = RB_ROOT(head); \ - break; \ - } \ - } else { \ - tmp = RB_LEFT(parent, field); \ - if (RB_COLOR(tmp, field) == RB_RED) { \ - RB_SET_BLACKRED(tmp, parent, field); \ - RB_ROTATE_RIGHT(head, parent, tmp, field);\ - tmp = RB_LEFT(parent, field); \ - } \ - if ((RB_LEFT(tmp, field) == NULL || \ - RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) &&\ - (RB_RIGHT(tmp, field) == NULL || \ - RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK)) {\ - RB_COLOR(tmp, field) = RB_RED; \ - elm = parent; \ - parent = RB_PARENT(elm, field); \ - } else { \ - if (RB_LEFT(tmp, field) == NULL || \ - RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) {\ - struct type *oright; \ - if ((oright = RB_RIGHT(tmp, field)))\ - RB_COLOR(oright, field) = RB_BLACK;\ - RB_COLOR(tmp, field) = RB_RED; \ - RB_ROTATE_LEFT(head, tmp, oright, field);\ - tmp = RB_LEFT(parent, field); \ - } \ - RB_COLOR(tmp, field) = RB_COLOR(parent, field);\ - RB_COLOR(parent, field) = RB_BLACK; \ - if (RB_LEFT(tmp, field)) \ - RB_COLOR(RB_LEFT(tmp, field), field) = RB_BLACK;\ - RB_ROTATE_RIGHT(head, parent, tmp, field);\ - elm = RB_ROOT(head); \ - break; \ - } \ - } \ - } \ - if (elm) \ - RB_COLOR(elm, field) = RB_BLACK; \ -} \ - \ -struct type * \ -name##_RB_REMOVE(struct name *head, struct type *elm) \ -{ \ - struct type *child, *parent, *old = elm; \ - int color; \ - if (RB_LEFT(elm, field) == NULL) \ - child = RB_RIGHT(elm, field); \ - else if (RB_RIGHT(elm, field) == NULL) \ - child = RB_LEFT(elm, field); \ - else { \ - struct type *left; \ - elm = RB_RIGHT(elm, field); \ - while ((left = RB_LEFT(elm, field))) \ - elm = left; \ - child = RB_RIGHT(elm, field); \ - parent = RB_PARENT(elm, field); \ - color = RB_COLOR(elm, field); \ - if (child) \ - RB_PARENT(child, field) = parent; \ - if (parent) { \ - if (RB_LEFT(parent, field) == elm) \ - RB_LEFT(parent, field) = child; \ - else \ - RB_RIGHT(parent, field) = child; \ - RB_AUGMENT(parent); \ - } else \ - RB_ROOT(head) = child; \ - if (RB_PARENT(elm, field) == old) \ - parent = elm; \ - (elm)->field = (old)->field; \ - if (RB_PARENT(old, field)) { \ - if (RB_LEFT(RB_PARENT(old, field), field) == old)\ - RB_LEFT(RB_PARENT(old, field), field) = elm;\ - else \ - RB_RIGHT(RB_PARENT(old, field), field) = elm;\ - RB_AUGMENT(RB_PARENT(old, field)); \ - } else \ - RB_ROOT(head) = elm; \ - RB_PARENT(RB_LEFT(old, field), field) = elm; \ - if (RB_RIGHT(old, field)) \ - RB_PARENT(RB_RIGHT(old, field), field) = elm; \ - if (parent) { \ - left = parent; \ - do { \ - RB_AUGMENT(left); \ - } while ((left = RB_PARENT(left, field))); \ - } \ - goto color; \ - } \ - parent = RB_PARENT(elm, field); \ - color = RB_COLOR(elm, field); \ - if (child) \ - RB_PARENT(child, field) = parent; \ - if (parent) { \ - if (RB_LEFT(parent, field) == elm) \ - RB_LEFT(parent, field) = child; \ - else \ - RB_RIGHT(parent, field) = child; \ - RB_AUGMENT(parent); \ - } else \ - RB_ROOT(head) = child; \ -color: \ - if (color == RB_BLACK) \ - name##_RB_REMOVE_COLOR(head, parent, child); \ - return (old); \ -} \ - \ -/* Inserts a node into the RB tree */ \ -struct type * \ -name##_RB_INSERT(struct name *head, struct type *elm) \ -{ \ - struct type *tmp; \ - struct type *parent = NULL; \ - int comp = 0; \ - tmp = RB_ROOT(head); \ - while (tmp) { \ - parent = tmp; \ - comp = (cmp)(elm, parent); \ - if (comp < 0) \ - tmp = RB_LEFT(tmp, field); \ - else if (comp > 0) \ - tmp = RB_RIGHT(tmp, field); \ - else \ - return (tmp); \ - } \ - RB_SET(elm, parent, field); \ - if (parent != NULL) { \ - if (comp < 0) \ - RB_LEFT(parent, field) = elm; \ - else \ - RB_RIGHT(parent, field) = elm; \ - RB_AUGMENT(parent); \ - } else \ - { \ - RB_ROOT(head) = elm; \ - } \ - name##_RB_INSERT_COLOR(head, elm); \ - return (NULL); \ -} \ - \ -/* Finds the node with the same key as elm */ \ -struct type * \ -name##_RB_FIND(struct name *head, struct type *elm) \ -{ \ - struct type *tmp = RB_ROOT(head); \ - int comp; \ - while (tmp) { \ - comp = cmp(elm, tmp); \ - if (comp < 0) \ - tmp = RB_LEFT(tmp, field); \ - else if (comp > 0) \ - tmp = RB_RIGHT(tmp, field); \ - else \ - return (tmp); \ - } \ - return (NULL); \ -} \ - \ -struct type * \ -name##_RB_NEXT(struct type *elm) \ -{ \ - if (RB_RIGHT(elm, field)) { \ - elm = RB_RIGHT(elm, field); \ - while (RB_LEFT(elm, field)) \ - elm = RB_LEFT(elm, field); \ - } else { \ - if (RB_PARENT(elm, field) && \ - (elm == RB_LEFT(RB_PARENT(elm, field), field))) \ - elm = RB_PARENT(elm, field); \ - else { \ - while (RB_PARENT(elm, field) && \ - (elm == RB_RIGHT(RB_PARENT(elm, field), field)))\ - elm = RB_PARENT(elm, field); \ - elm = RB_PARENT(elm, field); \ - } \ - } \ - return (elm); \ -} \ - \ -struct type * \ -name##_RB_MINMAX(struct name *head, int val) \ -{ \ - struct type *tmp = RB_ROOT(head); \ - struct type *parent = NULL; \ - while (tmp) { \ - parent = tmp; \ - if (val < 0) \ - tmp = RB_LEFT(tmp, field); \ - else \ - tmp = RB_RIGHT(tmp, field); \ - } \ - return (parent); \ -} - -#define RB_NEGINF -1 -#define RB_INF 1 - -#define RB_INSERT(name, x, y) name##_RB_INSERT(x, y) -#define RB_REMOVE(name, x, y) name##_RB_REMOVE(x, y) -#define RB_FIND(name, x, y) name##_RB_FIND(x, y) -#define RB_NEXT(name, x, y) name##_RB_NEXT(y) -#define RB_MIN(name, x) name##_RB_MINMAX(x, RB_NEGINF) -#define RB_MAX(name, x) name##_RB_MINMAX(x, RB_INF) - -#define RB_FOREACH(x, name, head) \ - for ((x) = RB_MIN(name, head); \ - (x) != NULL; \ - (x) = name##_RB_NEXT(x)) - -#endif /* _SYS_TREE_H_ */ diff --git a/openair-cn/autogen.sh b/openair-cn/autogen.sh deleted file mode 100755 index dc425bedc0..0000000000 --- a/openair-cn/autogen.sh +++ /dev/null @@ -1,8 +0,0 @@ -#! /bin/sh - -(cd GTPV2-C/nwgtpv2c-0.11 && libtoolize && autoreconf --install --force) - -aclocal \ -&& autoheader \ -&& automake --add-missing \ -&& autoconf \ No newline at end of file diff --git a/openair-cn/configure.ac b/openair-cn/configure.ac deleted file mode 100644 index 0d5b740fe6..0000000000 --- a/openair-cn/configure.ac +++ /dev/null @@ -1,427 +0,0 @@ -################################################################################ -# OpenAirInterface -# Copyright(c) 1999 - 2014 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 . -# -# Contact Information -# OpenAirInterface Admin: openair_admin@eurecom.fr -# OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr -# -# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. -# -################################################################################ -AC_PREREQ([2.68]) - -define([svnversion], esyscmd([sh -c "svnversion ..|tr -d '\n'"])) - -AC_DEFINE(SVN_REVISION, "svnversion", [SVN Revision]) - -AC_INIT([oai_epc], [0.3.svnversion], [openair_admin@eurecom.fr]) -AC_CANONICAL_BUILD -AC_CANONICAL_TARGET - -AM_INIT_AUTOMAKE([1.11 silent-rules]) - -AC_CONFIG_MACRO_DIR([m4]) - -AC_CONFIG_HEADERS([config.h]) - -AM_MAINTAINER_MODE - -AM_SILENT_RULES([yes]) - -AM_PROG_LIBTOOL -AM_PROG_LEX - -dnl *** Autoconf support *** -AC_ARG_ENABLE(autoconf, - [ --disable-autoconf disable automatic generation of configure script ], - enable_autoconf=$enableval, enable_autoconf=yes -) -AC_PATH_PROG(AUTOCONF, autoconf, @echo autoconf not available) -AC_PATH_PROG(AUTOHEADER, autoheader, @echo autoheader not available) -if test -z "$AUTOCONF"; then enable_autoconf=no ; fi -if test -z "$AUTOHEADER"; then enable_autoconf=no ; fi -if test x$enable_autoconf = xyes; then - CONFIGURE_DEPENDS="configure.in aclocal.m4" -fi -AC_SUBST(CONFIGURE_DEPENDS) - -AC_CHECK_PROGS([DOXYGEN], [doxygen]) -if test -z "$DOXYGEN"; then - AC_MSG_WARN([Doxygen not found - continuing without Doxygen support]) -else - # Check for presence of pdfLaTeX - AC_CHECK_PROG(PDFLATEX, pdflatex, pdflatex) - if test -z "$PDFLATEX"; then - AC_MSG_WARN([Unable to create PDF version of the user manual.]) - fi -fi -AM_CONDITIONAL([HAVE_PDFLATEX], test -n "$PDFLATEX") - -dnl ***asn1c support*** -AC_CHECK_PROG(ASN1C_CHECK, asn1c, yes, [AC_MSG_ERROR(Please install asn1c before going further.)]) - -# Checks for programs. -AC_PROG_CXX -AC_PROG_AWK -AC_PROG_CC -AC_PROG_CPP -AC_PROG_INSTALL -AC_PROG_LN_S -AC_PROG_MAKE_SET -AC_PROG_MKDIR_P -AC_PROG_YACC -AC_PROG_RANLIB - -AC_CHECK_HEADERS([arpa/inet.h fcntl.h float.h inttypes.h limits.h malloc.h]) -AC_CHECK_HEADERS([netinet/in.h stddef.h stdint.h stdlib.h string.h libintl.h]) -AC_CHECK_HEADERS([sys/time.h sys/ioctl.h sys/socket.h unistd.h]) -AC_CHECK_HEADERS([netdb.h termios.h]) - -# Checks for library functions. -AC_FUNC_MMAP -AC_FUNC_MALLOC -AC_FUNC_ALLOCA -AC_FUNC_REALLOC -AC_FUNC_STRTOD -AC_CHECK_FUNCS([ftruncate inet_ntoa memchr memmove memset munmap select socket]) -AC_CHECK_FUNCS([strdup strerror strspn strchr strstr]) -AC_CHECK_FUNCS([gethostname gethostbyname]) - -# Checks for typedefs, structures, and compiler characteristics. -AC_C_INLINE -AC_TYPE_INT8_T -AC_TYPE_INT16_T -AC_TYPE_INT32_T -AC_TYPE_INT64_T -AC_TYPE_OFF_T -AC_TYPE_SIZE_T -AC_TYPE_SSIZE_T -AC_TYPE_UINT8_T -AC_TYPE_UINT16_T -AC_TYPE_UINT32_T -AC_TYPE_UINT64_T - -AC_CHECK_TYPES([ptrdiff_t]) - -dnl *** libsctp-dev support *** -AC_CHECK_LIB([sctp], [sctp_sendmsg], [], - [AC_MSG_ERROR([libsctp-dev needed!])]) - -dnl *** pthread support *** -AC_CHECK_LIB([pthread], [pthread_mutex_init], [], - [AC_MSG_ERROR(pthread library needed!)]) - -dnl *** real time support *** -AC_CHECK_LIB([rt], [timer_create], [], - [AC_MSG_ERROR(rt library needed!)]) - -dnl *** Cryptographic lib nettle support *** -PKG_CHECK_MODULES(nettle, [nettle >= 2.5], - [HAVE_NETTLE=true], - [AC_MSG_ERROR("Please install nettle >= 2.5")]) -CFLAGS="$CFLAGS $nettle_CFLAGS" -LIBS="$LIBS $nettle_LIBS" - -AC_ARG_ENABLE([standalone-epc], - AS_HELP_STRING([--enable-standalone-epc], - [Compile MME, SGW and PGW in a single executable]), - [], - [STANDALONE_EPC="yes"]) -AM_CONDITIONAL([STANDALONE_EPC], [test "x$enable_standalone_epc" = "xyes"]) -if test "x$enable_standalone_epc" = "xyes"; then - CFLAGS="$CFLAGS -DENABLE_STANDALONE_EPC" -else - CFLAGS="$CFLAGS -DDISABLE_STANDALONE_EPC" -fi - -dnl *** Add freediameter dependencies *** -AC_CHECK_LIB([fdcore], [fd_core_initialize], [], - [AC_MSG_ERROR(Free diameter lib not installed)]) -AC_CHECK_LIB([fdproto], [fd_msg_search_avp], [], - [AC_MSG_ERROR(Free diameter lib not installed)]) - -dnl *** Freediameter requirements *** -AC_CHECK_HEADERS([signalent.h]) -AC_CHECK_FUNCS([ntohll strndup]) -AC_DEFINE([HAVE_AI_ADDRCONFIG], [], - [Define to 1 if you have AI_ADDRCONFIG defined in netdb.h]) -AC_DEFINE([HAVE_CLOCK_GETTIME], [], - [Define to 1 if you have clock_gettime in librt]) -AC_DEFINE([HAVE_PTHREAD_BAR], [], - [Define to 1 if you have pthread_barrier_wait in libpthread]) -AC_DEFINE([SCTP_CONNECTX_4_ARGS], [], - [Define to 1 if sctp_connectx function accepts 4 arguments]) -AC_CHECK_LIB([rt], [clock_gettime], [AC_DEFINE(HAVE_CLOCK_GETTIME, 1)], []) -AC_CHECK_LIB([pthread], [pthread_barrier_wait], - [AC_DEFINE(HAVE_PTHREAD_BAR, 1)], []) -AC_CHECK_DECL([AI_ADDRCONFIG], - [AC_DEFINE(HAVE_AI_ADDRCONFIG, 1)], - [], [[#include ]]) -AC_MSG_CHECKING(if sctp_connectx accepts 4 arguments) -AC_LINK_IFELSE([ - AC_LANG_SOURCE( - [[int main() { return sctp_connectx(0, NULL, 0, NULL); }]]) -], [AC_DEFINE(SCTP_CONNECTX_4_ARGS, 1)]) -AC_CHECK_LIB([gnutls], - [gnutls_hash], - [AC_DEFINE(GNUTLS_VERSION_210, 1, - [Define to 1 if you have gnutls 2.10 installed])], - []) -AC_CHECK_LIB([gnutls], - [gnutls_x509_trust_list_verify_crt], - [AC_DEFINE(GNUTLS_VERSION_300, 1, - [Define to 1 if you have gnutls 3.0 installed])], - []) -AC_CHECK_LIB([gnutls], - [gnutls_handshake_set_timeout], - [AC_DEFINE(GNUTLS_VERSION_310, 1, - [Define to 1 if you have gnutls 3.1 installed])], - []) - -AC_DEFINE(FREE_DIAMETER_MINIMUM_VERSION, "1.1.5", [freeDiameter minimum version]) - -AC_SUBST(ADD_CFLAGS) - -dnl *** Enable r8 update *** -AC_ARG_ENABLE([r8], - AS_HELP_STRING([--enable-r8], [Disable 3GPP release 9 and 10 updates]), - [], - []) - -dnl *** Enable r9 update *** -AC_ARG_ENABLE([r9], - AS_HELP_STRING([--enable-r9], [Disable 3GPP release 10 updates]), - [], - []) - -dnl *** Disable NAS layer *** -AC_ARG_ENABLE([nas], - AS_HELP_STRING([--disable-nas], [Disable NAS layer]), - [CFLAGS="$CFLAGS -DDISABLE_USE_NAS"], - []) -AM_CONDITIONAL([DISABLE_USE_NAS], [test x$enable_nas == xno]) - -AC_ARG_ENABLE([s11], - AS_HELP_STRING([--disable-s11], [Disable S11 layer]), - [CFLAGS="$CFLAGS -DDISABLE_S11"], - []) -AM_CONDITIONAL([DISABLE_S11], [test x$enable_s11 == xno]) - - -dnl *** Enable GTPU IN KERNEL *** -AC_ARG_ENABLE([gtp1u_in_kernel], - AS_HELP_STRING([--enable-gtp1u-in-kernel], [Enable GTPU IN KERNEL]), - [case "${enableval}" in - yes) gtp1u_in_kernel=true; CFLAGS="$CFLAGS -DENABLE_USE_GTPU_IN_KERNEL" ;; - no ) gtp1u_in_kernel=false;; - *) AC_MSG_ERROR(bad value ${enableval} for --enable-gtp1u-in-kernel) ;; - esac], - [gtp1u_in_kernel=false]) - -dnl *** Enable PCAP for SGI *** -AC_ARG_ENABLE([pcap_for_sgi], - AS_HELP_STRING([--enable-pcap-for-sgi], [Enable PCAP for SGI layer]), - [case "${enableval}" in - yes) pcap_for_sgi=true; CFLAGS="$CFLAGS -DENABLE_USE_PCAP_FOR_SGI" ;; - no ) pcap_for_sgi=false;; - *) AC_MSG_ERROR(bad value ${enableval} for --enable-pcap-for-sgi) ;; - esac], - [pcap_for_sgi=false]) - -dnl *** Enable NETFILTER for SGI *** -AC_ARG_ENABLE([netfilter_for_sgi], - AS_HELP_STRING([--enable-netfilter-for-sgi], [Enable netfilter for SGI layer]), - [case "${enableval}" in - yes) netfilter_for_sgi=true; CFLAGS="$CFLAGS -DENABLE_USE_NETFILTER_FOR_SGI" ;; - no ) netfilter_for_sgi=false;; - *) AC_MSG_ERROR(bad value ${enableval} for --enable-netfilter-for-sgi) ;; - esac], - [netfilter_for_sgi=false]) - -dnl *** Enable RAW socket for SGI *** -AC_ARG_ENABLE([raw_socket_for_sgi], - AS_HELP_STRING([--enable-raw-socket-for-sgi], [Enable netfilter for SGI layer]), - [case "${enableval}" in - yes) raw_socket_for_sgi=true; CFLAGS="$CFLAGS -DENABLE_USE_RAW_SOCKET_FOR_SGI" ;; - no ) raw_socket_for_sgi=false;; - *) AC_MSG_ERROR(bad value ${enableval} for --enable-raw-socket-for-sgi) ;; - esac], - [if test x$pcap_for_sgi != xtrue && test x$netfilter_for_sgi != xtrue && test x$gtp1u_in_kernel != xtrue; then - raw_socket_for_sgi=true; CFLAGS="$CFLAGS -DENABLE_USE_RAW_SOCKET_FOR_SGI" - else - raw_socket_for_sgi=false - fi]) - -AM_CONDITIONAL([ENABLE_USE_PCAP_FOR_SGI], [test x$pcap_for_sgi == xtrue]) -AM_CONDITIONAL([ENABLE_USE_NETFILTER_FOR_SGI], [test x$netfilter_for_sgi == xtrue]) -AM_CONDITIONAL([ENABLE_USE_RAW_SOCKET_FOR_SGI], [test x$raw_socket_for_sgi == xtrue]) -AM_CONDITIONAL([ENABLE_USE_RAW_SOCKET_FOR_SGI], [ test x$pcap_for_sgi != xtrue && test x$netfilter_for_sgi != xtrue ]) -AM_CONDITIONAL([ENABLE_USE_GTPU_IN_KERNEL], [ test x$gtp1u_in_kernel == xtrue ]) -AM_CONDITIONAL([ENABLE_USE_GTPU_IN_KERNEL], [ test x$raw_socket_for_sgi == xtrue && x$pcap_for_sgi != xtrue && test x$netfilter_for_sgi != xtrue ]) - -AS_IF([test "x$enable_pcap_for_sgi" == "xyes"], [ - dnl *** libpcap support *** - AC_CHECK_LIB([pcap], [pcap_compile], [], [ - AC_MSG_ERROR([PCAP library needed.]) - ]) -]) - -AS_IF([test "x$enable_netfilter_for_sgi" == "xyes"], [ - dnl *** libnfnetlink support *** - AC_CHECK_LIB([nfnetlink], [nfnl_fd], [], - [AC_MSG_ERROR([libnfnetlink needed!])]) - - dnl *** libnetfilter_queue support *** - AC_CHECK_LIB([netfilter_queue], [nfq_open], [], - [AC_MSG_ERROR([libnetfilter_queue needed!])]) -]) - - -if test x$enable_r8 == xyes; then - ASN1DIR=R8.10 -else - if test x$enable_r9 == xyes; then - ASN1DIR=R9.8 - CFLAGS="$CFLAGS -DUPDATE_RELEASE_9" - else - ASN1DIR=R10.5 - CFLAGS="$CFLAGS -DUPDATE_RELEASE_9 -DUPDATE_RELEASE_10" - fi -fi -AC_DEFINE(ASN1_MINIMUM_VERSION, 924, [asn1c minimum version]) -AM_CONDITIONAL([UPDATE_RELEASE_9], [test x$enable_r8 != xyes]) -AM_CONDITIONAL([UPDATE_RELEASE_10], [test x$enable_r8 != xyes && test x$enable_r9 != xyes]) - -AC_SUBST(ASN1DIR) - -PKG_CHECK_MODULES(OPENSSL, - [openssl >= 1.0.1], - [HAVE_OPENSSL=true], - [AC_MSG_ERROR("Please install libcrypto >= 1.0.1")]) -CFLAGS="$CFLAGS $OPENSSL_CFLAGS" -LIBS="$LIBS $OPENSSL_LIBS" - -PKG_CHECK_MODULES(CHECK, [check >= 0.9.4], [HAVE_CHECK=true], [HAVE_CHECK=false]) -AM_CONDITIONAL(HAVE_CHECK, test x$HAVE_CHECK = xtrue) - -AC_CHECK_PROG(HAVE_GCCXML,gccxml,yes,no) -AM_CONDITIONAL(HAVE_GCCXML, test x$HAVE_GCCXML = xyes) - -dnl Add these flags -CFLAGS="$CFLAGS -Wall -g -O" -CFLAGS="$CFLAGS -Wcast-align" -CFLAGS="$CFLAGS -Wchar-subscripts" -CFLAGS="$CFLAGS -Wmissing-prototypes" -CFLAGS="$CFLAGS -Wmissing-declarations" -CFLAGS="$CFLAGS -Werror=shadow" -CFLAGS="$CFLAGS -Werror=implicit-function-declaration" - -dnl *** Check for endianness of platform *** -AC_C_BIGENDIAN -if test "x$ac_cv_c_bigendian" = "xyes"; then - CFLAGS="$CFLAGS -DBYTE_ORDER=BIG_ENDIAN" -else - CFLAGS="$CFLAGS -DBYTE_ORDER=LITTLE_ENDIAN" -fi - -dnl AC_SUBST([AM_CFLAGS]) - -dnl Doxygen section -AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"]) -AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([DOCS/DOXYGEN/Doxyfile])]) - -dnl *** Retrieving hostname for substition in freediameter configuration file *** -HOSTNAME=$(uname -n) -AC_MSG_CHECKING([host name]) -AC_MSG_RESULT([$HOSTNAME]) -AC_SUBST([HOSTNAME]) - -AC_CONFIG_FILES( \ - GTPV1-U/Makefile \ - GTPV2-C/Makefile \ - INTERTASK_INTERFACE/Makefile \ - SGI/Makefile \ - NAS/Makefile \ - S11/Makefile \ - S1AP/MESSAGES/ASN1/Makefile \ - S1AP/MESSAGES/Makefile \ - S1AP/Makefile \ - S6A/Makefile \ - SCTP/Makefile \ - SECU/Makefile \ - SGW-LITE/Makefile \ - UTILS/CONF/s6a.conf \ - UTILS/HASHTABLE/Makefile \ - UTILS/Makefile \ - UDP/Makefile \ - MME_APP/Makefile \ - OAISIM_MME/Makefile \ - OAI_EPC/Makefile \ - OAI_SGW/Makefile \ - DOCS/DOXYGEN/Makefile \ - DOCS/Makefile \ - TEST/Makefile \ - Makefile \ -) - -dnl Call for configure script in gtpv2c subdir -AC_CONFIG_SUBDIRS([GTPV2-C/nwgtpv2c-0.11]) - -dnl configure makefiles -AC_OUTPUT - -echo " -($PACKAGE_NAME) version $PACKAGE_VERSION -Prefix.........: $prefix -C Compiler.....: $CC $CFLAGS -Linker.........: $LD $LDFLAGS $LIBS -Doxygen........: ${DOXYGEN:-no} -Tests..........: ${HAVE_CHECK} -GCCXML.........: ${HAVE_GCCXML} -Standalone ....: ${enable_standalone_epc:-no}" - -if test x$enable_r8 == xyes; then - echo "Release........: 8.10" -else - if test x$enable_r9 == xyes; then - echo "Release........: 9.8" - else - echo "Release........: 10.5" - fi -fi - -if test x$pcap_for_sgi == xtrue; then - echo "SGI pcap.......: yes" -fi - -if test x$netfilter_for_sgi == xtrue; then - echo "SGI netfilter..: yes" -fi - -if test x$raw_socket_for_sgi == xtrue; then - echo "SGI raw socket.: yes" -fi - -if test x$gtp1u_in_kernel == xtrue; then - echo "GTPU in kernel.: yes" -fi - - diff --git a/openair-cn/cppcheck.sh b/openair-cn/cppcheck.sh deleted file mode 100644 index ac79da8f2c..0000000000 --- a/openair-cn/cppcheck.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -cppcheck . --enable=all --xml --verbose --xml-version=2 -j4 2> err.xml diff --git a/openair1/MAC_INTERFACE/defs.h b/openair1/MAC_INTERFACE/defs.h index 8815a26430..dbaab57fcc 100755 --- a/openair1/MAC_INTERFACE/defs.h +++ b/openair1/MAC_INTERFACE/defs.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/MAC_INTERFACE/extern.h b/openair1/MAC_INTERFACE/extern.h index f1b3390db2..a7444939ee 100755 --- a/openair1/MAC_INTERFACE/extern.h +++ b/openair1/MAC_INTERFACE/extern.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/MAC_INTERFACE/init.c b/openair1/MAC_INTERFACE/init.c index 79c8b9d6b6..480d365f09 100644 --- a/openair1/MAC_INTERFACE/init.c +++ b/openair1/MAC_INTERFACE/init.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/MAC_INTERFACE/register.c b/openair1/MAC_INTERFACE/register.c index cb595b6577..0c3c611817 100644 --- a/openair1/MAC_INTERFACE/register.c +++ b/openair1/MAC_INTERFACE/register.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/MAC_INTERFACE/vars.h b/openair1/MAC_INTERFACE/vars.h index fece5ec4d6..e3ef7f6ab1 100755 --- a/openair1/MAC_INTERFACE/vars.h +++ b/openair1/MAC_INTERFACE/vars.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/CODING/3gpplte.c b/openair1/PHY/CODING/3gpplte.c index fd33bf999c..c1a862ebb3 100644 --- a/openair1/PHY/CODING/3gpplte.c +++ b/openair1/PHY/CODING/3gpplte.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/CODING/3gpplte_sse.c b/openair1/PHY/CODING/3gpplte_sse.c index c66a42016d..41c0f65dc3 100755 --- a/openair1/PHY/CODING/3gpplte_sse.c +++ b/openair1/PHY/CODING/3gpplte_sse.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/CODING/3gpplte_turbo_decoder.c b/openair1/PHY/CODING/3gpplte_turbo_decoder.c index ac70e94edd..9fba2ba899 100644 --- a/openair1/PHY/CODING/3gpplte_turbo_decoder.c +++ b/openair1/PHY/CODING/3gpplte_turbo_decoder.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/CODING/3gpplte_turbo_decoder_sse.c b/openair1/PHY/CODING/3gpplte_turbo_decoder_sse.c index 6c5be7de91..67df01c437 100644 --- a/openair1/PHY/CODING/3gpplte_turbo_decoder_sse.c +++ b/openair1/PHY/CODING/3gpplte_turbo_decoder_sse.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/CODING/3gpplte_turbo_decoder_sse_16bit.c b/openair1/PHY/CODING/3gpplte_turbo_decoder_sse_16bit.c index 96813c1072..702aee8656 100644 --- a/openair1/PHY/CODING/3gpplte_turbo_decoder_sse_16bit.c +++ b/openair1/PHY/CODING/3gpplte_turbo_decoder_sse_16bit.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/CODING/3gpplte_turbo_decoder_sse_8bit.c b/openair1/PHY/CODING/3gpplte_turbo_decoder_sse_8bit.c index 6e1ae73d6e..ee78dd0773 100644 --- a/openair1/PHY/CODING/3gpplte_turbo_decoder_sse_8bit.c +++ b/openair1/PHY/CODING/3gpplte_turbo_decoder_sse_8bit.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/CODING/TESTBENCH/ltetest.c b/openair1/PHY/CODING/TESTBENCH/ltetest.c index 3bd5871b76..b7b9fb4aab 100644 --- a/openair1/PHY/CODING/TESTBENCH/ltetest.c +++ b/openair1/PHY/CODING/TESTBENCH/ltetest.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/CODING/TESTBENCH/pdcch_test.c b/openair1/PHY/CODING/TESTBENCH/pdcch_test.c index adbecf3401..84ed605411 100644 --- a/openair1/PHY/CODING/TESTBENCH/pdcch_test.c +++ b/openair1/PHY/CODING/TESTBENCH/pdcch_test.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/CODING/TESTBENCH/viterbi_test.c b/openair1/PHY/CODING/TESTBENCH/viterbi_test.c index cc5ba08d29..efc07820f3 100644 --- a/openair1/PHY/CODING/TESTBENCH/viterbi_test.c +++ b/openair1/PHY/CODING/TESTBENCH/viterbi_test.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/CODING/ccoding_byte.c b/openair1/PHY/CODING/ccoding_byte.c index c6489008eb..cd626a8553 100755 --- a/openair1/PHY/CODING/ccoding_byte.c +++ b/openair1/PHY/CODING/ccoding_byte.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/CODING/ccoding_byte_lte.c b/openair1/PHY/CODING/ccoding_byte_lte.c index b399d0186b..12271fdceb 100644 --- a/openair1/PHY/CODING/ccoding_byte_lte.c +++ b/openair1/PHY/CODING/ccoding_byte_lte.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/CODING/crc_byte.c b/openair1/PHY/CODING/crc_byte.c index 747f94b0d7..e7ed05f411 100755 --- a/openair1/PHY/CODING/crc_byte.c +++ b/openair1/PHY/CODING/crc_byte.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/CODING/defs.h b/openair1/PHY/CODING/defs.h index 21767a1f33..acb6e8dd29 100644 --- a/openair1/PHY/CODING/defs.h +++ b/openair1/PHY/CODING/defs.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/CODING/extern.h b/openair1/PHY/CODING/extern.h index cf67c6c67b..0108dab386 100644 --- a/openair1/PHY/CODING/extern.h +++ b/openair1/PHY/CODING/extern.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/CODING/extern_3GPPinterleaver.h b/openair1/PHY/CODING/extern_3GPPinterleaver.h index a6a0fd02c6..bc521a59a3 100755 --- a/openair1/PHY/CODING/extern_3GPPinterleaver.h +++ b/openair1/PHY/CODING/extern_3GPPinterleaver.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/CODING/lte_interleaver.h b/openair1/PHY/CODING/lte_interleaver.h index 449a7c9efa..1199933a53 100644 --- a/openair1/PHY/CODING/lte_interleaver.h +++ b/openair1/PHY/CODING/lte_interleaver.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/CODING/lte_interleaver2.h b/openair1/PHY/CODING/lte_interleaver2.h index b573b373be..67b696a15f 100644 --- a/openair1/PHY/CODING/lte_interleaver2.h +++ b/openair1/PHY/CODING/lte_interleaver2.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/CODING/lte_interleaver_inline.h b/openair1/PHY/CODING/lte_interleaver_inline.h index 311dc0da25..5e71bd7081 100644 --- a/openair1/PHY/CODING/lte_interleaver_inline.h +++ b/openair1/PHY/CODING/lte_interleaver_inline.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/CODING/lte_rate_matching.c b/openair1/PHY/CODING/lte_rate_matching.c index 837665ceda..69697fc2e0 100644 --- a/openair1/PHY/CODING/lte_rate_matching.c +++ b/openair1/PHY/CODING/lte_rate_matching.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/CODING/lte_segmentation.c b/openair1/PHY/CODING/lte_segmentation.c index d0875cb883..a4409ee414 100644 --- a/openair1/PHY/CODING/lte_segmentation.c +++ b/openair1/PHY/CODING/lte_segmentation.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/CODING/rate_matching.c b/openair1/PHY/CODING/rate_matching.c index 619c5dae69..c14f22e2ac 100644 --- a/openair1/PHY/CODING/rate_matching.c +++ b/openair1/PHY/CODING/rate_matching.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/CODING/scrambler.h b/openair1/PHY/CODING/scrambler.h index f753289279..3718d8b456 100755 --- a/openair1/PHY/CODING/scrambler.h +++ b/openair1/PHY/CODING/scrambler.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/CODING/vars.h b/openair1/PHY/CODING/vars.h index 7caef4b403..98e63a43dc 100644 --- a/openair1/PHY/CODING/vars.h +++ b/openair1/PHY/CODING/vars.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/CODING/viterbi.c b/openair1/PHY/CODING/viterbi.c index 118e0ef2d8..cacc9ab2ff 100755 --- a/openair1/PHY/CODING/viterbi.c +++ b/openair1/PHY/CODING/viterbi.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/CODING/viterbi_lte.c b/openair1/PHY/CODING/viterbi_lte.c index 230b933f79..f5a174e53e 100644 --- a/openair1/PHY/CODING/viterbi_lte.c +++ b/openair1/PHY/CODING/viterbi_lte.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/INIT/defs.h b/openair1/PHY/INIT/defs.h index b63b31302e..f08ca678db 100644 --- a/openair1/PHY/INIT/defs.h +++ b/openair1/PHY/INIT/defs.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/INIT/extern.h b/openair1/PHY/INIT/extern.h index 7a5b283a8e..5c046434e6 100644 --- a/openair1/PHY/INIT/extern.h +++ b/openair1/PHY/INIT/extern.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/INIT/init_top.c b/openair1/PHY/INIT/init_top.c index c730654e6d..e0de14bbb8 100755 --- a/openair1/PHY/INIT/init_top.c +++ b/openair1/PHY/INIT/init_top.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/INIT/lte_init.c b/openair1/PHY/INIT/lte_init.c index 50c70b6d02..e604d599a1 100644 --- a/openair1/PHY/INIT/lte_init.c +++ b/openair1/PHY/INIT/lte_init.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/INIT/lte_parms.c b/openair1/PHY/INIT/lte_parms.c index 122ec169a1..55bd964aa7 100644 --- a/openair1/PHY/INIT/lte_parms.c +++ b/openair1/PHY/INIT/lte_parms.c @@ -21,12 +21,13 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE *******************************************************************************/ #include "defs.h" +#include "log.h" int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf) { diff --git a/openair1/PHY/INIT/vars.h b/openair1/PHY/INIT/vars.h index 7a5b283a8e..5c046434e6 100644 --- a/openair1/PHY/INIT/vars.h +++ b/openair1/PHY/INIT/vars.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/LTE_ESTIMATION/adjust_gain.c b/openair1/PHY/LTE_ESTIMATION/adjust_gain.c index dc1365734d..412f7cbae9 100644 --- a/openair1/PHY/LTE_ESTIMATION/adjust_gain.c +++ b/openair1/PHY/LTE_ESTIMATION/adjust_gain.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/LTE_ESTIMATION/defs.h b/openair1/PHY/LTE_ESTIMATION/defs.h index 54ba597699..cde5c3f6bf 100644 --- a/openair1/PHY/LTE_ESTIMATION/defs.h +++ b/openair1/PHY/LTE_ESTIMATION/defs.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/LTE_ESTIMATION/extern.h b/openair1/PHY/LTE_ESTIMATION/extern.h index f6edc6bb34..7f3cc6e31f 100644 --- a/openair1/PHY/LTE_ESTIMATION/extern.h +++ b/openair1/PHY/LTE_ESTIMATION/extern.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/LTE_ESTIMATION/filt96_32.h b/openair1/PHY/LTE_ESTIMATION/filt96_32.h index c92be225bd..a29a8c26fb 100644 --- a/openair1/PHY/LTE_ESTIMATION/filt96_32.h +++ b/openair1/PHY/LTE_ESTIMATION/filt96_32.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/LTE_ESTIMATION/freq_equalization.c b/openair1/PHY/LTE_ESTIMATION/freq_equalization.c index 595d1e7a48..8f1ffe0441 100755 --- a/openair1/PHY/LTE_ESTIMATION/freq_equalization.c +++ b/openair1/PHY/LTE_ESTIMATION/freq_equalization.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/LTE_ESTIMATION/lte_adjust_sync.c b/openair1/PHY/LTE_ESTIMATION/lte_adjust_sync.c index 63b3f27319..9425e94d02 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_adjust_sync.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_adjust_sync.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/LTE_ESTIMATION/lte_dl_channel_estimation.c b/openair1/PHY/LTE_ESTIMATION/lte_dl_channel_estimation.c index dd1d954b7b..c586af368b 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_dl_channel_estimation.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_dl_channel_estimation.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/LTE_ESTIMATION/lte_dl_channel_estimation_emos.c b/openair1/PHY/LTE_ESTIMATION/lte_dl_channel_estimation_emos.c index ea82b15aee..63223e5ff5 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_dl_channel_estimation_emos.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_dl_channel_estimation_emos.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/LTE_ESTIMATION/lte_dl_mbsfn_channel_estimation.c b/openair1/PHY/LTE_ESTIMATION/lte_dl_mbsfn_channel_estimation.c index 74072dc20a..dbb2ba231f 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_dl_mbsfn_channel_estimation.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_dl_mbsfn_channel_estimation.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/LTE_ESTIMATION/lte_eNB_measurements.c b/openair1/PHY/LTE_ESTIMATION/lte_eNB_measurements.c index 43ebd83941..9564b7842c 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_eNB_measurements.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_eNB_measurements.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/LTE_ESTIMATION/lte_est_freq_offset.c b/openair1/PHY/LTE_ESTIMATION/lte_est_freq_offset.c index b11ba532f5..6f1279b5b8 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_est_freq_offset.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_est_freq_offset.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/LTE_ESTIMATION/lte_sync_time.c b/openair1/PHY/LTE_ESTIMATION/lte_sync_time.c index 7c6254090f..9864a50ee2 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_sync_time.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_sync_time.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/LTE_ESTIMATION/lte_sync_timefreq.c b/openair1/PHY/LTE_ESTIMATION/lte_sync_timefreq.c index 37f5d26315..493583214a 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_sync_timefreq.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_sync_timefreq.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/LTE_ESTIMATION/lte_ue_measurements.c b/openair1/PHY/LTE_ESTIMATION/lte_ue_measurements.c index 50a71eb47a..14dd6dee06 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_ue_measurements.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_ue_measurements.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c b/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c index 44214e8b9d..38fed5e736 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/LTE_ESTIMATION/pss6144.h b/openair1/PHY/LTE_ESTIMATION/pss6144.h index aea275f77e..4903c84d62 100644 --- a/openair1/PHY/LTE_ESTIMATION/pss6144.h +++ b/openair1/PHY/LTE_ESTIMATION/pss6144.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/LTE_ESTIMATION/vars.h b/openair1/PHY/LTE_ESTIMATION/vars.h index f6edc6bb34..7f3cc6e31f 100644 --- a/openair1/PHY/LTE_ESTIMATION/vars.h +++ b/openair1/PHY/LTE_ESTIMATION/vars.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/LTE_REFSIG/defs.h b/openair1/PHY/LTE_REFSIG/defs.h index 1ced7f52e8..354813272c 100644 --- a/openair1/PHY/LTE_REFSIG/defs.h +++ b/openair1/PHY/LTE_REFSIG/defs.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/LTE_REFSIG/lte_dl_cell_spec.c b/openair1/PHY/LTE_REFSIG/lte_dl_cell_spec.c index 1a09c83372..6faf2e1ed0 100644 --- a/openair1/PHY/LTE_REFSIG/lte_dl_cell_spec.c +++ b/openair1/PHY/LTE_REFSIG/lte_dl_cell_spec.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/LTE_REFSIG/lte_dl_mbsfn.c b/openair1/PHY/LTE_REFSIG/lte_dl_mbsfn.c index 54b9a5442d..c3b141841a 100644 --- a/openair1/PHY/LTE_REFSIG/lte_dl_mbsfn.c +++ b/openair1/PHY/LTE_REFSIG/lte_dl_mbsfn.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/LTE_REFSIG/lte_dl_uespec.c b/openair1/PHY/LTE_REFSIG/lte_dl_uespec.c index d029f959ed..9e234bad8e 100644 --- a/openair1/PHY/LTE_REFSIG/lte_dl_uespec.c +++ b/openair1/PHY/LTE_REFSIG/lte_dl_uespec.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/LTE_REFSIG/lte_gold.c b/openair1/PHY/LTE_REFSIG/lte_gold.c index 5861e314ff..9611f2bae6 100644 --- a/openair1/PHY/LTE_REFSIG/lte_gold.c +++ b/openair1/PHY/LTE_REFSIG/lte_gold.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/LTE_REFSIG/lte_gold_mbsfn.c b/openair1/PHY/LTE_REFSIG/lte_gold_mbsfn.c index 17f95cb9ee..0d14515776 100644 --- a/openair1/PHY/LTE_REFSIG/lte_gold_mbsfn.c +++ b/openair1/PHY/LTE_REFSIG/lte_gold_mbsfn.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/LTE_REFSIG/lte_ul_ref.c b/openair1/PHY/LTE_REFSIG/lte_ul_ref.c index be3902ec47..75599f4b71 100644 --- a/openair1/PHY/LTE_REFSIG/lte_ul_ref.c +++ b/openair1/PHY/LTE_REFSIG/lte_ul_ref.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/LTE_REFSIG/mod_table.h b/openair1/PHY/LTE_REFSIG/mod_table.h index e63be32c6f..5ae3efdea2 100644 --- a/openair1/PHY/LTE_REFSIG/mod_table.h +++ b/openair1/PHY/LTE_REFSIG/mod_table.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/LTE_REFSIG/primary_synch.h b/openair1/PHY/LTE_REFSIG/primary_synch.h index ff069e046b..f9cf6fc171 100644 --- a/openair1/PHY/LTE_REFSIG/primary_synch.h +++ b/openair1/PHY/LTE_REFSIG/primary_synch.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/LTE_TRANSPORT/dci.c b/openair1/PHY/LTE_TRANSPORT/dci.c index dd18d16108..3189dc0cdb 100644 --- a/openair1/PHY/LTE_TRANSPORT/dci.c +++ b/openair1/PHY/LTE_TRANSPORT/dci.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/LTE_TRANSPORT/dci.h b/openair1/PHY/LTE_TRANSPORT/dci.h index d98984b2a1..e65352f5a0 100644 --- a/openair1/PHY/LTE_TRANSPORT/dci.h +++ b/openair1/PHY/LTE_TRANSPORT/dci.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/LTE_TRANSPORT/dci_tools.c b/openair1/PHY/LTE_TRANSPORT/dci_tools.c index 7cb47a49e9..afd859fc98 100644 --- a/openair1/PHY/LTE_TRANSPORT/dci_tools.c +++ b/openair1/PHY/LTE_TRANSPORT/dci_tools.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/LTE_TRANSPORT/defs.h b/openair1/PHY/LTE_TRANSPORT/defs.h index 96c2b7d760..460d9f399d 100644 --- a/openair1/PHY/LTE_TRANSPORT/defs.h +++ b/openair1/PHY/LTE_TRANSPORT/defs.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_coding.c b/openair1/PHY/LTE_TRANSPORT/dlsch_coding.c index 0db7708860..1ad0b847ef 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_coding.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_coding.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c b/openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c index 532570adf2..6ab784aa18 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c b/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c index f5d34f88cd..3e5ec84d46 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE @@ -45,7 +45,6 @@ #include "PHY/sse_intrin.h" - #ifndef USER_MODE #define NOCYGWIN_STATIC static #else @@ -53,9 +52,9 @@ #endif //#define DEBUG_PHY 1 -//#define DEBUG_DLSCH_MOD 1 +//#define DEBUG_DLSCH_DEMOD 1 -int avg[4]; +int avg[4]; // [MCS][i_mod (0,1,2) = (2,4,6)] unsigned char offset_mumimo_llr_drange_fix=0; @@ -3201,19 +3200,21 @@ void dlsch_alamouti(LTE_DL_FRAME_PARMS *frame_parms, ch_mag1 = (__m128i *)&dl_ch_mag[2][jj]; ch_mag0b = (__m128i *)&dl_ch_magb[0][jj]; ch_mag1b = (__m128i *)&dl_ch_magb[2][jj]; - + for (rb=0; rbN_RB_DL>>1)) { rxF = &rxdataF[aarx][(1 + (symbol*(frame_parms->ofdm_symbol_size)))]; //dl_ch0++; } + // PBCH + if ((subframe==0) && (rb>=((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l>=nsymb>>1) && (l<((nsymb>>1) + 4))) { + rb_alloc_ind = 0; + } + + //SSS + if (((subframe==0)||(subframe==5)) && (rb>=((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l==sss_symb) ) { + rb_alloc_ind = 0; + } + + + if (frame_parms->frame_type == FDD) { + //PSS + if (((subframe==0)||(subframe==5)) && (rb>=((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l==pss_symb) ) { + rb_alloc_ind = 0; + } + } + + if ((frame_parms->frame_type == TDD) && + (subframe==6)) { //TDD Subframe 6 + if ((rb>=((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l==pss_symb) ) { + rb_alloc_ind = 0; + } + } + if (rb_alloc_ind==1) { *pmi_ext = (pmi>>((rb>>2)<<1))&3; memcpy(dl_ch0_ext,dl_ch0,12*sizeof(int)); @@ -3382,7 +3411,7 @@ unsigned short dlsch_extract_rbs_single(int **rxdataF, rxF_ext+=10; } - nb_rb++; + } dl_ch0+=12; @@ -3391,7 +3420,9 @@ unsigned short dlsch_extract_rbs_single(int **rxdataF, } else { // Odd number of RBs for (rb=0; rbN_RB_DL>>1; rb++) { - // printf("dlch_ext %d\n",dl_ch0_ext-&dl_ch_estimates_ext[aarx][0]); +#ifdef DEBUG_DLSCH_DEMOD + printf("dlch_ext %d\n",dl_ch0_ext-&dl_ch_estimates_ext[aarx][0]); +#endif skip_half=0; if (rb < 32) @@ -3405,6 +3436,8 @@ unsigned short dlsch_extract_rbs_single(int **rxdataF, else rb_alloc_ind = 0; + if (rb_alloc_ind == 1) + nb_rb++; // PBCH if ((subframe==0) && (rb>((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l>=(nsymb>>1)) && (l<((nsymb>>1) + 4))) { @@ -3438,7 +3471,10 @@ unsigned short dlsch_extract_rbs_single(int **rxdataF, //PSS in subframe 0/5 if FDD if (frame_parms->frame_type == FDD) { //FDD - if (((subframe==0)||(subframe==5)) && (rb>((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l==pss_symb) ) { + if (((subframe==0)||(subframe==5)) && + (rb>((frame_parms->N_RB_DL>>1)-3)) && + (rb<((frame_parms->N_RB_DL>>1)+3)) && + (l==pss_symb) ) { rb_alloc_ind = 0; } @@ -3462,55 +3498,68 @@ unsigned short dlsch_extract_rbs_single(int **rxdataF, if (rb_alloc_ind==1) { - // printf("rb %d/symbol %d (skip_half %d)\n",rb,l,skip_half); - +#ifdef DEBUG_DLSCH_DEMOD + printf("rb %d/symbol %d (skip_half %d)\n",rb,l,skip_half); +#endif if (pilots==0) { - // printf("Extracting w/o pilots (symbol %d, rb %d, skip_half %d)\n",l,rb,skip_half); + // printf("Extracting w/o pilots (symbol %d, rb %d, skip_half %d)\n",l,rb,skip_half); if (skip_half==1) { memcpy(dl_ch0_ext,dl_ch0,6*sizeof(int)); - for (i=0; i<6; i++) - rxF_ext[i]=rxF[i]; - + for (i=0; i<6; i++) { + rxF_ext[i]=rxF[i]; +#ifdef DEBUG_DLSCH_DEMOD + printf("extract rb %d, re %d => (%d,%d)\n",rb,i,*(short *)&rxF_ext[i],*(1+(short*)&rxF_ext[i])); +#endif + } dl_ch0_ext+=6; rxF_ext+=6; } else if (skip_half==2) { memcpy(dl_ch0_ext,dl_ch0+6,6*sizeof(int)); - for (i=0; i<6; i++) + for (i=0; i<6; i++) { rxF_ext[i]=rxF[(i+6)]; - +#ifdef DEBUG_DLSCH_DEMOD + printf("extract rb %d, re %d => (%d,%d)\n",rb,i,*(short *)&rxF_ext[i],*(1+(short*)&rxF_ext[i])); +#endif + } dl_ch0_ext+=6; rxF_ext+=6; } else { memcpy(dl_ch0_ext,dl_ch0,12*sizeof(int)); - for (i=0; i<12; i++) + for (i=0; i<12; i++) { rxF_ext[i]=rxF[i]; - +#ifdef DEBUG_DLSCH_DEMOD + printf("extract rb %d, re %d => (%d,%d)\n",rb,i,*(short *)&rxF_ext[i],*(1+(short*)&rxF_ext[i])); +#endif + } dl_ch0_ext+=12; rxF_ext+=12; } } else { - // printf("Extracting with pilots (symbol %d, rb %d, skip_half %d)\n",l,rb,skip_half); + // printf("Extracting with pilots (symbol %d, rb %d, skip_half %d)\n",l,rb,skip_half); j=0; if (skip_half==1) { for (i=0; i<6; i++) { if (i!=((frame_parms->nushift+poffset)%6)) { rxF_ext[j]=rxF[i]; - // printf("extract rb %d, re %d => (%d,%d)\n",rb,i,*(short *)&rxF_ext[j],*(1+(short*)&rxF_ext[j])); +#ifdef DEBUG_DLSCH_DEMOD + printf("extract rb %d, re %d => (%d,%d)\n",rb,i,*(short *)&rxF_ext[j],*(1+(short*)&rxF_ext[j])); +#endif dl_ch0_ext[j++]=dl_ch0[i]; } } - + rxF_ext+=5; dl_ch0_ext+=5; - rxF_ext+=5; } else if (skip_half==2) { for (i=0; i<6; i++) { if (i!=((frame_parms->nushift+poffset)%6)) { rxF_ext[j]=rxF[(i+6)]; - // printf("extract rb %d, re %d => (%d,%d)\n",rb,i,*(short *)&rxF_ext[j],*(1+(short*)&rxF_ext[j])); +#ifdef DEBUG_DLSCH_DEMOD + printf("extract rb %d, re %d => (%d,%d)\n",rb,i,*(short *)&rxF_ext[j],*(1+(short*)&rxF_ext[j])); +#endif dl_ch0_ext[j++]=dl_ch0[i+6]; } } @@ -3522,7 +3571,9 @@ unsigned short dlsch_extract_rbs_single(int **rxdataF, if ((i!=(frame_parms->nushift+poffset)) && (i!=((frame_parms->nushift+poffset+6)%12))) { rxF_ext[j]=rxF[i]; - // printf("extract rb %d, re %d => (%d,%d)\n",rb,i,*(short *)&rxF_ext[j],*(1+(short*)&rxF_ext[j])); +#ifdef DEBUG_DLSCH_DEMOD + printf("extract rb %d, re %d => (%d,%d)\n",rb,i,*(short *)&rxF_ext[j],*(1+(short*)&rxF_ext[j])); +#endif dl_ch0_ext[j++]=dl_ch0[i]; } @@ -3532,8 +3583,6 @@ unsigned short dlsch_extract_rbs_single(int **rxdataF, rxF_ext+=10; } } - - nb_rb++; } dl_ch0+=12; @@ -3554,36 +3603,42 @@ unsigned short dlsch_extract_rbs_single(int **rxdataF, rb_alloc_ind = 0; + if (rb_alloc_ind == 1) + nb_rb++; // PBCH - if ((subframe==0) && (rb>=((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l>=(nsymb>>1)) && (l<((nsymb>>1) + 4))) { + if ((subframe==0) && + (l>=(nsymb>>1)) && + (l<((nsymb>>1) + 4))) { rb_alloc_ind = 0; } //SSS - if (((subframe==0)||(subframe==5)) && (rb>=((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l==sss_symb) ) { + if (((subframe==0)||(subframe==5)) && (l==sss_symb) ) { rb_alloc_ind = 0; } if (frame_parms->frame_type == FDD) { //PSS - if (((subframe==0)||(subframe==5)) && (rb>=((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l==pss_symb) ) { + if (((subframe==0)||(subframe==5)) && (l==pss_symb) ) { rb_alloc_ind = 0; } } + //PSS if ((frame_parms->frame_type == TDD) && - (subframe==6)) { - //PSS - if ((rb>((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l==pss_symb) ) { - rb_alloc_ind = 0; - } + (subframe==6) && + (l==pss_symb) ) { + rb_alloc_ind = 0; } + // printf("dlch_ext %d\n",dl_ch0_ext-&dl_ch_estimates_ext[aarx][0]); // printf("DC rb %d (%p)\n",rb,rxF); if (rb_alloc_ind==1) { - // printf("rb %d/symbol %d (skip_half %d)\n",rb,l,skip_half); +#ifdef DEBUG_DLSCH_DEMOD + printf("rb %d/symbol %d (skip_half %d)\n",rb,l,skip_half); +#endif if (pilots==0) { for (i=0; i<6; i++) { dl_ch0_ext[i]=dl_ch0[i]; @@ -3606,7 +3661,9 @@ unsigned short dlsch_extract_rbs_single(int **rxdataF, if (i!=((frame_parms->nushift+poffset)%6)) { dl_ch0_ext[j]=dl_ch0[i]; rxF_ext[j++]=rxF[i]; - // printf("**extract rb %d, re %d => (%d,%d)\n",rb,i,*(short *)&rxF_ext[j-1],*(1+(short*)&rxF_ext[j-1])); +#ifdef DEBUG_DLSCH_DEMOD + printf("**extract rb %d, re %d => (%d,%d)\n",rb,i,*(short *)&rxF_ext[j-1],*(1+(short*)&rxF_ext[j-1])); +#endif } } @@ -3616,7 +3673,9 @@ unsigned short dlsch_extract_rbs_single(int **rxdataF, if (i!=((frame_parms->nushift+6+poffset)%12)) { dl_ch0_ext[j]=dl_ch0[i]; rxF_ext[j++]=rxF[(1+i-6)]; - // printf("**extract rb %d, re %d => (%d,%d)\n",rb,i,*(short *)&rxF_ext[j-1],*(1+(short*)&rxF_ext[j-1])); +#ifdef DEBUG_DLSCH_DEMOD + printf("**extract rb %d, re %d => (%d,%d)\n",rb,i,*(short *)&rxF_ext[j-1],*(1+(short*)&rxF_ext[j-1])); +#endif } } @@ -3624,7 +3683,6 @@ unsigned short dlsch_extract_rbs_single(int **rxdataF, rxF_ext+=10; } // symbol_mod==0 - nb_rb++; } // rballoc==1 else { rxF = &rxdataF[aarx][((symbol*(frame_parms->ofdm_symbol_size)))]; @@ -3650,7 +3708,8 @@ unsigned short dlsch_extract_rbs_single(int **rxdataF, else rb_alloc_ind = 0; - + if (rb_alloc_ind == 1) + nb_rb++; // PBCH if ((subframe==0) && (rb>((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l>=nsymb>>1) && (l<((nsymb>>1) + 4))) { @@ -3700,7 +3759,9 @@ unsigned short dlsch_extract_rbs_single(int **rxdataF, } if (rb_alloc_ind==1) { - // printf("rb %d/symbol %d (skip_half %d)\n",rb,l,skip_half); +#ifdef DEBUG_DLSCH_DEMOD + printf("rb %d/symbol %d (skip_half %d)\n",rb,l,skip_half); +#endif /* printf("rb %d\n",rb); for (i=0;i<12;i++) @@ -3708,43 +3769,54 @@ unsigned short dlsch_extract_rbs_single(int **rxdataF, printf("\n"); */ if (pilots==0) { - // printf("Extracting w/o pilots (symbol %d, rb %d, skip_half %d)\n",l,rb,skip_half); + // printf("Extracting w/o pilots (symbol %d, rb %d, skip_half %d)\n",l,rb,skip_half); if (skip_half==1) { memcpy(dl_ch0_ext,dl_ch0,6*sizeof(int)); - for (i=0; i<6; i++) + for (i=0; i<6; i++) { rxF_ext[i]=rxF[i]; - +#ifdef DEBUG_DLSCH_DEMOD + printf("extract rb %d, re %d => (%d,%d)\n",rb,i,*(short *)&rxF_ext[i],*(1+(short*)&rxF_ext[i])); +#endif + } dl_ch0_ext+=6; rxF_ext+=6; } else if (skip_half==2) { memcpy(dl_ch0_ext,dl_ch0+6,6*sizeof(int)); - for (i=0; i<6; i++) + for (i=0; i<6; i++) { rxF_ext[i]=rxF[(i+6)]; - +#ifdef DEBUG_DLSCH_DEMOD + printf("extract rb %d, re %d => (%d,%d)\n",rb,i,*(short *)&rxF_ext[i],*(1+(short*)&rxF_ext[i])); +#endif + } dl_ch0_ext+=6; rxF_ext+=6; } else { memcpy(dl_ch0_ext,dl_ch0,12*sizeof(int)); - for (i=0; i<12; i++) + for (i=0; i<12; i++) { rxF_ext[i]=rxF[i]; - +#ifdef DEBUG_DLSCH_DEMOD + printf("extract rb %d, re %d => (%d,%d)\n",rb,i,*(short *)&rxF_ext[i],*(1+(short*)&rxF_ext[i])); +#endif + } dl_ch0_ext+=12; rxF_ext+=12; } } else { - // printf("Extracting with pilots (symbol %d, rb %d, skip_half %d)\n",l,rb,skip_half); + // printf("Extracting with pilots (symbol %d, rb %d, skip_half %d)\n",l,rb,skip_half); j=0; if (skip_half==1) { for (i=0; i<6; i++) { if (i!=((frame_parms->nushift+poffset)%6)) { rxF_ext[j]=rxF[i]; - // printf("extract rb %d, re %d => (%d,%d)\n",rb,i,*(short *)&rxF_ext[j],*(1+(short*)&rxF_ext[j])); +#ifdef DEBUG_DLSCH_DEMOD + printf("extract rb %d, re %d => (%d,%d)\n",rb,i,*(short *)&rxF_ext[j],*(1+(short*)&rxF_ext[j])); +#endif dl_ch0_ext[j++]=dl_ch0[i]; } } @@ -3755,7 +3827,9 @@ unsigned short dlsch_extract_rbs_single(int **rxdataF, for (i=0; i<6; i++) { if (i!=((frame_parms->nushift+poffset)%6)) { rxF_ext[j]=rxF[(i+6)]; - // printf("extract rb %d, re %d => (%d,%d)\n",rb,i,*(short *)&rxF_ext[j],*(1+(short*)&rxF_ext[j])); +#ifdef DEBUG_DLSCH_DEMOD + printf("extract rb %d, re %d => (%d,%d)\n",rb,i,*(short *)&rxF_ext[j],*(1+(short*)&rxF_ext[j])); +#endif dl_ch0_ext[j++]=dl_ch0[i+6]; } } @@ -3767,7 +3841,9 @@ unsigned short dlsch_extract_rbs_single(int **rxdataF, if ((i!=(frame_parms->nushift+poffset)) && (i!=((frame_parms->nushift+poffset+6)%12))) { rxF_ext[j]=rxF[i]; - // printf("extract rb %d, re %d => (%d,%d)\n",rb,i,*(short *)&rxF_ext[j],*(1+(short*)&rxF_ext[j])); +#ifdef DEBUG_DLSCH_DEMOD + printf("extract rb %d, re %d => (%d,%d)\n",rb,i,*(short *)&rxF_ext[j],*(1+(short*)&rxF_ext[j])); +#endif dl_ch0_ext[j++]=dl_ch0[i]; } } @@ -3776,8 +3852,6 @@ unsigned short dlsch_extract_rbs_single(int **rxdataF, rxF_ext+=10; } } // pilots=0 - - nb_rb++; } dl_ch0+=12; @@ -3859,52 +3933,58 @@ unsigned short dlsch_extract_rbs_dual(int **rxdataF, rb_alloc_ind = (rb_alloc[3]>>(prb-96)) & 1; else rb_alloc_ind = 0; - - // PBCH - if ((subframe==0) && - (prb>((frame_parms->N_RB_DL>>1)-3)) && - (prb<((frame_parms->N_RB_DL>>1)+3)) && - (l>=(nsymb>>1)) && - (l<((nsymb>>1) + 4))) { - rb_alloc_ind = 0; - // printf("symbol %d / rb %d: skipping PBCH REs\n",symbol,prb); - } - - //SSS - - if (((subframe==0)||(subframe==5)) && - (prb>((frame_parms->N_RB_DL>>1)-3)) && - (prb<((frame_parms->N_RB_DL>>1)+3)) && - (l==sss_symb) ) { - rb_alloc_ind = 0; - // printf("symbol %d / rb %d: skipping SSS REs\n",symbol,prb); - } - - - - //PSS in subframe 0/5 if FDD - if (frame_parms->frame_type == FDD) { //FDD - if (((subframe==0)||(subframe==5)) && - (prb>((frame_parms->N_RB_DL>>1)-3)) && - (prb<((frame_parms->N_RB_DL>>1)+3)) && - (l==pss_symb) ) { - rb_alloc_ind = 0; - // printf("symbol %d / rb %d: skipping PSS REs\n",symbol,prb); - } - } - - if ((frame_parms->frame_type == TDD) && - (subframe==6)) { //TDD Subframe 6 - if ((prb>=((frame_parms->N_RB_DL>>1)-3)) && - (prb<=((frame_parms->N_RB_DL>>1)+3)) && - (l==pss_symb) ) { - rb_alloc_ind = 0; - } - } - - if (rb_alloc_ind==1) { // PRB is allocated - if ((frame_parms->N_RB_DL&1) == 0) { // even number of RBs + if (rb_alloc_ind == 1) + nb_rb++; + + + if ((frame_parms->N_RB_DL&1) == 0) { // even number of RBs + + // PBCH + if ((subframe==0) && + (prb>=((frame_parms->N_RB_DL>>1)-3)) && + (prb<((frame_parms->N_RB_DL>>1)+3)) && + (l>=(nsymb>>1)) && + (l<((nsymb>>1) + 4))) { + rb_alloc_ind = 0; + // printf("symbol %d / rb %d: skipping PBCH REs\n",symbol,prb); + } + + //SSS + + if (((subframe==0)||(subframe==5)) && + (prb>=((frame_parms->N_RB_DL>>1)-3)) && + (prb<((frame_parms->N_RB_DL>>1)+3)) && + (l==sss_symb) ) { + rb_alloc_ind = 0; + // printf("symbol %d / rb %d: skipping SSS REs\n",symbol,prb); + } + + + + //PSS in subframe 0/5 if FDD + if (frame_parms->frame_type == FDD) { //FDD + if (((subframe==0)||(subframe==5)) && + (prb>=((frame_parms->N_RB_DL>>1)-3)) && + (prb<((frame_parms->N_RB_DL>>1)+3)) && + (l==pss_symb) ) { + rb_alloc_ind = 0; + // printf("symbol %d / rb %d: skipping PSS REs\n",symbol,prb); + } + } + + if ((frame_parms->frame_type == TDD) && + (subframe==6)) { //TDD Subframe 6 + if ((prb>=((frame_parms->N_RB_DL>>1)-3)) && + (prb<((frame_parms->N_RB_DL>>1)+3)) && + (l==pss_symb) ) { + rb_alloc_ind = 0; + } + } + + if (rb_alloc_ind==1) { // PRB is allocated + + prb_off = 12*prb; prb_off2 = 1+(12*(prb-(frame_parms->N_RB_DL>>1))); @@ -3949,12 +4029,55 @@ unsigned short dlsch_extract_rbs_dual(int **rxdataF, rxF_ext+=8; } // pilots==1 - nb_rb++; + } + } else { // Odd number of RBs - } else { // Odd number of RBs + // PBCH + if ((subframe==0) && + (prb>((frame_parms->N_RB_DL>>1)-3)) && + (prb<((frame_parms->N_RB_DL>>1)+3)) && + (l>=(nsymb>>1)) && + (l<((nsymb>>1) + 4))) { + rb_alloc_ind = 0; + // printf("symbol %d / rb %d: skipping PBCH REs\n",symbol,prb); + } + + //SSS + + if (((subframe==0)||(subframe==5)) && + (prb>((frame_parms->N_RB_DL>>1)-3)) && + (prb<((frame_parms->N_RB_DL>>1)+3)) && + (l==sss_symb) ) { + rb_alloc_ind = 0; + // printf("symbol %d / rb %d: skipping SSS REs\n",symbol,prb); + } + + + + //PSS in subframe 0/5 if FDD + if (frame_parms->frame_type == FDD) { //FDD + if (((subframe==0)||(subframe==5)) && + (prb>((frame_parms->N_RB_DL>>1)-3)) && + (prb<((frame_parms->N_RB_DL>>1)+3)) && + (l==pss_symb) ) { + rb_alloc_ind = 0; + // printf("symbol %d / rb %d: skipping PSS REs\n",symbol,prb); + } + } + + if ((frame_parms->frame_type == TDD) && + ((subframe==1) || (subframe==6))) { //TDD Subframe 1-6 + if ((prb>((frame_parms->N_RB_DL>>1)-3)) && + (prb<((frame_parms->N_RB_DL>>1)+3)) && + (l==pss_symb) ) { + rb_alloc_ind = 0; + } + } + + if (rb_alloc_ind == 1) { skip_half=0; - + //Check if we have to drop half a PRB due to PSS/SSS/PBCH // skip_half == 0 means full PRB // skip_half == 1 means first half is used (leftmost half-PRB from PSS/SSS/PBCH) @@ -3985,13 +4108,12 @@ unsigned short dlsch_extract_rbs_dual(int **rxdataF, if (((frame_parms->frame_type == FDD) && (((subframe==0)||(subframe==5)))) || //FDD Subframes 0,5 ((frame_parms->frame_type == TDD) && - (((subframe==2) || (subframe==6))))) { //TDD Subframes 2,6 + (((subframe==1) || (subframe==6))))) { //TDD Subframes 1,6 if ((prb==((frame_parms->N_RB_DL>>1)-3)) && (l==pss_symb)) skip_half=1; - else if (((subframe==0)||(subframe==5)) && - (prb==((frame_parms->N_RB_DL>>1)+3)) && + else if ((prb==((frame_parms->N_RB_DL>>1)+3)) && (l==pss_symb)) skip_half=2; } @@ -4011,9 +4133,9 @@ unsigned short dlsch_extract_rbs_dual(int **rxdataF, rxF = &rxdataF[aarx][prb_off2+ (symbol*(frame_parms->ofdm_symbol_size))]; } - - // printf("symbol %d / rb %d: alloc %d skip_half %d (rxF %p, rxF_ext %p) prb_off (%d,%d)\n",symbol,prb,rb_alloc_ind,skip_half,rxF,rxF_ext,prb_off,prb_off2); - +#ifdef DEBUG_DLSCH_DEMOD + printf("symbol %d / rb %d: alloc %d skip_half %d (rxF %p, rxF_ext %p) prb_off (%d,%d)\n",symbol,prb,rb_alloc_ind,skip_half,rxF,rxF_ext,prb_off,prb_off2); +#endif *pmi_loc = (pmi>>((prb>>2)<<1))&3; // printf("symbol_mod %d (pilots %d) rb %d, sb %d, pmi %d (pmi_loc %p,rxF %p, ch00 %p, ch01 %p, rxF_ext %p dl_ch0_ext %p dl_ch1_ext %p)\n",symbol_mod,pilots,rb,rb>>2,*pmi_loc,pmi_loc,rxF,dl_ch0, dl_ch1, rxF_ext,dl_ch0_ext,dl_ch1_ext); @@ -4025,6 +4147,10 @@ unsigned short dlsch_extract_rbs_dual(int **rxdataF, memcpy(dl_ch0_ext,dl_ch0p,6*sizeof(int32_t)); memcpy(dl_ch1_ext,dl_ch1p,6*sizeof(int32_t)); memcpy(rxF_ext,rxF,6*sizeof(int32_t)); +#ifdef DEBUG_DLSCH_DEMOD + for (i=0;i<6;i++) + printf("extract rb %d, re %d => (%d,%d)\n",prb,i,*(short *)&rxF_ext[i],*(1+(short*)&rxF_ext[i])); +#endif dl_ch0_ext+=6; dl_ch1_ext+=6; rxF_ext+=6; @@ -4032,6 +4158,10 @@ unsigned short dlsch_extract_rbs_dual(int **rxdataF, memcpy(dl_ch0_ext,dl_ch0p+6,6*sizeof(int32_t)); memcpy(dl_ch1_ext,dl_ch1p+6,6*sizeof(int32_t)); memcpy(rxF_ext,rxF+6,6*sizeof(int32_t)); +#ifdef DEBUG_DLSCH_DEMOD + for (i=0;i<6;i++) + printf("extract rb %d, re %d => (%d,%d)\n",prb,i,*(short *)&rxF_ext[i],*(1+(short*)&rxF_ext[i])); +#endif dl_ch0_ext+=6; dl_ch1_ext+=6; rxF_ext+=6; @@ -4039,8 +4169,10 @@ unsigned short dlsch_extract_rbs_dual(int **rxdataF, memcpy(dl_ch0_ext,dl_ch0p,12*sizeof(int32_t)); memcpy(dl_ch1_ext,dl_ch1p,12*sizeof(int32_t)); memcpy(rxF_ext,rxF,12*sizeof(int32_t)); +#ifdef DEBUG_DLSCH_DEMOD for (i=0;i<12;i++) - // printf("extract rb %d, re %d => (%d,%d)\n",prb,i,*(short *)&rxF_ext[i],*(1+(short*)&rxF_ext[i])); + printf("extract rb %d, re %d => (%d,%d)\n",prb,i,*(short *)&rxF_ext[i],*(1+(short*)&rxF_ext[i])); +#endif dl_ch0_ext+=12; dl_ch1_ext+=12; rxF_ext+=12; @@ -4053,7 +4185,9 @@ unsigned short dlsch_extract_rbs_dual(int **rxdataF, if ((i!=frame_parms->nushift) && (i!=((frame_parms->nushift+3)%6))) { rxF_ext[j]=rxF[i]; - // printf("(pilots,skip1)extract rb %d, re %d => (%d,%d)\n",prb,i,*(short *)&rxF_ext[j],*(1+(short*)&rxF_ext[j])); +#ifdef DEBUG_DLSCH_DEMOD + printf("(pilots,skip1)extract rb %d, re %d (%d)=> (%d,%d)\n",prb,i,j,*(short *)&rxF_ext[j],*(1+(short*)&rxF_ext[j])); +#endif dl_ch0_ext[j]=dl_ch0p[i]; dl_ch1_ext[j++]=dl_ch1p[i]; } @@ -4066,15 +4200,17 @@ unsigned short dlsch_extract_rbs_dual(int **rxdataF, if ((i!=frame_parms->nushift) && (i!=((frame_parms->nushift+3)%6))) { rxF_ext[j]=rxF[(i+6)]; - // printf("(pilots,skip2)extract rb %d, re %d => (%d,%d)\n",prb,i,*(short *)&rxF_ext[j],*(1+(short*)&rxF_ext[j])); +#ifdef DEBUG_DLSCH_DEMOD + printf("(pilots,skip2)extract rb %d, re %d (%d) => (%d,%d)\n",prb,i,j,*(short *)&rxF_ext[j],*(1+(short*)&rxF_ext[j])); +#endif dl_ch0_ext[j]=dl_ch0p[i+6]; dl_ch1_ext[j++]=dl_ch1p[i+6]; } - - dl_ch0_ext+=4; - dl_ch1_ext+=4; - rxF_ext+=4; } + dl_ch0_ext+=4; + dl_ch1_ext+=4; + rxF_ext+=4; + } else { //skip_half==0 for (i=0; i<12; i++) { if ((i!=frame_parms->nushift) && @@ -4082,7 +4218,9 @@ unsigned short dlsch_extract_rbs_dual(int **rxdataF, (i!=frame_parms->nushift+6) && (i!=((frame_parms->nushift+9)%12))) { rxF_ext[j]=rxF[i]; - // printf("(pilots)extract rb %d, re %d => (%d,%d)\n",prb,i,*(short *)&rxF_ext[j],*(1+(short*)&rxF_ext[j])); +#ifdef DEBUG_DLSCH_DEMOD + printf("(pilots)extract rb %d, re %d => (%d,%d)\n",prb,i,*(short *)&rxF_ext[j],*(1+(short*)&rxF_ext[j])); +#endif dl_ch0_ext[j] =dl_ch0p[i]; dl_ch1_ext[j++]=dl_ch1p[i]; } @@ -4092,31 +4230,33 @@ unsigned short dlsch_extract_rbs_dual(int **rxdataF, rxF_ext+=8; } //skip_half==0 } //pilots==1 - nb_rb++; } else { // Do middle RB (around DC) if (pilots==0) { memcpy(dl_ch0_ext,dl_ch0p,6*sizeof(int32_t)); memcpy(dl_ch1_ext,dl_ch1p,6*sizeof(int32_t)); memcpy(rxF_ext,rxF,6*sizeof(int32_t)); - /* +#ifdef DEBUG_DLSCH_DEMOD for (i=0; i<6; i++) { printf("extract rb %d, re %d => (%d,%d)\n",prb,i,*(short *)&rxF_ext[i],*(1+(short*)&rxF_ext[i])); - }*/ + } +#endif rxF_ext+=6; dl_ch0_ext+=6; dl_ch1_ext+=6; dl_ch0p+=6; dl_ch1p+=6; - rxF = &rxdataF[aarx][((symbol*(frame_parms->ofdm_symbol_size)))]; + rxF = &rxdataF[aarx][1+((symbol*(frame_parms->ofdm_symbol_size)))]; memcpy(dl_ch0_ext,dl_ch0p,6*sizeof(int32_t)); memcpy(dl_ch1_ext,dl_ch1p,6*sizeof(int32_t)); memcpy(rxF_ext,rxF,6*sizeof(int32_t)); - /*for (i=0; i<6; i++) { +#ifdef DEBUG_DLSCH_DEMOD + for (i=0; i<6; i++) { printf("extract rb %d, re %d => (%d,%d)\n",prb,i,*(short *)&rxF_ext[i],*(1+(short*)&rxF_ext[i])); - }*/ + } +#endif rxF_ext+=6; dl_ch0_ext+=6; dl_ch1_ext+=6; @@ -4129,18 +4269,22 @@ unsigned short dlsch_extract_rbs_dual(int **rxdataF, dl_ch0_ext[j]=dl_ch0p[i]; dl_ch1_ext[j]=dl_ch1p[i]; rxF_ext[j++]=rxF[i]; - //printf("(pilots)extract rb %d, re %d => (%d,%d)\n",prb,i,*(short *)&rxF[i],*(1+(short*)&rxF[i])); +#ifdef DEBUG_DLSCH_DEMOD + printf("(pilots)extract rb %d, re %d (%d) => (%d,%d)\n",prb,i,j,*(short *)&rxF[i],*(1+(short*)&rxF[i])); +#endif } } - rxF = &rxdataF[aarx][symbol*(frame_parms->ofdm_symbol_size)]; + rxF = &rxdataF[aarx][1+symbol*(frame_parms->ofdm_symbol_size)]; for (; i<12; i++) { if ((i!=((frame_parms->nushift+6)%12)) && (i!=((frame_parms->nushift+9)%12))) { dl_ch0_ext[j]=dl_ch0p[i]; dl_ch1_ext[j]=dl_ch1p[i]; - rxF_ext[j++]=rxF[(1+i-6)]; - //printf("(pilots)extract rb %d, re %d => (%d,%d)\n",prb,i,*(short *)&rxF[1+i-6],*(1+(short*)&rxF[1+i-6])); + rxF_ext[j++]=rxF[i-6]; +#ifdef DEBUG_DLSCH_DEMOD + printf("(pilots)extract rb %d, re %d (%d) => (%d,%d)\n",prb,i,j,*(short *)&rxF[1+i-6],*(1+(short*)&rxF[1+i-6])); +#endif } } @@ -4148,7 +4292,6 @@ unsigned short dlsch_extract_rbs_dual(int **rxdataF, dl_ch1_ext+=8; rxF_ext+=8; } //pilots==1 - nb_rb++; } // if Middle PRB } // if odd PRB } // if rballoc==1 @@ -4980,7 +5123,7 @@ void dump_dlsch2(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint16_t coded_bits_per #endif #ifdef DEBUG_DLSCH_DEMOD - +/* void print_bytes(char *s,__m128i *x) { @@ -5018,5 +5161,5 @@ void print_ints(char *s,__m128i *x) printf("%s : %d,%d,%d,%d\n",s, tempb[0],tempb[1],tempb[2],tempb[3]); -} +}*/ #endif diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_llr_computation.c b/openair1/PHY/LTE_TRANSPORT/dlsch_llr_computation.c index bf81aaafa9..9febcdf729 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_llr_computation.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_llr_computation.c @@ -22,7 +22,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE @@ -675,9 +675,10 @@ int dlsch_qpsk_llr(LTE_DL_FRAME_PARMS *frame_parms, len = (nb_rb*12) - pbch_pss_sss_adjust; } -// printf("dlsch_qpsk_llr: symbol %d,nb_rb %d, len %d,pbch_pss_sss_adjust %d\n",symbol,nb_rb,len,pbch_pss_sss_adjust); + // printf("dlsch_qpsk_llr: symbol %d,nb_rb %d, len %d,pbch_pss_sss_adjust %d\n",symbol,nb_rb,len,pbch_pss_sss_adjust); for (i=0; i. - - 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 - -*******************************************************************************/ /***************************************************************************** diff --git a/openair2/COMMON/commonDef.h b/openair2/COMMON/commonDef.h index 47fef519b5..e33e64ec06 100644 --- a/openair2/COMMON/commonDef.h +++ b/openair2/COMMON/commonDef.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - -*******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ /* Source commonDef.h diff --git a/openair2/COMMON/gtpv1_u_messages_def.h b/openair2/COMMON/gtpv1_u_messages_def.h index 3ec9be54e3..0e93a917ab 100755 --- a/openair2/COMMON/gtpv1_u_messages_def.h +++ b/openair2/COMMON/gtpv1_u_messages_def.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/COMMON/gtpv1_u_messages_types.h b/openair2/COMMON/gtpv1_u_messages_types.h index 9c385ae3f6..2a6dd1bf2c 100755 --- a/openair2/COMMON/gtpv1_u_messages_types.h +++ b/openair2/COMMON/gtpv1_u_messages_types.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/COMMON/intertask_interface_conf.h b/openair2/COMMON/intertask_interface_conf.h index 3d20c317bd..9d6a7f9d99 100644 --- a/openair2/COMMON/intertask_interface_conf.h +++ b/openair2/COMMON/intertask_interface_conf.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/COMMON/mac_messages_def.h b/openair2/COMMON/mac_messages_def.h index 2854517a7c..64aca9911c 100644 --- a/openair2/COMMON/mac_messages_def.h +++ b/openair2/COMMON/mac_messages_def.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/COMMON/mac_messages_types.h b/openair2/COMMON/mac_messages_types.h index e0eb258104..ecc8c67533 100644 --- a/openair2/COMMON/mac_messages_types.h +++ b/openair2/COMMON/mac_messages_types.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/COMMON/mac_primitives.h b/openair2/COMMON/mac_primitives.h index df5c488b70..a8fc149f47 100644 --- a/openair2/COMMON/mac_primitives.h +++ b/openair2/COMMON/mac_primitives.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/COMMON/mac_rlc_primitives.h b/openair2/COMMON/mac_rlc_primitives.h index 602062977d..62913bd842 100644 --- a/openair2/COMMON/mac_rlc_primitives.h +++ b/openair2/COMMON/mac_rlc_primitives.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/COMMON/mac_rrc_primitives.h b/openair2/COMMON/mac_rrc_primitives.h index 72c77b3434..b7f1450909 100644 --- a/openair2/COMMON/mac_rrc_primitives.h +++ b/openair2/COMMON/mac_rrc_primitives.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/COMMON/messages_def.h b/openair2/COMMON/messages_def.h index 86297be314..246aa855ec 100644 --- a/openair2/COMMON/messages_def.h +++ b/openair2/COMMON/messages_def.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/COMMON/messages_types.h b/openair2/COMMON/messages_types.h index 669c2e935a..b1ff6c3b18 100644 --- a/openair2/COMMON/messages_types.h +++ b/openair2/COMMON/messages_types.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/COMMON/nas_messages_def.h b/openair2/COMMON/nas_messages_def.h index f18453991e..0e70564aa9 100644 --- a/openair2/COMMON/nas_messages_def.h +++ b/openair2/COMMON/nas_messages_def.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/COMMON/nas_messages_types.h b/openair2/COMMON/nas_messages_types.h index 4f6159c094..2251444a01 100644 --- a/openair2/COMMON/nas_messages_types.h +++ b/openair2/COMMON/nas_messages_types.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/COMMON/networkDef.h b/openair2/COMMON/networkDef.h index 2eb376a9c7..46716bee24 100644 --- a/openair2/COMMON/networkDef.h +++ b/openair2/COMMON/networkDef.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - -*******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ /***************************************************************************** diff --git a/openair2/COMMON/openair_defs.h b/openair2/COMMON/openair_defs.h index da0db25d2a..0a6b88ce33 100755 --- a/openair2/COMMON/openair_defs.h +++ b/openair2/COMMON/openair_defs.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/COMMON/openair_types.h b/openair2/COMMON/openair_types.h index 502af95de9..47f217038d 100755 --- a/openair2/COMMON/openair_types.h +++ b/openair2/COMMON/openair_types.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/COMMON/pdcp_messages_def.h b/openair2/COMMON/pdcp_messages_def.h index a6e032a0d7..28cda8bc1b 100644 --- a/openair2/COMMON/pdcp_messages_def.h +++ b/openair2/COMMON/pdcp_messages_def.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/COMMON/pdcp_messages_types.h b/openair2/COMMON/pdcp_messages_types.h index 4eb6063a5e..fc239f529f 100644 --- a/openair2/COMMON/pdcp_messages_types.h +++ b/openair2/COMMON/pdcp_messages_types.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/COMMON/phy_messages_def.h b/openair2/COMMON/phy_messages_def.h index 80464299ce..bc63c28ac3 100644 --- a/openair2/COMMON/phy_messages_def.h +++ b/openair2/COMMON/phy_messages_def.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/COMMON/phy_messages_types.h b/openair2/COMMON/phy_messages_types.h index 6dd647a17c..b8ef212f31 100644 --- a/openair2/COMMON/phy_messages_types.h +++ b/openair2/COMMON/phy_messages_types.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/COMMON/platform_constants.h b/openair2/COMMON/platform_constants.h index e7f0b7bcb7..ed052fc608 100755 --- a/openair2/COMMON/platform_constants.h +++ b/openair2/COMMON/platform_constants.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/COMMON/platform_types.h b/openair2/COMMON/platform_types.h index 7b1c02c2e7..a1af19fd0a 100755 --- a/openair2/COMMON/platform_types.h +++ b/openair2/COMMON/platform_types.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/COMMON/ral_messages_def.h b/openair2/COMMON/ral_messages_def.h index 96543e6ad8..59719663fe 100755 --- a/openair2/COMMON/ral_messages_def.h +++ b/openair2/COMMON/ral_messages_def.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/COMMON/ral_messages_types.h b/openair2/COMMON/ral_messages_types.h index 5b54a03d77..234304004d 100755 --- a/openair2/COMMON/ral_messages_types.h +++ b/openair2/COMMON/ral_messages_types.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/COMMON/rlc_messages_def.h b/openair2/COMMON/rlc_messages_def.h index aed4022856..990648eff6 100755 --- a/openair2/COMMON/rlc_messages_def.h +++ b/openair2/COMMON/rlc_messages_def.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/COMMON/rlc_messages_types.h b/openair2/COMMON/rlc_messages_types.h index 2918675fa1..1399dadade 100755 --- a/openair2/COMMON/rlc_messages_types.h +++ b/openair2/COMMON/rlc_messages_types.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/COMMON/rrc_messages_def.h b/openair2/COMMON/rrc_messages_def.h index 76073933fb..27d3a6bdd4 100644 --- a/openair2/COMMON/rrc_messages_def.h +++ b/openair2/COMMON/rrc_messages_def.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/COMMON/rrc_messages_types.h b/openair2/COMMON/rrc_messages_types.h index 2d6f3cdb86..816b936895 100644 --- a/openair2/COMMON/rrc_messages_types.h +++ b/openair2/COMMON/rrc_messages_types.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/COMMON/rrm_config_structs.h b/openair2/COMMON/rrm_config_structs.h index 9fa74dd14e..55443f497e 100755 --- a/openair2/COMMON/rrm_config_structs.h +++ b/openair2/COMMON/rrm_config_structs.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/COMMON/rrm_constants.h b/openair2/COMMON/rrm_constants.h index 25c584711c..e12608feb2 100755 --- a/openair2/COMMON/rrm_constants.h +++ b/openair2/COMMON/rrm_constants.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/COMMON/rtos_header.h b/openair2/COMMON/rtos_header.h index 92ed57e822..ea2783ee6f 100755 --- a/openair2/COMMON/rtos_header.h +++ b/openair2/COMMON/rtos_header.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/COMMON/s1ap_messages_def.h b/openair2/COMMON/s1ap_messages_def.h index ae81968018..ce51ac78ca 100644 --- a/openair2/COMMON/s1ap_messages_def.h +++ b/openair2/COMMON/s1ap_messages_def.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/COMMON/s1ap_messages_types.h b/openair2/COMMON/s1ap_messages_types.h index 7849e418d1..c39725b737 100644 --- a/openair2/COMMON/s1ap_messages_types.h +++ b/openair2/COMMON/s1ap_messages_types.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/COMMON/sctp_messages_def.h b/openair2/COMMON/sctp_messages_def.h index d3273ba03d..8053f47ec9 100644 --- a/openair2/COMMON/sctp_messages_def.h +++ b/openair2/COMMON/sctp_messages_def.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/COMMON/sctp_messages_types.h b/openair2/COMMON/sctp_messages_types.h index 0b365bd38b..490e39a8c7 100644 --- a/openair2/COMMON/sctp_messages_types.h +++ b/openair2/COMMON/sctp_messages_types.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/COMMON/tasks_def.h b/openair2/COMMON/tasks_def.h index 1da78c6131..5e0f8bd211 100644 --- a/openair2/COMMON/tasks_def.h +++ b/openair2/COMMON/tasks_def.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/COMMON/udp_messages_def.h b/openair2/COMMON/udp_messages_def.h index 43dc61f94f..a6341ec880 100755 --- a/openair2/COMMON/udp_messages_def.h +++ b/openair2/COMMON/udp_messages_def.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/COMMON/udp_messages_types.h b/openair2/COMMON/udp_messages_types.h index fe3ebbafd7..9491fab65f 100755 --- a/openair2/COMMON/udp_messages_types.h +++ b/openair2/COMMON/udp_messages_types.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/COMMON/x2ap_messages_def.h b/openair2/COMMON/x2ap_messages_def.h index 8518adcc8e..4e5bef69d5 100644 --- a/openair2/COMMON/x2ap_messages_def.h +++ b/openair2/COMMON/x2ap_messages_def.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/COMMON/x2ap_messages_types.h b/openair2/COMMON/x2ap_messages_types.h index 0e936c98cb..4e22149f3b 100644 --- a/openair2/COMMON/x2ap_messages_types.h +++ b/openair2/COMMON/x2ap_messages_types.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/ENB_APP/enb_app.c b/openair2/ENB_APP/enb_app.c index 4c55b05070..70fb5ad61f 100644 --- a/openair2/ENB_APP/enb_app.c +++ b/openair2/ENB_APP/enb_app.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/ENB_APP/enb_app.h b/openair2/ENB_APP/enb_app.h index 78580e27bf..30e3373eac 100644 --- a/openair2/ENB_APP/enb_app.h +++ b/openair2/ENB_APP/enb_app.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/ENB_APP/enb_config.c b/openair2/ENB_APP/enb_config.c index b5eeb63e09..07e0ffa640 100755 --- a/openair2/ENB_APP/enb_config.c +++ b/openair2/ENB_APP/enb_config.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/ENB_APP/enb_config.h b/openair2/ENB_APP/enb_config.h index 0fb82dcde3..113681dafe 100755 --- a/openair2/ENB_APP/enb_config.h +++ b/openair2/ENB_APP/enb_config.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/MAC/config.c b/openair2/LAYER2/MAC/config.c index b19e7f72e8..e3f6d8e78c 100644 --- a/openair2/LAYER2/MAC/config.c +++ b/openair2/LAYER2/MAC/config.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/MAC/defs.h b/openair2/LAYER2/MAC/defs.h index c5c4156c00..a0a43b6d79 100644 --- a/openair2/LAYER2/MAC/defs.h +++ b/openair2/LAYER2/MAC/defs.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/MAC/eNB_scheduler.c b/openair2/LAYER2/MAC/eNB_scheduler.c index 041cabb686..329c40be05 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler.c +++ b/openair2/LAYER2/MAC/eNB_scheduler.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/MAC/eNB_scheduler_RA.c b/openair2/LAYER2/MAC/eNB_scheduler_RA.c index bdcbae6b7f..361c0f461f 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_RA.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_RA.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair2/LAYER2/MAC/eNB_scheduler_bch.c b/openair2/LAYER2/MAC/eNB_scheduler_bch.c index 963942d7dc..dd0890783e 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_bch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_bch.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c index e8738f9be0..52e0f60d65 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/MAC/eNB_scheduler_mch.c b/openair2/LAYER2/MAC/eNB_scheduler_mch.c index ce3386b2cd..e894f3a662 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_mch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_mch.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/MAC/eNB_scheduler_primitives.c b/openair2/LAYER2/MAC/eNB_scheduler_primitives.c index d5415e0413..34169d902e 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_primitives.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_primitives.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c index 8b79090f3d..1018c6e7d8 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/MAC/extern.h b/openair2/LAYER2/MAC/extern.h index f29fefbea7..ca847acf4c 100644 --- a/openair2/LAYER2/MAC/extern.h +++ b/openair2/LAYER2/MAC/extern.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/MAC/l1_helpers.c b/openair2/LAYER2/MAC/l1_helpers.c index 89314b8200..3b4c78ea92 100644 --- a/openair2/LAYER2/MAC/l1_helpers.c +++ b/openair2/LAYER2/MAC/l1_helpers.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/MAC/lte_transport_init.c b/openair2/LAYER2/MAC/lte_transport_init.c index 47493f5086..fa446a4aee 100755 --- a/openair2/LAYER2/MAC/lte_transport_init.c +++ b/openair2/LAYER2/MAC/lte_transport_init.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/MAC/main.c b/openair2/LAYER2/MAC/main.c index 8a73c9298f..5db78a30c2 100644 --- a/openair2/LAYER2/MAC/main.c +++ b/openair2/LAYER2/MAC/main.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/MAC/openair2_proc.c b/openair2/LAYER2/MAC/openair2_proc.c index 5e0b8d5c02..bb4a994a8a 100644 --- a/openair2/LAYER2/MAC/openair2_proc.c +++ b/openair2/LAYER2/MAC/openair2_proc.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/MAC/pre_processor.c b/openair2/LAYER2/MAC/pre_processor.c index e4f113c77a..5a4caf82c4 100644 --- a/openair2/LAYER2/MAC/pre_processor.c +++ b/openair2/LAYER2/MAC/pre_processor.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/MAC/proto.h b/openair2/LAYER2/MAC/proto.h index 331d635371..d02e42ee16 100644 --- a/openair2/LAYER2/MAC/proto.h +++ b/openair2/LAYER2/MAC/proto.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/MAC/ra_procedures.c b/openair2/LAYER2/MAC/ra_procedures.c index 6f61f22848..43ec8b05ec 100644 --- a/openair2/LAYER2/MAC/ra_procedures.c +++ b/openair2/LAYER2/MAC/ra_procedures.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/MAC/rar_tools.c b/openair2/LAYER2/MAC/rar_tools.c index acf284bd37..2e97f83fac 100644 --- a/openair2/LAYER2/MAC/rar_tools.c +++ b/openair2/LAYER2/MAC/rar_tools.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/MAC/ue_procedures.c b/openair2/LAYER2/MAC/ue_procedures.c index 0a474d14b8..ee6340cb43 100644 --- a/openair2/LAYER2/MAC/ue_procedures.c +++ b/openair2/LAYER2/MAC/ue_procedures.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/MAC/vars.h b/openair2/LAYER2/MAC/vars.h index 60023bbae2..88da64de5a 100644 --- a/openair2/LAYER2/MAC/vars.h +++ b/openair2/LAYER2/MAC/vars.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c index df27aa2ee0..f25e921570 100755 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp.h b/openair2/LAYER2/PDCP_v10.1.0/pdcp.h index ee1ef82c93..9e5b15f5a3 100755 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp.h +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp_control_primitive.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp_control_primitive.c index facb9c8844..e858008803 100755 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp_control_primitive.c +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp_control_primitive.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp_control_primitives_proto_extern.h b/openair2/LAYER2/PDCP_v10.1.0/pdcp_control_primitives_proto_extern.h index 84d3e9cea5..90c4805dde 100755 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp_control_primitives_proto_extern.h +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp_control_primitives_proto_extern.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c index 785a287d58..787d463b32 100755 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp_netlink.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp_netlink.c index 524dd2022b..365013c42d 100644 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp_netlink.c +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp_netlink.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp_primitives.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp_primitives.c index 7ecf483332..fb530f686a 100755 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp_primitives.c +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp_primitives.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp_primitives.h b/openair2/LAYER2/PDCP_v10.1.0/pdcp_primitives.h index 185b50f866..1913fd69f1 100755 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp_primitives.h +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp_primitives.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp_proto_extern.h b/openair2/LAYER2/PDCP_v10.1.0/pdcp_proto_extern.h index e7ed7dde9b..3b83140af2 100755 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp_proto_extern.h +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp_proto_extern.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp_security.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp_security.c index 131f56b968..15a1cf57d2 100644 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp_security.c +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp_security.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp_sequence_manager.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp_sequence_manager.c index fcfcfb58ae..9615726bc0 100755 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp_sequence_manager.c +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp_sequence_manager.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp_sequence_manager.h b/openair2/LAYER2/PDCP_v10.1.0/pdcp_sequence_manager.h index a17d9ecc6c..1766613e1f 100644 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp_sequence_manager.h +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp_sequence_manager.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp_thread.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp_thread.c index 4f0d11e235..8786a91690 100644 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp_thread.c +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp_thread.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp_util.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp_util.c index 0790244fbb..ef2cf1afaf 100644 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp_util.c +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp_util.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp_util.h b/openair2/LAYER2/PDCP_v10.1.0/pdcp_util.h index f5a7141a33..41f73a7045 100644 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp_util.h +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp_util.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.c b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.c index e8dcae6762..ec303172b0 100755 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.c +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.h b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.h index 0e944d76bc..70cbb3b12e 100755 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.h +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_constants.h b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_constants.h index 63cc6d8e9e..3bc97ee650 100755 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_constants.h +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_constants.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_entity.h b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_entity.h index ea661b3881..15bba038ea 100755 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_entity.h +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_entity.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_in_sdu.c b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_in_sdu.c index 5d981b417a..8bffde184e 100755 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_in_sdu.c +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_in_sdu.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_in_sdu.h b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_in_sdu.h index 19cc5c2a8e..111de0416e 100755 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_in_sdu.h +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_in_sdu.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_init.c b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_init.c index ade7becaf1..eb2d0c5aca 100755 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_init.c +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_init.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_init.h b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_init.h index e9633213a7..ed2f7f2936 100755 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_init.h +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_init.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_proto_extern.h b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_proto_extern.h index f6edc6bb34..7f3cc6e31f 100755 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_proto_extern.h +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_proto_extern.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_reassembly.c b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_reassembly.c index badbd0d71b..2581437f91 100755 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_reassembly.c +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_reassembly.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_reassembly.h b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_reassembly.h index d4cb8a4373..c5fbc9edea 100755 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_reassembly.h +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_reassembly.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_receiver.c b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_receiver.c index e85f627a4b..f41b96653c 100755 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_receiver.c +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_receiver.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_receiver.h b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_receiver.h index 18a3423564..66e492649d 100755 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_receiver.h +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_receiver.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_retransmit.c b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_retransmit.c index ec0da054c8..9c318a0346 100755 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_retransmit.c +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_retransmit.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_retransmit.h b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_retransmit.h index e1d01d180c..aa6c4b878d 100755 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_retransmit.h +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_retransmit.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_rx_list.c b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_rx_list.c index 4a96a25306..a580181f6e 100755 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_rx_list.c +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_rx_list.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_rx_list.h b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_rx_list.h index 2f57c3859e..6c6bb0e6c6 100755 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_rx_list.h +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_rx_list.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_segment.c b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_segment.c index d5c53c3b6b..e2dda28f95 100755 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_segment.c +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_segment.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_segment.h b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_segment.h index 99de4b1f76..eba9dd6455 100755 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_segment.h +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_segment.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_segments_holes.c b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_segments_holes.c index cb00704175..59f5180e2c 100755 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_segments_holes.c +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_segments_holes.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_segments_holes.h b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_segments_holes.h index 5b83dfebfd..db171d3e3e 100755 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_segments_holes.h +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_segments_holes.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_status_report.c b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_status_report.c index 84d86c1a91..9c46297ad6 100755 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_status_report.c +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_status_report.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_status_report.h b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_status_report.h index 85bdd196b7..6a44401701 100755 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_status_report.h +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_status_report.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_structs.h b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_structs.h index d887168fb8..738952d3c6 100755 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_structs.h +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_structs.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_test.c b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_test.c index a174b7fa93..13f96e1f3f 100755 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_test.c +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_test.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_test.h b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_test.h index 3e77bacca2..a78a391869 100755 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_test.h +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_test.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_poll_retransmit.c b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_poll_retransmit.c index a30590bb83..746bde2659 100755 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_poll_retransmit.c +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_poll_retransmit.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_poll_retransmit.h b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_poll_retransmit.h index 079a0f4565..2ef993e9ee 100755 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_poll_retransmit.h +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_poll_retransmit.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_reordering.c b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_reordering.c index f15ae8132f..a05700abc1 100755 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_reordering.c +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_reordering.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_reordering.h b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_reordering.h index 35f79e8637..11bcc92b09 100755 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_reordering.h +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_reordering.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_status_prohibit.c b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_status_prohibit.c index cd04c185a3..716e592ce7 100755 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_status_prohibit.c +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_status_prohibit.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_status_prohibit.h b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_status_prohibit.h index cf6ffc06bc..3881085b0e 100755 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_status_prohibit.h +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_status_prohibit.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_windows.c b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_windows.c index 5255ef8b35..89a6657d62 100755 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_windows.c +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_windows.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_windows.h b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_windows.h index d7716777cf..a9a306cad3 100755 --- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_windows.h +++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_windows.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm.c b/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm.c index c0bb945d18..9f57a6a0cd 100755 --- a/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm.c +++ b/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm.h b/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm.h index a55971ae9b..d772d1d4be 100755 --- a/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm.h +++ b/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm_entity.h b/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm_entity.h index 2e9e8820c2..fa716f81be 100755 --- a/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm_entity.h +++ b/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm_entity.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm_init.c b/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm_init.c index 4a5a4dd259..6b1b487286 100755 --- a/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm_init.c +++ b/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm_init.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm_init.h b/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm_init.h index b4f9d0bcbc..48322c98b8 100755 --- a/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm_init.h +++ b/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm_init.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm_structs.h b/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm_structs.h index 32ed6980b1..e59d2972bc 100755 --- a/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm_structs.h +++ b/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm_structs.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um.c b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um.c index 834e45e7d7..8aab33f54c 100755 --- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um.c +++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um.h b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um.h index d9b5012766..2289ed639c 100644 --- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um.h +++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_constants.h b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_constants.h index afafa734e2..d25a394e8b 100755 --- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_constants.h +++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_constants.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_control_primitives.c b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_control_primitives.c index 8e735ca5f3..a91e384a55 100755 --- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_control_primitives.c +++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_control_primitives.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_control_primitives.h b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_control_primitives.h index 98f4b0d4e2..b9a5166ed2 100644 --- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_control_primitives.h +++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_control_primitives.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_dar.c b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_dar.c index b78feb66e0..b2930e6296 100644 --- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_dar.c +++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_dar.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_dar.h b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_dar.h index b31d803c64..dce80d2d98 100644 --- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_dar.h +++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_dar.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_entity.h b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_entity.h index 8aed136494..07fb15bfef 100755 --- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_entity.h +++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_entity.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_fsm.c b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_fsm.c index ab7b3a8497..27b35de67d 100755 --- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_fsm.c +++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_fsm.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_fsm.h b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_fsm.h index 04e3a09499..645311f451 100644 --- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_fsm.h +++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_fsm.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_reassembly.c b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_reassembly.c index 5dfd7c47f3..24c0ee8291 100755 --- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_reassembly.c +++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_reassembly.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_reassembly.h b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_reassembly.h index 7a2c13e5e4..adba9c133c 100644 --- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_reassembly.h +++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_reassembly.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_receiver.c b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_receiver.c index 0cbd74fbf4..085f37e4c1 100755 --- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_receiver.c +++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_receiver.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_receiver.h b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_receiver.h index 560957a50f..b230a6cb40 100644 --- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_receiver.h +++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_receiver.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_segment.c b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_segment.c index e57ae55eec..a31f990916 100755 --- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_segment.c +++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_segment.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_segment.h b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_segment.h index ec9d72851c..45c8b3d16d 100644 --- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_segment.h +++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_segment.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_structs.h b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_structs.h index 3d518861ce..535998bfd1 100755 --- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_structs.h +++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_structs.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_test.c b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_test.c index aaa4c80e55..04afcff0ff 100755 --- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_test.c +++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_test.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_test.h b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_test.h index 185ba9886d..ae64c28278 100755 --- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_test.h +++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_test.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_very_simple_test.c b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_very_simple_test.c index 7fea51ff72..139490a680 100644 --- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_very_simple_test.c +++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_very_simple_test.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_very_simple_test.h b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_very_simple_test.h index 407d0d76b6..790dc1ee50 100644 --- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_very_simple_test.h +++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_very_simple_test.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/rlc.c b/openair2/LAYER2/RLC/rlc.c index 67c8803c93..e19c6b0b0a 100644 --- a/openair2/LAYER2/RLC/rlc.c +++ b/openair2/LAYER2/RLC/rlc.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/rlc.h b/openair2/LAYER2/RLC/rlc.h index 627d48c311..392ae88cf8 100755 --- a/openair2/LAYER2/RLC/rlc.h +++ b/openair2/LAYER2/RLC/rlc.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/rlc_def.h b/openair2/LAYER2/RLC/rlc_def.h index c0c56299a9..1205ad2891 100755 --- a/openair2/LAYER2/RLC/rlc_def.h +++ b/openair2/LAYER2/RLC/rlc_def.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/rlc_def_lte.h b/openair2/LAYER2/RLC/rlc_def_lte.h index ee7859e03c..01bf2ac486 100644 --- a/openair2/LAYER2/RLC/rlc_def_lte.h +++ b/openair2/LAYER2/RLC/rlc_def_lte.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/rlc_mac.c b/openair2/LAYER2/RLC/rlc_mac.c index 83ef0716ea..73f323f14b 100644 --- a/openair2/LAYER2/RLC/rlc_mac.c +++ b/openair2/LAYER2/RLC/rlc_mac.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/rlc_mpls.c b/openair2/LAYER2/RLC/rlc_mpls.c index a8d875984c..263b92b063 100644 --- a/openair2/LAYER2/RLC/rlc_mpls.c +++ b/openair2/LAYER2/RLC/rlc_mpls.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/rlc_primitives.h b/openair2/LAYER2/RLC/rlc_primitives.h index 40fa39aedd..d77d131345 100755 --- a/openair2/LAYER2/RLC/rlc_primitives.h +++ b/openair2/LAYER2/RLC/rlc_primitives.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/RLC/rlc_rrc.c b/openair2/LAYER2/RLC/rlc_rrc.c index a2be5cc3cd..05ad79d7d4 100644 --- a/openair2/LAYER2/RLC/rlc_rrc.c +++ b/openair2/LAYER2/RLC/rlc_rrc.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/layer2_top.c b/openair2/LAYER2/layer2_top.c index 9acfb1ed94..4cd1f50d03 100644 --- a/openair2/LAYER2/layer2_top.c +++ b/openair2/LAYER2/layer2_top.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/openair2_proc.c b/openair2/LAYER2/openair2_proc.c index 83441d7cb7..35684d239a 100644 --- a/openair2/LAYER2/openair2_proc.c +++ b/openair2/LAYER2/openair2_proc.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/register.c b/openair2/LAYER2/register.c index 02b299d2cc..ac93364452 100644 --- a/openair2/LAYER2/register.c +++ b/openair2/LAYER2/register.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/LAYER2/register.h b/openair2/LAYER2/register.h index 84113a37c5..09c464ae56 100644 --- a/openair2/LAYER2/register.h +++ b/openair2/LAYER2/register.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/Makefile b/openair2/Makefile index 19ce431a2e..799fde93c0 100755 --- a/openair2/Makefile +++ b/openair2/Makefile @@ -21,7 +21,7 @@ # Contact Information # OpenAirInterface Admin: openair_admin@eurecom.fr # OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr +# OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr # # Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE # diff --git a/openair2/NAS/nas_ue_task.h b/openair2/NAS/nas_ue_task.h index 99410fb335..6695ab0ac5 100644 --- a/openair2/NAS/nas_ue_task.h +++ b/openair2/NAS/nas_ue_task.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/NETWORK_DRIVER/LITE/RB_TOOL/rb_tool.c b/openair2/NETWORK_DRIVER/LITE/RB_TOOL/rb_tool.c index 4026f024ed..43b8ec3614 100755 --- a/openair2/NETWORK_DRIVER/LITE/RB_TOOL/rb_tool.c +++ b/openair2/NETWORK_DRIVER/LITE/RB_TOOL/rb_tool.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/NETWORK_DRIVER/LITE/classifier.c b/openair2/NETWORK_DRIVER/LITE/classifier.c index 5db3ded758..4025e28e19 100755 --- a/openair2/NETWORK_DRIVER/LITE/classifier.c +++ b/openair2/NETWORK_DRIVER/LITE/classifier.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/NETWORK_DRIVER/LITE/common.c b/openair2/NETWORK_DRIVER/LITE/common.c index c428d760db..7aca4b8d5f 100755 --- a/openair2/NETWORK_DRIVER/LITE/common.c +++ b/openair2/NETWORK_DRIVER/LITE/common.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/NETWORK_DRIVER/LITE/constant.h b/openair2/NETWORK_DRIVER/LITE/constant.h index 4bed95b08f..82cef8e8c1 100755 --- a/openair2/NETWORK_DRIVER/LITE/constant.h +++ b/openair2/NETWORK_DRIVER/LITE/constant.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/NETWORK_DRIVER/LITE/device.c b/openair2/NETWORK_DRIVER/LITE/device.c index 0ccba3e6ba..9b772d6eef 100755 --- a/openair2/NETWORK_DRIVER/LITE/device.c +++ b/openair2/NETWORK_DRIVER/LITE/device.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/NETWORK_DRIVER/LITE/ioctl.c b/openair2/NETWORK_DRIVER/LITE/ioctl.c index df2d74f53a..ad3a4eefac 100755 --- a/openair2/NETWORK_DRIVER/LITE/ioctl.c +++ b/openair2/NETWORK_DRIVER/LITE/ioctl.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/NETWORK_DRIVER/LITE/ioctl.h b/openair2/NETWORK_DRIVER/LITE/ioctl.h index 578792e5ab..3b5d55823a 100755 --- a/openair2/NETWORK_DRIVER/LITE/ioctl.h +++ b/openair2/NETWORK_DRIVER/LITE/ioctl.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/NETWORK_DRIVER/LITE/local.h b/openair2/NETWORK_DRIVER/LITE/local.h index 7d13063555..7268f69b5d 100755 --- a/openair2/NETWORK_DRIVER/LITE/local.h +++ b/openair2/NETWORK_DRIVER/LITE/local.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/NETWORK_DRIVER/LITE/netlink.c b/openair2/NETWORK_DRIVER/LITE/netlink.c index bf8030f667..2339540cae 100755 --- a/openair2/NETWORK_DRIVER/LITE/netlink.c +++ b/openair2/NETWORK_DRIVER/LITE/netlink.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/NETWORK_DRIVER/LITE/proto_extern.h b/openair2/NETWORK_DRIVER/LITE/proto_extern.h index 16d4e14401..36039ed984 100755 --- a/openair2/NETWORK_DRIVER/LITE/proto_extern.h +++ b/openair2/NETWORK_DRIVER/LITE/proto_extern.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/NETWORK_DRIVER/LITE/sap.h b/openair2/NETWORK_DRIVER/LITE/sap.h index 00aed03764..ffe778fe34 100755 --- a/openair2/NETWORK_DRIVER/LITE/sap.h +++ b/openair2/NETWORK_DRIVER/LITE/sap.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/NETWORK_DRIVER/LITE/tool.c b/openair2/NETWORK_DRIVER/LITE/tool.c index 37910bc6c2..492d674c06 100755 --- a/openair2/NETWORK_DRIVER/LITE/tool.c +++ b/openair2/NETWORK_DRIVER/LITE/tool.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/NETWORK_DRIVER/MESH/RB_TOOL/rb_tool.c b/openair2/NETWORK_DRIVER/MESH/RB_TOOL/rb_tool.c index 0c0107a37e..fb005b3589 100644 --- a/openair2/NETWORK_DRIVER/MESH/RB_TOOL/rb_tool.c +++ b/openair2/NETWORK_DRIVER/MESH/RB_TOOL/rb_tool.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/NETWORK_DRIVER/MESH/classifier.c b/openair2/NETWORK_DRIVER/MESH/classifier.c index 7c6ab220ef..2c55c0ca79 100755 --- a/openair2/NETWORK_DRIVER/MESH/classifier.c +++ b/openair2/NETWORK_DRIVER/MESH/classifier.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/NETWORK_DRIVER/MESH/common.c b/openair2/NETWORK_DRIVER/MESH/common.c index fa29b91955..37862046c9 100755 --- a/openair2/NETWORK_DRIVER/MESH/common.c +++ b/openair2/NETWORK_DRIVER/MESH/common.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/NETWORK_DRIVER/MESH/constant.h b/openair2/NETWORK_DRIVER/MESH/constant.h index 4f05f77734..a6f053b658 100755 --- a/openair2/NETWORK_DRIVER/MESH/constant.h +++ b/openair2/NETWORK_DRIVER/MESH/constant.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/NETWORK_DRIVER/MESH/device.c b/openair2/NETWORK_DRIVER/MESH/device.c index c7492064db..51b71d6d8e 100755 --- a/openair2/NETWORK_DRIVER/MESH/device.c +++ b/openair2/NETWORK_DRIVER/MESH/device.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/NETWORK_DRIVER/MESH/ioctl.c b/openair2/NETWORK_DRIVER/MESH/ioctl.c index 08e445ef6c..89f63ece77 100755 --- a/openair2/NETWORK_DRIVER/MESH/ioctl.c +++ b/openair2/NETWORK_DRIVER/MESH/ioctl.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/NETWORK_DRIVER/MESH/local.h b/openair2/NETWORK_DRIVER/MESH/local.h index 8539960470..1171eb3b5a 100755 --- a/openair2/NETWORK_DRIVER/MESH/local.h +++ b/openair2/NETWORK_DRIVER/MESH/local.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/NETWORK_DRIVER/MESH/mesh.c b/openair2/NETWORK_DRIVER/MESH/mesh.c index b53caf219e..9f49a4b4cd 100755 --- a/openair2/NETWORK_DRIVER/MESH/mesh.c +++ b/openair2/NETWORK_DRIVER/MESH/mesh.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/NETWORK_DRIVER/MESH/netlink.c b/openair2/NETWORK_DRIVER/MESH/netlink.c index ac6b9014cf..e8fd851c23 100644 --- a/openair2/NETWORK_DRIVER/MESH/netlink.c +++ b/openair2/NETWORK_DRIVER/MESH/netlink.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/NETWORK_DRIVER/MESH/proto_extern.h b/openair2/NETWORK_DRIVER/MESH/proto_extern.h index 7dd52c7682..ea46858445 100755 --- a/openair2/NETWORK_DRIVER/MESH/proto_extern.h +++ b/openair2/NETWORK_DRIVER/MESH/proto_extern.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/NETWORK_DRIVER/MESH/rrc_nas_primitives.h b/openair2/NETWORK_DRIVER/MESH/rrc_nas_primitives.h index 2900ac8be2..a1787b1df7 100755 --- a/openair2/NETWORK_DRIVER/MESH/rrc_nas_primitives.h +++ b/openair2/NETWORK_DRIVER/MESH/rrc_nas_primitives.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/NETWORK_DRIVER/MESH/sap.h b/openair2/NETWORK_DRIVER/MESH/sap.h index 7320f749df..4241744d86 100755 --- a/openair2/NETWORK_DRIVER/MESH/sap.h +++ b/openair2/NETWORK_DRIVER/MESH/sap.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/NETWORK_DRIVER/MESH/tool.c b/openair2/NETWORK_DRIVER/MESH/tool.c index 3b32535d24..54acd68ba7 100755 --- a/openair2/NETWORK_DRIVER/MESH/tool.c +++ b/openair2/NETWORK_DRIVER/MESH/tool.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/NETWORK_DRIVER/UE_IP/common.c b/openair2/NETWORK_DRIVER/UE_IP/common.c index 47d2786fa4..17ce737e6a 100755 --- a/openair2/NETWORK_DRIVER/UE_IP/common.c +++ b/openair2/NETWORK_DRIVER/UE_IP/common.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/NETWORK_DRIVER/UE_IP/constant.h b/openair2/NETWORK_DRIVER/UE_IP/constant.h index 2dfc810080..0345d2dfad 100755 --- a/openair2/NETWORK_DRIVER/UE_IP/constant.h +++ b/openair2/NETWORK_DRIVER/UE_IP/constant.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/NETWORK_DRIVER/UE_IP/device.c b/openair2/NETWORK_DRIVER/UE_IP/device.c index c02165174f..a0e32726d9 100755 --- a/openair2/NETWORK_DRIVER/UE_IP/device.c +++ b/openair2/NETWORK_DRIVER/UE_IP/device.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/NETWORK_DRIVER/UE_IP/local.h b/openair2/NETWORK_DRIVER/UE_IP/local.h index 5dd428c4cf..f00d26385d 100755 --- a/openair2/NETWORK_DRIVER/UE_IP/local.h +++ b/openair2/NETWORK_DRIVER/UE_IP/local.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/NETWORK_DRIVER/UE_IP/netlink.c b/openair2/NETWORK_DRIVER/UE_IP/netlink.c index a3efbb2140..17870218c9 100755 --- a/openair2/NETWORK_DRIVER/UE_IP/netlink.c +++ b/openair2/NETWORK_DRIVER/UE_IP/netlink.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/NETWORK_DRIVER/UE_IP/proto_extern.h b/openair2/NETWORK_DRIVER/UE_IP/proto_extern.h index 260af062f8..4eac01b680 100755 --- a/openair2/NETWORK_DRIVER/UE_IP/proto_extern.h +++ b/openair2/NETWORK_DRIVER/UE_IP/proto_extern.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/NETWORK_DRIVER/UE_IP/sap.h b/openair2/NETWORK_DRIVER/UE_IP/sap.h index 170ddf38c6..086390cdc4 100755 --- a/openair2/NETWORK_DRIVER/UE_IP/sap.h +++ b/openair2/NETWORK_DRIVER/UE_IP/sap.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/PHY_INTERFACE/defs.h b/openair2/PHY_INTERFACE/defs.h index a33e1586f3..20acba99e4 100755 --- a/openair2/PHY_INTERFACE/defs.h +++ b/openair2/PHY_INTERFACE/defs.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/PHY_INTERFACE/extern.h b/openair2/PHY_INTERFACE/extern.h index e90423be0e..b1700b7697 100644 --- a/openair2/PHY_INTERFACE/extern.h +++ b/openair2/PHY_INTERFACE/extern.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/PHY_INTERFACE/mac_phy_primitives.c b/openair2/PHY_INTERFACE/mac_phy_primitives.c index 0b7fecf66e..52b4a1b039 100644 --- a/openair2/PHY_INTERFACE/mac_phy_primitives.c +++ b/openair2/PHY_INTERFACE/mac_phy_primitives.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/PHY_INTERFACE/mac_phy_primitives.h b/openair2/PHY_INTERFACE/mac_phy_primitives.h index 774f393c58..a52ce6c8cb 100644 --- a/openair2/PHY_INTERFACE/mac_phy_primitives.h +++ b/openair2/PHY_INTERFACE/mac_phy_primitives.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/PHY_INTERFACE/vars.h b/openair2/PHY_INTERFACE/vars.h index 8e33fafc01..561ab426e7 100644 --- a/openair2/PHY_INTERFACE/vars.h +++ b/openair2/PHY_INTERFACE/vars.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRC/L2_INTERFACE/openair_rrc_L2_interface.c b/openair2/RRC/L2_INTERFACE/openair_rrc_L2_interface.c index fe71e4bd4c..732d2aa54a 100644 --- a/openair2/RRC/L2_INTERFACE/openair_rrc_L2_interface.c +++ b/openair2/RRC/L2_INTERFACE/openair_rrc_L2_interface.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRC/L2_INTERFACE/openair_rrc_L2_interface.h b/openair2/RRC/L2_INTERFACE/openair_rrc_L2_interface.h index 15807ddb83..f694a68c58 100644 --- a/openair2/RRC/L2_INTERFACE/openair_rrc_L2_interface.h +++ b/openair2/RRC/L2_INTERFACE/openair_rrc_L2_interface.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRC/LITE/L2_interface.c b/openair2/RRC/LITE/L2_interface.c index 16811fe70f..6a64095e92 100644 --- a/openair2/RRC/LITE/L2_interface.c +++ b/openair2/RRC/LITE/L2_interface.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRC/LITE/MESSAGES/asn1_msg.c b/openair2/RRC/LITE/MESSAGES/asn1_msg.c index 8823a87130..110dc6442d 100644 --- a/openair2/RRC/LITE/MESSAGES/asn1_msg.c +++ b/openair2/RRC/LITE/MESSAGES/asn1_msg.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRC/LITE/MESSAGES/asn1_msg.h b/openair2/RRC/LITE/MESSAGES/asn1_msg.h index d1516feccc..b5747cb94b 100644 --- a/openair2/RRC/LITE/MESSAGES/asn1_msg.h +++ b/openair2/RRC/LITE/MESSAGES/asn1_msg.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRC/LITE/defs.h b/openair2/RRC/LITE/defs.h index 75db59add6..bae3dc887a 100644 --- a/openair2/RRC/LITE/defs.h +++ b/openair2/RRC/LITE/defs.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRC/LITE/extern.h b/openair2/RRC/LITE/extern.h index 40e5e3e262..64863b796f 100644 --- a/openair2/RRC/LITE/extern.h +++ b/openair2/RRC/LITE/extern.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRC/LITE/proto.h b/openair2/RRC/LITE/proto.h index 9fbfadbd85..5d77698c8e 100644 --- a/openair2/RRC/LITE/proto.h +++ b/openair2/RRC/LITE/proto.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRC/LITE/rrc_2_rrm_msg.c b/openair2/RRC/LITE/rrc_2_rrm_msg.c index 64318c8063..0dcdce6b12 100644 --- a/openair2/RRC/LITE/rrc_2_rrm_msg.c +++ b/openair2/RRC/LITE/rrc_2_rrm_msg.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRC/LITE/rrc_UE.c b/openair2/RRC/LITE/rrc_UE.c index 9682f2f587..a919a055f2 100644 --- a/openair2/RRC/LITE/rrc_UE.c +++ b/openair2/RRC/LITE/rrc_UE.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRC/LITE/rrc_UE_ral.c b/openair2/RRC/LITE/rrc_UE_ral.c index 401d7257f9..ed1e6ca205 100755 --- a/openair2/RRC/LITE/rrc_UE_ral.c +++ b/openair2/RRC/LITE/rrc_UE_ral.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRC/LITE/rrc_UE_ral.h b/openair2/RRC/LITE/rrc_UE_ral.h index 6ad8e24023..a06ae637cd 100755 --- a/openair2/RRC/LITE/rrc_UE_ral.h +++ b/openair2/RRC/LITE/rrc_UE_ral.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRC/LITE/rrc_common.c b/openair2/RRC/LITE/rrc_common.c index 1d0e855a82..e2d8a6c69b 100644 --- a/openair2/RRC/LITE/rrc_common.c +++ b/openair2/RRC/LITE/rrc_common.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRC/LITE/rrc_config.c b/openair2/RRC/LITE/rrc_config.c index e33c2a71b9..cd91e6c2f3 100644 --- a/openair2/RRC/LITE/rrc_config.c +++ b/openair2/RRC/LITE/rrc_config.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRC/LITE/rrc_eNB.c b/openair2/RRC/LITE/rrc_eNB.c index 47c6055c62..f19c3bced4 100644 --- a/openair2/RRC/LITE/rrc_eNB.c +++ b/openair2/RRC/LITE/rrc_eNB.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRC/LITE/rrc_eNB_GTPV1U.c b/openair2/RRC/LITE/rrc_eNB_GTPV1U.c index ef70760235..b85933ad47 100755 --- a/openair2/RRC/LITE/rrc_eNB_GTPV1U.c +++ b/openair2/RRC/LITE/rrc_eNB_GTPV1U.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRC/LITE/rrc_eNB_GTPV1U.h b/openair2/RRC/LITE/rrc_eNB_GTPV1U.h index 70f9876164..388f71c136 100755 --- a/openair2/RRC/LITE/rrc_eNB_GTPV1U.h +++ b/openair2/RRC/LITE/rrc_eNB_GTPV1U.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRC/LITE/rrc_eNB_S1AP.c b/openair2/RRC/LITE/rrc_eNB_S1AP.c index 60b514ba2c..5c41658862 100644 --- a/openair2/RRC/LITE/rrc_eNB_S1AP.c +++ b/openair2/RRC/LITE/rrc_eNB_S1AP.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRC/LITE/rrc_eNB_S1AP.h b/openair2/RRC/LITE/rrc_eNB_S1AP.h index 0f6e01d5b6..ea797e8c20 100644 --- a/openair2/RRC/LITE/rrc_eNB_S1AP.h +++ b/openair2/RRC/LITE/rrc_eNB_S1AP.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRC/LITE/rrc_eNB_UE_context.c b/openair2/RRC/LITE/rrc_eNB_UE_context.c index 2bd2f1d69c..0662471763 100644 --- a/openair2/RRC/LITE/rrc_eNB_UE_context.c +++ b/openair2/RRC/LITE/rrc_eNB_UE_context.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRC/LITE/rrc_eNB_UE_context.h b/openair2/RRC/LITE/rrc_eNB_UE_context.h index 6a575cd700..084baa9cc4 100644 --- a/openair2/RRC/LITE/rrc_eNB_UE_context.h +++ b/openair2/RRC/LITE/rrc_eNB_UE_context.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRC/LITE/rrc_eNB_ral.c b/openair2/RRC/LITE/rrc_eNB_ral.c index ab9ff08705..d1a0f02e46 100755 --- a/openair2/RRC/LITE/rrc_eNB_ral.c +++ b/openair2/RRC/LITE/rrc_eNB_ral.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRC/LITE/rrc_eNB_ral.h b/openair2/RRC/LITE/rrc_eNB_ral.h index 31c1d031ca..da69b47023 100755 --- a/openair2/RRC/LITE/rrc_eNB_ral.h +++ b/openair2/RRC/LITE/rrc_eNB_ral.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRC/LITE/rrc_rrm_interface.c b/openair2/RRC/LITE/rrc_rrm_interface.c index 9e539bf4df..29f97ed296 100644 --- a/openair2/RRC/LITE/rrc_rrm_interface.c +++ b/openair2/RRC/LITE/rrc_rrm_interface.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRC/LITE/rrc_rrm_interface.h b/openair2/RRC/LITE/rrc_rrm_interface.h index eccadf03bf..5d83f8679b 100644 --- a/openair2/RRC/LITE/rrc_rrm_interface.h +++ b/openair2/RRC/LITE/rrc_rrm_interface.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRC/LITE/rrc_types.h b/openair2/RRC/LITE/rrc_types.h index 854f43e747..cd9b7815f6 100644 --- a/openair2/RRC/LITE/rrc_types.h +++ b/openair2/RRC/LITE/rrc_types.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRC/LITE/rrm_2_rrc_msg.c b/openair2/RRC/LITE/rrm_2_rrc_msg.c index 6cc08421dd..cc44465201 100644 --- a/openair2/RRC/LITE/rrm_2_rrc_msg.c +++ b/openair2/RRC/LITE/rrm_2_rrc_msg.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRC/LITE/utils.c b/openair2/RRC/LITE/utils.c index cf1252c30a..1bf6530384 100644 --- a/openair2/RRC/LITE/utils.c +++ b/openair2/RRC/LITE/utils.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRC/LITE/vars.h b/openair2/RRC/LITE/vars.h index 92525194e8..122dea1df2 100644 --- a/openair2/RRC/LITE/vars.h +++ b/openair2/RRC/LITE/vars.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRC/NAS/nas_config.c b/openair2/RRC/NAS/nas_config.c index d6c12a09e6..400be1a604 100644 --- a/openair2/RRC/NAS/nas_config.c +++ b/openair2/RRC/NAS/nas_config.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRC/NAS/nas_config.h b/openair2/RRC/NAS/nas_config.h index 654cb978c5..93ee5a196d 100755 --- a/openair2/RRC/NAS/nas_config.h +++ b/openair2/RRC/NAS/nas_config.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRC/NAS/rb_config.c b/openair2/RRC/NAS/rb_config.c index 2779a70420..9a7f8a88da 100644 --- a/openair2/RRC/NAS/rb_config.c +++ b/openair2/RRC/NAS/rb_config.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRC/NAS/rb_config.h b/openair2/RRC/NAS/rb_config.h index 9a9bd011f0..e8d807f882 100644 --- a/openair2/RRC/NAS/rb_config.h +++ b/openair2/RRC/NAS/rb_config.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRM_4_RRC_LITE/src/platform.h b/openair2/RRM_4_RRC_LITE/src/platform.h index 2d3ed51435..42bab6dc8b 100755 --- a/openair2/RRM_4_RRC_LITE/src/platform.h +++ b/openair2/RRM_4_RRC_LITE/src/platform.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRM_4_RRC_LITE/src/platform_constants.h b/openair2/RRM_4_RRC_LITE/src/platform_constants.h index 40d936f44a..ecf072ac4c 100755 --- a/openair2/RRM_4_RRC_LITE/src/platform_constants.h +++ b/openair2/RRM_4_RRC_LITE/src/platform_constants.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRM_4_RRC_LITE/src/platform_defines.h b/openair2/RRM_4_RRC_LITE/src/platform_defines.h index 9f185a04a8..ff3e7c0428 100755 --- a/openair2/RRM_4_RRC_LITE/src/platform_defines.h +++ b/openair2/RRM_4_RRC_LITE/src/platform_defines.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRM_4_RRC_LITE/src/radio_resources/Asn1Utils.cpp b/openair2/RRM_4_RRC_LITE/src/radio_resources/Asn1Utils.cpp index 4408039e1c..04b97887e4 100755 --- a/openair2/RRM_4_RRC_LITE/src/radio_resources/Asn1Utils.cpp +++ b/openair2/RRM_4_RRC_LITE/src/radio_resources/Asn1Utils.cpp @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRM_4_RRC_LITE/src/radio_resources/Asn1Utils.h b/openair2/RRM_4_RRC_LITE/src/radio_resources/Asn1Utils.h index 867b22c040..ee1eb8f38a 100755 --- a/openair2/RRM_4_RRC_LITE/src/radio_resources/Asn1Utils.h +++ b/openair2/RRM_4_RRC_LITE/src/radio_resources/Asn1Utils.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRM_4_RRC_LITE/src/radio_resources/Command.cpp b/openair2/RRM_4_RRC_LITE/src/radio_resources/Command.cpp index cc5bcb68d8..7bd92ad9b6 100755 --- a/openair2/RRM_4_RRC_LITE/src/radio_resources/Command.cpp +++ b/openair2/RRM_4_RRC_LITE/src/radio_resources/Command.cpp @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRM_4_RRC_LITE/src/radio_resources/Command.h b/openair2/RRM_4_RRC_LITE/src/radio_resources/Command.h index c5ddc45756..107cc97717 100755 --- a/openair2/RRM_4_RRC_LITE/src/radio_resources/Command.h +++ b/openair2/RRM_4_RRC_LITE/src/radio_resources/Command.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRM_4_RRC_LITE/src/radio_resources/DataRadioBearer.cpp b/openair2/RRM_4_RRC_LITE/src/radio_resources/DataRadioBearer.cpp index ae3c752efa..73824db9a9 100755 --- a/openair2/RRM_4_RRC_LITE/src/radio_resources/DataRadioBearer.cpp +++ b/openair2/RRM_4_RRC_LITE/src/radio_resources/DataRadioBearer.cpp @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRM_4_RRC_LITE/src/radio_resources/DataRadioBearer.h b/openair2/RRM_4_RRC_LITE/src/radio_resources/DataRadioBearer.h index e561a9ea7e..eb897ce894 100755 --- a/openair2/RRM_4_RRC_LITE/src/radio_resources/DataRadioBearer.h +++ b/openair2/RRM_4_RRC_LITE/src/radio_resources/DataRadioBearer.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRM_4_RRC_LITE/src/radio_resources/ENodeB.cpp b/openair2/RRM_4_RRC_LITE/src/radio_resources/ENodeB.cpp index b3e486fe85..8a4498861b 100755 --- a/openair2/RRM_4_RRC_LITE/src/radio_resources/ENodeB.cpp +++ b/openair2/RRM_4_RRC_LITE/src/radio_resources/ENodeB.cpp @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRM_4_RRC_LITE/src/radio_resources/ENodeB.h b/openair2/RRM_4_RRC_LITE/src/radio_resources/ENodeB.h index 3e8bf11ad3..c1c761032d 100755 --- a/openair2/RRM_4_RRC_LITE/src/radio_resources/ENodeB.h +++ b/openair2/RRM_4_RRC_LITE/src/radio_resources/ENodeB.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRM_4_RRC_LITE/src/radio_resources/Exceptions.h b/openair2/RRM_4_RRC_LITE/src/radio_resources/Exceptions.h index b18730bf38..a236d5e09e 100755 --- a/openair2/RRM_4_RRC_LITE/src/radio_resources/Exceptions.h +++ b/openair2/RRM_4_RRC_LITE/src/radio_resources/Exceptions.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRM_4_RRC_LITE/src/radio_resources/LogicalChannel.cpp b/openair2/RRM_4_RRC_LITE/src/radio_resources/LogicalChannel.cpp index 3b810a833b..607bfd042a 100755 --- a/openair2/RRM_4_RRC_LITE/src/radio_resources/LogicalChannel.cpp +++ b/openair2/RRM_4_RRC_LITE/src/radio_resources/LogicalChannel.cpp @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRM_4_RRC_LITE/src/radio_resources/LogicalChannel.h b/openair2/RRM_4_RRC_LITE/src/radio_resources/LogicalChannel.h index 2420f39f43..c9d572cbf1 100755 --- a/openair2/RRM_4_RRC_LITE/src/radio_resources/LogicalChannel.h +++ b/openair2/RRM_4_RRC_LITE/src/radio_resources/LogicalChannel.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRM_4_RRC_LITE/src/radio_resources/Mobile.cpp b/openair2/RRM_4_RRC_LITE/src/radio_resources/Mobile.cpp index 2e92d95240..7400700800 100755 --- a/openair2/RRM_4_RRC_LITE/src/radio_resources/Mobile.cpp +++ b/openair2/RRM_4_RRC_LITE/src/radio_resources/Mobile.cpp @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRM_4_RRC_LITE/src/radio_resources/Mobile.h b/openair2/RRM_4_RRC_LITE/src/radio_resources/Mobile.h index 41dbf9bebe..6d2be81694 100755 --- a/openair2/RRM_4_RRC_LITE/src/radio_resources/Mobile.h +++ b/openair2/RRM_4_RRC_LITE/src/radio_resources/Mobile.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRM_4_RRC_LITE/src/radio_resources/RadioBearer.cpp b/openair2/RRM_4_RRC_LITE/src/radio_resources/RadioBearer.cpp index 179fba1c7f..76a32516e4 100755 --- a/openair2/RRM_4_RRC_LITE/src/radio_resources/RadioBearer.cpp +++ b/openair2/RRM_4_RRC_LITE/src/radio_resources/RadioBearer.cpp @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRM_4_RRC_LITE/src/radio_resources/RadioBearer.h b/openair2/RRM_4_RRC_LITE/src/radio_resources/RadioBearer.h index fc944f57a2..16cf600c04 100755 --- a/openair2/RRM_4_RRC_LITE/src/radio_resources/RadioBearer.h +++ b/openair2/RRM_4_RRC_LITE/src/radio_resources/RadioBearer.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRM_4_RRC_LITE/src/radio_resources/RadioResources.cpp b/openair2/RRM_4_RRC_LITE/src/radio_resources/RadioResources.cpp index 7cd631cc02..efcffdcf7d 100755 --- a/openair2/RRM_4_RRC_LITE/src/radio_resources/RadioResources.cpp +++ b/openair2/RRM_4_RRC_LITE/src/radio_resources/RadioResources.cpp @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRM_4_RRC_LITE/src/radio_resources/RadioResources.h b/openair2/RRM_4_RRC_LITE/src/radio_resources/RadioResources.h index 7eeb564d29..263c486c2e 100755 --- a/openair2/RRM_4_RRC_LITE/src/radio_resources/RadioResources.h +++ b/openair2/RRM_4_RRC_LITE/src/radio_resources/RadioResources.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRM_4_RRC_LITE/src/radio_resources/SignallingRadioBearer.cpp b/openair2/RRM_4_RRC_LITE/src/radio_resources/SignallingRadioBearer.cpp index f3a197b135..99fa875d67 100755 --- a/openair2/RRM_4_RRC_LITE/src/radio_resources/SignallingRadioBearer.cpp +++ b/openair2/RRM_4_RRC_LITE/src/radio_resources/SignallingRadioBearer.cpp @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRM_4_RRC_LITE/src/radio_resources/SignallingRadioBearer.h b/openair2/RRM_4_RRC_LITE/src/radio_resources/SignallingRadioBearer.h index b5603e74cb..e441f9b0d7 100755 --- a/openair2/RRM_4_RRC_LITE/src/radio_resources/SignallingRadioBearer.h +++ b/openair2/RRM_4_RRC_LITE/src/radio_resources/SignallingRadioBearer.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRM_4_RRC_LITE/src/radio_resources/Transaction.cpp b/openair2/RRM_4_RRC_LITE/src/radio_resources/Transaction.cpp index 810fdc1636..c9ccc39745 100755 --- a/openair2/RRM_4_RRC_LITE/src/radio_resources/Transaction.cpp +++ b/openair2/RRM_4_RRC_LITE/src/radio_resources/Transaction.cpp @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRM_4_RRC_LITE/src/radio_resources/Transaction.h b/openair2/RRM_4_RRC_LITE/src/radio_resources/Transaction.h index 7f9eade115..2497a4ea3b 100755 --- a/openair2/RRM_4_RRC_LITE/src/radio_resources/Transaction.h +++ b/openair2/RRM_4_RRC_LITE/src/radio_resources/Transaction.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRM_4_RRC_LITE/src/radio_resources/Transactions.cpp b/openair2/RRM_4_RRC_LITE/src/radio_resources/Transactions.cpp index ed084245ec..04176f98ee 100755 --- a/openair2/RRM_4_RRC_LITE/src/radio_resources/Transactions.cpp +++ b/openair2/RRM_4_RRC_LITE/src/radio_resources/Transactions.cpp @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRM_4_RRC_LITE/src/radio_resources/Transactions.h b/openair2/RRM_4_RRC_LITE/src/radio_resources/Transactions.h index 2060f6a4a2..1b15b2e59f 100755 --- a/openair2/RRM_4_RRC_LITE/src/radio_resources/Transactions.h +++ b/openair2/RRM_4_RRC_LITE/src/radio_resources/Transactions.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/RRM_4_RRC_LITE/src/rrm.cpp b/openair2/RRM_4_RRC_LITE/src/rrm.cpp index 9c6304da22..02e3cae229 100755 --- a/openair2/RRM_4_RRC_LITE/src/rrm.cpp +++ b/openair2/RRM_4_RRC_LITE/src/rrm.cpp @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/AT_COMMANDS/parser.c b/openair2/UTIL/AT_COMMANDS/parser.c index c8cdba1209..0a5a530a31 100755 --- a/openair2/UTIL/AT_COMMANDS/parser.c +++ b/openair2/UTIL/AT_COMMANDS/parser.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/AT_COMMANDS/parser.h b/openair2/UTIL/AT_COMMANDS/parser.h index 443b602221..d232c076aa 100755 --- a/openair2/UTIL/AT_COMMANDS/parser.h +++ b/openair2/UTIL/AT_COMMANDS/parser.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/BIGPHYS/bigphys.c b/openair2/UTIL/BIGPHYS/bigphys.c index bf99d96a70..a325217621 100755 --- a/openair2/UTIL/BIGPHYS/bigphys.c +++ b/openair2/UTIL/BIGPHYS/bigphys.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/BIGPHYS/defs.h b/openair2/UTIL/BIGPHYS/defs.h index 5719cf0511..a371fb0002 100644 --- a/openair2/UTIL/BIGPHYS/defs.h +++ b/openair2/UTIL/BIGPHYS/defs.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/CLI/cli.c b/openair2/UTIL/CLI/cli.c index 710f9c4d8a..9f5f226047 100644 --- a/openair2/UTIL/CLI/cli.c +++ b/openair2/UTIL/CLI/cli.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/CLI/cli.h b/openair2/UTIL/CLI/cli.h index 4e9ba75cfe..fc1109b1c6 100644 --- a/openair2/UTIL/CLI/cli.h +++ b/openair2/UTIL/CLI/cli.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/CLI/cli_cmd.c b/openair2/UTIL/CLI/cli_cmd.c index a7acbbe5e5..8f7db6862c 100644 --- a/openair2/UTIL/CLI/cli_cmd.c +++ b/openair2/UTIL/CLI/cli_cmd.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/CLI/cli_if.h b/openair2/UTIL/CLI/cli_if.h index f7a3e0c381..1ec29d18a5 100644 --- a/openair2/UTIL/CLI/cli_if.h +++ b/openair2/UTIL/CLI/cli_if.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/CLI/cli_server.c b/openair2/UTIL/CLI/cli_server.c index df285c52bd..b93679c384 100644 --- a/openair2/UTIL/CLI/cli_server.c +++ b/openair2/UTIL/CLI/cli_server.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/FIFO/pad_list.c b/openair2/UTIL/FIFO/pad_list.c index dc0176670d..db7e33f1d6 100755 --- a/openair2/UTIL/FIFO/pad_list.c +++ b/openair2/UTIL/FIFO/pad_list.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/FIFO/pad_list.h b/openair2/UTIL/FIFO/pad_list.h index bcaf803cb8..5d018c3e24 100755 --- a/openair2/UTIL/FIFO/pad_list.h +++ b/openair2/UTIL/FIFO/pad_list.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/FIFO/types.h b/openair2/UTIL/FIFO/types.h index 0881074964..f75460d18b 100644 --- a/openair2/UTIL/FIFO/types.h +++ b/openair2/UTIL/FIFO/types.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/LISTS/list.c b/openair2/UTIL/LISTS/list.c index 343b1769d2..37450f6b30 100755 --- a/openair2/UTIL/LISTS/list.c +++ b/openair2/UTIL/LISTS/list.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/LOG/log.c b/openair2/UTIL/LOG/log.c index 283a906b58..abbdbc01ab 100755 --- a/openair2/UTIL/LOG/log.c +++ b/openair2/UTIL/LOG/log.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/LOG/log.h b/openair2/UTIL/LOG/log.h index c5d84689bf..c6abbfa001 100755 --- a/openair2/UTIL/LOG/log.h +++ b/openair2/UTIL/LOG/log.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/LOG/log_extern.h b/openair2/UTIL/LOG/log_extern.h index 8751254916..fbae536524 100644 --- a/openair2/UTIL/LOG/log_extern.h +++ b/openair2/UTIL/LOG/log_extern.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/LOG/log_if.h b/openair2/UTIL/LOG/log_if.h index b286d027aa..1e89344028 100644 --- a/openair2/UTIL/LOG/log_if.h +++ b/openair2/UTIL/LOG/log_if.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/LOG/vcd_signal_dumper.c b/openair2/UTIL/LOG/vcd_signal_dumper.c index a1223e6ca5..8dfbfd6ef5 100644 --- a/openair2/UTIL/LOG/vcd_signal_dumper.c +++ b/openair2/UTIL/LOG/vcd_signal_dumper.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/LOG/vcd_signal_dumper.h b/openair2/UTIL/LOG/vcd_signal_dumper.h index 7ec2e2445e..68257484f0 100644 --- a/openair2/UTIL/LOG/vcd_signal_dumper.h +++ b/openair2/UTIL/LOG/vcd_signal_dumper.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/MATH/crc_byte.c b/openair2/UTIL/MATH/crc_byte.c index 18054bf4d8..d305b10aeb 100644 --- a/openair2/UTIL/MATH/crc_byte.c +++ b/openair2/UTIL/MATH/crc_byte.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/MATH/oml.c b/openair2/UTIL/MATH/oml.c index 09e5b1a9c2..20c2876207 100644 --- a/openair2/UTIL/MATH/oml.c +++ b/openair2/UTIL/MATH/oml.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/MATH/oml.h b/openair2/UTIL/MATH/oml.h index 24e951fa68..9b0b863549 100644 --- a/openair2/UTIL/MATH/oml.h +++ b/openair2/UTIL/MATH/oml.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/MATH/random.c b/openair2/UTIL/MATH/random.c index 0d60a02512..04c20abaa8 100644 --- a/openair2/UTIL/MATH/random.c +++ b/openair2/UTIL/MATH/random.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/MATH/random_proto_extern.h b/openair2/UTIL/MATH/random_proto_extern.h index 3844a394ef..2fd70eb86c 100644 --- a/openair2/UTIL/MATH/random_proto_extern.h +++ b/openair2/UTIL/MATH/random_proto_extern.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/MATH/taus.c b/openair2/UTIL/MATH/taus.c index cba74ef1b4..277c2c16f6 100755 --- a/openair2/UTIL/MATH/taus.c +++ b/openair2/UTIL/MATH/taus.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/MEM/mem_block.c b/openair2/UTIL/MEM/mem_block.c index 6b4b3dab18..f0191a536a 100644 --- a/openair2/UTIL/MEM/mem_block.c +++ b/openair2/UTIL/MEM/mem_block.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/MEM/mem_block.h b/openair2/UTIL/MEM/mem_block.h index b38e9a2417..edcb147cee 100755 --- a/openair2/UTIL/MEM/mem_block.h +++ b/openair2/UTIL/MEM/mem_block.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/MEM/mem_mngt.c b/openair2/UTIL/MEM/mem_mngt.c index 43f55d1a05..1c4ad60552 100755 --- a/openair2/UTIL/MEM/mem_mngt.c +++ b/openair2/UTIL/MEM/mem_mngt.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/MEM/mem_mngt_proto_extern.h b/openair2/UTIL/MEM/mem_mngt_proto_extern.h index 9195aa558e..dd20bc2f25 100755 --- a/openair2/UTIL/MEM/mem_mngt_proto_extern.h +++ b/openair2/UTIL/MEM/mem_mngt_proto_extern.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/MEM/mem_pool.h b/openair2/UTIL/MEM/mem_pool.h index 7b68c88baa..5d950008de 100755 --- a/openair2/UTIL/MEM/mem_pool.h +++ b/openair2/UTIL/MEM/mem_pool.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OCG/OCG.c b/openair2/UTIL/OCG/OCG.c index 1170a6db7f..54f011260b 100644 --- a/openair2/UTIL/OCG/OCG.c +++ b/openair2/UTIL/OCG/OCG.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OCG/OCG.h b/openair2/UTIL/OCG/OCG.h index a32bfb14ee..cf96de7963 100644 --- a/openair2/UTIL/OCG/OCG.h +++ b/openair2/UTIL/OCG/OCG.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OCG/OCG_call_emu.h b/openair2/UTIL/OCG/OCG_call_emu.h index 836a10456c..25e455764e 100644 --- a/openair2/UTIL/OCG/OCG_call_emu.h +++ b/openair2/UTIL/OCG/OCG_call_emu.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OCG/OCG_config_mobi.c b/openair2/UTIL/OCG/OCG_config_mobi.c index b84210c073..f931fe0929 100644 --- a/openair2/UTIL/OCG/OCG_config_mobi.c +++ b/openair2/UTIL/OCG/OCG_config_mobi.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OCG/OCG_config_mobi.h b/openair2/UTIL/OCG/OCG_config_mobi.h index d1125651a0..a52c784fc6 100644 --- a/openair2/UTIL/OCG/OCG_config_mobi.h +++ b/openair2/UTIL/OCG/OCG_config_mobi.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OCG/OCG_create_dir.c b/openair2/UTIL/OCG/OCG_create_dir.c index 357fce7b20..27258ff122 100644 --- a/openair2/UTIL/OCG/OCG_create_dir.c +++ b/openair2/UTIL/OCG/OCG_create_dir.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OCG/OCG_create_dir.h b/openair2/UTIL/OCG/OCG_create_dir.h index b51306f624..f9f8db1690 100644 --- a/openair2/UTIL/OCG/OCG_create_dir.h +++ b/openair2/UTIL/OCG/OCG_create_dir.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OCG/OCG_detect_file.c b/openair2/UTIL/OCG/OCG_detect_file.c index 1ce230fb97..fb18f90bbc 100644 --- a/openair2/UTIL/OCG/OCG_detect_file.c +++ b/openair2/UTIL/OCG/OCG_detect_file.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OCG/OCG_detect_file.h b/openair2/UTIL/OCG/OCG_detect_file.h index 237bfa41d2..de877a4fcf 100644 --- a/openair2/UTIL/OCG/OCG_detect_file.h +++ b/openair2/UTIL/OCG/OCG_detect_file.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OCG/OCG_extern.h b/openair2/UTIL/OCG/OCG_extern.h index 1dc0b82ab7..e03932e406 100644 --- a/openair2/UTIL/OCG/OCG_extern.h +++ b/openair2/UTIL/OCG/OCG_extern.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OCG/OCG_generate_report.c b/openair2/UTIL/OCG/OCG_generate_report.c index 36db0d2ccb..5cf448a15d 100644 --- a/openair2/UTIL/OCG/OCG_generate_report.c +++ b/openair2/UTIL/OCG/OCG_generate_report.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OCG/OCG_generate_report.h b/openair2/UTIL/OCG/OCG_generate_report.h index e8a777f8a4..2a2f26f827 100644 --- a/openair2/UTIL/OCG/OCG_generate_report.h +++ b/openair2/UTIL/OCG/OCG_generate_report.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OCG/OCG_get_opt.c b/openair2/UTIL/OCG/OCG_get_opt.c index d4d0c877d9..1e9d8a784b 100644 --- a/openair2/UTIL/OCG/OCG_get_opt.c +++ b/openair2/UTIL/OCG/OCG_get_opt.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OCG/OCG_get_opt.h b/openair2/UTIL/OCG/OCG_get_opt.h index a084619a07..d44e96f5c3 100644 --- a/openair2/UTIL/OCG/OCG_get_opt.h +++ b/openair2/UTIL/OCG/OCG_get_opt.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OCG/OCG_if.h b/openair2/UTIL/OCG/OCG_if.h index 7b56003424..5f600539dd 100644 --- a/openair2/UTIL/OCG/OCG_if.h +++ b/openair2/UTIL/OCG/OCG_if.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OCG/OCG_parse_XML.c b/openair2/UTIL/OCG/OCG_parse_XML.c index 7d6cfad8ae..5397cdbd98 100644 --- a/openair2/UTIL/OCG/OCG_parse_XML.c +++ b/openair2/UTIL/OCG/OCG_parse_XML.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OCG/OCG_parse_XML.h b/openair2/UTIL/OCG/OCG_parse_XML.h index 6295a7afe6..25de67e196 100644 --- a/openair2/UTIL/OCG/OCG_parse_XML.h +++ b/openair2/UTIL/OCG/OCG_parse_XML.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OCG/OCG_parse_filename.c b/openair2/UTIL/OCG/OCG_parse_filename.c index bb860728a7..2f2a196fa0 100644 --- a/openair2/UTIL/OCG/OCG_parse_filename.c +++ b/openair2/UTIL/OCG/OCG_parse_filename.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OCG/OCG_parse_filename.h b/openair2/UTIL/OCG/OCG_parse_filename.h index ebdb617efe..4c1bd6989d 100644 --- a/openair2/UTIL/OCG/OCG_parse_filename.h +++ b/openair2/UTIL/OCG/OCG_parse_filename.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OCG/OCG_save_XML.c b/openair2/UTIL/OCG/OCG_save_XML.c index 5ad4081572..ec94ab9f8e 100644 --- a/openair2/UTIL/OCG/OCG_save_XML.c +++ b/openair2/UTIL/OCG/OCG_save_XML.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OCG/OCG_save_XML.h b/openair2/UTIL/OCG/OCG_save_XML.h index 0fff43fa34..d8cc24c9e8 100644 --- a/openair2/UTIL/OCG/OCG_save_XML.h +++ b/openair2/UTIL/OCG/OCG_save_XML.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OCG/OCG_vars.h b/openair2/UTIL/OCG/OCG_vars.h index 34c97dd58d..f1aab9b580 100644 --- a/openair2/UTIL/OCG/OCG_vars.h +++ b/openair2/UTIL/OCG/OCG_vars.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OMG/TraCIConstants.h b/openair2/UTIL/OMG/TraCIConstants.h index 90c78e0012..1defa16aad 100644 --- a/openair2/UTIL/OMG/TraCIConstants.h +++ b/openair2/UTIL/OMG/TraCIConstants.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OMG/client_traci_OMG.c b/openair2/UTIL/OMG/client_traci_OMG.c index a4b027116a..b3b43f49b2 100644 --- a/openair2/UTIL/OMG/client_traci_OMG.c +++ b/openair2/UTIL/OMG/client_traci_OMG.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OMG/client_traci_OMG.h b/openair2/UTIL/OMG/client_traci_OMG.h index a30f64372e..4d8b9e86d1 100644 --- a/openair2/UTIL/OMG/client_traci_OMG.h +++ b/openair2/UTIL/OMG/client_traci_OMG.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OMG/common.c b/openair2/UTIL/OMG/common.c index 1e2ea5a1f3..dd12cb302a 100644 --- a/openair2/UTIL/OMG/common.c +++ b/openair2/UTIL/OMG/common.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OMG/defs.h b/openair2/UTIL/OMG/defs.h index 1e70f1ea47..99de25b176 100644 --- a/openair2/UTIL/OMG/defs.h +++ b/openair2/UTIL/OMG/defs.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OMG/grid.c b/openair2/UTIL/OMG/grid.c index 69c9f2eb24..1c3fc0cc5c 100644 --- a/openair2/UTIL/OMG/grid.c +++ b/openair2/UTIL/OMG/grid.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OMG/grid.h b/openair2/UTIL/OMG/grid.h index dd148e3e2a..138eb0b552 100644 --- a/openair2/UTIL/OMG/grid.h +++ b/openair2/UTIL/OMG/grid.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OMG/id_manager.c b/openair2/UTIL/OMG/id_manager.c index ba6b8391e9..d37e56210d 100644 --- a/openair2/UTIL/OMG/id_manager.c +++ b/openair2/UTIL/OMG/id_manager.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OMG/id_manager.h b/openair2/UTIL/OMG/id_manager.h index ac2be91e43..d255d84dea 100644 --- a/openair2/UTIL/OMG/id_manager.h +++ b/openair2/UTIL/OMG/id_manager.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OMG/job.c b/openair2/UTIL/OMG/job.c index 51efd44e91..e43ed1a3eb 100644 --- a/openair2/UTIL/OMG/job.c +++ b/openair2/UTIL/OMG/job.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OMG/mobility_parser.c b/openair2/UTIL/OMG/mobility_parser.c index f22fea9972..d011dbe34f 100644 --- a/openair2/UTIL/OMG/mobility_parser.c +++ b/openair2/UTIL/OMG/mobility_parser.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OMG/mobility_parser.h b/openair2/UTIL/OMG/mobility_parser.h index 9b2ded837e..834f01d64a 100644 --- a/openair2/UTIL/OMG/mobility_parser.h +++ b/openair2/UTIL/OMG/mobility_parser.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OMG/omg.c b/openair2/UTIL/OMG/omg.c index 86e865ab9d..11bdc62071 100644 --- a/openair2/UTIL/OMG/omg.c +++ b/openair2/UTIL/OMG/omg.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OMG/omg.h b/openair2/UTIL/OMG/omg.h index 0b6627be60..1df5205df7 100644 --- a/openair2/UTIL/OMG/omg.h +++ b/openair2/UTIL/OMG/omg.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OMG/omg_constants.h b/openair2/UTIL/OMG/omg_constants.h index 8be36532ba..ba09ac6dd8 100644 --- a/openair2/UTIL/OMG/omg_constants.h +++ b/openair2/UTIL/OMG/omg_constants.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OMG/omg_hashtable.c b/openair2/UTIL/OMG/omg_hashtable.c index 2528c0e80e..761750a634 100644 --- a/openair2/UTIL/OMG/omg_hashtable.c +++ b/openair2/UTIL/OMG/omg_hashtable.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OMG/omg_hashtable.h b/openair2/UTIL/OMG/omg_hashtable.h index 8c4003e53b..c5437e381c 100644 --- a/openair2/UTIL/OMG/omg_hashtable.h +++ b/openair2/UTIL/OMG/omg_hashtable.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OMG/omg_vars.h b/openair2/UTIL/OMG/omg_vars.h index 3baf3758fb..f2715cdf1b 100644 --- a/openair2/UTIL/OMG/omg_vars.h +++ b/openair2/UTIL/OMG/omg_vars.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OMG/rwalk.c b/openair2/UTIL/OMG/rwalk.c index 40c7940c12..1a406d20e8 100644 --- a/openair2/UTIL/OMG/rwalk.c +++ b/openair2/UTIL/OMG/rwalk.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OMG/rwalk.h b/openair2/UTIL/OMG/rwalk.h index 9d512c67ad..6d38a8f799 100644 --- a/openair2/UTIL/OMG/rwalk.h +++ b/openair2/UTIL/OMG/rwalk.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OMG/rwp.c b/openair2/UTIL/OMG/rwp.c index f00d1f0bf2..6766cd9555 100644 --- a/openair2/UTIL/OMG/rwp.c +++ b/openair2/UTIL/OMG/rwp.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OMG/rwp.h b/openair2/UTIL/OMG/rwp.h index d35130fb00..ae895b95e3 100644 --- a/openair2/UTIL/OMG/rwp.h +++ b/openair2/UTIL/OMG/rwp.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OMG/socket_traci_OMG.c b/openair2/UTIL/OMG/socket_traci_OMG.c index fed154aa08..1a62ec04da 100644 --- a/openair2/UTIL/OMG/socket_traci_OMG.c +++ b/openair2/UTIL/OMG/socket_traci_OMG.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OMG/socket_traci_OMG.h b/openair2/UTIL/OMG/socket_traci_OMG.h index 1a7f4f5528..a873591148 100644 --- a/openair2/UTIL/OMG/socket_traci_OMG.h +++ b/openair2/UTIL/OMG/socket_traci_OMG.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OMG/static.c b/openair2/UTIL/OMG/static.c index f882ae7fe6..8305c6e9b7 100644 --- a/openair2/UTIL/OMG/static.c +++ b/openair2/UTIL/OMG/static.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OMG/static.h b/openair2/UTIL/OMG/static.h index 18b22123d7..1b5cb0f72f 100644 --- a/openair2/UTIL/OMG/static.h +++ b/openair2/UTIL/OMG/static.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OMG/steadystaterwp.c b/openair2/UTIL/OMG/steadystaterwp.c index 9bf11d240f..c466f3cd23 100644 --- a/openair2/UTIL/OMG/steadystaterwp.c +++ b/openair2/UTIL/OMG/steadystaterwp.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OMG/steadystaterwp.h b/openair2/UTIL/OMG/steadystaterwp.h index e7f3b184ee..1e274d9e1f 100644 --- a/openair2/UTIL/OMG/steadystaterwp.h +++ b/openair2/UTIL/OMG/steadystaterwp.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OMG/storage_traci_OMG.c b/openair2/UTIL/OMG/storage_traci_OMG.c index 7b703387f5..f8ccfdc059 100644 --- a/openair2/UTIL/OMG/storage_traci_OMG.c +++ b/openair2/UTIL/OMG/storage_traci_OMG.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OMG/storage_traci_OMG.h b/openair2/UTIL/OMG/storage_traci_OMG.h index cf2ecbe999..e1f97615c6 100644 --- a/openair2/UTIL/OMG/storage_traci_OMG.h +++ b/openair2/UTIL/OMG/storage_traci_OMG.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OMG/sumo.c b/openair2/UTIL/OMG/sumo.c index 65e193d8dc..f709a73e2a 100644 --- a/openair2/UTIL/OMG/sumo.c +++ b/openair2/UTIL/OMG/sumo.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OMG/sumo.h b/openair2/UTIL/OMG/sumo.h index f4950afc5c..71b36bf310 100644 --- a/openair2/UTIL/OMG/sumo.h +++ b/openair2/UTIL/OMG/sumo.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OMG/trace.c b/openair2/UTIL/OMG/trace.c index 04c84ed22a..89a9377f93 100644 --- a/openair2/UTIL/OMG/trace.c +++ b/openair2/UTIL/OMG/trace.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OMG/trace.h b/openair2/UTIL/OMG/trace.h index b3fe9af630..b3825e2fa8 100644 --- a/openair2/UTIL/OMG/trace.h +++ b/openair2/UTIL/OMG/trace.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OMG/trace_hashtable.c b/openair2/UTIL/OMG/trace_hashtable.c index 633ba700a1..2ecb392219 100644 --- a/openair2/UTIL/OMG/trace_hashtable.c +++ b/openair2/UTIL/OMG/trace_hashtable.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OMG/trace_hashtable.h b/openair2/UTIL/OMG/trace_hashtable.h index 0f0490318c..cd7feb73fc 100644 --- a/openair2/UTIL/OMG/trace_hashtable.h +++ b/openair2/UTIL/OMG/trace_hashtable.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OPT/mac_pcap.h b/openair2/UTIL/OPT/mac_pcap.h index e6e1dfb800..f44c12ec40 100644 --- a/openair2/UTIL/OPT/mac_pcap.h +++ b/openair2/UTIL/OPT/mac_pcap.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OPT/opt.h b/openair2/UTIL/OPT/opt.h index 62ec940cc3..bb3a099e12 100644 --- a/openair2/UTIL/OPT/opt.h +++ b/openair2/UTIL/OPT/opt.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OPT/probe.c b/openair2/UTIL/OPT/probe.c index 5fd34bbcf4..effd0bee85 100644 --- a/openair2/UTIL/OPT/probe.c +++ b/openair2/UTIL/OPT/probe.c @@ -52,7 +52,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OPT/socket_sender.c b/openair2/UTIL/OPT/socket_sender.c index b904e008c5..c984895351 100644 --- a/openair2/UTIL/OPT/socket_sender.c +++ b/openair2/UTIL/OPT/socket_sender.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OPT/vars.h b/openair2/UTIL/OPT/vars.h index 2730a971bd..4e03467537 100644 --- a/openair2/UTIL/OPT/vars.h +++ b/openair2/UTIL/OPT/vars.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OSA/osa_defs.h b/openair2/UTIL/OSA/osa_defs.h index 99f8023142..c11f93d2bb 100644 --- a/openair2/UTIL/OSA/osa_defs.h +++ b/openair2/UTIL/OSA/osa_defs.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OSA/osa_internal.h b/openair2/UTIL/OSA/osa_internal.h index 9376fc8a39..a42f925322 100644 --- a/openair2/UTIL/OSA/osa_internal.h +++ b/openair2/UTIL/OSA/osa_internal.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OSA/osa_key_deriver.c b/openair2/UTIL/OSA/osa_key_deriver.c index 25ed08889e..d8b5fba58b 100644 --- a/openair2/UTIL/OSA/osa_key_deriver.c +++ b/openair2/UTIL/OSA/osa_key_deriver.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OSA/osa_stream_eea.c b/openair2/UTIL/OSA/osa_stream_eea.c index 60fd731902..0a044e2e01 100644 --- a/openair2/UTIL/OSA/osa_stream_eea.c +++ b/openair2/UTIL/OSA/osa_stream_eea.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OSA/osa_stream_eia.c b/openair2/UTIL/OSA/osa_stream_eia.c index 9dc03f3f44..22ad10d25d 100644 --- a/openair2/UTIL/OSA/osa_stream_eia.c +++ b/openair2/UTIL/OSA/osa_stream_eia.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OTG/otg.c b/openair2/UTIL/OTG/otg.c index 5c7708c5c6..e167eb7b45 100644 --- a/openair2/UTIL/OTG/otg.c +++ b/openair2/UTIL/OTG/otg.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OTG/otg.h b/openair2/UTIL/OTG/otg.h index 8fef4c0c87..4c3f5bf8d9 100644 --- a/openair2/UTIL/OTG/otg.h +++ b/openair2/UTIL/OTG/otg.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OTG/otg_config.h b/openair2/UTIL/OTG/otg_config.h index 18bb4f5969..7e0e014375 100644 --- a/openair2/UTIL/OTG/otg_config.h +++ b/openair2/UTIL/OTG/otg_config.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OTG/otg_defs.h b/openair2/UTIL/OTG/otg_defs.h index 4f4cc4f601..c6cee01ec2 100644 --- a/openair2/UTIL/OTG/otg_defs.h +++ b/openair2/UTIL/OTG/otg_defs.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OTG/otg_externs.h b/openair2/UTIL/OTG/otg_externs.h index bcaa5d307d..7ceccfce35 100644 --- a/openair2/UTIL/OTG/otg_externs.h +++ b/openair2/UTIL/OTG/otg_externs.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OTG/otg_form.c b/openair2/UTIL/OTG/otg_form.c index 69b2549541..db77c6a801 100644 --- a/openair2/UTIL/OTG/otg_form.c +++ b/openair2/UTIL/OTG/otg_form.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OTG/otg_form.h b/openair2/UTIL/OTG/otg_form.h index b149206502..153ec75b32 100644 --- a/openair2/UTIL/OTG/otg_form.h +++ b/openair2/UTIL/OTG/otg_form.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OTG/otg_kpi.c b/openair2/UTIL/OTG/otg_kpi.c index f69c6940ff..3aa55df05f 100644 --- a/openair2/UTIL/OTG/otg_kpi.c +++ b/openair2/UTIL/OTG/otg_kpi.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OTG/otg_kpi.h b/openair2/UTIL/OTG/otg_kpi.h index d2c2fcec8a..c4ea232d87 100644 --- a/openair2/UTIL/OTG/otg_kpi.h +++ b/openair2/UTIL/OTG/otg_kpi.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OTG/otg_models.c b/openair2/UTIL/OTG/otg_models.c index b1327e8a08..e671160444 100644 --- a/openair2/UTIL/OTG/otg_models.c +++ b/openair2/UTIL/OTG/otg_models.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OTG/otg_models.h b/openair2/UTIL/OTG/otg_models.h index a0a776f8a7..51944fc15e 100644 --- a/openair2/UTIL/OTG/otg_models.h +++ b/openair2/UTIL/OTG/otg_models.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OTG/otg_rx.c b/openair2/UTIL/OTG/otg_rx.c index b5f0fd416b..8331dd8477 100644 --- a/openair2/UTIL/OTG/otg_rx.c +++ b/openair2/UTIL/OTG/otg_rx.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OTG/otg_rx.h b/openair2/UTIL/OTG/otg_rx.h index 6b3536a9c0..21c6fd85cb 100644 --- a/openair2/UTIL/OTG/otg_rx.h +++ b/openair2/UTIL/OTG/otg_rx.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OTG/otg_rx_socket.c b/openair2/UTIL/OTG/otg_rx_socket.c index 29590e33fc..e9d2e8a863 100644 --- a/openair2/UTIL/OTG/otg_rx_socket.c +++ b/openair2/UTIL/OTG/otg_rx_socket.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OTG/otg_rx_socket.h b/openair2/UTIL/OTG/otg_rx_socket.h index d9e33c9eea..0128269270 100644 --- a/openair2/UTIL/OTG/otg_rx_socket.h +++ b/openair2/UTIL/OTG/otg_rx_socket.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OTG/otg_tx.c b/openair2/UTIL/OTG/otg_tx.c index d6f6507644..e70bccbc73 100644 --- a/openair2/UTIL/OTG/otg_tx.c +++ b/openair2/UTIL/OTG/otg_tx.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OTG/otg_tx.h b/openair2/UTIL/OTG/otg_tx.h index b5cd7741a4..26013dfe47 100644 --- a/openair2/UTIL/OTG/otg_tx.h +++ b/openair2/UTIL/OTG/otg_tx.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OTG/otg_tx_socket.c b/openair2/UTIL/OTG/otg_tx_socket.c index 7eac7d0195..60b9df020c 100644 --- a/openair2/UTIL/OTG/otg_tx_socket.c +++ b/openair2/UTIL/OTG/otg_tx_socket.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OTG/otg_tx_socket.h b/openair2/UTIL/OTG/otg_tx_socket.h index 61668015df..2c5372773f 100644 --- a/openair2/UTIL/OTG/otg_tx_socket.h +++ b/openair2/UTIL/OTG/otg_tx_socket.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OTG/otg_vars.h b/openair2/UTIL/OTG/otg_vars.h index 9ce0afb82d..cc4c56ce9e 100644 --- a/openair2/UTIL/OTG/otg_vars.h +++ b/openair2/UTIL/OTG/otg_vars.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/OTG/traffic_config.h b/openair2/UTIL/OTG/traffic_config.h index 59b609cca7..3e982b1742 100644 --- a/openair2/UTIL/OTG/traffic_config.h +++ b/openair2/UTIL/OTG/traffic_config.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/TIMER/umts_timer.c b/openair2/UTIL/TIMER/umts_timer.c index 4e59e1e82f..9562aee67d 100755 --- a/openair2/UTIL/TIMER/umts_timer.c +++ b/openair2/UTIL/TIMER/umts_timer.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/TIMER/umts_timer.h b/openair2/UTIL/TIMER/umts_timer.h index e5668f6788..a857244ddf 100755 --- a/openair2/UTIL/TIMER/umts_timer.h +++ b/openair2/UTIL/TIMER/umts_timer.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/TIMER/umts_timer_proto_extern.h b/openair2/UTIL/TIMER/umts_timer_proto_extern.h index cb0223b111..ca50d3193f 100755 --- a/openair2/UTIL/TIMER/umts_timer_proto_extern.h +++ b/openair2/UTIL/TIMER/umts_timer_proto_extern.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/TIMER/umts_timer_struct.h b/openair2/UTIL/TIMER/umts_timer_struct.h index d6e15fabac..46b7216cd9 100755 --- a/openair2/UTIL/TIMER/umts_timer_struct.h +++ b/openair2/UTIL/TIMER/umts_timer_struct.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/TRACE/fifo_printf.c b/openair2/UTIL/TRACE/fifo_printf.c index e3b85337d3..2c5f5202f9 100755 --- a/openair2/UTIL/TRACE/fifo_printf.c +++ b/openair2/UTIL/TRACE/fifo_printf.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/TRACE/fifo_printf.h b/openair2/UTIL/TRACE/fifo_printf.h index ee0778fbda..84571e355c 100755 --- a/openair2/UTIL/TRACE/fifo_printf.h +++ b/openair2/UTIL/TRACE/fifo_printf.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/TRACE/fifo_printf_proto_extern.h b/openair2/UTIL/TRACE/fifo_printf_proto_extern.h index f9e6e278f9..66456af305 100755 --- a/openair2/UTIL/TRACE/fifo_printf_proto_extern.h +++ b/openair2/UTIL/TRACE/fifo_printf_proto_extern.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/UTIL/TRACE/print.h b/openair2/UTIL/TRACE/print.h index aff035a242..2c465e0fa5 100755 --- a/openair2/UTIL/TRACE/print.h +++ b/openair2/UTIL/TRACE/print.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/X2AP/x2ap.c b/openair2/X2AP/x2ap.c index 4ce72caf55..69b70964a4 100644 --- a/openair2/X2AP/x2ap.c +++ b/openair2/X2AP/x2ap.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/X2AP/x2ap.h b/openair2/X2AP/x2ap.h index 16c07eb672..561f0953c3 100644 --- a/openair2/X2AP/x2ap.h +++ b/openair2/X2AP/x2ap.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/X2AP/x2ap_common.c b/openair2/X2AP/x2ap_common.c index 9d9d7bc656..5565835997 100755 --- a/openair2/X2AP/x2ap_common.c +++ b/openair2/X2AP/x2ap_common.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair2/X2AP/x2ap_common.h b/openair2/X2AP/x2ap_common.h index fe7b710d96..04ad77f8e3 100755 --- a/openair2/X2AP/x2ap_common.h +++ b/openair2/X2AP/x2ap_common.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair-cn/COMMON/as_message.h b/openair3/COMMON/as_message.h similarity index 100% rename from openair-cn/COMMON/as_message.h rename to openair3/COMMON/as_message.h diff --git a/openair-cn/COMMON/common_types.h b/openair3/COMMON/common_types.h similarity index 77% rename from openair-cn/COMMON/common_types.h rename to openair3/COMMON/common_types.h index ff9a595ec8..18cba9fb81 100644 --- a/openair-cn/COMMON/common_types.h +++ b/openair3/COMMON/common_types.h @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ #include diff --git a/openair3/COMMON/gtpv1_u_messages_def.h b/openair3/COMMON/gtpv1_u_messages_def.h new file mode 100644 index 0000000000..d58b2dfc2e --- /dev/null +++ b/openair3/COMMON/gtpv1_u_messages_def.h @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ + +MESSAGE_DEF(GTPV1U_CREATE_TUNNEL_REQ, MESSAGE_PRIORITY_MED, Gtpv1uCreateTunnelReq, gtpv1uCreateTunnelReq) +MESSAGE_DEF(GTPV1U_CREATE_TUNNEL_RESP, MESSAGE_PRIORITY_MED, Gtpv1uCreateTunnelResp, gtpv1uCreateTunnelResp) +MESSAGE_DEF(GTPV1U_UPDATE_TUNNEL_REQ, MESSAGE_PRIORITY_MED, Gtpv1uUpdateTunnelReq, gtpv1uUpdateTunnelReq) +MESSAGE_DEF(GTPV1U_UPDATE_TUNNEL_RESP, MESSAGE_PRIORITY_MED, Gtpv1uUpdateTunnelResp, gtpv1uUpdateTunnelResp) +MESSAGE_DEF(GTPV1U_DELETE_TUNNEL_REQ, MESSAGE_PRIORITY_MED, Gtpv1uDeleteTunnelReq, gtpv1uDeleteTunnelReq) +MESSAGE_DEF(GTPV1U_DELETE_TUNNEL_RESP, MESSAGE_PRIORITY_MED, Gtpv1uDeleteTunnelResp, gtpv1uDeleteTunnelResp) +MESSAGE_DEF(GTPV1U_TUNNEL_DATA_IND, MESSAGE_PRIORITY_MED, Gtpv1uTunnelDataInd, gtpv1uTunnelDataInd) +MESSAGE_DEF(GTPV1U_TUNNEL_DATA_REQ, MESSAGE_PRIORITY_MED, Gtpv1uTunnelDataReq, gtpv1uTunnelDataReq) diff --git a/openair-cn/COMMON/gtpv1_u_messages_types.h b/openair3/COMMON/gtpv1_u_messages_types.h similarity index 60% rename from openair-cn/COMMON/gtpv1_u_messages_types.h rename to openair3/COMMON/gtpv1_u_messages_types.h index 0fe662e9ea..13fd0fd8a0 100644 --- a/openair-cn/COMMON/gtpv1_u_messages_types.h +++ b/openair3/COMMON/gtpv1_u_messages_types.h @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ #ifndef GTPV1_U_MESSAGES_TYPES_H_ #define GTPV1_U_MESSAGES_TYPES_H_ diff --git a/openair3/COMMON/intertask_interface_conf.h b/openair3/COMMON/intertask_interface_conf.h new file mode 100644 index 0000000000..9ab7cc3151 --- /dev/null +++ b/openair3/COMMON/intertask_interface_conf.h @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ + + +/* + * intertask_interface_conf.h + * + * Created on: Oct 21, 2013 + * Author: winckel + */ + +#ifndef INTERTASK_INTERFACE_CONF_H_ +#define INTERTASK_INTERFACE_CONF_H_ + +/******************************************************************************* + * Intertask Interface Constants + ******************************************************************************/ + +#define ITTI_PORT (10007) + +/* This is the queue size for signal dumper */ +#define ITTI_QUEUE_MAX_ELEMENTS (200 * 1024) +#define ITTI_DUMP_MAX_CON (5) /* Max connections in parallel */ + +#endif /* INTERTASK_INTERFACE_CONF_H_ */ diff --git a/openair3/COMMON/messages_def.h b/openair3/COMMON/messages_def.h new file mode 100644 index 0000000000..2b8667507b --- /dev/null +++ b/openair3/COMMON/messages_def.h @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ + +// These messages files are mandatory and must always be placed in first position +#include "intertask_messages_def.h" +#include "timer_messages_def.h" + +// Messages files used between tasks +#include "gtpv1_u_messages_def.h" +#include "ip_forward_messages_def.h" +#include "nas_messages_def.h" +#include "s11_messages_def.h" +#include "s1ap_messages_def.h" +#include "s6a_messages_def.h" +#include "sctp_messages_def.h" +#include "sgw_lite_def.h" +#include "udp_messages_def.h" +#include "mme_app_messages_def.h" diff --git a/openair3/COMMON/messages_types.h b/openair3/COMMON/messages_types.h new file mode 100644 index 0000000000..46a7261c59 --- /dev/null +++ b/openair3/COMMON/messages_types.h @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ + + +#ifndef MESSAGES_TYPES_H_ +#define MESSAGES_TYPES_H_ + +#include "intertask_messages_types.h" +#include "timer_messages_types.h" + +#include "security_types.h" + +#include "gtpv1_u_messages_types.h" +#include "ip_forward_messages_types.h" +#include "s11_messages_types.h" +#include "s1ap_messages_types.h" +#include "nas_messages_types.h" +#include "s6a_messages_types.h" +#include "sctp_messages_types.h" +#include "sgw_lite_messages_types.h" +#include "udp_messages_types.h" +#include "mme_app_messages_types.h" + +#endif /* MESSAGES_TYPES_H_ */ diff --git a/openair-cn/COMMON/nas_messages_def.h b/openair3/COMMON/nas_messages_def.h similarity index 72% rename from openair-cn/COMMON/nas_messages_def.h rename to openair3/COMMON/nas_messages_def.h index ddd7ca392c..7c7e670511 100644 --- a/openair-cn/COMMON/nas_messages_def.h +++ b/openair3/COMMON/nas_messages_def.h @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ //WARNING: Do not include this header directly. Use intertask_interface.h instead. // Messages for NAS logging diff --git a/openair-cn/COMMON/nas_messages_types.h b/openair3/COMMON/nas_messages_types.h similarity index 85% rename from openair-cn/COMMON/nas_messages_types.h rename to openair3/COMMON/nas_messages_types.h index 6c03d25252..4cbdad2c99 100644 --- a/openair-cn/COMMON/nas_messages_types.h +++ b/openair3/COMMON/nas_messages_types.h @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ #include "as_message.h" #include "nas_message.h" diff --git a/openair-cn/COMMON/s1ap_messages_def.h b/openair3/COMMON/s1ap_messages_def.h similarity index 57% rename from openair-cn/COMMON/s1ap_messages_def.h rename to openair3/COMMON/s1ap_messages_def.h index 2e39e264b2..eeb48a64b0 100644 --- a/openair-cn/COMMON/s1ap_messages_def.h +++ b/openair3/COMMON/s1ap_messages_def.h @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ //WARNING: Do not include this header directly. Use intertask_interface.h instead. /* Messages for S1AP logging */ diff --git a/openair-cn/COMMON/s1ap_messages_types.h b/openair3/COMMON/s1ap_messages_types.h similarity index 58% rename from openair-cn/COMMON/s1ap_messages_types.h rename to openair3/COMMON/s1ap_messages_types.h index 23ff59a858..af45f57029 100644 --- a/openair-cn/COMMON/s1ap_messages_types.h +++ b/openair3/COMMON/s1ap_messages_types.h @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ #ifndef S1AP_MESSAGES_TYPES_H_ #define S1AP_MESSAGES_TYPES_H_ diff --git a/openair3/COMMON/sctp_messages_def.h b/openair3/COMMON/sctp_messages_def.h new file mode 100644 index 0000000000..e56598bc44 --- /dev/null +++ b/openair3/COMMON/sctp_messages_def.h @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ + +//WARNING: Do not include this header directly. Use intertask_interface.h instead. + +MESSAGE_DEF(SCTP_INIT_MSG, MESSAGE_PRIORITY_MED, SctpInit, sctpInit) +MESSAGE_DEF(SCTP_DATA_REQ, MESSAGE_PRIORITY_MED, sctp_data_req_t, sctp_data_req) +MESSAGE_DEF(SCTP_DATA_IND, MESSAGE_PRIORITY_MED, sctp_data_ind_t, sctp_data_ind) +MESSAGE_DEF(SCTP_NEW_ASSOCIATION, MESSAGE_PRIORITY_MAX, sctp_new_peer_t, sctp_new_peer) +MESSAGE_DEF(SCTP_CLOSE_ASSOCIATION, MESSAGE_PRIORITY_MAX, sctp_close_association_t, sctp_close_association) diff --git a/openair3/COMMON/sctp_messages_types.h b/openair3/COMMON/sctp_messages_types.h new file mode 100644 index 0000000000..5d1aef92ed --- /dev/null +++ b/openair3/COMMON/sctp_messages_types.h @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ + +#ifndef SCTP_MESSAGES_TYPES_H_ +#define SCTP_MESSAGES_TYPES_H_ + +#define SCTP_DATA_IND(mSGpTR) (mSGpTR)->ittiMsg.sctp_data_ind +#define SCTP_DATA_REQ(mSGpTR) (mSGpTR)->ittiMsg.sctp_data_req +#define SCTP_INIT_MSG(mSGpTR) (mSGpTR)->ittiMsg.sctpInit +#define SCTP_CLOSE_ASSOCIATION(mSGpTR) (mSGpTR)->ittiMsg.sctp_close_association + +typedef struct sctp_data_req_s { + uint8_t *buffer; + uint32_t bufLen; + uint32_t assocId; + uint16_t stream; +} sctp_data_req_t; + +typedef struct sctp_data_ind_s { + uint8_t *buffer; ///< SCTP buffer + uint32_t buf_length; ///< SCTP buffer length + int32_t assoc_id; ///< SCTP physical association ID + uint8_t stream; ///< Stream number on which data had been received + uint16_t instreams; ///< Number of input streams for the SCTP connection between peers + uint16_t outstreams; ///< Number of output streams for the SCTP connection between peers +} sctp_data_ind_t; + +typedef struct sctp_init_s { + /* Request usage of ipv4 */ + unsigned ipv4:1; + /* Request usage of ipv6 */ + unsigned ipv6:1; + uint8_t nb_ipv4_addr; + uint32_t ipv4_address[10]; + uint8_t nb_ipv6_addr; + char *ipv6_address[10]; + uint16_t port; + uint32_t ppid; +} SctpInit; + +typedef struct sctp_close_association_s { + uint32_t assoc_id; +} sctp_close_association_t; + +typedef struct sctp_new_peer_s { + uint32_t instreams; + uint32_t outstreams; + uint32_t assoc_id; +} sctp_new_peer_t; + +#endif /* SCTP_MESSAGES_TYPES_H_ */ diff --git a/openair-cn/COMMON/security_types.h b/openair3/COMMON/security_types.h similarity index 71% rename from openair-cn/COMMON/security_types.h rename to openair3/COMMON/security_types.h index debe695c90..3428b23e7a 100644 --- a/openair-cn/COMMON/security_types.h +++ b/openair3/COMMON/security_types.h @@ -1,31 +1,32 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 Eurecom +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ - 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ #if HAVE_CONFIG_H # include "config.h" #endif diff --git a/openair3/COMMON/tasks_def.h b/openair3/COMMON/tasks_def.h new file mode 100644 index 0000000000..4590bc002a --- /dev/null +++ b/openair3/COMMON/tasks_def.h @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ + +// This task is mandatory and must always be placed in first position +TASK_DEF(TASK_TIMER, TASK_PRIORITY_MED, 10) + +// Other possible tasks in the process + +/// GTPV1-U task +TASK_DEF(TASK_GTPV1_U, TASK_PRIORITY_MED, 200) +/// FW_IP task +TASK_DEF(TASK_FW_IP, TASK_PRIORITY_MED, 200) +/// MME Applicative task +TASK_DEF(TASK_MME_APP, TASK_PRIORITY_MED, 200) +/// NAS task +TASK_DEF(TASK_NAS_MME, TASK_PRIORITY_MED, 200) +/// S11 task +TASK_DEF(TASK_S11, TASK_PRIORITY_MED, 200) +/// S1AP task +TASK_DEF(TASK_S1AP, TASK_PRIORITY_MED, 200) +/// S6a task +TASK_DEF(TASK_S6A, TASK_PRIORITY_MED, 200) +/// SCTP task +TASK_DEF(TASK_SCTP, TASK_PRIORITY_MED, 200) +/// Serving and Proxy Gateway Application task +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) diff --git a/openair3/COMMON/udp_messages_def.h b/openair3/COMMON/udp_messages_def.h new file mode 100644 index 0000000000..551788a2bb --- /dev/null +++ b/openair3/COMMON/udp_messages_def.h @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ + +MESSAGE_DEF(UDP_INIT, MESSAGE_PRIORITY_MED, udp_init_t, udp_init) +MESSAGE_DEF(UDP_DATA_REQ, MESSAGE_PRIORITY_MED, udp_data_req_t, udp_data_req) +MESSAGE_DEF(UDP_DATA_IND, MESSAGE_PRIORITY_MED, udp_data_ind_t, udp_data_ind) diff --git a/openair3/COMMON/udp_messages_types.h b/openair3/COMMON/udp_messages_types.h new file mode 100644 index 0000000000..a44ab44c16 --- /dev/null +++ b/openair3/COMMON/udp_messages_types.h @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ + +#ifndef UDP_MESSAGES_TYPES_H_ +#define UDP_MESSAGES_TYPES_H_ + +#define UDP_INIT(mSGpTR) (mSGpTR)->ittiMsg.udp_init + +typedef struct { + uint32_t port; + char *address; +} udp_init_t; + +typedef struct { + uint8_t *buffer; + uint32_t buffer_length; + uint32_t buffer_offset; + uint32_t peer_address; + uint32_t peer_port; +} udp_data_req_t; + +typedef struct { + uint8_t *buffer; + uint32_t buffer_length; + uint32_t peer_address; + uint32_t peer_port; +} udp_data_ind_t; + +#endif /* UDP_MESSAGES_TYPES_H_ */ diff --git a/openair-cn/COPYING b/openair3/DOCS/DOXYGEN/COPYING similarity index 100% rename from openair-cn/COPYING rename to openair3/DOCS/DOXYGEN/COPYING diff --git a/openair3/DOCS/DOXYGEN/Doxyfile b/openair3/DOCS/DOXYGEN/Doxyfile deleted file mode 100644 index 64c68eed76..0000000000 --- a/openair3/DOCS/DOXYGEN/Doxyfile +++ /dev/null @@ -1,217 +0,0 @@ -# Doxyfile 1.3.8 - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- -PROJECT_NAME = OPENAIR -PROJECT_NUMBER = -OUTPUT_DIRECTORY = -CREATE_SUBDIRS = NO -OUTPUT_LANGUAGE = English -USE_WINDOWS_ENCODING = YES -BRIEF_MEMBER_DESC = YES -REPEAT_BRIEF = YES -ABBREVIATE_BRIEF = -ALWAYS_DETAILED_SEC = NO -INLINE_INHERITED_MEMB = NO -FULL_PATH_NAMES = NO -STRIP_FROM_PATH = -STRIP_FROM_INC_PATH = -SHORT_NAMES = NO -JAVADOC_AUTOBRIEF = YES -MULTILINE_CPP_IS_BRIEF = YES -DETAILS_AT_TOP = YES -INHERIT_DOCS = NO -DISTRIBUTE_GROUP_DOC = NO -TAB_SIZE = 8 -ALIASES = -OPTIMIZE_OUTPUT_FOR_C = YES -OPTIMIZE_OUTPUT_JAVA = NO -SUBGROUPING = YES -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- -EXTRACT_ALL = YES -EXTRACT_PRIVATE = NO -EXTRACT_STATIC = NO -EXTRACT_LOCAL_CLASSES = YES -EXTRACT_LOCAL_METHODS = YES -HIDE_UNDOC_MEMBERS = YES -HIDE_UNDOC_CLASSES = YES -HIDE_FRIEND_COMPOUNDS = NO -HIDE_IN_BODY_DOCS = NO -INTERNAL_DOCS = NO -CASE_SENSE_NAMES = YES -HIDE_SCOPE_NAMES = NO -SHOW_INCLUDE_FILES = NO -INLINE_INFO = YES -SORT_MEMBER_DOCS = NO -SORT_BRIEF_DOCS = NO -SORT_BY_SCOPE_NAME = NO -GENERATE_TODOLIST = YES -GENERATE_TESTLIST = NO -GENERATE_BUGLIST = YES -GENERATE_DEPRECATEDLIST= NO -ENABLED_SECTIONS = -MAX_INITIALIZER_LINES = 30 -SHOW_USED_FILES = NO -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- -QUIET = NO -WARNINGS = YES -WARN_IF_UNDOCUMENTED = YES -WARN_IF_DOC_ERROR = YES -WARN_FORMAT = "$file:$line: $text" -WARN_LOGFILE = -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- -INPUT = $(OPENAIR3_DIR)/MESH/L3_rrc_interface.h \ - $(OPENAIR3_DIR)/MESH/L3_rrc_defs.h \ - $(OPENAIR3_DIR)/MESH/cmm_rrm_interface.h \ - $(OPENAIR3_DIR)/MESH/cmm_ral_interface.h \ - -FILE_PATTERNS = *.h -RECURSIVE = NO -EXCLUDE = -EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = -EXAMPLE_PATH = -EXAMPLE_PATTERNS = -EXAMPLE_RECURSIVE = NO -IMAGE_PATH = images -INPUT_FILTER = -FILTER_PATTERNS = -FILTER_SOURCE_FILES = NO -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- -SOURCE_BROWSER = NO -INLINE_SOURCES = NO -STRIP_CODE_COMMENTS = YES -REFERENCED_BY_RELATION = NO -REFERENCES_RELATION = NO -VERBATIM_HEADERS = YES -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- -ALPHABETICAL_INDEX = NO -COLS_IN_ALPHA_INDEX = 5 -IGNORE_PREFIX = -#--------------------------------------------------------------------------- -COLS_IN_ALPHA_INDEX = 5 -IGNORE_PREFIX = -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- -ALPHABETICAL_INDEX = NO -COLS_IN_ALPHA_INDEX = 5 -IGNORE_PREFIX = -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- -GENERATE_HTML = YES -HTML_OUTPUT = html -HTML_FILE_EXTENSION = .html -HTML_HEADER = -HTML_FOOTER = -HTML_STYLESHEET = -HTML_ALIGN_MEMBERS = YES -GENERATE_HTMLHELP = YES -CHM_FILE = irs_openair.chm -HHC_LOCATION = -GENERATE_CHI = NO -BINARY_TOC = NO -TOC_EXPAND = NO -DISABLE_INDEX = NO -ENUM_VALUES_PER_LINE = 4 -GENERATE_TREEVIEW = YES -TREEVIEW_WIDTH = 250 -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- -GENERATE_LATEX = NO -LATEX_OUTPUT = latex -LATEX_CMD_NAME = latex -MAKEINDEX_CMD_NAME = makeindex -COMPACT_LATEX = NO -PAPER_TYPE = a4wide -EXTRA_PACKAGES = amsmath amssymb -LATEX_HEADER = -PDF_HYPERLINKS = YES -USE_PDFLATEX = YES -LATEX_BATCHMODE = NO -LATEX_HIDE_INDICES = NO -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- -GENERATE_RTF = NO -RTF_OUTPUT = rtf -COMPACT_RTF = YES -RTF_HYPERLINKS = YES -RTF_STYLESHEET_FILE = -RTF_EXTENSIONS_FILE = -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- -GENERATE_MAN = NO -MAN_OUTPUT = man -MAN_EXTENSION = .3 -MAN_LINKS = NO -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- -GENERATE_XML = NO -XML_OUTPUT = xml -XML_SCHEMA = -XML_DTD = -XML_PROGRAMLISTING = YES -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- -GENERATE_AUTOGEN_DEF = NO -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- -GENERATE_PERLMOD = NO -PERLMOD_LATEX = NO -PERLMOD_PRETTY = YES -PERLMOD_MAKEVAR_PREFIX = -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- -ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = NO -EXPAND_ONLY_PREDEF = NO -SEARCH_INCLUDES = YES -INCLUDE_PATH = -INCLUDE_FILE_PATTERNS = -PREDEFINED = -EXPAND_AS_DEFINED = -SKIP_FUNCTION_MACROS = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- -TAGFILES = -GENERATE_TAGFILE = -ALLEXTERNALS = NO -EXTERNAL_GROUPS = YES -PERL_PATH = /usr/bin/perl -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- -CLASS_DIAGRAMS = NO -HIDE_UNDOC_RELATIONS = NO -HAVE_DOT = NO -CLASS_GRAPH = NO -COLLABORATION_GRAPH = NO -UML_LOOK = NO -TEMPLATE_RELATIONS = NO -INCLUDE_GRAPH = NO -INCLUDED_BY_GRAPH = NO -CALL_GRAPH = NO -GRAPHICAL_HIERARCHY = NO -DOT_IMAGE_FORMAT = jpg -DOT_PATH = -DOTFILE_DIRS = ../docs/dotfiles diff --git a/openair-cn/DOCS/DOXYGEN/Doxyfile.in b/openair3/DOCS/DOXYGEN/Doxyfile.in similarity index 100% rename from openair-cn/DOCS/DOXYGEN/Doxyfile.in rename to openair3/DOCS/DOXYGEN/Doxyfile.in diff --git a/openair-cn/DOCS/DOXYGEN/Makefile.am b/openair3/DOCS/DOXYGEN/Makefile.am similarity index 96% rename from openair-cn/DOCS/DOXYGEN/Makefile.am rename to openair3/DOCS/DOXYGEN/Makefile.am index 31f49b260d..f80ebfdfe0 100644 --- a/openair-cn/DOCS/DOXYGEN/Makefile.am +++ b/openair3/DOCS/DOXYGEN/Makefile.am @@ -21,7 +21,7 @@ # Contact Information # OpenAirInterface Admin: openair_admin@eurecom.fr # OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr +# OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr # # Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. # diff --git a/openair-cn/DOCS/COPYING b/openair3/DOCS/Latex/COPYING similarity index 100% rename from openair-cn/DOCS/COPYING rename to openair3/DOCS/Latex/COPYING diff --git a/openair-cn/DOCS/DOXYGEN/COPYING b/openair3/DOCS/Latex/DefaultBearer/COPYING similarity index 100% rename from openair-cn/DOCS/DOXYGEN/COPYING rename to openair3/DOCS/Latex/DefaultBearer/COPYING diff --git a/openair-cn/DOCS/Latex/DefaultBearer/DefaultBearer.pdf b/openair3/DOCS/Latex/DefaultBearer/DefaultBearer.pdf similarity index 100% rename from openair-cn/DOCS/Latex/DefaultBearer/DefaultBearer.pdf rename to openair3/DOCS/Latex/DefaultBearer/DefaultBearer.pdf diff --git a/openair-cn/DOCS/Latex/DefaultBearer/DefaultBearer.tex b/openair3/DOCS/Latex/DefaultBearer/DefaultBearer.tex similarity index 100% rename from openair-cn/DOCS/Latex/DefaultBearer/DefaultBearer.tex rename to openair3/DOCS/Latex/DefaultBearer/DefaultBearer.tex diff --git a/openair-cn/DOCS/Latex/COPYING b/openair3/DOCS/Latex/EPC/COPYING similarity index 100% rename from openair-cn/DOCS/Latex/COPYING rename to openair3/DOCS/Latex/EPC/COPYING diff --git a/openair-cn/DOCS/Latex/EPC/EPC.pdf b/openair3/DOCS/Latex/EPC/EPC.pdf similarity index 100% rename from openair-cn/DOCS/Latex/EPC/EPC.pdf rename to openair3/DOCS/Latex/EPC/EPC.pdf diff --git a/openair-cn/DOCS/Latex/EPC/EPC.tex b/openair3/DOCS/Latex/EPC/EPC.tex similarity index 100% rename from openair-cn/DOCS/Latex/EPC/EPC.tex rename to openair3/DOCS/Latex/EPC/EPC.tex diff --git a/openair-cn/DOCS/Latex/EPC/Makefile b/openair3/DOCS/Latex/EPC/Makefile similarity index 95% rename from openair-cn/DOCS/Latex/EPC/Makefile rename to openair3/DOCS/Latex/EPC/Makefile index 4c218c90fb..a29da4a53c 100644 --- a/openair-cn/DOCS/Latex/EPC/Makefile +++ b/openair3/DOCS/Latex/EPC/Makefile @@ -21,7 +21,7 @@ # Contact Information # OpenAirInterface Admin: openair_admin@eurecom.fr # OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr +# OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr # # Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. # diff --git a/openair-cn/DOCS/Makefile.am b/openair3/DOCS/Makefile.am similarity index 95% rename from openair-cn/DOCS/Makefile.am rename to openair3/DOCS/Makefile.am index 4f16edea72..daf460186f 100644 --- a/openair-cn/DOCS/Makefile.am +++ b/openair3/DOCS/Makefile.am @@ -21,7 +21,7 @@ # Contact Information # OpenAirInterface Admin: openair_admin@eurecom.fr # OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr +# OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr # # Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. # diff --git a/openair3/DOCS/TEMPLATES/CODE/COPYING b/openair3/DOCS/TEMPLATES/CODE/COPYING deleted file mode 100644 index 623b6258a1..0000000000 --- a/openair3/DOCS/TEMPLATES/CODE/COPYING +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program 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 2 of the License, or - (at your option) any later version. - - This program 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 this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/openair3/DOCS/TEMPLATES/CODE/Doxyfile b/openair3/DOCS/TEMPLATES/CODE/Doxyfile deleted file mode 100644 index 131b032fb4..0000000000 --- a/openair3/DOCS/TEMPLATES/CODE/Doxyfile +++ /dev/null @@ -1,231 +0,0 @@ -# Doxyfile 1.5.3 - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- -DOXYFILE_ENCODING = UTF-8 -PROJECT_NAME = OpenAirInterface -PROJECT_NUMBER = V1.0 -OUTPUT_DIRECTORY = -CREATE_SUBDIRS = NO -OUTPUT_LANGUAGE = English -BRIEF_MEMBER_DESC = YES -REPEAT_BRIEF = YES -ABBREVIATE_BRIEF = -ALWAYS_DETAILED_SEC = NO -INLINE_INHERITED_MEMB = NO -FULL_PATH_NAMES = YES -STRIP_FROM_PATH = -STRIP_FROM_INC_PATH = -SHORT_NAMES = NO -JAVADOC_AUTOBRIEF = NO -QT_AUTOBRIEF = NO -MULTILINE_CPP_IS_BRIEF = NO -DETAILS_AT_TOP = NO -INHERIT_DOCS = YES -SEPARATE_MEMBER_PAGES = NO -TAB_SIZE = 8 -ALIASES = -OPTIMIZE_OUTPUT_FOR_C = NO -OPTIMIZE_OUTPUT_JAVA = NO -BUILTIN_STL_SUPPORT = NO -CPP_CLI_SUPPORT = NO -DISTRIBUTE_GROUP_DOC = NO -SUBGROUPING = YES -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- -EXTRACT_ALL = NO -EXTRACT_PRIVATE = NO -EXTRACT_STATIC = NO -EXTRACT_LOCAL_CLASSES = YES -EXTRACT_LOCAL_METHODS = NO -EXTRACT_ANON_NSPACES = NO -HIDE_UNDOC_MEMBERS = NO -HIDE_UNDOC_CLASSES = NO -HIDE_FRIEND_COMPOUNDS = NO -HIDE_IN_BODY_DOCS = NO -INTERNAL_DOCS = NO -CASE_SENSE_NAMES = YES -HIDE_SCOPE_NAMES = NO -SHOW_INCLUDE_FILES = YES -INLINE_INFO = YES -SORT_MEMBER_DOCS = YES -SORT_BRIEF_DOCS = NO -SORT_BY_SCOPE_NAME = NO -GENERATE_TODOLIST = YES -GENERATE_TESTLIST = YES -GENERATE_BUGLIST = YES -GENERATE_DEPRECATEDLIST= YES -ENABLED_SECTIONS = -MAX_INITIALIZER_LINES = 30 -SHOW_USED_FILES = YES -SHOW_DIRECTORIES = NO -FILE_VERSION_FILTER = -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- -QUIET = NO -WARNINGS = YES -WARN_IF_UNDOCUMENTED = YES -WARN_IF_DOC_ERROR = YES -WARN_NO_PARAMDOC = NO -WARN_FORMAT = "$file:$line: $text" -WARN_LOGFILE = -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- -INPUT = example_doxy.h -INPUT_ENCODING = UTF-8 -FILE_PATTERNS = -RECURSIVE = NO -EXCLUDE = -EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = -EXCLUDE_SYMBOLS = -EXAMPLE_PATH = -EXAMPLE_PATTERNS = -EXAMPLE_RECURSIVE = NO -IMAGE_PATH = images/ -INPUT_FILTER = -FILTER_PATTERNS = -FILTER_SOURCE_FILES = NO -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- -SOURCE_BROWSER = NO -INLINE_SOURCES = NO -STRIP_CODE_COMMENTS = YES -REFERENCED_BY_RELATION = YES -REFERENCES_RELATION = YES -REFERENCES_LINK_SOURCE = YES -USE_HTAGS = NO -VERBATIM_HEADERS = YES -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- -ALPHABETICAL_INDEX = NO -COLS_IN_ALPHA_INDEX = 5 -IGNORE_PREFIX = -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- -GENERATE_HTML = YES -HTML_OUTPUT = html -HTML_FILE_EXTENSION = .html -HTML_HEADER = -HTML_FOOTER = -HTML_STYLESHEET = -HTML_ALIGN_MEMBERS = YES -GENERATE_HTMLHELP = NO -HTML_DYNAMIC_SECTIONS = NO -CHM_FILE = -HHC_LOCATION = -GENERATE_CHI = NO -BINARY_TOC = NO -TOC_EXPAND = NO -DISABLE_INDEX = NO -ENUM_VALUES_PER_LINE = 4 -GENERATE_TREEVIEW = YES -TREEVIEW_WIDTH = 250 -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- -GENERATE_LATEX = YES -LATEX_OUTPUT = latex -LATEX_CMD_NAME = latex -MAKEINDEX_CMD_NAME = makeindex -COMPACT_LATEX = NO -PAPER_TYPE = a4wide -EXTRA_PACKAGES = -LATEX_HEADER = -PDF_HYPERLINKS = NO -USE_PDFLATEX = NO -LATEX_BATCHMODE = NO -LATEX_HIDE_INDICES = NO -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- -GENERATE_RTF = NO -RTF_OUTPUT = rtf -COMPACT_RTF = NO -RTF_HYPERLINKS = NO -RTF_STYLESHEET_FILE = -RTF_EXTENSIONS_FILE = -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- -GENERATE_MAN = NO -MAN_OUTPUT = man -MAN_EXTENSION = .3 -MAN_LINKS = NO -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- -GENERATE_XML = NO -XML_OUTPUT = xml -XML_SCHEMA = -XML_DTD = -XML_PROGRAMLISTING = YES -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- -GENERATE_AUTOGEN_DEF = NO -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- -GENERATE_PERLMOD = NO -PERLMOD_LATEX = NO -PERLMOD_PRETTY = YES -PERLMOD_MAKEVAR_PREFIX = -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- -ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = NO -EXPAND_ONLY_PREDEF = NO -SEARCH_INCLUDES = YES -INCLUDE_PATH = -INCLUDE_FILE_PATTERNS = -PREDEFINED = -EXPAND_AS_DEFINED = -SKIP_FUNCTION_MACROS = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- -TAGFILES = -GENERATE_TAGFILE = -ALLEXTERNALS = NO -EXTERNAL_GROUPS = YES -PERL_PATH = /usr/bin/perl -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- -CLASS_DIAGRAMS = YES -MSCGEN_PATH = -HIDE_UNDOC_RELATIONS = YES -HAVE_DOT = NO -CLASS_GRAPH = YES -COLLABORATION_GRAPH = YES -GROUP_GRAPHS = YES -UML_LOOK = NO -TEMPLATE_RELATIONS = NO -INCLUDE_GRAPH = YES -INCLUDED_BY_GRAPH = YES -CALL_GRAPH = NO -CALLER_GRAPH = NO -GRAPHICAL_HIERARCHY = YES -DIRECTORY_GRAPH = YES -DOT_IMAGE_FORMAT = png -DOT_PATH = /usr/bin/dot -DOTFILE_DIRS = -DOT_GRAPH_MAX_NODES = 50 -MAX_DOT_GRAPH_DEPTH = 0 -DOT_TRANSPARENT = NO -DOT_MULTI_TARGETS = NO -GENERATE_LEGEND = YES -DOT_CLEANUP = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- -SEARCHENGINE = NO diff --git a/openair3/DOCS/TEMPLATES/CODE/example_doxy.h b/openair3/DOCS/TEMPLATES/CODE/example_doxy.h deleted file mode 100644 index 8ced85652f..0000000000 --- a/openair3/DOCS/TEMPLATES/CODE/example_doxy.h +++ /dev/null @@ -1,149 +0,0 @@ -/******************************************************************************* - - Eurecom OpenAirInterface 3 - Copyright(c) 1999 - 2010 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.fsr/openairinterface - Address : Eurecom, 2229, route des crêtes, 06560 Valbonne Sophia Antipolis, France - -*******************************************************************************/ - - -/*! \file doxy_template.h -* \brief explain how this block is organized, and how it works -* \author Navid Nikaein -* \date 2006-2010 -* \version 4.0 -* \company Eurecom -* \email: navid.nikaein@eurecom.fr -* \note this a note -* \bug this is a bug -* \warning this is a warning -*/ - -//-----------------------------------begin group----------------------------- - - -/** @defgroup _oai System definitions - - - -There is different modules: -- OAI Address -- OAI Components -- \ref _frame - -The following diagram is based on graphviz (http://www.graphviz.org/), you need to install the package to view the diagram. - - * \dot - * digraph group_frame { - * node [shape=rect, fontname=Helvetica, fontsize=8,style=filled,fillcolor=lightgrey]; - * a [ label = " address"]; - * b [ label = " component"]; - * c [ label = " frame",URL="\ref _frame"]; - * a->b; - * a->c; - * b->d; - * label="Architecture" - * - * } - * \enddot - -\section _doxy Doxygen Help -You can use the provided Doxyfile as the configuration file or alternatively run "doxygen -g Doxyfile" to generat the file. -You need at least to set the some variables in the Doxyfile including "PROJECT_NAME","PROJECT_NUMBER","INPUT","IMAGE_PATH". -Doxygen help and commands can be found at http://www.stack.nl/~dimitri/doxygen/commands.html#cmdprotocol - -\section _arch Architecture - -You need to set the IMAGE_PATH in your Doxyfile - -\image html arch.png "Architecture" -\image latex arch.eps "Architecture" - -\subsection _mac MAC -thisis the mac -\subsection _rlc RLC -this is the rlc -\subsection _impl Implementation -what about the implementation - - -*@{*/ - -/*!\brief OAI protocol verion */ -#define OAI_PROTOCOL_Version 0x00 -/*!\brief Length in bytes of the OAI address */ -#define OAI_ADDR_LEN 6 - -/*!\brief OAI snode type */ -enum NodeType { - /*!\brief mesh routers are */ - meshrouter = 1, - /*!\brief relay nodes are */ - relaynode = 2, - /*!\brief clusterheads are */ - clusterhead = 3 -}; - - -/*@}*/ - -// --------------------------end group ------------------------------ - - -//---------------------------begin group------------------------------ -/** @defgroup _frame Frame Structure - * @ingroup _oai -The Frame is composed of .... - - -*@{*/ -/*! \brief the frame structure is ... */ -struct frame { - u_short duration; /*!< \brief Duration in us (2 bytes) */ - u_char da[OAI_ADDR_LEN];/*!< \brief Destination MAC@ (OAI_ADDR_LEN bytes) */ - u_char sa[OAI_ADDR_LEN];/*!< \brief Source MAC@ (OAI_ADDR_LEN bytes)*/ - u_char body[0]; /*!< \brief Body of the frame */ -}; -/*! \brief Broadcast ID is ... */ -#define BROADCAST_ID 15 - - -/*@}*/ - -//--------------------------end group----------------------- - - -//-----------------------begin func proto------------------- - -/*! \fn int init(int,int) -* \brief this function initializes and allocates memories and etc. -* \param[in] src the memory area to copy frrm -* \param[out] dst the memory area to copy to -* \return 0 on success, otherwise -1 -* \note -* @ingroup _oai -*/ -int init(int src, int dst); - -//-----------------------end func proto------------------- diff --git a/openair3/DOCS/TEMPLATES/CODE/images/arch.eps b/openair3/DOCS/TEMPLATES/CODE/images/arch.eps deleted file mode 100644 index a64e194fdb..0000000000 --- a/openair3/DOCS/TEMPLATES/CODE/images/arch.eps +++ /dev/null @@ -1,785 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Title: /homes/nikaeinn/templates/dev/arch.dia -%%Creator: Dia v0.95 -%%CreationDate: Fri Dec 11 12:31:01 2009 -%%For: nikaeinn -%%Orientation: Portrait -%%Magnification: 1.0000 -%%BoundingBox: 0 0 355 138 -%%BeginSetup -%%EndSetup -%%EndComments -%%BeginProlog -[ /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef -/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef -/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef -/.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright -/parenleft /parenright /asterisk /plus /comma /hyphen /period /slash /zero /one -/two /three /four /five /six /seven /eight /nine /colon /semicolon -/less /equal /greater /question /at /A /B /C /D /E -/F /G /H /I /J /K /L /M /N /O -/P /Q /R /S /T /U /V /W /X /Y -/Z /bracketleft /backslash /bracketright /asciicircum /underscore /quoteleft /a /b /c -/d /e /f /g /h /i /j /k /l /m -/n /o /p /q /r /s /t /u /v /w -/x /y /z /braceleft /bar /braceright /asciitilde /.notdef /.notdef /.notdef -/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef -/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef -/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef -/space /exclamdown /cent /sterling /currency /yen /brokenbar /section /dieresis /copyright -/ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron /degree /plusminus /twosuperior /threesuperior -/acute /mu /paragraph /periodcentered /cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf -/threequarters /questiondown /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla -/Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis /Eth /Ntilde -/Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply /Oslash /Ugrave /Uacute /Ucircumflex -/Udieresis /Yacute /Thorn /germandbls /agrave /aacute /acircumflex /atilde /adieresis /aring -/ae /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis -/eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide /oslash /ugrave -/uacute /ucircumflex /udieresis /yacute /thorn /ydieresis] /isolatin1encoding exch def -/cp {closepath} bind def -/c {curveto} bind def -/f {fill} bind def -/a {arc} bind def -/ef {eofill} bind def -/ex {exch} bind def -/gr {grestore} bind def -/gs {gsave} bind def -/sa {save} bind def -/rs {restore} bind def -/l {lineto} bind def -/m {moveto} bind def -/rm {rmoveto} bind def -/n {newpath} bind def -/s {stroke} bind def -/sh {show} bind def -/slc {setlinecap} bind def -/slj {setlinejoin} bind def -/slw {setlinewidth} bind def -/srgb {setrgbcolor} bind def -/rot {rotate} bind def -/sc {scale} bind def -/sd {setdash} bind def -/ff {findfont} bind def -/sf {setfont} bind def -/scf {scalefont} bind def -/sw {stringwidth pop} bind def -/tr {translate} bind def - -/ellipsedict 8 dict def -ellipsedict /mtrx matrix put -/ellipse -{ ellipsedict begin - /endangle exch def - /startangle exch def - /yrad exch def - /xrad exch def - /y exch def - /x exch def /savematrix mtrx currentmatrix def - x y tr xrad yrad sc - 0 0 1 startangle endangle arc - savematrix setmatrix - end -} def - -/mergeprocs { -dup length -3 -1 roll -dup -length -dup -5 1 roll -3 -1 roll -add -array cvx -dup -3 -1 roll -0 exch -putinterval -dup -4 2 roll -putinterval -} bind def -/dpi_x 300 def -/dpi_y 300 def -/conicto { - /to_y exch def - /to_x exch def - /conic_cntrl_y exch def - /conic_cntrl_x exch def - currentpoint - /p0_y exch def - /p0_x exch def - /p1_x p0_x conic_cntrl_x p0_x sub 2 3 div mul add def - /p1_y p0_y conic_cntrl_y p0_y sub 2 3 div mul add def - /p2_x p1_x to_x p0_x sub 1 3 div mul add def - /p2_y p1_y to_y p0_y sub 1 3 div mul add def - p1_x p1_y p2_x p2_y to_x to_y curveto -} bind def -/start_ol { gsave 1.1 dpi_x div dup scale} bind def -/end_ol { closepath fill grestore } bind def -28.346000 -28.346000 scale --4.400000 -8.150000 translate -%%EndProlog - - -1.000000 1.000000 1.000000 srgb -n 4.450000 3.350000 m 4.450000 8.100000 l 16.850000 8.100000 l 16.850000 3.350000 l f -0.100000 slw -[] 0 sd -[] 0 sd -0 slj -0.000000 0.000000 0.000000 srgb -n 4.450000 3.350000 m 4.450000 8.100000 l 16.850000 8.100000 l 16.850000 3.350000 l cp s -gsave 8.875000 4.300000 translate 0.035278 -0.035278 scale -start_ol -1762 3044 moveto -1276 3044 990 2673 conicto -704 2303 704 1663 conicto -704 1025 990 654 conicto -1276 284 1762 284 conicto -2248 284 2532 654 conicto -2816 1025 2816 1663 conicto -2816 2303 2532 2673 conicto -2248 3044 1762 3044 conicto -1762 3392 moveto -2446 3392 2855 2922 conicto -3264 2453 3264 1664 conicto -3264 876 2855 406 conicto -2446 -64 1762 -64 conicto -1077 -64 666 405 conicto -256 874 256 1664 conicto -256 2453 666 2922 conicto -1077 3392 1762 3392 conicto -end_ol grestore -gsave 9.330083 4.300000 translate 0.035278 -0.035278 scale -start_ol -1536 2838 moveto -935 1180 lineto -2140 1180 lineto -1536 2838 lineto -1286 3282 moveto -1789 3282 lineto -3038 0 lineto -2577 0 lineto -2278 832 lineto -801 832 lineto -503 0 lineto -35 0 lineto -1286 3282 lineto -end_ol grestore -gsave 9.736483 4.300000 translate 0.035278 -0.035278 scale -start_ol -448 3328 moveto -874 3328 lineto -874 0 lineto -448 0 lineto -448 3328 lineto -end_ol grestore -gsave 9.914283 4.300000 translate 0.035278 -0.035278 scale -start_ol -end_ol grestore -gsave 10.100550 4.300000 translate 0.035278 -0.035278 scale -start_ol -1536 2838 moveto -935 1180 lineto -2140 1180 lineto -1536 2838 lineto -1286 3282 moveto -1789 3282 lineto -3038 0 lineto -2577 0 lineto -2278 832 lineto -801 832 lineto -503 0 lineto -35 0 lineto -1286 3282 lineto -end_ol grestore -gsave 10.506950 4.300000 translate 0.035278 -0.035278 scale -start_ol -1842 2133 moveto -1776 2174 1696 2193 conicto -1616 2212 1519 2212 conicto -1177 2212 993 1983 conicto -810 1755 810 1328 conicto -810 0 lineto -384 0 lineto -384 2496 lineto -810 2496 lineto -810 2129 lineto -937 2347 1141 2453 conicto -1345 2560 1638 2560 conicto -1680 2560 1730 2554 conicto -1781 2548 1842 2536 conicto -1842 2133 lineto -end_ol grestore -gsave 10.752483 4.300000 translate 0.035278 -0.035278 scale -start_ol -2176 2404 moveto -2176 2020 lineto -2008 2116 1838 2164 conicto -1669 2212 1496 2212 conicto -1109 2212 895 1958 conicto -682 1705 682 1248 conicto -682 791 895 537 conicto -1109 284 1496 284 conicto -1669 284 1838 332 conicto -2008 380 2176 476 conicto -2176 97 lineto -2009 17 1830 -23 conicto -1652 -64 1449 -64 conicto -902 -64 579 291 conicto -256 646 256 1248 conicto -256 1859 582 2209 conicto -909 2560 1476 2560 conicto -1660 2560 1835 2521 conicto -2011 2482 2176 2404 conicto -end_ol grestore -gsave 11.074217 4.300000 translate 0.035278 -0.035278 scale -start_ol -2474 1509 moveto -2474 0 lineto -2048 0 lineto -2048 1502 lineto -2048 1858 1913 2035 conicto -1778 2212 1509 2212 conicto -1185 2212 997 1999 conicto -810 1786 810 1419 conicto -810 0 lineto -384 0 lineto -384 3456 lineto -810 3456 lineto -810 2120 lineto -954 2343 1152 2451 conicto -1350 2560 1609 2560 conicto -2037 2560 2255 2293 conicto -2474 2027 2474 1509 conicto -end_ol grestore -1.000000 1.000000 1.000000 srgb -n 4.900000 6.250000 m 4.900000 7.500000 l 8.250000 7.500000 l 8.250000 6.250000 l f -0.100000 slw -[] 0 sd -[] 0 sd -0 slj -0.000000 0.000000 0.000000 srgb -n 4.900000 6.250000 m 4.900000 7.500000 l 8.250000 7.500000 l 8.250000 6.250000 l cp s -1.000000 1.000000 1.000000 srgb -n 8.900000 6.200000 m 8.900000 7.495000 l 12.500000 7.495000 l 12.500000 6.200000 l f -0.100000 slw -[] 0 sd -[] 0 sd -0 slj -0.000000 0.000000 0.000000 srgb -n 8.900000 6.200000 m 8.900000 7.495000 l 12.500000 7.495000 l 12.500000 6.200000 l cp s -1.000000 1.000000 1.000000 srgb -n 13.090000 6.195000 m 13.090000 7.495000 l 16.400000 7.495000 l 16.400000 6.195000 l f -0.100000 slw -[] 0 sd -[] 0 sd -0 slj -0.000000 0.000000 0.000000 srgb -n 13.090000 6.195000 m 13.090000 7.495000 l 16.400000 7.495000 l 16.400000 6.195000 l cp s -gsave 5.400000 7.100000 translate 0.035278 -0.035278 scale -start_ol -1536 2838 moveto -935 1180 lineto -2140 1180 lineto -1536 2838 lineto -1286 3282 moveto -1789 3282 lineto -3038 0 lineto -2577 0 lineto -2278 832 lineto -801 832 lineto -503 0 lineto -35 0 lineto -1286 3282 lineto -end_ol grestore -gsave 5.795817 7.100000 translate 0.035278 -0.035278 scale -start_ol -2048 2116 moveto -2048 3456 lineto -2474 3456 lineto -2474 0 lineto -2048 0 lineto -2048 380 lineto -1922 154 1727 45 conicto -1533 -64 1261 -64 conicto -816 -64 536 297 conicto -256 659 256 1248 conicto -256 1837 536 2198 conicto -816 2560 1260 2560 conicto -1532 2560 1726 2450 conicto -1921 2341 2048 2116 conicto -682 1248 moveto -682 798 864 541 conicto -1046 284 1364 284 conicto -1683 284 1865 541 conicto -2048 798 2048 1248 conicto -2048 1699 1865 1955 conicto -1683 2212 1364 2212 conicto -1046 2212 864 1955 conicto -682 1699 682 1248 conicto -end_ol grestore -gsave 6.176817 7.100000 translate 0.035278 -0.035278 scale -start_ol -2048 2116 moveto -2048 3456 lineto -2474 3456 lineto -2474 0 lineto -2048 0 lineto -2048 380 lineto -1922 154 1727 45 conicto -1533 -64 1261 -64 conicto -816 -64 536 297 conicto -256 659 256 1248 conicto -256 1837 536 2198 conicto -816 2560 1260 2560 conicto -1532 2560 1726 2450 conicto -1921 2341 2048 2116 conicto -682 1248 moveto -682 798 864 541 conicto -1046 284 1364 284 conicto -1683 284 1865 541 conicto -2048 798 2048 1248 conicto -2048 1699 1865 1955 conicto -1683 2212 1364 2212 conicto -1046 2212 864 1955 conicto -682 1699 682 1248 conicto -end_ol grestore -gsave 6.557817 7.100000 translate 0.035278 -0.035278 scale -start_ol -1842 2133 moveto -1776 2174 1696 2193 conicto -1616 2212 1519 2212 conicto -1177 2212 993 1983 conicto -810 1755 810 1328 conicto -810 0 lineto -384 0 lineto -384 2496 lineto -810 2496 lineto -810 2129 lineto -937 2347 1141 2453 conicto -1345 2560 1638 2560 conicto -1680 2560 1730 2554 conicto -1781 2548 1842 2536 conicto -1842 2133 lineto -end_ol grestore -gsave 6.790121 7.100000 translate 0.035278 -0.035278 scale -start_ol -2538 1329 moveto -2538 1124 lineto -682 1124 lineto -682 714 908 499 conicto -1134 284 1537 284 conicto -1772 284 1991 340 conicto -2211 396 2432 509 conicto -2432 128 lineto -2216 34 1988 -15 conicto -1760 -64 1526 -64 conicto -940 -64 598 284 conicto -256 633 256 1226 conicto -256 1839 582 2199 conicto -909 2560 1463 2560 conicto -1960 2560 2249 2229 conicto -2538 1898 2538 1329 conicto -2112 1472 moveto -2112 1809 1931 2010 conicto -1751 2212 1453 2212 conicto -1116 2212 914 2018 conicto -712 1824 682 1472 conicto -2112 1472 lineto -end_ol grestore -gsave 7.154187 7.100000 translate 0.035278 -0.035278 scale -start_ol -2021 2424 moveto -2021 2034 lineto -1818 2123 1638 2167 conicto -1459 2212 1267 2212 conicto -975 2212 828 2119 conicto -682 2026 682 1838 conicto -682 1696 784 1615 conicto -887 1535 1196 1461 conicto -1327 1430 lineto -1748 1337 1930 1166 conicto -2112 995 2112 690 conicto -2112 342 1839 139 conicto -1566 -64 1089 -64 conicto -891 -64 675 -25 conicto -460 14 222 94 conicto -222 519 lineto -481 402 692 343 conicto -903 284 1110 284 conicto -1387 284 1536 383 conicto -1686 482 1686 661 conicto -1686 829 1580 917 conicto -1475 1006 1118 1088 conicto -985 1121 lineto -620 1201 438 1367 conicto -256 1533 256 1823 conicto -256 2176 507 2368 conicto -758 2560 1219 2560 conicto -1448 2560 1649 2526 conicto -1851 2492 2021 2424 conicto -end_ol grestore -gsave 7.458988 7.100000 translate 0.035278 -0.035278 scale -start_ol -2021 2424 moveto -2021 2034 lineto -1818 2123 1638 2167 conicto -1459 2212 1267 2212 conicto -975 2212 828 2119 conicto -682 2026 682 1838 conicto -682 1696 784 1615 conicto -887 1535 1196 1461 conicto -1327 1430 lineto -1748 1337 1930 1166 conicto -2112 995 2112 690 conicto -2112 342 1839 139 conicto -1566 -64 1089 -64 conicto -891 -64 675 -25 conicto -460 14 222 94 conicto -222 519 lineto -481 402 692 343 conicto -903 284 1110 284 conicto -1387 284 1536 383 conicto -1686 482 1686 661 conicto -1686 829 1580 917 conicto -1475 1006 1118 1088 conicto -985 1121 lineto -620 1201 438 1367 conicto -256 1533 256 1823 conicto -256 2176 507 2368 conicto -758 2560 1219 2560 conicto -1448 2560 1649 2526 conicto -1851 2492 2021 2424 conicto -end_ol grestore -gsave 9.020000 7.095000 translate 0.035278 -0.035278 scale -start_ol -2880 3094 moveto -2880 2615 lineto -2656 2831 2402 2937 conicto -2149 3044 1864 3044 conicto -1301 3044 1002 2689 conicto -704 2334 704 1663 conicto -704 993 1002 638 conicto -1301 284 1864 284 conicto -2149 284 2402 390 conicto -2656 497 2880 713 conicto -2880 238 lineto -2649 87 2390 11 conicto -2132 -64 1845 -64 conicto -1106 -64 681 399 conicto -256 863 256 1664 conicto -256 2466 681 2929 conicto -1106 3392 1845 3392 conicto -2137 3392 2395 3317 conicto -2654 3243 2880 3094 conicto -end_ol grestore -gsave 9.434867 7.095000 translate 0.035278 -0.035278 scale -start_ol -1377 2212 moveto -1055 2212 868 1954 conicto -682 1696 682 1248 conicto -682 800 867 542 conicto -1053 284 1377 284 conicto -1697 284 1883 543 conicto -2070 802 2070 1248 conicto -2070 1692 1883 1952 conicto -1697 2212 1377 2212 conicto -1376 2560 moveto -1899 2560 2197 2212 conicto -2496 1864 2496 1248 conicto -2496 635 2197 285 conicto -1899 -64 1376 -64 conicto -851 -64 553 285 conicto -256 635 256 1248 conicto -256 1864 553 2212 conicto -851 2560 1376 2560 conicto -end_ol grestore -gsave 9.798933 7.095000 translate 0.035278 -0.035278 scale -start_ol -2339 2028 moveto -2493 2302 2705 2431 conicto -2918 2560 3204 2560 conicto -3591 2560 3800 2286 conicto -4010 2013 4010 1509 conicto -4010 0 lineto -3584 0 lineto -3584 1502 lineto -3584 1862 3460 2037 conicto -3336 2212 3082 2212 conicto -2771 2212 2590 1999 conicto -2410 1786 2410 1419 conicto -2410 0 lineto -1984 0 lineto -1984 1502 lineto -1984 1865 1860 2038 conicto -1736 2212 1477 2212 conicto -1171 2212 990 1998 conicto -810 1784 810 1419 conicto -810 0 lineto -384 0 lineto -384 2496 lineto -810 2496 lineto -810 2120 lineto -947 2344 1141 2452 conicto -1335 2560 1602 2560 conicto -1871 2560 2060 2423 conicto -2249 2287 2339 2028 conicto -end_ol grestore -gsave 10.383133 7.095000 translate 0.035278 -0.035278 scale -start_ol -810 380 moveto -810 -960 lineto -384 -960 lineto -384 2496 lineto -810 2496 lineto -810 2116 lineto -937 2339 1131 2449 conicto -1325 2560 1595 2560 conicto -2042 2560 2322 2198 conicto -2602 1837 2602 1248 conicto -2602 659 2322 297 conicto -2043 -64 1595 -64 conicto -1325 -64 1131 45 conicto -938 155 810 380 conicto -2176 1248 moveto -2176 1699 1994 1955 conicto -1812 2212 1493 2212 conicto -1175 2212 992 1955 conicto -810 1699 810 1248 conicto -810 798 992 541 conicto -1175 284 1493 284 conicto -1812 284 1994 541 conicto -2176 798 2176 1248 conicto -end_ol grestore -gsave 10.755667 7.095000 translate 0.035278 -0.035278 scale -start_ol -1377 2212 moveto -1055 2212 868 1954 conicto -682 1696 682 1248 conicto -682 800 867 542 conicto -1053 284 1377 284 conicto -1697 284 1883 543 conicto -2070 802 2070 1248 conicto -2070 1692 1883 1952 conicto -1697 2212 1377 2212 conicto -1376 2560 moveto -1899 2560 2197 2212 conicto -2496 1864 2496 1248 conicto -2496 635 2197 285 conicto -1899 -64 1376 -64 conicto -851 -64 553 285 conicto -256 635 256 1248 conicto -256 1864 553 2212 conicto -851 2560 1376 2560 conicto -end_ol grestore -gsave 11.119733 7.095000 translate 0.035278 -0.035278 scale -start_ol -2474 1509 moveto -2474 0 lineto -2048 0 lineto -2048 1502 lineto -2048 1858 1913 2035 conicto -1778 2212 1509 2212 conicto -1185 2212 997 1999 conicto -810 1786 810 1419 conicto -810 0 lineto -384 0 lineto -384 2496 lineto -810 2496 lineto -810 2120 lineto -954 2340 1152 2450 conicto -1350 2560 1609 2560 conicto -2037 2560 2255 2293 conicto -2474 2027 2474 1509 conicto -end_ol grestore -gsave 11.500733 7.095000 translate 0.035278 -0.035278 scale -start_ol -2538 1329 moveto -2538 1124 lineto -682 1124 lineto -682 714 908 499 conicto -1134 284 1537 284 conicto -1772 284 1991 340 conicto -2211 396 2432 509 conicto -2432 128 lineto -2216 34 1988 -15 conicto -1760 -64 1526 -64 conicto -940 -64 598 284 conicto -256 633 256 1226 conicto -256 1839 582 2199 conicto -909 2560 1463 2560 conicto -1960 2560 2249 2229 conicto -2538 1898 2538 1329 conicto -2112 1472 moveto -2112 1809 1931 2010 conicto -1751 2212 1453 2212 conicto -1116 2212 914 2018 conicto -712 1824 682 1472 conicto -2112 1472 lineto -end_ol grestore -gsave 11.864800 7.095000 translate 0.035278 -0.035278 scale -start_ol -2474 1509 moveto -2474 0 lineto -2048 0 lineto -2048 1502 lineto -2048 1858 1913 2035 conicto -1778 2212 1509 2212 conicto -1185 2212 997 1999 conicto -810 1786 810 1419 conicto -810 0 lineto -384 0 lineto -384 2496 lineto -810 2496 lineto -810 2120 lineto -954 2340 1152 2450 conicto -1350 2560 1609 2560 conicto -2037 2560 2255 2293 conicto -2474 2027 2474 1509 conicto -end_ol grestore -gsave 12.245800 7.095000 translate 0.035278 -0.035278 scale -start_ol -832 3213 moveto -832 2524 lineto -1664 2524 lineto -1664 2176 lineto -832 2176 lineto -832 826 lineto -832 521 914 434 conicto -997 348 1249 348 conicto -1664 348 lineto -1664 0 lineto -1242 0 lineto -768 0 587 179 conicto -406 359 406 826 conicto -406 2176 lineto -128 2176 lineto -128 2524 lineto -406 2524 lineto -406 3213 lineto -832 3213 lineto -end_ol grestore -gsave 13.945000 6.995000 translate 0.035278 -0.035278 scale -start_ol -448 3328 moveto -2313 3328 lineto -2313 2980 lineto -874 2980 lineto -874 1948 lineto -2173 1948 lineto -2173 1600 lineto -874 1600 lineto -874 27 lineto -448 27 lineto -448 3328 lineto -end_ol grestore -gsave 14.239614 6.995000 translate 0.035278 -0.035278 scale -start_ol -1842 2133 moveto -1776 2174 1696 2193 conicto -1616 2212 1519 2212 conicto -1177 2212 993 1983 conicto -810 1755 810 1328 conicto -810 0 lineto -384 0 lineto -384 2496 lineto -810 2496 lineto -810 2129 lineto -937 2347 1141 2453 conicto -1345 2560 1638 2560 conicto -1680 2560 1730 2554 conicto -1781 2548 1842 2536 conicto -1842 2133 lineto -end_ol grestore -gsave 14.485147 6.995000 translate 0.035278 -0.035278 scale -start_ol -1528 1252 moveto -1050 1252 866 1139 conicto -682 1026 682 754 conicto -682 538 820 411 conicto -958 284 1196 284 conicto -1523 284 1721 523 conicto -1920 763 1920 1161 conicto -1920 1252 lineto -1528 1252 lineto -2346 1426 moveto -2346 0 lineto -1920 0 lineto -1920 383 lineto -1785 154 1579 45 conicto -1374 -64 1076 -64 conicto -701 -64 478 154 conicto -256 373 256 739 conicto -256 1166 543 1383 conicto -830 1600 1367 1600 conicto -1920 1600 lineto -1920 1639 lineto -1920 1913 1740 2062 conicto -1561 2212 1238 2212 conicto -1032 2212 836 2162 conicto -641 2113 448 2014 conicto -448 2386 lineto -670 2473 879 2516 conicto -1088 2560 1285 2560 conicto -1819 2560 2082 2279 conicto -2346 1998 2346 1426 conicto -end_ol grestore -gsave 14.849214 6.995000 translate 0.035278 -0.035278 scale -start_ol -2339 2028 moveto -2493 2302 2705 2431 conicto -2918 2560 3204 2560 conicto -3591 2560 3800 2286 conicto -4010 2013 4010 1509 conicto -4010 0 lineto -3584 0 lineto -3584 1502 lineto -3584 1862 3460 2037 conicto -3336 2212 3082 2212 conicto -2771 2212 2590 1999 conicto -2410 1786 2410 1419 conicto -2410 0 lineto -1984 0 lineto -1984 1502 lineto -1984 1865 1860 2038 conicto -1736 2212 1477 2212 conicto -1171 2212 990 1998 conicto -810 1784 810 1419 conicto -810 0 lineto -384 0 lineto -384 2496 lineto -810 2496 lineto -810 2120 lineto -947 2344 1141 2452 conicto -1335 2560 1602 2560 conicto -1871 2560 2060 2423 conicto -2249 2287 2339 2028 conicto -end_ol grestore -gsave 15.433414 6.995000 translate 0.035278 -0.035278 scale -start_ol -2538 1329 moveto -2538 1124 lineto -682 1124 lineto -682 714 908 499 conicto -1134 284 1537 284 conicto -1772 284 1991 340 conicto -2211 396 2432 509 conicto -2432 128 lineto -2216 34 1988 -15 conicto -1760 -64 1526 -64 conicto -940 -64 598 284 conicto -256 633 256 1226 conicto -256 1839 582 2199 conicto -909 2560 1463 2560 conicto -1960 2560 2249 2229 conicto -2538 1898 2538 1329 conicto -2112 1472 moveto -2112 1809 1931 2010 conicto -1751 2212 1453 2212 conicto -1116 2212 914 2018 conicto -712 1824 682 1472 conicto -2112 1472 lineto -end_ol grestore -showpage diff --git a/openair3/DOCS/TEMPLATES/CODE/images/arch.png b/openair3/DOCS/TEMPLATES/CODE/images/arch.png deleted file mode 100644 index 24741b93ef..0000000000 Binary files a/openair3/DOCS/TEMPLATES/CODE/images/arch.png and /dev/null differ diff --git a/openair3/DOCS/TEMPLATES/README/Readme.doxy b/openair3/DOCS/TEMPLATES/README/Readme.doxy deleted file mode 100644 index 43e4e3b87a..0000000000 --- a/openair3/DOCS/TEMPLATES/README/Readme.doxy +++ /dev/null @@ -1,112 +0,0 @@ -/******************************************************************************* - - OPENAIRINTERFACE 0/1/2/3 - Copyright(c) 1999 - 2010 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 - Mailing List - Forums http://forums.eurecom.fr/openairinterface - Eurecom, 2229, route des cretes, 06560 Valbonne Sophia Antipolis, France - -*******************************************************************************/ - -/*! \file Readme.doxy -* \brief explain how this block is organized, and how it works -* \author Navid Nikaein -* \date 2009 -* \version 0.1 -* \company Eurecom -* \note This conde is under GNU GENERAL PUBLIC LICENSE, version 2, June 1991 -* \email: navid.nikaein@eurecom.fr -* \warning -*/ - -/*! \mainpage Table of contents - -The content of this readme is the following: - - -# What is this block about in OpenAirInterface - -# Folders and files description - -# Organization of the folders and their dependancies - -# Makefile targets and how to build - -# How to use through a tutorial: run a simple experimentation - - -\section _block What is this block about in OpenAirInterface ? - - - It essentially means "the hardware part" located at openair0. - - Explain through the figures: - \image html image.png "caption" width=3cm - \image latex image.pdf "caption" - - More information about ??? can be found on the Twiki: - https://twiki.eurecom.fr/twiki/bin/view/OpenAirInterface/WebHome - - -\section _folders Folders and files description - -The structure is the following: - - -
File/Folder Description
- -- Folder1: Contains this and that -- Folder2: Contains this and that -- init.bash: A simple script file, that any user SHOULD source from its environment personal set-up script (this is typically ~/.bashrc) by adding the following lines to it: - This is my ~/.bashrc file or equivalent export OPENAIRX=path/to/my/openairX/folder source $OPENAIRX/init.bash. The file includes variable definitions & path settings to access softwares, sources & Makefiles, software distribution in openair, and so on. - - -YOU DEFINETELY NEED TO SOURCE THIS FILE. Description - -\section _organization Organization of the folders and their dependancies - - - The 3 folders have the following structures - - - Folder1/subfolder1/: contains any ressource related to the design - - - Folder2/subfolder2/: contains - - - Folder2/src/ - - - Folder2/lib/ - - - Folder2/bin/ - - Explain where are the source files. - Explain the relationship with other Blocks. - - -\section _makefile Makefile targets and how to build - - Explain whether you are using symbolic links or not, - how to backup/archive - how to generate the tags - how to print the vars - how to create the documentation - -\section _howto How to use through a tutorial: run a simple experimentation - ... - - -*/ - diff --git a/openair3/DOCS/TEMPLATES/README/readme.txt b/openair3/DOCS/TEMPLATES/README/readme.txt deleted file mode 100644 index 12d67a31dc..0000000000 --- a/openair3/DOCS/TEMPLATES/README/readme.txt +++ /dev/null @@ -1,120 +0,0 @@ -/******************************************************************************* - - OPENAIRINTERFACE 0/1/2/3 - Copyright(c) 1999 - 2010 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 - Mailing List - Forums http://forums.eurecom.fr/openairinterface - Eurecom, 2229, route des cretes, 06560 Valbonne Sophia Antipolis, France - -*******************************************************************************/ -/*________________________OEPNAIR/OPENAIR0/________________________ - - File : Readme.txt - Authors : navid nikaein - Company : EURECOM - Emails : navid.nikaein@eurecom.fr -________________________________________________________________*/ - - -------------------------- -Table of contents -------------------------- - -The content of this readme is the following: - - 1) What is this block about in OpenAirInterface - 2) Folders and files description - 3) Organization of the folders and their dependancies - 4) Makefile targets and how to build - 5) How to use through a tutorial: run a simple experimentation - ------------------------------------------------- -1) What is this block about in OpenAirInterface ? ------------------------------------------------ - - - It essentially means "the hardware part" located at openair0. - - More information about ??? can be found on the Twiki: - https://twiki.eurecom.fr/twiki/bin/view/OpenAirInterface/WebHome - ------------------------------------------ -2) Folders and files description ------------------------------------------ - - File/Folder Description - ----------- ----------- - - - Folder1/ contains - - - Folder2/ contains - - - init.bash A simple script file, that any user SHOULD source from - its environment personal set-up script (this is typically ~/.bashrc) - by adding the following lines to it: - - # This is my ~/.bashrc file or equivalent - export OPENAIRX=path/to/my/openairX/folder - source $OPENAIRX/init.bash - - The file includes variable definitions & path settings to - access softwares, sources & Makefiles, software - distribution in openair, and so on. - - YOU DEFINETELY NEED TO SOURCE THIS FILE. - ----------------------------------------------------- -3) Organization of the folders and their dependancies ----------------------------------------------------- - - The 3 folders have the following structures - - - Folder1/subfolder1/ contains any ressource related to the design - - - Folder2/subfolder2/ contains - - - Folder2/src/ - - - Folder2/lib/ - - - Folder2/bin/ - - Explain where are the source files. - Explain the relationship with other Blocks. - - ------------------------------------------ -4) Makefile targets and how to build ------------------------------------------ - - Explain whether you are using symbolic links or not, - how to backup/archive - how to generate the tags - how to print the vars - how to create the documentation - ----------------------------------------------------------------- -6) How to use through a tutorial: run a simple experimentation ----------------------------------------------------------------- - - ... - diff --git a/openair-cn/GTPV1-U/Makefile.am b/openair3/GTPV1-U/Makefile.am similarity index 97% rename from openair-cn/GTPV1-U/Makefile.am rename to openair3/GTPV1-U/Makefile.am index cb8acf56c3..34df3ff5c9 100644 --- a/openair-cn/GTPV1-U/Makefile.am +++ b/openair3/GTPV1-U/Makefile.am @@ -21,7 +21,7 @@ # Contact Information # OpenAirInterface Admin: openair_admin@eurecom.fr # OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr +# OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr # # Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. # diff --git a/openair-cn/GTPV1-U/Makefile.eNB b/openair3/GTPV1-U/Makefile.eNB similarity index 97% rename from openair-cn/GTPV1-U/Makefile.eNB rename to openair3/GTPV1-U/Makefile.eNB index 1347eb2c29..97920f114f 100644 --- a/openair-cn/GTPV1-U/Makefile.eNB +++ b/openair3/GTPV1-U/Makefile.eNB @@ -21,7 +21,7 @@ # Contact Information # OpenAirInterface Admin: openair_admin@eurecom.fr # OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr +# OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr # # Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. # diff --git a/openair-cn/GTPV1-U/gtpv1u.h b/openair3/GTPV1-U/gtpv1u.h similarity index 97% rename from openair-cn/GTPV1-U/gtpv1u.h rename to openair3/GTPV1-U/gtpv1u.h index 3409505158..264fedfe77 100644 --- a/openair-cn/GTPV1-U/gtpv1u.h +++ b/openair3/GTPV1-U/gtpv1u.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/GTPV1-U/gtpv1u_eNB.c b/openair3/GTPV1-U/gtpv1u_eNB.c similarity index 99% rename from openair-cn/GTPV1-U/gtpv1u_eNB.c rename to openair3/GTPV1-U/gtpv1u_eNB.c index 704123c3b2..ca492469b1 100644 --- a/openair-cn/GTPV1-U/gtpv1u_eNB.c +++ b/openair3/GTPV1-U/gtpv1u_eNB.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/GTPV1-U/gtpv1u_eNB_defs.h b/openair3/GTPV1-U/gtpv1u_eNB_defs.h similarity index 98% rename from openair-cn/GTPV1-U/gtpv1u_eNB_defs.h rename to openair3/GTPV1-U/gtpv1u_eNB_defs.h index 81f00005d9..916d4459d9 100644 --- a/openair-cn/GTPV1-U/gtpv1u_eNB_defs.h +++ b/openair3/GTPV1-U/gtpv1u_eNB_defs.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/GTPV1-U/gtpv1u_eNB_task.h b/openair3/GTPV1-U/gtpv1u_eNB_task.h similarity index 96% rename from openair-cn/GTPV1-U/gtpv1u_eNB_task.h rename to openair3/GTPV1-U/gtpv1u_eNB_task.h index ce6643b131..b06777a55d 100755 --- a/openair-cn/GTPV1-U/gtpv1u_eNB_task.h +++ b/openair3/GTPV1-U/gtpv1u_eNB_task.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/GTPV1-U/gtpv1u_sgw_defs.h b/openair3/GTPV1-U/gtpv1u_sgw_defs.h similarity index 98% rename from openair-cn/GTPV1-U/gtpv1u_sgw_defs.h rename to openair3/GTPV1-U/gtpv1u_sgw_defs.h index a525c388a2..d40410f3b7 100644 --- a/openair-cn/GTPV1-U/gtpv1u_sgw_defs.h +++ b/openair3/GTPV1-U/gtpv1u_sgw_defs.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/GTPV1-U/gtpv1u_task.c b/openair3/GTPV1-U/gtpv1u_task.c similarity index 99% rename from openair-cn/GTPV1-U/gtpv1u_task.c rename to openair3/GTPV1-U/gtpv1u_task.c index f98db6056e..f17a0fdd0e 100644 --- a/openair-cn/GTPV1-U/gtpv1u_task.c +++ b/openair3/GTPV1-U/gtpv1u_task.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/GTPV1-U/gtpv1u_teid_pool.c b/openair3/GTPV1-U/gtpv1u_teid_pool.c similarity index 96% rename from openair-cn/GTPV1-U/gtpv1u_teid_pool.c rename to openair3/GTPV1-U/gtpv1u_teid_pool.c index 3cbafd8979..32db1ff47e 100644 --- a/openair-cn/GTPV1-U/gtpv1u_teid_pool.c +++ b/openair3/GTPV1-U/gtpv1u_teid_pool.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/GTPV1-U/nw-gtpv1u/AUTHORS b/openair3/GTPV1-U/nw-gtpv1u/AUTHORS similarity index 100% rename from openair-cn/GTPV1-U/nw-gtpv1u/AUTHORS rename to openair3/GTPV1-U/nw-gtpv1u/AUTHORS diff --git a/openair-cn/GTPV1-U/nw-gtpv1u/COPYING b/openair3/GTPV1-U/nw-gtpv1u/COPYING similarity index 100% rename from openair-cn/GTPV1-U/nw-gtpv1u/COPYING rename to openair3/GTPV1-U/nw-gtpv1u/COPYING diff --git a/openair-cn/GTPV1-U/nw-gtpv1u/ChangeLog b/openair3/GTPV1-U/nw-gtpv1u/ChangeLog similarity index 100% rename from openair-cn/GTPV1-U/nw-gtpv1u/ChangeLog rename to openair3/GTPV1-U/nw-gtpv1u/ChangeLog diff --git a/openair-cn/GTPV1-U/nw-gtpv1u/NEWS b/openair3/GTPV1-U/nw-gtpv1u/NEWS similarity index 100% rename from openair-cn/GTPV1-U/nw-gtpv1u/NEWS rename to openair3/GTPV1-U/nw-gtpv1u/NEWS diff --git a/openair-cn/GTPV1-U/nw-gtpv1u/README b/openair3/GTPV1-U/nw-gtpv1u/README similarity index 100% rename from openair-cn/GTPV1-U/nw-gtpv1u/README rename to openair3/GTPV1-U/nw-gtpv1u/README diff --git a/openair-cn/GTPV1-U/nw-gtpv1u/include/NwGtpv1uLog.h b/openair3/GTPV1-U/nw-gtpv1u/include/NwGtpv1uLog.h similarity index 100% rename from openair-cn/GTPV1-U/nw-gtpv1u/include/NwGtpv1uLog.h rename to openair3/GTPV1-U/nw-gtpv1u/include/NwGtpv1uLog.h diff --git a/openair-cn/GTPV1-U/nw-gtpv1u/include/NwGtpv1uPrivate.h b/openair3/GTPV1-U/nw-gtpv1u/include/NwGtpv1uPrivate.h similarity index 100% rename from openair-cn/GTPV1-U/nw-gtpv1u/include/NwGtpv1uPrivate.h rename to openair3/GTPV1-U/nw-gtpv1u/include/NwGtpv1uPrivate.h diff --git a/openair-cn/GTPV1-U/nw-gtpv1u/include/NwGtpv1uTrxn.h b/openair3/GTPV1-U/nw-gtpv1u/include/NwGtpv1uTrxn.h similarity index 100% rename from openair-cn/GTPV1-U/nw-gtpv1u/include/NwGtpv1uTrxn.h rename to openair3/GTPV1-U/nw-gtpv1u/include/NwGtpv1uTrxn.h diff --git a/openair-cn/GTPV1-U/nw-gtpv1u/include/NwGtpv1uTunnelEndPoint.h b/openair3/GTPV1-U/nw-gtpv1u/include/NwGtpv1uTunnelEndPoint.h similarity index 100% rename from openair-cn/GTPV1-U/nw-gtpv1u/include/NwGtpv1uTunnelEndPoint.h rename to openair3/GTPV1-U/nw-gtpv1u/include/NwGtpv1uTunnelEndPoint.h diff --git a/openair-cn/GTPV1-U/nw-gtpv1u/shared/NwGtpv1u.h b/openair3/GTPV1-U/nw-gtpv1u/shared/NwGtpv1u.h similarity index 100% rename from openair-cn/GTPV1-U/nw-gtpv1u/shared/NwGtpv1u.h rename to openair3/GTPV1-U/nw-gtpv1u/shared/NwGtpv1u.h diff --git a/openair-cn/GTPV1-U/nw-gtpv1u/shared/NwGtpv1uError.h b/openair3/GTPV1-U/nw-gtpv1u/shared/NwGtpv1uError.h similarity index 100% rename from openair-cn/GTPV1-U/nw-gtpv1u/shared/NwGtpv1uError.h rename to openair3/GTPV1-U/nw-gtpv1u/shared/NwGtpv1uError.h diff --git a/openair-cn/GTPV1-U/nw-gtpv1u/shared/NwGtpv1uIe.h b/openair3/GTPV1-U/nw-gtpv1u/shared/NwGtpv1uIe.h similarity index 100% rename from openair-cn/GTPV1-U/nw-gtpv1u/shared/NwGtpv1uIe.h rename to openair3/GTPV1-U/nw-gtpv1u/shared/NwGtpv1uIe.h diff --git a/openair-cn/GTPV1-U/nw-gtpv1u/shared/NwGtpv1uMsg.h b/openair3/GTPV1-U/nw-gtpv1u/shared/NwGtpv1uMsg.h similarity index 100% rename from openair-cn/GTPV1-U/nw-gtpv1u/shared/NwGtpv1uMsg.h rename to openair3/GTPV1-U/nw-gtpv1u/shared/NwGtpv1uMsg.h diff --git a/openair-cn/GTPV1-U/nw-gtpv1u/shared/NwLog.h b/openair3/GTPV1-U/nw-gtpv1u/shared/NwLog.h similarity index 100% rename from openair-cn/GTPV1-U/nw-gtpv1u/shared/NwLog.h rename to openair3/GTPV1-U/nw-gtpv1u/shared/NwLog.h diff --git a/openair-cn/GTPV1-U/nw-gtpv1u/shared/NwTypes.h b/openair3/GTPV1-U/nw-gtpv1u/shared/NwTypes.h similarity index 100% rename from openair-cn/GTPV1-U/nw-gtpv1u/shared/NwTypes.h rename to openair3/GTPV1-U/nw-gtpv1u/shared/NwTypes.h diff --git a/openair-cn/GTPV1-U/nw-gtpv1u/shared/NwUtils.h b/openair3/GTPV1-U/nw-gtpv1u/shared/NwUtils.h similarity index 100% rename from openair-cn/GTPV1-U/nw-gtpv1u/shared/NwUtils.h rename to openair3/GTPV1-U/nw-gtpv1u/shared/NwUtils.h diff --git a/openair-cn/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c b/openair3/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c similarity index 100% rename from openair-cn/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c rename to openair3/GTPV1-U/nw-gtpv1u/src/NwGtpv1u.c diff --git a/openair-cn/GTPV1-U/nw-gtpv1u/src/NwGtpv1uMsg.c b/openair3/GTPV1-U/nw-gtpv1u/src/NwGtpv1uMsg.c similarity index 100% rename from openair-cn/GTPV1-U/nw-gtpv1u/src/NwGtpv1uMsg.c rename to openair3/GTPV1-U/nw-gtpv1u/src/NwGtpv1uMsg.c diff --git a/openair-cn/GTPV1-U/nw-gtpv1u/src/NwGtpv1uTrxn.c b/openair3/GTPV1-U/nw-gtpv1u/src/NwGtpv1uTrxn.c similarity index 100% rename from openair-cn/GTPV1-U/nw-gtpv1u/src/NwGtpv1uTrxn.c rename to openair3/GTPV1-U/nw-gtpv1u/src/NwGtpv1uTrxn.c diff --git a/openair-cn/GTPV1-U/nw-gtpv1u/src/NwGtpv1uTunnelEndPoint.c b/openair3/GTPV1-U/nw-gtpv1u/src/NwGtpv1uTunnelEndPoint.c similarity index 100% rename from openair-cn/GTPV1-U/nw-gtpv1u/src/NwGtpv1uTunnelEndPoint.c rename to openair3/GTPV1-U/nw-gtpv1u/src/NwGtpv1uTunnelEndPoint.c diff --git a/openair-cn/GTPV1-U/nw-gtpv1u/test-app/Makefile.am b/openair3/GTPV1-U/nw-gtpv1u/test-app/Makefile.am similarity index 100% rename from openair-cn/GTPV1-U/nw-gtpv1u/test-app/Makefile.am rename to openair3/GTPV1-U/nw-gtpv1u/test-app/Makefile.am diff --git a/openair-cn/GTPV1-U/nw-gtpv1u/test-app/Makefile.in b/openair3/GTPV1-U/nw-gtpv1u/test-app/Makefile.in similarity index 100% rename from openair-cn/GTPV1-U/nw-gtpv1u/test-app/Makefile.in rename to openair3/GTPV1-U/nw-gtpv1u/test-app/Makefile.in diff --git a/openair-cn/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/Makefile.am b/openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/Makefile.am similarity index 100% rename from openair-cn/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/Makefile.am rename to openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/Makefile.am diff --git a/openair-cn/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/Makefile.in b/openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/Makefile.in similarity index 100% rename from openair-cn/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/Makefile.in rename to openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/Makefile.in diff --git a/openair-cn/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwEvt.h b/openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwEvt.h similarity index 100% rename from openair-cn/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwEvt.h rename to openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwEvt.h diff --git a/openair-cn/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniLogMgrEntity.c b/openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniLogMgrEntity.c similarity index 100% rename from openair-cn/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniLogMgrEntity.c rename to openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniLogMgrEntity.c diff --git a/openair-cn/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniLogMgrEntity.h b/openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniLogMgrEntity.h similarity index 100% rename from openair-cn/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniLogMgrEntity.h rename to openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniLogMgrEntity.h diff --git a/openair-cn/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniTmrMgrEntity.c b/openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniTmrMgrEntity.c similarity index 100% rename from openair-cn/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniTmrMgrEntity.c rename to openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniTmrMgrEntity.c diff --git a/openair-cn/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniTmrMgrEntity.h b/openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniTmrMgrEntity.h similarity index 100% rename from openair-cn/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniTmrMgrEntity.h rename to openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniTmrMgrEntity.h diff --git a/openair-cn/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniUdpEntity.c b/openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniUdpEntity.c similarity index 100% rename from openair-cn/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniUdpEntity.c rename to openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniUdpEntity.c diff --git a/openair-cn/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniUdpEntity.h b/openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniUdpEntity.h similarity index 100% rename from openair-cn/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniUdpEntity.h rename to openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniUdpEntity.h diff --git a/openair-cn/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniUlpEntity.c b/openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniUlpEntity.c similarity index 100% rename from openair-cn/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniUlpEntity.c rename to openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniUlpEntity.c diff --git a/openair-cn/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniUlpEntity.h b/openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniUlpEntity.h similarity index 100% rename from openair-cn/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniUlpEntity.h rename to openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/NwMiniUlpEntity.h diff --git a/openair-cn/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/helloworld.c b/openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/helloworld.c similarity index 100% rename from openair-cn/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/helloworld.c rename to openair3/GTPV1-U/nw-gtpv1u/test-app/nw-helloworld/helloworld.c diff --git a/openair-cn/INTERTASK_INTERFACE b/openair3/INTERTASK_INTERFACE similarity index 100% rename from openair-cn/INTERTASK_INTERFACE rename to openair3/INTERTASK_INTERFACE diff --git a/openair3/MESH/COPYING b/openair3/MESH/COPYING deleted file mode 100644 index 94a9ed024d..0000000000 --- a/openair3/MESH/COPYING +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program 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. - - This program 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 this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/openair3/MESH/L3_rrc_defs.h b/openair3/MESH/L3_rrc_defs.h deleted file mode 100644 index a6c82a9828..0000000000 --- a/openair3/MESH/L3_rrc_defs.h +++ /dev/null @@ -1,220 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/** @addtogroup _mesh_layer3_ - * @{ This page describes the interface between the RRC and RRM/RRCI modules for OpenAirInterface Mesh. - */ - - -#ifndef __L3_RRC_DEFS_H__ -#define __L3_RRC_DEFS_H__ - -#define MAX_L3_INFO 16 -#define LENGTH_L2_ID 8 -#define IEEE_ADDR_LEN 6 - - -#include "COMMON/mac_rrc_primitives.h" - -/*! \brief SENDORA scenario active: flags to set at the beginning of the simulation -*/ -#define WSN 1 ///if wsn = 0 -> secondary network, else sensor network -#define SCEN_1 1 -#define SCEN_2_CENTR 0 -#define SCEN_2_DISTR 0 -#define COLL_CLUST 0 //mod_lor_10_11_04 - -//mod_lor_10_05_05++ -/*! -******************************************************************************* -\brief Id of different CRRM entities in case of multiple entities on same machine - */ -#define BTS_ID -1 -#define FC_ID -1 -#define CH_COLL_ID -1 -#define FIRST_SENSOR_ID 0 -#define FIRST_SECOND_CLUSTER_USER_ID 5 //add_lor_11_01_06 AAA: if two clusters on two pcs this parameter should be greater than the number of rrm instances -#define FIRST_MR_ID 8 //mod_lor_11_02_18: if cluster on more than 1 pc, this is the ID of first MR -//mod_lor_10_05_05-- - -/*! - ******************************************************************************* - \brief Parameters about channels: - * -*/ -#define NB_OF_SENSORS 3 //!< Number of units that can perform sensing (if scen2_centr it includes secondary users of both clusters) -#define CH_NEEDED_FOR_SN 1 //!< Number of channels needed by secondary network//mod_lor_10_05_17 -#define SB_NEEDED_FOR_SN 25 //mod_lor_10_05_26: -#define NB_SENS_MAX 4 //!< Maximum number of channels accepted by the system; AAA: should be low (4) in SCEN_2 otherwise overflow at rrc level -#define MAX_NUM_SB 50//mod_eure_lor -#define SB_BANDWIDTH 180 //! in khz, bandwidth of each sub-band; AAA -> modify only in relation with NUM_SB and sensing parameters in emul_interface! //mod_lor_10_05_26 -#define NUM_SB 50//mod_eure_lor -#define LAMBDA0 -90 //mod_lor_10_05_26: for mu0 that is the averaged value -#define LAMBDA1 -75 //mod_lor_10_05_26: for mu1 that is the maximum value -#define MIN_NB_SB_CH 25 //mod_lor_10_05_26: for mu1 that is the maximum value -#define BG 8 //! sub-bands of protection between channels -#define MAX_USER_NB 5 //! max number of users //add_lor_10_11_03 - -/*! \brief Transaction ID descriptor -*/ -typedef unsigned int Transaction_t; - -/*! \brief Instance ID descriptor - */ -typedef unsigned char Instance_t; - -/*!\brief Radio Bearer ID descriptor - */ -typedef unsigned short RB_ID; - - -typedef unsigned short QOS_CLASS_T; - -#define LCHAN_BCCH 0 -#define LCHAN_CCCH 1 -#define LCHAN_DCCH 2 -#define LCHAN_DTCH_B 3 -#define LCHAN_DTCH 4 -#define LCHAN_MRBCH 5 - -/*!\brief Layer 2 Identifier - */ - -typedef struct { - unsigned char L2_id[LENGTH_L2_ID]; -} L2_ID; - - - -/*!\brief Measurement Mode - */ -typedef enum { - PERIODIC=0, /*!< Periodic measurement*/ - EVENT_DRIVEN /*!< Event-driven measurement*/ -} MEAS_MODE; - -/*!\brief Sensing measurement descriptor - */ -typedef struct { - unsigned char RSSI_Threshold; /*!< Threshold (minus in dBm) for neighbour RSSI measurement*/ - unsigned char RSSI_F_Factor; /*!< Forgetting factor for RSSI averaging*/ - unsigned short Rep_interval; /*!< \brief Reporting interval between successive measurement reports in this process*/ -} SENSING_MEAS_DESC; - -/*!\brief Sensing measurement information - */ -typedef struct { - unsigned char Rssi; /*!< RSSI (minus in dBm) for neighbour*/ - L2_ID L2_id; /*!< Layer 2 ID for neighbour*/ -} SENSING_MEAS_T; - -/*! -******************************************************************************* -\brief Structure of sensing information database -*/ -typedef struct Sens_ch_s { - unsigned int Start_f ; ///< frequence initial du canal //mod_lor_10_03_17: intxflot - unsigned int Final_f ; ///< frequence final du canal //mod_lor_10_03_17: intxflot - unsigned int Ch_id ; ///< ID du canal - //mod_eure_lor++ - char I0[MAX_NUM_SB] ; - char mu0[MAX_NUM_SB]; - char mu1[MAX_NUM_SB]; - - //float meas ; ///< Sensing results - unsigned int is_free [MAX_NUM_SB] ; ///< Decision about the channel //mod_lor_10_05_28 ->char instead of int - //mod_eure_lor-- - struct Sens_ch_s *next ; ///< pointeur sur le prochain canal -} Sens_ch_t ; - -/*! -******************************************************************************* -\brief Structure that describes the channels -*/ -typedef struct { - unsigned int Start_f ; ///< frequence initial du canal //mod_lor_10_03_17: intxflot - unsigned int Final_f ; ///< frequence final du canal //mod_lor_10_03_17: intxflot - unsigned int Ch_id ; ///< ID du canal //mod_lor_10_03_17: intxflot - QOS_CLASS_T QoS ; ///< Max QoS possible on the channel -} CHANNEL_T ; - -/*!\brief cooperation type between CHs - */ -typedef enum { - NO_COOP = 0, //!< No cooperation - AMPL_FORW = 1, //!< amplify and forward collaboration - DECO_FORW = 2, //!< decode and forward collaboration -} COOPERATION_T; -/*! -******************************************************************************* -\brief Structure that describes the channels -*/ -typedef struct { - //float Start_f ; ///< frequence initial du canal - //float Final_f ; ///< frequence final du canal - int Ch_id ; ///< ID du canal - //QOS_CLASS_T QoS ; ///< Max QoS possible on the channel -} MAC_INFO_T ; - - -/*!\brief Layer 3 Info types for RRC messages - */ -typedef enum { - NONE_L3 = 0, //!< No information - IPv4_ADDR = 4, //!< IPv4 Address = size Info - IPv6_ADDR =16, //!< IPv6 Address = size Info - MAC_ADDR = 8 //!< MAC Id = size Info -} L3_INFO_T; - -/*!\brief Layer 3 Info types for RRC messages - */ -typedef enum { - BROADCAST=0, /*!< Broadcast bearer*/ - UNICAST, /*!< Unicast bearer*/ - MULTICAST /*!< Multicast bearer*/ -} RB_TYPE; - - -/*! -******************************************************************************* -\brief Entete de la file des messages reçus ou a envoyer -*/ -typedef struct channels_db_s { - double info_time ; ///< information age - unsigned int is_free ; ///< channel availability //mod_lor_10_05_28 ->char instead of int - unsigned int priority ; ///< channel priority - unsigned int is_ass ; ///< channel used by secondary network - L2_ID source_id ; ///< SU using channel (source) - L2_ID dest_id ; ///< SU using channel (dest) - CHANNEL_T channel ; ///< channel description - struct channels_db_s *next ; ///< next node pointer -} CHANNELS_DB_T ; - -#endif //__L3_RRC_DEFS_H__ -/** @} */ diff --git a/openair3/MESH/L3_rrc_interface.h b/openair3/MESH/L3_rrc_interface.h deleted file mode 100644 index 967e32097b..0000000000 --- a/openair3/MESH/L3_rrc_interface.h +++ /dev/null @@ -1,491 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/*! @defgroup _mesh_layer3_ OpenAirInterface MESH L2/L3 Interfaces - * @{ - */ - -/*! -\brief Ask RRC to establish a radio bearer. Used mainly by CH, except during - initialization phase of MR for default bearers (SRB0,SRB1). Sends - CH IPAddr to RRC for attachment signaling (for example during DTCH_B - configuration). - */ -void rrm_rb_establish_req( - Instance_t inst , //!< Identification de l'instance - LCHAN_DESC *Lchan_desc , //!< Logical Channel Descriptor Array - MAC_RLC_MEAS_DESC *Mac_rlc_meas_desc, //!< MAC/RLC Measurement descriptors for RB - L2_ID *L2_id , //!< Layer 2 (MAC) IDs for link - Transaction_t Trans_id , //!< Transaction ID - unsigned char *L3_info , //!< Optional L3 Information - L3_INFO_T L3_info_t //!< Type of L3 Information -); -/*! -\brief RRC response to rb_establish_req. RRC Acknowledgement of reception of - rrc_rb_establishment_req. - */ -void rrc_rb_establish_resp( - Instance_t inst , //!< Identification de l'instance - Transaction_t Trans_id //!< Transaction ID -); -/*! - \brief RRC confirmation of rb_establish_req. RRC confirmation of - rrc_rb_establishment_req after transactions are complete. Essentially - for CH only (except SRB0/1) - */ -void rrc_rb_establish_cfm( - Instance_t inst , //!< Identification de l'instance - RB_ID Rb_id , //!< Radio Bearer ID used by RRC - RB_TYPE RB_type , //!< Radio Bearer Type - Transaction_t Trans_id //!< Transaction ID -); -/*! -\brief RRC Connection Establishment indication. Message received by RRM in CH - at completion of attachment phase of a new MR (after configuration MR - IPAddr). Here L3_info contains MR IPAddr. Message received by RRCI in MR - after configuration of initial RBs and reception of CH IPAddr. Here - L3_info contains CH IPAddr. For MR the RBID's of basic IP services are - also required. -*/ -void rrc_cx_establish_ind( - Instance_t inst , //!< Identification de l'instance - L2_ID L2_id , //!< Layer 2 (MAC) ID - Transaction_t Trans_id , //!< Transaction ID - unsigned char *L3_info , //!< Optional L3 Information - L3_INFO_T L3_info_t , //!< Type of L3 Information - RB_ID DTCH_B_id , //!< RBID of broadcast IP service (MR only) - RB_ID DTCH_id //!< RBID of default IP service (MR only) -); -/*! -\brief RRCI Connection Establishment response. Received by RRC in MR at - completion of attachment phase and address configuration of a new MR. - L3_info contains IPAddr of MR. -*/ -void rrci_cx_establish_resp( - Instance_t inst , //!< Identification de l'instance - Transaction_t Trans_id , //!< Transaction ID - unsigned char *L3_info , //!< Optional L3 Information - L3_INFO_T L3_info_t //!< Type of L3 Information -); -/*! -\brief Ask RRC to modify the QoS/Measurements of a radio bearer - */ -void rrm_rb_modify_req( - Instance_t inst , //!< Identification de l'instance - LCHAN_DESC *Lchan_desc , //!< Logical Channel Descriptor Array - MAC_RLC_MEAS_DESC *Mac_meas_desc , //!< MAC/RLC Measurement descriptors for RB - RB_ID Rb_id , //!< Radio Bearer ID - Transaction_t Trans_id //!< Transaction ID -); -/*! -\brief RRC response to rb_modify_req - */ -void rrc_rb_modify_resp( - Instance_t inst , //!< Identification de l'instance - Transaction_t Trans_id //!< Transaction ID -); -/*! -\brief RRC confirmation of rb_modify_req - */ -void rrc_rb_modify_cfm( - Instance_t inst , //!< Identification de l'instance - RB_ID Rb_id , //!< Radio Bearer ID used by RRC - Transaction_t Trans_id //!< Transaction ID -); -/*! -\brief Ask RRC to release a radio bearer - */ -void rrm_rb_release_req( - Instance_t inst , //!< Identification de l'instance - RB_ID Rb_id , //!< Radio Bearer ID - Transaction_t Trans_id //!< Transaction ID -); -/*! -\brief RRC response to rb_release_req - */ -void rrc_rb_release_resp( - Instance_t inst , //!< Identification de l'instance - Transaction_t Trans_id //!< Transaction ID -); -/*! -\brief RRC measurement indication - */ -void rrc_rb_meas_ind( - Instance_t inst , //!< Identification de l'instance - RB_ID Rb_id , //!< Radio Bearer ID - L2_ID L2_id , //!< Layer 2 (MAC) IDs for link - MEAS_MODE Meas_mode , //!< Measurement mode (periodic or event-driven) - MAC_RLC_MEAS_T Mac_rlc_meas , //!< MAC/RLC measurements - Transaction_t Trans_id //!< Transaction ID -); - -/*! -\brief RRM response to rb_meas_ind - */ -void rrm_rb_meas_resp( - Instance_t inst , //!< Identification de l'instance - Transaction_t Trans_id //!< Transaction ID -); -/*! -\brief Configure a sensing measurement - */ -void rrm_sensing_meas_req( - Instance_t inst , //!< Identification de l'instance - L2_ID L2_id , //!< Layer 2 (MAC) ID - SENSING_MEAS_DESC Sensing_meas_desc, //!< Sensing Measurement Descriptor - Transaction_t Trans_id //!< Transaction ID -); -/*! -\brief RRC response to sensing_meas_req - */ -void rrc_sensing_meas_resp( - Instance_t inst , //!< Identification de l'instance - Transaction_t Trans_id //!< Transaction ID -); -/*! -\brief RRC sensing measurement indication - */ -void rrc_sensing_meas_ind( - Instance_t inst , //!< Identification de l'instance - L2_ID L2_id , //!< Layer 2 ID (MAC) of sensing node - unsigned int NB_meas , //!< Layer 2 ID (MAC) of sensing node - SENSING_MEAS_T *Sensing_meas , //!< Sensing Information - Transaction_t Trans_id //!< Transaction ID -); -/*! -\brief RRM response to sensing_meas_resp - */ -void rrm_sensing_meas_resp( - Instance_t inst , //!< Identification de l'instance - Transaction_t Trans_id //!< Transaction ID -); -/*! -\brief Clusterhead PHY-Synch Indication - */ -void rrc_phy_synch_to_CH_ind( - Instance_t inst , //!< Identification de l'instance - unsigned int Ch_index , //!< Clusterhead index - L2_ID L2_id //!< Layer 2 ID (MAC) of CH -); -/*! -\brief Mesh router PHY-Synch Indication - */ -void rrc_phy_synch_to_MR_ind( - Instance_t inst , //!< Identification de l'instance - L2_ID L2_id //!< Layer 2 ID (MAC) of MR -); - -/*! -\brief Clusterhead PHY-Out-of-Synch Indication - */ -void rrc_phy_out_of_synch_CH_ind( - Instance_t inst , //!< Identification de l'instance - unsigned int Ch_index //!< Clusterhead Index -); - -/*! -\brief MR loss indication - */ -void rrc_MR_loss_ind( - Instance_t inst , //!< Identification de l'instance - L2_ID L2_id //!< Layer 2 (MAC) ID -); -/*! -\brief Release all resources for MR - */ -void rrm_MR_release_all( - Instance_t inst , //!< Identification de l'instance - L2_ID L2_id //!< Layer 2 (MAC) ID -); -/*! -\brief MR attachement indication. Sent by RRC to RRM to indicate the MAC ID of - a new MR attached to CH at layer 2 - */ -void rrc_MR_attach_ind( - Instance_t inst , //!< Identification de l'instance - L2_ID L2_id //!< Layer 2 (MAC) ID -); -/*! -\brief initialization CH request . Sent by RRM to RRC to create the default - Radio bearer : SRB0 and SRB1 - */ - -void rrm_init_ch_req( - Instance_t inst , //!< Identification de l'instance - Transaction_t Trans_id , //!< Transaction ID - LCHAN_DESC *Lchan_desc_srb0 , //!< Logical Channel Descriptor Array for SRB0 - LCHAN_DESC *Lchan_desc_srb1 , //!< Logical Channel Descriptor Array for SRB1 - L2_ID *L2_id //!< Layer 2 (MAC) ID -) ; - -/*! -\brief initialization MR request . Sent by RRCI to RRC to create the default - Radio bearer : SRB0 and SRB1 - */ -void rrci_init_mr_req( - Instance_t inst , //!< Identification de l'instance - Transaction_t Trans_id , //!< Transaction ID - LCHAN_DESC *Lchan_desc_srb0 , //!< Logical Channel Descriptor Array for SRB0 - LCHAN_DESC *Lchan_desc_srb1 , //!< Logical Channel Descriptor Array for SRB1 - unsigned char CH_index , //!< index to identify the CH - L2_ID *L2_id //!< Layer 2 (MAC) ID -); - -/*! -\brief sns and ip sensing measurement indication - */ -void rrc_update_sens( //mod_lor_10_01_25: RRC function, but also IP function - Instance_t inst , //!< Identification de l'instance - L2_ID L2_id , //!< Layer 2 ID (MAC) of sensing node - unsigned int NB_info , //!< Number of channels info - Sens_ch_t *Sense_meas , //!< Sensing Information - double info_time //!< Info time -); - -/*! -\brief RRC starting sensing request - */ -void rrc_init_scan_req( - Instance_t inst , //!< instance ID - L2_ID L2_id , //!< FC address - unsigned int Start_fr, - unsigned int Stop_fr, - unsigned int Meas_band, - unsigned int Meas_tpf, - unsigned int Nb_channels, - unsigned int Overlap, - unsigned int Sampl_freq, - Transaction_t Trans_id //!< Transaction ID -); - - -/*! -\brief RRC ending sensing confirmation - */ -void rrc_end_scan_conf( - Instance_t inst , //!< instance ID - L2_ID L2_id , - Transaction_t Trans_id //!< Transaction ID - -); - -/*! -\brief RRC ending sensing request (sensors side) - */ -void rrc_end_scan_req( - Instance_t inst , //!< instance ID - L2_ID L2_id , - Transaction_t Trans_id //!< Transaction ID - -); - -/*! -\brief RRC starting monitoring request - */ -void rrc_init_mon_req( - Instance_t inst , //!< identification de l'instance - L2_ID L2_id , //!< FC address - unsigned int *ch_to_scan , - unsigned int NB_chan , - unsigned int interv , //!< sensing freq. - Transaction_t Trans_id //!< Transaction ID -); - - -/*! -\brief update open frequencies -> correspondent message via IP -*/ -unsigned int update_open_freq( //mod_lor_10_01_25: IP function; //mod_lor_10_05_18: return unsigned int instead of void - Instance_t inst, //!< instance ID - L2_ID L2_id, //!< L2_id of the FC/CH - unsigned int NB_chan, - unsigned int *occ_channels , //!< vector on wich the selected frequencies will be saved //mod_lor_10_05_18 - CHANNELS_DB_T *fr_channels, - Transaction_t Trans_id -); - -/*! -\brief ask for frequencies -> correspondent message via IP - */ -unsigned int open_freq_query( //mod_lor_10_01_25: IP function - Instance_t inst, - L2_ID L2_id , - QOS_CLASS_T QoS , - Transaction_t Trans_id -); - -/*! -\brief update secondary network frequencies in use -> correspondent message via IP - */ -unsigned int update_SN_occ_freq( //mod_lor_10_01_25: IP function - Instance_t inst , //!< instance ID - L2_ID L2_id , //!< Layer 2 (MAC) ID of BTS - unsigned int NB_chan , - unsigned int *occ_channels , - Transaction_t Trans_id //!< Transaction ID -); - -/*! -\brief RRC cluster scan request from CH1 reported to RRM of CH2 - */ -void rrc_clust_scan_req( - Instance_t inst , //!< instance ID - L2_ID L2_id , //!< Layer 2 (MAC) ID of CH2 - float interv , - COOPERATION_T coop , - Transaction_t Trans_id -); - -/*! -\brief RRC starting monitoring request ordered from another CH - */ -void rrc_clust_mon_req( - Instance_t inst , //!< identification de l'instance - L2_ID L2_id , //!< CH1 address - unsigned int *ch_to_scan , - unsigned int NB_chan , - float interv , //!< sensing freq. - Transaction_t Trans_id //!< Transaction ID -); - -/*! -\brief RRC reported confirmation about the connection - */ -void rrc_init_conn_conf( - Instance_t inst , //!< identification de l'instance - L2_ID L2_id , - unsigned int Session_id , - Transaction_t Trans_id -); - -/*! -\brief RRC reported confirmation from SU2 on the proposed channels - */ -void rrc_freq_all_prop_conf( - Instance_t inst , - L2_ID L2_id , - unsigned int Session_id , - unsigned int NB_free_ch , - CHANNEL_T *fr_channels , - Transaction_t Trans_id -); - -/*! -\brief RRC reported assignement from CH of a channel (SENDORA scenario 2 distr) - */ -void rrc_rep_freq_ack( - Instance_t inst , - L2_ID L2_id_ch , - L2_ID L2_id_source , - L2_ID L2_id_dest , - unsigned int Session_id , - CHANNEL_T all_channel , - Transaction_t Trans_id -); - -/*! -\brief RRC init connection request from another SU (SENDORA scenario 2 distr) - */ -void rrc_init_conn_req( - Instance_t inst , - L2_ID L2_id , - unsigned int Session_id , - QOS_CLASS_T QoS_class , - Transaction_t Trans_id -); - -/*! -\brief RRC reported proposed channels from SU1 in SU2 - */ -void rrc_freq_all_prop( - Instance_t inst , - L2_ID L2_id , - unsigned int Session_id , - unsigned int NB_free_ch , - CHANNEL_T *fr_channels , - Transaction_t Trans_id -); - -/*! -\brief RRC reported proposed channels from SU1 in CH - */ -void rrc_rep_freq_all( - Instance_t inst , - L2_ID L2_id_source , - L2_ID L2_id_dest , - unsigned int Session_id , - unsigned int NB_prop_ch , - CHANNEL_T *pr_channels , - Transaction_t Trans_id -); - -/*! -\brief IP interface. Updating of the sensing measures -> correspondent message via IP -*/ -unsigned int update_sens_results( - Instance_t inst , //!< Identification de l'instance - L2_ID L2_id , //!< Adresse L2 of the source of information - unsigned int NB_info , //!< Number of channel info - Sens_ch_t *Sens_meas , //!< Pointer to the sensing information - double info_time -); - -/*! -\brief Sensing Unit interface. End sensing confirmation -*/ -void sns_end_scan_conf( - Instance_t inst //!< Identification de l'instance -); - -//mod_lor_10_05_10++ -/*! -\brief Updating sensing information received from collaborative Cluster -*/ -void up_coll_sens_results( //AAA: to add weights for the collaborative cluster information - Instance_t inst , //!< Identification de l'instance - L2_ID L2_id , //!< Adresse L2 of the source of information - unsigned int NB_info , //!< Number of channel info - Sens_ch_t *Sens_meas , //!< Pointer to the sensing information - double info_time -);//mod_lor_10_05_10-- - -/*! -\brief Received request of frequencies from secondary user -> attribute available channels -*/ -unsigned int ask_freq_to_CH( - Instance_t inst , //!< identification de l'instance - L2_ID L2_id[NB_SENS_MAX] , //!< L2_id of the SU - L2_ID L2_id_dest[NB_SENS_MAX], //!< L2_id of the SU dest - unsigned int N_users , //!< quality of service required (i.e. number of channels required) - Transaction_t Trans_id //!< Transaction ID -); - - -/*! @} */ - diff --git a/openair3/MESH/RRM/DOC/Doxyfile_rrm b/openair3/MESH/RRM/DOC/Doxyfile_rrm deleted file mode 100755 index 85eedb8b5c..0000000000 --- a/openair3/MESH/RRM/DOC/Doxyfile_rrm +++ /dev/null @@ -1,305 +0,0 @@ -# Doxyfile 1.4.6 - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- -PROJECT_NAME = "Radio Resource Managment (RRM)" -PROJECT_NUMBER = 0.0.1 -OUTPUT_DIRECTORY = /home/burlot/rrm_nl/doc/rrm/ -CREATE_SUBDIRS = NO -OUTPUT_LANGUAGE = English -USE_WINDOWS_ENCODING = NO -BRIEF_MEMBER_DESC = YES -REPEAT_BRIEF = YES -ABBREVIATE_BRIEF = "The $name class" \ - "The $name widget" \ - "The $name file" \ - is \ - provides \ - specifies \ - contains \ - represents \ - a \ - an \ - the -ALWAYS_DETAILED_SEC = NO -INLINE_INHERITED_MEMB = NO -FULL_PATH_NAMES = YES -STRIP_FROM_PATH = /home/burlot/rrm_nl/ -STRIP_FROM_INC_PATH = -SHORT_NAMES = NO -JAVADOC_AUTOBRIEF = NO -MULTILINE_CPP_IS_BRIEF = NO -DETAILS_AT_TOP = NO -INHERIT_DOCS = YES -SEPARATE_MEMBER_PAGES = NO -TAB_SIZE = 4 -ALIASES = -OPTIMIZE_OUTPUT_FOR_C = YES -OPTIMIZE_OUTPUT_JAVA = NO -BUILTIN_STL_SUPPORT = NO -DISTRIBUTE_GROUP_DOC = NO -SUBGROUPING = YES -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- -EXTRACT_ALL = NO -EXTRACT_PRIVATE = NO -EXTRACT_STATIC = NO -EXTRACT_LOCAL_CLASSES = YES -EXTRACT_LOCAL_METHODS = NO -HIDE_UNDOC_MEMBERS = YES -HIDE_UNDOC_CLASSES = YES -HIDE_FRIEND_COMPOUNDS = NO -HIDE_IN_BODY_DOCS = NO -INTERNAL_DOCS = NO -CASE_SENSE_NAMES = YES -HIDE_SCOPE_NAMES = NO -SHOW_INCLUDE_FILES = YES -INLINE_INFO = YES -SORT_MEMBER_DOCS = YES -SORT_BRIEF_DOCS = NO -SORT_BY_SCOPE_NAME = NO -GENERATE_TODOLIST = YES -GENERATE_TESTLIST = YES -GENERATE_BUGLIST = YES -GENERATE_DEPRECATEDLIST= YES -ENABLED_SECTIONS = -MAX_INITIALIZER_LINES = 30 -SHOW_USED_FILES = YES -SHOW_DIRECTORIES = NO -FILE_VERSION_FILTER = -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- -QUIET = NO -WARNINGS = YES -WARN_IF_UNDOCUMENTED = YES -WARN_IF_DOC_ERROR = YES -WARN_NO_PARAMDOC = NO -WARN_FORMAT = "$file:$line: $text" -WARN_LOGFILE = -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- -INPUT = /home/burlot/rrm_nl/ch_init.c \ - /home/burlot/rrm_nl/ch_init.h \ - /home/burlot/rrm_nl/cmm_msg.c \ - /home/burlot/rrm_nl/cmm_msg.h \ - /home/burlot/rrm_nl/debug.h \ - /home/burlot/rrm_nl/mr_attach.c \ - /home/burlot/rrm_nl/mr_attach.h \ - /home/burlot/rrm_nl/msg_mngt.c \ - /home/burlot/rrm_nl/msg_mngt.h \ - /home/burlot/rrm_nl/neighbor_db.c \ - /home/burlot/rrm_nl/neighbor_db.h \ - /home/burlot/rrm_nl/pusu_msg.c \ - /home/burlot/rrm_nl/pusu_msg.h \ - /home/burlot/rrm_nl/rb_db.c \ - /home/burlot/rrm_nl/rb_db.h \ - /home/burlot/rrm_nl/rb_mngt.c \ - /home/burlot/rrm_nl/rb_mngt.h \ - /home/burlot/rrm_nl/rrc_msg.c \ - /home/burlot/rrm_nl/rrc_msg.h \ - /home/burlot/rrm_nl/rrm.c \ - /home/burlot/rrm_nl/rrm_constant.c \ - /home/burlot/rrm_nl/rrm_constant.h \ - /home/burlot/rrm_nl/rrm.h \ - /home/burlot/rrm_nl/rrm_sock.c \ - /home/burlot/rrm_nl/rrm_sock.h \ - /home/burlot/rrm_nl/rrm_util.c \ - /home/burlot/rrm_nl/rrm_util.h \ - /home/burlot/rrm_nl/interface/cmm_ral_interface.h \ - /home/burlot/rrm_nl/interface/cmm_rrm_interface.h \ - /home/burlot/rrm_nl/interface/L3_rrc_defs.h \ - /home/burlot/rrm_nl/interface/L3_rrc_interface.h \ - /home/burlot/rrm_nl/transact.c \ - /home/burlot/rrm_nl/transact.h -FILE_PATTERNS = *.c \ - *.cc \ - *.cxx \ - *.cpp \ - *.c++ \ - *.d \ - *.java \ - *.ii \ - *.ixx \ - *.ipp \ - *.i++ \ - *.inl \ - *.h \ - *.hh \ - *.hxx \ - *.hpp \ - *.h++ \ - *.idl \ - *.odl \ - *.cs \ - *.php \ - *.php3 \ - *.inc \ - *.m \ - *.mm \ - *.dox \ - *.py \ - *.C \ - *.CC \ - *.C++ \ - *.II \ - *.I++ \ - *.H \ - *.HH \ - *.H++ \ - *.CS \ - *.PHP \ - *.PHP3 \ - *.M \ - *.MM \ - *.PY -RECURSIVE = NO -EXCLUDE = -EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = -EXAMPLE_PATH = -EXAMPLE_PATTERNS = * -EXAMPLE_RECURSIVE = NO -IMAGE_PATH = -INPUT_FILTER = -FILTER_PATTERNS = -FILTER_SOURCE_FILES = NO -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- -SOURCE_BROWSER = YES -INLINE_SOURCES = YES -STRIP_CODE_COMMENTS = YES -REFERENCED_BY_RELATION = YES -REFERENCES_RELATION = YES -USE_HTAGS = NO -VERBATIM_HEADERS = YES -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- -ALPHABETICAL_INDEX = NO -COLS_IN_ALPHA_INDEX = 5 -IGNORE_PREFIX = -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- -GENERATE_HTML = YES -HTML_OUTPUT = html -HTML_FILE_EXTENSION = .html -HTML_HEADER = -HTML_FOOTER = -HTML_STYLESHEET = -HTML_ALIGN_MEMBERS = YES -GENERATE_HTMLHELP = NO -CHM_FILE = -HHC_LOCATION = -GENERATE_CHI = NO -BINARY_TOC = NO -TOC_EXPAND = NO -DISABLE_INDEX = NO -ENUM_VALUES_PER_LINE = 4 -GENERATE_TREEVIEW = NO -TREEVIEW_WIDTH = 250 -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- -GENERATE_LATEX = NO -LATEX_OUTPUT = latex -LATEX_CMD_NAME = latex -MAKEINDEX_CMD_NAME = makeindex -COMPACT_LATEX = NO -PAPER_TYPE = a4wide -EXTRA_PACKAGES = -LATEX_HEADER = -PDF_HYPERLINKS = NO -USE_PDFLATEX = NO -LATEX_BATCHMODE = NO -LATEX_HIDE_INDICES = NO -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- -GENERATE_RTF = NO -RTF_OUTPUT = rtf -COMPACT_RTF = NO -RTF_HYPERLINKS = NO -RTF_STYLESHEET_FILE = -RTF_EXTENSIONS_FILE = -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- -GENERATE_MAN = NO -MAN_OUTPUT = man -MAN_EXTENSION = .3 -MAN_LINKS = NO -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- -GENERATE_XML = NO -XML_OUTPUT = xml -XML_SCHEMA = -XML_DTD = -XML_PROGRAMLISTING = YES -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- -GENERATE_AUTOGEN_DEF = NO -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- -GENERATE_PERLMOD = NO -PERLMOD_LATEX = NO -PERLMOD_PRETTY = YES -PERLMOD_MAKEVAR_PREFIX = -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- -ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = NO -EXPAND_ONLY_PREDEF = NO -SEARCH_INCLUDES = YES -INCLUDE_PATH = -INCLUDE_FILE_PATTERNS = -PREDEFINED = -EXPAND_AS_DEFINED = -SKIP_FUNCTION_MACROS = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- -TAGFILES = -GENERATE_TAGFILE = -ALLEXTERNALS = NO -EXTERNAL_GROUPS = YES -PERL_PATH = /usr/bin/perl -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- -CLASS_DIAGRAMS = NO -HIDE_UNDOC_RELATIONS = YES -HAVE_DOT = YES -CLASS_GRAPH = YES -COLLABORATION_GRAPH = YES -GROUP_GRAPHS = YES -UML_LOOK = NO -TEMPLATE_RELATIONS = NO -INCLUDE_GRAPH = YES -INCLUDED_BY_GRAPH = YES -CALL_GRAPH = YES -GRAPHICAL_HIERARCHY = YES -DIRECTORY_GRAPH = YES -DOT_IMAGE_FORMAT = png -DOT_PATH = -DOTFILE_DIRS = -MAX_DOT_GRAPH_WIDTH = 1024 -MAX_DOT_GRAPH_HEIGHT = 1024 -MAX_DOT_GRAPH_DEPTH = 1000 -DOT_TRANSPARENT = NO -DOT_MULTI_TARGETS = NO -GENERATE_LEGEND = YES -DOT_CLEANUP = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- -SEARCHENGINE = NO diff --git a/openair3/MESH/RRM/EMUL/.tmp_versions/kemul_nl.mod b/openair3/MESH/RRM/EMUL/.tmp_versions/kemul_nl.mod deleted file mode 100755 index faa28584d6..0000000000 --- a/openair3/MESH/RRM/EMUL/.tmp_versions/kemul_nl.mod +++ /dev/null @@ -1,2 +0,0 @@ -/home/burlot/rrm/emul/kemul_nl.ko -/home/burlot/rrm/emul/kemul_nl.o diff --git a/openair3/MESH/RRM/EMUL/Makefile b/openair3/MESH/RRM/EMUL/Makefile deleted file mode 100755 index 65c2494e26..0000000000 --- a/openair3/MESH/RRM/EMUL/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -obj-m += kemul_nl.o - -all: - make -C .. - -modules: - @echo "**** module $(obj-m) ******" - make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules - -cleank: - make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean diff --git a/openair3/MESH/RRM/EMUL/actdiff.c b/openair3/MESH/RRM/EMUL/actdiff.c deleted file mode 100755 index 54b63f4a0f..0000000000 --- a/openair3/MESH/RRM/EMUL/actdiff.c +++ /dev/null @@ -1,214 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/*! -******************************************************************************* - -\file actdiff.c - -\brief Gestion des actions differees d'envoi de messages sur les sockets - ( emulation du traitement par un retard ) - - -\author BURLOT Pascal - -\date 13/08/08 - - -\par Historique: - $Author$ $Date$ $Revision$ - $Id$ - $Log$ - -******************************************************************************* -*/ -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "debug.h" -#include "L3_rrc_defs.h" -#include "rrm_util.h" -#include "rrm_sock.h" -#include "actdiff.h" - -#define DBG_ACTDIFF 0 - -#if DBG_ACTDIFF==0 -#define PRINT_ACTDIFF(...) -#else -#define PRINT_ACTDIFF(...) print_actdiff( __VA_ARGS__ ) -#endif - - -/****************************************************************************** - * \brief La fonction affiche a l'ecran la liste - * - * \return aucune valeur retournee - */ -static void print_actdiff( actdiff_t *pEntry ) -{ - actdiff_t *pCurrentItem = pEntry; - - fprintf(stderr,"actdiff_t=[\n"); - - while ( pCurrentItem != NULL) { - fprintf(stderr," @%p(.tv=%lf, .id=%d, .sock=%p, .msg=%p, .next=%p)\n", - pCurrentItem, pCurrentItem->tv, pCurrentItem->id, pCurrentItem->sock, - pCurrentItem->msg, pCurrentItem->next); - - pCurrentItem = pCurrentItem->next ; - } - - fprintf(stderr," ]\n"); - -} - -/****************************************************************************** - * \brief La fonction ajoute un element en fin de la liste des actions differees - * non-cloturees. - * - * \return retourne le pointeur de debut de liste. - */ -actdiff_t *add_actdiff( - actdiff_t **pEntry , - double delai, - int id, - sock_rrm_t *sock, - msg_t *msg -) -{ - actdiff_t *pNewItem = RRM_MALLOC(actdiff_t , 1 ) ; - - PNULL(pNewItem) ; - - if ( pNewItem == NULL ) - return NULL ; - - pNewItem->id = id ; - pNewItem->msg = msg ; - pNewItem->sock = sock ; - - pNewItem->tv = get_currentclock() + delai ; - pNewItem->next = NULL ; - - if ( *pEntry == NULL ) { - *pEntry = pNewItem ; - } else { - actdiff_t *pCurrentItem = *pEntry; - actdiff_t *pNextItem ; - - while ( pCurrentItem != NULL ) { - pNextItem = pCurrentItem->next ; - - if ( pNextItem == NULL ) { - pCurrentItem->next = pNewItem ; - break ; - } - - pCurrentItem = pNextItem ; - } - } - - PRINT_ACTDIFF(*pEntry) ; - - return pNewItem ; -} - -/****************************************************************************** - * \brief La fonction detruit l'action no Id de la liste . - * - * \return aucune valeur. - */ -void del_actdiff( actdiff_t **pEntry , int id ) -{ - actdiff_t *pCurrentItem = *pEntry; - actdiff_t *pNextItem ; - actdiff_t **ppPrevItem = pEntry ; - - if ( (pCurrentItem == NULL) || (pEntry==NULL)) - return ; - - while ( pCurrentItem != NULL ) { - pNextItem = pCurrentItem->next ; - - if ( pCurrentItem->id == id ) { - *ppPrevItem = pNextItem; - - RRM_FREE( pCurrentItem ) ; - break ; - } - - ppPrevItem = &(pCurrentItem->next) ; - pCurrentItem = pNextItem ; - } - - PRINT_ACTDIFF(*pEntry) ; -} - - -/****************************************************************************** - * \brief La fonction traite les actions arrivees a echeance. - * - * \return aucune valeur. - */ -void processing_actdiff( actdiff_t **pEntry ) -{ - double tv_current ; - - actdiff_t *pCurrentItem = *pEntry; - actdiff_t *pNextItem ; - - if ( (pCurrentItem == NULL) || (pEntry==NULL)) - return ; - - tv_current = get_currentclock() ; - - while ( pCurrentItem != NULL ) { - pNextItem = pCurrentItem->next ; - - if ( pCurrentItem->tv <= tv_current ) { - send_msg( pCurrentItem->sock, pCurrentItem->msg ) ; - //fprintf(stderr,"act diff: %lf \n", tv_current); - del_actdiff(pEntry,pCurrentItem->id) ; - } - - pCurrentItem = pNextItem ; - } -} - - - diff --git a/openair3/MESH/RRM/EMUL/actdiff.h b/openair3/MESH/RRM/EMUL/actdiff.h deleted file mode 100755 index 9cd58c1bd5..0000000000 --- a/openair3/MESH/RRM/EMUL/actdiff.h +++ /dev/null @@ -1,83 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/*! -******************************************************************************* - -\file actdiff.h - -\brief Fichier d'entête - - Il contient les declarations de type, des defines relatif aux - fonctions à la gestion des actions differees. - -\author BURLOT Pascal - -\date 13/08/08 - - -\par Historique: - $Author$ $Date$ $Revision$ - $Id$ - $Log$ - -******************************************************************************* -*/ - -#ifndef ACTDIFF_H -#define ACTDIFF_H - -#ifdef __cplusplus -extern "C" { -#endif - -///< \brief action differee ( a traiter ulterieurement ) -typedef struct actdiff_s { - double tv ; ///< date du traitement - int id ; ///< ID de l'action differee - sock_rrm_t *sock ; ///< socket associe - msg_t *msg ; ///< message a envoyer - struct actdiff_s *next ; ///< pointeur sur la prochaine action differee -} actdiff_t ; - -actdiff_t *add_actdiff( - actdiff_t **pEntry , - double delai, - int id, - sock_rrm_t *sock, - msg_t *msg -); - -void processing_actdiff( actdiff_t **pEntry ) ; - -#ifdef __cplusplus -} -#endif - -#endif /* ACTDIFF_H */ diff --git a/openair3/MESH/RRM/EMUL/emul_interface.c b/openair3/MESH/RRM/EMUL/emul_interface.c deleted file mode 100755 index bef08e8df8..0000000000 --- a/openair3/MESH/RRM/EMUL/emul_interface.c +++ /dev/null @@ -1,1124 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/*! -******************************************************************************* - -\file emul_interface.c - -\brief Emulation des interfaces du RRM (Radio Ressource Manager ) - - Cette application d'envoyer des stimuli sur les interfaces RRM: - - RRC -> RRM - - CMM -> RRM - -\author BURLOT Pascal - -\date 10/07/08 - - -\par Historique: - L.IACOBELLI 2009-10-19 - + new messages - L.IACOBELLI 2010-04-15 - + add sensing unit emulation - -******************************************************************************* -*/ -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include - -#include "debug.h" - -#include "L3_rrc_defs.h" -#include "cmm_rrm_interface.h" - -#include "rrm_sock.h" -#include "cmm_msg.h" -#include "rrc_rrm_msg.h" -#include "ip_msg.h" //mod_lor_10_04_27 -#include "pusu_msg.h" -#include "sensing_rrm_msg.h" - -#include "transact.h" -#include "actdiff.h" -#include "rrm_util.h" -#include "rrm_constant.h" - -#define NUM_SCENARIO 14 -#define SENSORS_NB 3 //mod_lor_10_03_03 -#define PUSU_EMUL -/*#define BTS_ID 1 -#define FC_ID 0 -#define CH_COLL_ID 0*/ - - -#ifdef RRC_EMUL - -extern msg_t *msg_rrc_rb_meas_ind(Instance_t inst, RB_ID Rb_id, L2_ID L2_id, MEAS_MODE Meas_mode, MAC_RLC_MEAS_T *Mac_rlc_meas_t, Transaction_t Trans_id ); -extern msg_t *msg_rrc_sensing_meas_ind( Instance_t inst, L2_ID L2_id, unsigned int NB_meas, SENSING_MEAS_T *Sensing_meas, Transaction_t Trans_id ); -extern msg_t *msg_rrc_sensing_meas_resp( Instance_t inst, Transaction_t Trans_id ) ; -extern msg_t *msg_rrc_cx_establish_ind( Instance_t inst, L2_ID L2_id, Transaction_t Trans_id,unsigned char *L3_info, L3_INFO_T L3_info_t, - RB_ID DTCH_B_id, RB_ID DTCH_id ); -extern msg_t *msg_rrc_phy_synch_to_MR_ind( Instance_t inst, L2_ID L2_id); -extern msg_t *msg_rrc_phy_synch_to_CH_ind( Instance_t inst, unsigned int Ch_index,L2_ID L2_id ); -extern msg_t *msg_rrc_rb_establish_resp( Instance_t inst, Transaction_t Trans_id ); -extern msg_t *msg_rrc_rb_establish_cfm( Instance_t inst, RB_ID Rb_id, RB_TYPE RB_type, Transaction_t Trans_id ); -extern msg_t *msg_rrc_rb_modify_resp( Instance_t inst, Transaction_t Trans_id ); -extern msg_t *msg_rrc_rb_modify_cfm(Instance_t inst, RB_ID Rb_id, Transaction_t Trans_id ); -extern msg_t *msg_rrc_rb_release_resp( Instance_t inst, Transaction_t Trans_id ); -extern msg_t *msg_rrc_MR_attach_ind( Instance_t inst, L2_ID L2_id ); -extern msg_t *msg_rrc_update_sens( Instance_t inst, /*double info_time,*/ L2_ID L2_id, unsigned int NB_info, Sens_ch_t *Sens_meas, Transaction_t Trans_id); -#endif - -#ifdef SNS_EMUL -extern msg_t *msg_sensing_end_scan_conf ( Instance_t inst); -#endif - -typedef struct { - L2_ID L2_id ; ///< identification de niveau L2 - L3_INFO_T L3_info_t ; ///< type de l'identification de niveau L3 - unsigned char L3_info[MAX_L3_INFO]; ///< identification de niveau L3 -} node_info_t ; - -static char c; //mod_lor_10_04_27 - -/*node_info_t node_info[10] = { - { .L2_id={{0x00,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11}}, .L3_info_t=IPv6_ADDR, .L3_info={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11} }, - { .L2_id={{0x01,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11}}, .L3_info_t=IPv6_ADDR, .L3_info={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11} }, - { .L2_id={{0x02,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11}}, .L3_info_t=IPv6_ADDR, .L3_info={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11} }, - { .L2_id={{0x03,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11}}, .L3_info_t=IPv6_ADDR, .L3_info={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11} }, - { .L2_id={{0x04,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11}}, .L3_info_t=IPv6_ADDR, .L3_info={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11} }, - { .L2_id={{0x05,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11}}, .L3_info_t=IPv6_ADDR, .L3_info={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11} }, - { .L2_id={{0x06,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11}}, .L3_info_t=IPv6_ADDR, .L3_info={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11} }, - { .L2_id={{0x07,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11}}, .L3_info_t=IPv6_ADDR, .L3_info={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11} }, - { .L2_id={{0x08,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11}}, .L3_info_t=IPv6_ADDR, .L3_info={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11} }, - { .L2_id={{0x09,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11}}, .L3_info_t=IPv6_ADDR, .L3_info={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x09,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11} } -} ;*/ -//mod_lor_10_01_25++ -node_info_t node_info[10] = { - { .L2_id={{0x00,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11}}, .L3_info_t=IPv4_ADDR, .L3_info={0xC0,0xA8,0x0C,0x43} }, - { .L2_id={{0x01,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11}}, .L3_info_t=IPv4_ADDR, .L3_info={0xC0,0xA8,0x0C,0x14} }, - { .L2_id={{0x02,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11}}, .L3_info_t=IPv4_ADDR, .L3_info={0x0A,0x00,0x03,0x03} }, - { .L2_id={{0x03,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11}}, .L3_info_t=IPv4_ADDR, .L3_info={0x0A,0x00,0x04,0x04} }, - { .L2_id={{0x04,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11}}, .L3_info_t=IPv4_ADDR, .L3_info={0x0A,0x00,0x05,0x05} }, - { .L2_id={{0x05,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11}}, .L3_info_t=IPv4_ADDR, .L3_info={0x0A,0x00,0x06,0x06} }, - { .L2_id={{0x06,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11}}, .L3_info_t=IPv4_ADDR, .L3_info={0x0A,0x00,0x07,0x07} }, - { .L2_id={{0x07,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11}}, .L3_info_t=IPv4_ADDR, .L3_info={0x0A,0x00,0x08,0x08} }, - { .L2_id={{0x08,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11}}, .L3_info_t=IPv4_ADDR, .L3_info={0x0A,0x00,0x09,0x09} }, - { .L2_id={{0x09,0x00,0xAA,0xCC,0x33,0x55,0x00,0x11}}, .L3_info_t=IPv4_ADDR, .L3_info={0x0A,0x00,0x10,0x10} } -} ; -//mod_lor_10_01_25--*/ -/***************************************************************************** - * \brief Sensing Parameters - */ -unsigned int Start_fr = 2420000; //!< Low frequency limit KHz -unsigned int Stop_fr = 2438000; //!< High frequency limit KHz -unsigned int Meas_band = 9000; //!< Channel bandwidth KHz -unsigned int Meas_tpf = 2; //!< Misuration time per frequency -unsigned int Overlap = 5; //!< Overlap -unsigned int Sampl_freq = 10; //!< Sample frequency - - -//void print_pusu_msg( neighbor_entry_RRM_to_CMM_t *pEntry ); - -static int flag_not_exit = 1 ; -int attached_sensors = 0;//mod_lor_10_01_25 - -static pthread_t pthread_rrc_hnd, - pthread_sns_hnd, - pthread_cmm_hnd , - pthread_pusu_hnd , // Publish Subscribe : -> routing CH - pthread_action_differe_hnd; - -pthread_mutex_t cmm_transact_exclu, - rrc_transact_exclu, - sns_transact_exclu; - -unsigned int cmm_transaction=512, - rrc_transaction=256, - sns_transaction=128 ; - -transact_t *cmm_transact_list=NULL, - *rrc_transact_list=NULL, - *sns_transact_list=NULL ; - -static RB_ID rb_id =4 ; - -pthread_mutex_t actdiff_exclu; -actdiff_t *list_actdiff = NULL ; -unsigned int cnt_actdiff = 512; - - -extern void scenario( int num , sock_rrm_t *s_rrc, sock_rrm_t *s_cmm, sock_rrm_t *s_sns) ; - -/***************************************************************************** - * \brief thread d'emulation de l'interface du Publish/subcribe (routingCH). - * \return NULL - */ -#ifdef PUSU_EMUL -static void *fn_pusu ( - void * p_data /**< parametre du pthread */ -) -{ - sock_rrm_t *s = (sock_rrm_t *) p_data ; - msg_head_t *header ; - -#ifdef TRACE - FILE *fd = fopen( "VCD/rrm2pusu.txt", "w") ; - PNULL(fd) ; -#endif - - fprintf(stderr,"PUSU interfaces :starting ...\n"); - - while (flag_not_exit) { - header = (msg_head_t *) recv_msg(s) ; - - if (header == NULL ) { - fprintf(stderr,"Server closed connection\n"); - //flag_not_exit = 0; //mod_lor_10_04_27 - } else { - char *msg = NULL ; - - if ( header->size > 0 ) { - msg = (char *) (header +1) ; - } - -#ifdef TRACE - - if ( header->msg_type < NB_MSG_RRM_PUSU ) - fprintf(fd,"%lf RRM->PUSU %d %-30s %d %d\n",get_currentclock(),header->inst,Str_msg_pusu_rrm[header->msg_type],header->msg_type,header->Trans_id); - else - fprintf(fd,"%lf RRM->PUSU %-30s %d %d\n",get_currentclock(), "inconnu", header->msg_type,header->Trans_id); - - fflush(fd); -#endif - - switch ( header->msg_type ) { - case RRM_PUBLISH_IND: { - // msg_fct( "[RRM]>[PUSU]:%d:RRM_PUBLISH_IND\n",header->inst); - send_msg( s, msg_pusu_resp( header->inst, PUSU_PUBLISH_RESP, header->Trans_id )) ; - } - break ; - - case RRM_UNPUBLISH_IND: { - // msg_fct( "[RRM]>[PUSU]:%d:RRM_UNPUBLISH_IND\n",header->inst); - send_msg( s, msg_pusu_resp( header->inst, PUSU_UNPUBLISH_RESP, header->Trans_id )) ; - } - break ; - - case RRM_LINK_INFO_IND: { - msg_fct( "[RRM]>[PUSU]:%d:RRM_LINK_INFO_IND\n",header->inst); - send_msg( s, msg_pusu_resp( header->inst, PUSU_LINK_INFO_RESP, header->Trans_id )) ; - } - break ; - - case RRM_SENSING_INFO_IND: { - // msg_fct( "[RRM]>[PUSU]:%d:RRM_SENSING_INFO_IND\n",header->inst); - send_msg( s, msg_pusu_resp( header->inst, PUSU_SENSING_INFO_RESP, header->Trans_id )) ; - } - break ; - - case RRM_CH_LOAD_IND: { - // msg_fct( "[RRM]>[PUSU]:%d:RRM_CH_LOAD_IND\n",header->inst); - send_msg( s, msg_pusu_resp( header->inst, PUSU_CH_LOAD_RESP, header->Trans_id )) ; - } - break ; - - default: - fprintf(stderr, "[RRM]>[PUSU]: msg unknown %d\n", header->msg_type) ; - //printHex(msg,n,1); - } - - RRM_FREE(header); - } - } - - fprintf(stderr,"... stopped PUSU interfaces\n"); -#ifdef TRACE - fclose(fd) ; -#endif - - return NULL; -} -#endif /* PUSU_EMUL */ - -#ifdef RRC_EMUL - -/***************************************************************************** - * \brief thread d'emulation de l'interface du rrc. - * \return NULL - */ -static void * fn_rrc ( - void * p_data /**< parametre du pthread */ -) -{ - sock_rrm_t *s = (sock_rrm_t *) p_data ; - msg_head_t *header ; - -#ifdef TRACE - FILE *fd = fopen( "VCD/rrm2rrc.txt", "w") ; - PNULL(fd) ; -#endif - - fprintf(stderr,"RRC interfaces :starting ...\n"); - fprintf(stderr,"prova\n"); //dbg - - while (flag_not_exit) { - header = (msg_head_t *) recv_msg(s) ; - - if (header == NULL ) { - fprintf(stderr,"Server closed connection\n"); - //flag_not_exit = 0;//mod_lor_10_04_27 - } else { - char *msg = NULL ; - - if ( header->size > 0 ) { - msg = (char *) (header +1) ; - } - -#ifdef TRACE - - if ( header->msg_type < NB_MSG_RRC_RRM ) - fprintf(fd,"%lf RRM->RRC %d %-30s %d %d\n",get_currentclock(),header->inst,Str_msg_rrc_rrm[header->msg_type],header->msg_type,header->Trans_id); - else - fprintf(fd,"%lf RRM->RRC %-30s %d %d\n",get_currentclock(), "inconnu", header->msg_type,header->Trans_id); - - fflush(fd); -#endif - - switch ( header->msg_type ) { - case RRM_RB_ESTABLISH_REQ: { - //rrm_rb_establish_req_t *p = (rrm_rb_establish_req_t *) msg ; - msg_fct( "[RRM]>[RRC]:%d:RRM_RB_ESTABLISH_REQ\n",header->inst); - - send_msg( s, msg_rrc_rb_establish_resp( header->inst, header->Trans_id )) ; - - pthread_mutex_lock( &actdiff_exclu ) ; - add_actdiff(&list_actdiff,0.05, cnt_actdiff++, s, - msg_rrc_rb_establish_cfm( header->inst, rb_id++, UNICAST,header->Trans_id) ) ; - - pthread_mutex_unlock( &actdiff_exclu ) ; - } - break ; - - case RRM_RB_MODIFY_REQ: { - rrm_rb_modify_req_t *p = (rrm_rb_modify_req_t *) msg ; - msg_fct( "[RRM]>[RRC]:%d:RRM_RB_MODIFY_REQ\n",header->inst); - - send_msg( s, msg_rrc_rb_modify_resp( header->inst,header->Trans_id )) ; - - pthread_mutex_lock( &actdiff_exclu ) ; - - add_actdiff(&list_actdiff,0.05, cnt_actdiff++, s, - msg_rrc_rb_modify_cfm( header->inst, p->Rb_id, header->Trans_id) ) ; - - pthread_mutex_unlock( &actdiff_exclu ) ; - - } - break ; - - case RRM_RB_RELEASE_REQ: { - //rrm_rb_release_req_t *p = (rrm_rb_release_req_t *) msg ; - msg_fct( "[RRM]>[RRC]:%d:RRM_RB_RELEASE_REQ\n",header->inst); - - send_msg( s, msg_rrc_rb_release_resp( header->inst,header->Trans_id )) ; - } - break ; - - case RRM_SENSING_MEAS_REQ: { - //rrm_sensing_meas_req_t *p = (rrm_sensing_meas_req_t *) msg ; - msg_fct( "[RRM]>[RRC]:%d:RRM_SENSING_MEAS_REQ\n",header->inst); - - send_msg( s, msg_rrc_sensing_meas_resp( header->inst, header->Trans_id ) ); - } - break ; - - case RRCI_CX_ESTABLISH_RESP: { - rrci_cx_establish_resp_t *p = (rrci_cx_establish_resp_t *) msg ; - msg_fct( "[RRCI]>[RRC]:%d:RRCI_CX_ESTABLISH_RESP\n",header->inst); - - fprintf(stderr,"L3_id: "); - print_L3_id(p->L3_info_t, p->L3_info ); - fprintf(stderr,"\n"); - - } - break ; - - case RRM_SENSING_MEAS_RESP: { - msg_fct( "[RRM]>[RRC]:%d:RRM_SENSING_MEAS_RESP\n",header->inst); - } - break ; - - case RRM_RB_MEAS_RESP: { - msg_fct( "[RRM]>[RRC]:%d:RRM_RB_MEAS_RESP\n",header->inst); - } - break ; - - case RRM_INIT_CH_REQ: { - msg_fct( "[RRM]>[RRC]:%d:RRM_INIT_CH_REQ\n",header->inst); - } - break ; - - case RRCI_INIT_MR_REQ: { - msg_fct( "[RRM]>[RRC]:%d:RRM_INIT_MR_REQ\n",header->inst); - } - break ; - - case RRM_INIT_MON_REQ: { - rrm_init_mon_req_t *p = (rrm_init_mon_req_t *) msg ; - msg_fct( "[RRM]>[RRC]:%d:RRM_INIT_MON_REQ on channels: ",header->inst); - fprintf(stdout,"chan nb: %d\n", p->NB_chan); //dbg - - for ( int i=0; iNB_chan; i++) - msg_fct("%d ", p->ch_to_scan[i]); - - msg_fct( "\n"); - - } - break ; - - case RRM_INIT_SCAN_REQ: { - msg_fct( "[RRM]>[RRC]:%d:RRM_INIT_SCAN_REQ\n",header->inst); - - } - break ; - - case RRM_END_SCAN_REQ: { - rrm_end_scan_req_t *p = (rrm_end_scan_req_t *) msg ; - msg_fct( "[RRM]>[RRC]:%d:RRM_END_SCAN_REQ on sensor",header->inst); - - for ( int i=0; i<8; i++) - msg_fct("%02X", p->L2_id.L2_id[i]); - - msg_fct( "\n"); - - - } - break ; - - case RRM_END_SCAN_ORD: { - msg_fct( "[RRM]>[RRC]:%d:RRM_END_SCAN_ORD\n",header->inst); - - } - break ; - - case RRM_UP_FREQ_ASS : { - msg_fct( "[RRM]>[RRC]:%d:RRM_UP_FREQ_ASS\n",header->inst); - } - break ; - - default : - fprintf(stderr, "RRC: msg unknown %d\n", header->msg_type) ; - //printHex(msg,n,1); - } - - RRM_FREE(header); - } - - } - - fprintf(stderr,"... stopped RRC interfaces\n"); - -#ifdef TRACE - fclose(fd) ; -#endif - - return NULL; -} - -#endif /* RRC_EMUL */ - -/***************************************************************************** - * \brief thread d'emulation de l'interface du cmm. - * \return NULL - */ -static void * fn_cmm ( - void * p_data /**< parametre du pthread */ -) -{ - sock_rrm_t *s = (sock_rrm_t *) p_data ; - msg_head_t *header ; - -#ifdef TRACE - FILE *fd = fopen( "VCD/rrm2cmm.txt", "w") ; - PNULL(fd) ; -#endif - - fprintf(stderr,"CMM interfaces :starting ...\n"); - - while (flag_not_exit) { - header = (msg_head_t *) recv_msg(s) ; - - if (header == NULL ) { - fprintf(stderr,"Server closed connection\n"); - //flag_not_exit = 0;//mod_lor_10_04_27 - } else { - char *msg = NULL ; - - if ( header->size > 0 ) { - msg = (char *) (header +1) ; - } - -#ifdef TRACE - - if ( header->msg_type < NB_MSG_CMM_RRM ) - fprintf(fd,"%lf RRM->CMM %d %-30s %d %d\n",get_currentclock(),header->inst,Str_msg_cmm_rrm[header->msg_type],header->msg_type,header->Trans_id); - else - fprintf(fd,"%lf RRM->CMM %-30s %d %d\n",get_currentclock(),"inconnu",header->msg_type,header->Trans_id); - - fflush(fd); -#endif - - switch ( header->msg_type ) { - case RRM_CX_SETUP_CNF : { - // rrm_cx_setup_cnf_t *p = (rrm_cx_setup_cnf_t *) msg ; - // msg_fct( "[RRM]>[CMM]:%d:RRM_CX_SETUP_CNF\n",header->inst); - - pthread_mutex_lock( &cmm_transact_exclu ) ; - del_item_transact( &cmm_transact_list, header->Trans_id ); - pthread_mutex_unlock( &cmm_transact_exclu ) ; - } - break ; - - case RRM_CX_MODIFY_CNF : { - //rrm_cx_modify_cnf_t *p = (rrm_cx_modify_cnf_t *) msg ; - // msg_fct( "[RRM]>[CMM]:%d:RRM_CX_MODIFY_CNF\n",header->inst); - } - break ; - - case RRM_CX_RELEASE_CNF : { - //rrm_cx_release_cnf_t *p = (rrm_cx_release_cnf_t *) msg ; - // msg_fct( "[RRM]>[CMM]:%d:RRM_CX_RELEASE_CNF\n",header->inst); - } - break ; - - case RRM_CX_RELEASE_ALL_CNF : { - //rrm_cx_release_all_cnf_t *p = (rrm_cx_release_all_cnf_t *) msg ; - // msg_fct( "[RRM]>[CMM]:%d:RRM_CX_RELEASE_ALL_CNF\n",header->inst); - } - break ; - - case RRCI_ATTACH_REQ : { -#ifndef PHY_EMUL - float delai = 0.05 ; -#else - float delai = 0.00 ; -#endif - rrci_attach_req_t *p = (rrci_attach_req_t *) msg ; - - // msg_fct( "[RRM]>[CMM]:%d:RRCI_ATTACH_REQ \n",header->inst); - //MSG_L2ID(p->L2_id); - //add_lor_11_01_07++ - if (SCEN_2_CENTR) - sleep(2); - - //add_lor_11_01_07-- - pthread_mutex_lock( &actdiff_exclu ) ; - - - add_actdiff(&list_actdiff,delai, cnt_actdiff++, s, - msg_cmm_attach_cnf(header->inst,p->L2_id,node_info[header->inst].L3_info_t,node_info[header->inst].L3_info,header->Trans_id ) ) ; - - pthread_mutex_unlock( &actdiff_exclu ) ; - } - break ; - - case RRM_ATTACH_IND : { - //mod_lor: 10_02_09++ - if (WSN && header->inst == 0) //inst_to_change: remove header->inst == 0 in case WSN and SN not on the same machine - attached_sensors ++;//mod_lor: 10_01_25 - - //msg_fct( "attached_sensors %d \n\n",attached_sensors); //dbg -#ifndef PHY_EMUL - float delai = 0.05 ; -#else - float delai = 0.00 ; -#endif - // msg_fct( "[RRM]>[CMM]:%d:RRM_ATTACH_IND\n",header->inst); - - /* //mod_lor_10_04_27++ - //if (WSN && attached_sensors==SENSORS_NB && header->inst == 0){ //AAA inst_to_change: remove header->inst == 0 in case WSN and SN not on the same machine - //mod_lor_10_03_12++ - unsigned int Start_fr = 1000; - unsigned int Stop_fr = 2000; - unsigned int Meas_band = 200; - unsigned int Meas_tpf = 2; - unsigned int Nb_channels= (Stop_fr-Start_fr)/Meas_band; - unsigned int Overlap = 5; - unsigned int Sampl_freq = 10; - - - scanf("%c",&c); //mod_lor_10_04_27 - if (c == 's'){//mod_lor_10_04_27 - - pthread_mutex_lock( &actdiff_exclu ) ; - add_actdiff(&list_actdiff,5, cnt_actdiff++, s, - msg_cmm_init_sensing(header->inst,Start_fr,Stop_fr,Meas_band,Meas_tpf, - Nb_channels,Overlap, Sampl_freq) ); - - pthread_mutex_unlock( &actdiff_exclu ) ; //mod_lor: 10_02_09-- - scanf("%c",&c); //mod_lor_10_04_27 - } - - if (c == 'e'){//mod_lor_10_04_27 - pthread_mutex_lock( &actdiff_exclu ) ; - add_actdiff(&list_actdiff,5, cnt_actdiff++, s, - msg_cmm_stop_sensing(0) ); - - pthread_mutex_unlock( &actdiff_exclu ) ; //mod_lor: 10_02_09-- - } - - } //mod_lor_10_03_12++ - //mod_lor_10_04_27--*/ - } - break ; - - case RRM_MR_ATTACH_IND : { - L2_ID L2_id_mr; -#ifndef PHY_EMUL - float delai = 0.05 ; -#else - float delai = 0.00 ; -#endif - rrm_MR_attach_ind_t *p = (rrm_MR_attach_ind_t *) msg ; - - // msg_fct( "[RRM]>[CMM]:%d:RRM_MR_ATTACH_IND\n",header->inst); - memcpy( L2_id_mr.L2_id, p->L2_id.L2_id, sizeof(L2_ID)); - - //add_lor_11_01_07++ - if (SCEN_2_CENTR) - sleep(2); - - //add_lor_11_01_07-- - pthread_mutex_lock( &actdiff_exclu ) ; - - cmm_transaction++; - add_actdiff(&list_actdiff,delai, cnt_actdiff++, s, - msg_cmm_cx_setup_req(header->inst,node_info[header->inst].L2_id,L2_id_mr, QOS_DTCH_D, cmm_transaction ) ) ; - - pthread_mutex_unlock( &actdiff_exclu ) ; - - pthread_mutex_lock( &cmm_transact_exclu ) ; - add_item_transact( &cmm_transact_list, cmm_transaction, INT_CMM,CMM_CX_SETUP_REQ,0,NO_PARENT); - pthread_mutex_unlock( &cmm_transact_exclu ) ; - } - break ; - - case ROUTER_IS_CH_IND : { -#ifndef PHY_EMUL - float delai = 0.05 ; //mod_lor_10_04_22: 5 instead of 0.05 - float delai2 = 0.08 ; -#else - float delai = 0.00 ; - float delai2 = 0.00 ; -#endif - router_is_CH_ind_t *p =(router_is_CH_ind_t *)msg ; - // msg_fct( "[RRM]>[CMM]:%d:ROUTER_IS_CH_IND\n",header->inst); - - memcpy( node_info[header->inst].L2_id.L2_id, p->L2_id.L2_id, sizeof(L2_ID)); - //print_L2_id(&L2_id_ch ); printf("=>L2_id_ch\n"); - - pthread_mutex_lock( &actdiff_exclu ) ; - - add_actdiff(&list_actdiff,delai, cnt_actdiff++, s, - msg_cmm_init_ch_req( header->inst,node_info[header->inst].L3_info_t,node_info[header->inst].L3_info )) ; - - cmm_transaction++; - add_actdiff(&list_actdiff,delai2, cnt_actdiff++, s, - msg_cmm_cx_setup_req(header->inst,node_info[header->inst].L2_id,node_info[header->inst].L2_id, QOS_DTCH_B, cmm_transaction ) ) ; - - pthread_mutex_unlock( &actdiff_exclu ) ; - - pthread_mutex_lock( &cmm_transact_exclu ) ; - add_item_transact( &cmm_transact_list, cmm_transaction, INT_CMM, CMM_CX_SETUP_REQ,0,NO_PARENT); - pthread_mutex_unlock( &cmm_transact_exclu ) ; - - /*//mod_lor_10_04_27++ - if (header->inst==1){ - //scanf("%c",&c); //mod_lor_10_04_27 - //if (c == 'a'){//mod_lor_10_04_27 - pthread_mutex_lock( &actdiff_exclu ) ; - add_actdiff(&list_actdiff,20, cnt_actdiff++, s, msg_cmm_ask_freq(header->inst) ); - pthread_mutex_unlock( &actdiff_exclu ) ; - //} - }//mod_lor_10_04_27--*/ - } - break ; - - case RRCI_CH_SYNCH_IND : { - // msg_fct( "[RRM]>[CMM]:%d:RRCI_CH_SYNCH_IND\n",header->inst); - } - break ; - - case RRM_MR_SYNCH_IND : { - // msg_fct( "[RRM]>[CMM]:%d:RRM_MR_SYNCH_IND\n",header->inst); - } - break ; - - case RRM_NO_SYNCH_IND: { - // msg_fct( "[RRM]>[CMM]:%d:RRM_NO_SYNCH_IND\n",header->inst); - } - break ; - - default : - fprintf(stderr, "CMM:unknown msg %d\n", header->msg_type) ; - //printHex(msg,n,1); - } - - RRM_FREE(header); - } - } - - fprintf(stderr,"... stopped CMM interfaces\n"); - -#ifdef TRACE - fclose(fd) ; -#endif - - return NULL; -} -//mod_lor_10_04_15++ -> emulation sensing -/***************************************************************************** - * \brief thread d'emulation de l'interface du Publish/subcribe (routingCH). - * \return NULL - */ -#ifdef SNS_EMUL -static void *fn_sns ( - void * p_data /**< parametre du pthread */ -) -{ - sock_rrm_t *s = (sock_rrm_t *) p_data ; - msg_head_t *header ; - -#ifdef TRACE - FILE *fd = fopen( "VCD/rrm2sns.txt", "w") ; - PNULL(fd) ; -#endif - - fprintf(stderr,"SNS interfaces :starting ...\n"); - - while (flag_not_exit) { - header = (msg_head_t *) recv_msg(s) ; - - if (header == NULL ) { - fprintf(stderr,"Server closed connection\n"); - //flag_not_exit = 0; //mod_lor_10_04_27 - } else { - char *msg = NULL ; - - if ( header->size > 0 ) { - msg = (char *) (header +1) ; - } - -#ifdef TRACE - - if ( header->msg_type < NB_MSG_SNS_RRM ) - fprintf(fd,"%lf RRM->SENSING %d %-30s %d %d\n",get_currentclock(),header->inst,Str_msg_sns_rrm[header->msg_type],header->msg_type,header->Trans_id); - else - fprintf(fd,"%lf RRM->SENSING %-30s %d %d\n",get_currentclock(), "inconnu", header->msg_type,header->Trans_id); - - fflush(fd); -#endif - - switch ( header->msg_type ) { - case RRM_SCAN_ORD: { - rrm_scan_ord_t *p = (rrm_scan_ord_t *) msg ; - msg_fct( "[RRM]>[SENSING]:%d:RRM_SCAN_ORD\n",header->inst); - - /*fprintf(stderr,"NB_chan = %d;\nMeas_tpf: %d;\nOverlap: %d;\nSampl_freq: %d;\n",p->NB_chan, p->Meas_tpf, p->Overlap,p->Sampl_freq);//dbg - fprintf(stderr,"Channels ids: ");//dbg - for ( int i=0; iNB_chan; i++)//dbg - fprintf(stderr," %d ",p->ch_to_scan[i].Ch_id);//dbg - fprintf(stderr," \n\n");//dbg*/ - - } - break ; - - case RRM_END_SCAN_ORD: { - msg_fct( "[RRM]>[SENSING]:%d:RRM_END_SCAN_ORD\n",header->inst); - send_msg( s, msg_sensing_end_scan_conf( header->inst)) ; - - } - break ; - - - default: - fprintf(stderr, "[RRM]>[SENSING]: msg unknown %d\n", header->msg_type) ; - //printHex(msg,n,1); - } - - RRM_FREE(header); - } - } - - fprintf(stderr,"... stopped SENSING interfaces\n"); -#ifdef TRACE - fclose(fd) ; -#endif - - return NULL; -} -#endif /* SNS_EMUL */ - -//mod_lor_10_04_15-- - -/***************************************************************************** - * \brief thread d'emulation de l'interface du cmm. - * \return NULL - */ -static void * fn_action_differe ( - void * p_data /**< parametre du pthread */ -) -{ - fprintf(stderr,"thread action differe :starting ...\n"); - - while (flag_not_exit) { - usleep( 10*1000 ) ; - - // traitement de liste d'actions differees - pthread_mutex_lock( &actdiff_exclu ) ; - processing_actdiff(&list_actdiff ) ; - pthread_mutex_unlock( &actdiff_exclu ) ; - - } - - fprintf(stderr,"... stopped thread action differe\n"); - return NULL; -} - -int main( int argc , char **argv ) -{ - int ret = 0; - int tr, rec; -#ifdef RRC_EMUL - sock_rrm_t s_rrc ; -#endif /* RRC_EMUL */ -#ifdef SNS_EMUL - sock_rrm_t s_sns ; -#endif /* SNS_EMUL */ - sock_rrm_t s_cmm ; - sock_rrm_t s_pusu ; - - /* ***** MUTEX ***** */ - pthread_attr_t attr ; - - // initialise les attributs des threads - pthread_attr_init( &attr ) ; - pthread_attr_setschedpolicy( &attr, SCHED_RR ) ; - - pthread_mutex_init( &actdiff_exclu , NULL ) ; - pthread_mutex_init( &cmm_transact_exclu , NULL ) ; - pthread_mutex_init( &rrc_transact_exclu , NULL ) ; - pthread_mutex_init( &sns_transact_exclu , NULL ) ; - - fprintf(stderr,"Emulation des interfaces\n"); - -#ifdef RRC_EMUL - fprintf(stderr,"Trying to connect... RRM-RRC\n"); - open_socket(&s_rrc, RRC_RRM_SOCK_PATH, RRM_RRC_SOCK_PATH,0) ; - - if (s_rrc.s == -1) - exit(1); - - fprintf(stderr,"Connected... RRM-RRC (s=%d)\n",s_rrc.s); -#endif /* RRC_EMUL */ - -#ifdef SNS_EMUL - fprintf(stderr,"Trying to connect... RRM-SNS\n"); - open_socket(&s_sns, SENSING_RRM_SOCK_PATH, RRM_SENSING_SOCK_PATH,0) ; - - if (s_sns.s == -1) - exit(1); - - fprintf(stderr,"Connected... RRM-SNS (s=%d)\n",s_sns.s); -#endif /* SNS_EMUL */ - - - fprintf(stderr,"Trying to connect... CRRM-CMM\n"); - open_socket(&s_cmm,CMM_RRM_SOCK_PATH,RRM_CMM_SOCK_PATH,0) ; - - if (s_cmm.s == -1) - exit(1); - - fprintf(stderr,"Connected... CRRM-CMM (s=%d)\n",s_cmm.s); - -#ifdef PUSU_EMUL - fprintf(stderr,"Trying to connect... CRRM-PUSU\n"); - open_socket(&s_pusu,PUSU_RRM_SOCK_PATH,RRM_PUSU_SOCK_PATH,0) ; - - if (s_pusu.s == -1) - exit(1); - - fprintf(stderr,"Connected... CRRM-PUSU (s=%d)\n",s_pusu.s); -#endif - -#ifdef RRC_EMUL - /* Creation du thread RRC */ - fprintf(stderr,"Creation du thread RRC \n"); - ret = pthread_create ( &pthread_rrc_hnd, NULL, fn_rrc, &s_rrc ); - - if (ret) { - fprintf(stderr, "%s", strerror (ret)); - } - -#endif /* RRC_EMUL */ - -#ifdef SNS_EMUL - /* Creation du thread SENSING */ - fprintf(stderr,"Creation du thread SNS \n"); - ret = pthread_create ( &pthread_sns_hnd, NULL, fn_sns, &s_sns ); - - if (ret) { - fprintf(stderr, "%s", strerror (ret)); - } - -#endif /* SNS_EMUL */ - - /* Creation du thread CMM */ - ret = pthread_create(&pthread_cmm_hnd , NULL, fn_cmm, &s_cmm ); - - if (ret) { - fprintf(stderr, "%s", strerror (ret)); - } - -#ifdef PUSU_EMUL - /* Creation du thread Publish Subscribe (Routing CH) */ - ret = pthread_create (&pthread_pusu_hnd , NULL, fn_pusu, &s_pusu ); - - if (ret) { - fprintf (stderr, "%s", strerror (ret)); - } - -#endif /*PUSU_EMUL */ - - /* Creation du thread action_differe */ - ret = pthread_create (&pthread_action_differe_hnd , NULL, fn_action_differe, NULL ); - - if (ret) { - fprintf(stderr, "%s", strerror (ret)); - } - -#ifdef RRC_EMUL - usleep(100000); - scenario( NUM_SCENARIO, &s_rrc, &s_cmm, &s_sns ); -#endif /* RRC_EMUL */ - sleep(5); - //mod_lor_11_02_15 ++: reorganization - printf("\n\n\nCommands: \n 'q' to exit\n" ); - - if(SCEN_2_CENTR || (SCEN_1 && FC_ID>=0)) { - printf(" 's' to start sensing\n 'e' to end sensing\n" ); - - if (SCEN_1) - printf("\n\n" ); - } - - if (SCEN_1 && BTS_ID>=0) - printf(" 'a' to active BTS request\n\n\n" ); - - if (SCEN_2_CENTR) - printf(" 'c' to active collaborative sensing\n 'a' to active a secondary user\n 'l' to remove a link between two secondary users\n 'd' to disconnect a secondary user\n\n\n" ); - - //mod_lor_11_02_15 -- - - //getchar() ;//mod_lor_10_04_27 - while (flag_not_exit) { - scanf("%c",&c); - - if (c == 'q') - flag_not_exit = 0;//mod_lor_10_04_27 - else if (c == 's') { //mod_lor_10_04_27 - printf("Starting sensing ... \n\n"); - unsigned int Nb_channels= (Stop_fr-Start_fr)/Meas_band; - - if (Nb_channels>NB_SENS_MAX) { - printf("ERROR! too many channels! Maximum number of channels is %d",NB_SENS_MAX); - break; - } - - pthread_mutex_lock( &actdiff_exclu ) ; - add_actdiff(&list_actdiff,0, cnt_actdiff++, &s_cmm, - msg_cmm_init_sensing(FC_ID,Start_fr,Stop_fr,Meas_band,Meas_tpf, - Nb_channels,Overlap, Sampl_freq) ); - pthread_mutex_unlock( &actdiff_exclu ) ; //mod_lor: 10_02_09-- - } else if (c == 'd') { //add_lor_10_11_09 - printf("Select user to disconnect (from 1 to 3) ... \n"); - scanf("%d",&tr); - - while (tr<1||tr>3) { - printf(" User id not valid!\nSelect user (from 1 to 3) ... \n"); - scanf("%d",&tr); - } - - //mod_lor_10_12_07++ - tr = tr+FIRST_SENSOR_ID-1; - //mod_lor_10_12_07-- - pthread_mutex_lock( &actdiff_exclu ) ; - add_actdiff(&list_actdiff,0, cnt_actdiff++, &s_cmm, msg_cmm_user_disc(tr) ); - pthread_mutex_unlock( &actdiff_exclu ) ; - - } else if (c == 'l') { //add_lor_10_11_09 - printf("Digit id of users involved in the link to remove (from 1 to 3) ... \n"); - scanf("%d",&tr); - - while (tr<1||tr>3) { - printf(" User id not valid!\nSelect user (from 1 to 3) ... \n"); - scanf("%d",&tr); - } - - scanf("%d",&rec); - - while (rec<1||rec>3||rec==tr) { - if (rec==tr) - printf(" A user cannot have a link with itself!\n"); - else - printf(" User id not valid!\n"); - - printf("Select user (from 1 to 3) ... \n"); - scanf("%d",&rec); - } - - //mod_lor_10_12_07++ - tr = tr+FIRST_SENSOR_ID-1; - rec = rec+FIRST_SENSOR_ID-1; - //mod_lor_10_12_07-- - - pthread_mutex_lock( &actdiff_exclu ) ; - add_actdiff(&list_actdiff,0, cnt_actdiff++, &s_cmm, msg_cmm_link_disc(tr,rec) ); - pthread_mutex_unlock( &actdiff_exclu ) ; - - } else if (c == 'c') { //add_lor_10_11_08 - printf("Starting collaborative sensing ... \n\n"); - unsigned int Nb_channels= (Stop_fr-Start_fr)/Meas_band; - - if (Nb_channels>NB_SENS_MAX) { - printf("ERROR! too many channels! Maximum number of channels is %d",NB_SENS_MAX); - break; - } - - pthread_mutex_lock( &actdiff_exclu ) ; - add_actdiff(&list_actdiff,0, cnt_actdiff++, &s_cmm, - msg_cmm_init_coll_sensing(FC_ID,Start_fr,Stop_fr,Meas_band,Meas_tpf, - Nb_channels,Overlap, Sampl_freq) ); - pthread_mutex_unlock( &actdiff_exclu ) ; - } else if (c == 'e') { //mod_lor_10_04_27 - printf("Ending sensing ... \n\n"); - pthread_mutex_lock( &actdiff_exclu ) ; - add_actdiff(&list_actdiff,0, cnt_actdiff++, &s_cmm, - msg_cmm_stop_sensing(FC_ID) ); - - pthread_mutex_unlock( &actdiff_exclu ) ; //mod_lor: 10_02_09--*/ - } else if (c == 'a') { - if (BTS_ID>=0) { - printf("Activating BTS to ask for frequencies ... \n\n"); - pthread_mutex_lock( &actdiff_exclu ) ; - add_actdiff(&list_actdiff,0, cnt_actdiff++, &s_cmm, msg_cmm_ask_freq(BTS_ID) ); - pthread_mutex_unlock( &actdiff_exclu ) ; - } - //mod_lor_10_10_28++ - //mod_lor_10_10_28-- - else if (SCEN_2_CENTR) { - printf("Select user that wants to transmit (from 1 to 3) ... \n"); - scanf("%d",&tr); - - while (tr<1||tr>3) { - printf(" User id not valid!\nSelect user that wants to transmit (from 1 to 3) ... \n"); - scanf("%d",&tr); - } - - printf("Select user destination of the transmission(from 1 to 3) ... \n"); - scanf("%d",&rec); - - while (rec<1||rec>3||rec==tr) { - if (rec==tr) - printf(" Receiver could not be equal to transmitter!\n"); - else - printf(" User id not valid!\n"); - - printf("Select user destination (from 1 to 3) ... \n"); - scanf("%d",&rec); - } - - //mod_lor_10_12_07++ - tr = tr+FIRST_SENSOR_ID-1; - rec = rec+FIRST_SENSOR_ID-1; - //mod_lor_10_12_07-- - - pthread_mutex_lock( &actdiff_exclu ) ; - add_actdiff(&list_actdiff,0, cnt_actdiff++, &s_cmm, msg_cmm_need_to_tx(tr,rec,1) ); - pthread_mutex_unlock( &actdiff_exclu ) ; - } else - printf("BTS not connected ... \n\n"); - } - - } - - //mod_lor_10_04_27--*/ - - -#ifdef RRC_EMUL - close_socket(&s_rrc); -#endif /* RRC_EMUL */ - -#ifdef SNS_EMUL - close_socket(&s_sns); -#endif /* SNS_EMUL */ - - close_socket(&s_cmm); - -#ifdef PUSU_EMUL - close_socket(&s_pusu); -#endif /*PUSU_EMUL */ - - /* Attente de la fin des threads. */ - pthread_join (pthread_cmm_hnd, NULL); -#ifdef PUSU_EMUL - pthread_join (pthread_pusu_hnd, NULL); -#endif /*PUSU_EMUL */ -#ifdef RRC_EMUL - pthread_join (pthread_rrc_hnd, NULL); -#endif /* RRC_EMUL */ -#ifdef SNS_EMUL - pthread_join (pthread_sns_hnd, NULL); -#endif /* SNS_EMUL */ - pthread_join (pthread_action_differe_hnd, NULL); - - return 0 ; -} diff --git a/openair3/MESH/RRM/EMUL/emul_interface.h b/openair3/MESH/RRM/EMUL/emul_interface.h deleted file mode 100755 index c8eac108e2..0000000000 --- a/openair3/MESH/RRM/EMUL/emul_interface.h +++ /dev/null @@ -1,79 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/*! -******************************************************************************* - -\file emul_interface.h - -\brief Fichier d'entête - - Il contient les declarations de type, des defines relatif aux - fonctions d'emulation des interfaces du RRM (Radio Resource - Management ). - -\author BURLOT Pascal - -\date 15/07/08 - - -\par Historique: - $Author$ $Date$ $Revision$ - $Id$ - $Log$ - -******************************************************************************* -*/ - - -#ifndef EMUL_INTERFACE_H -#define EMUL_INTERFACE_H - -#ifdef __cplusplus -extern "C" { -#endif - -extern pthread_mutex_t cmm_transact_exclu; -extern pthread_mutex_t rrc_transact_exclu; - -extern unsigned int cmm_transaction; -extern unsigned int rrc_transaction; - -extern pthread_mutex_t actdiff_exclu; -extern actdiff_t *list_actdiff; -extern unsigned int cnt_actdiff; - -extern transact_t *cmm_transact_list; -extern transact_t *rrc_transact_list; - -#ifdef __cplusplus -} -#endif - -#endif /* EMUL_INTERFACE_H */ diff --git a/openair3/MESH/RRM/EMUL/scenario.c b/openair3/MESH/RRM/EMUL/scenario.c deleted file mode 100755 index e396038766..0000000000 --- a/openair3/MESH/RRM/EMUL/scenario.c +++ /dev/null @@ -1,1292 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/*! -******************************************************************************* - -\file scenario.c - -\brief Emulation d'un scenario de test sur les interfaces du RRM - - Cette application d'envoyer des stimuli sur les interfaces RRM: - - RRC -> RRM - - CMM -> RRM - -\author BURLOT Pascal - -\date 10/07/08 - - -\par Historique: - IACOBELLI Lorenzo 15/04/2010 - - scenarios from 14 that include sensing unit emulation - - -******************************************************************************* -*/ -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include - -#include "debug.h" - -#include "L3_rrc_defs.h" -#include "cmm_rrm_interface.h" - -#include "rrm_sock.h" -#include "cmm_msg.h" -#include "rrc_rrm_msg.h" -#include "ip_msg.h" //mod_lor_10_04_27 -#include "pusu_msg.h" -#include "sensing_rrm_msg.h" //mod_lor_10_04_15 - -#include "transact.h" -#include "actdiff.h" -#include "rrm_util.h" -#include "rrm_constant.h" -#include "emul_interface.h" - -extern msg_t *msg_rrc_rb_meas_ind(Instance_t inst, RB_ID Rb_id, L2_ID L2_id, MEAS_MODE Meas_mode, MAC_RLC_MEAS_T *Mac_rlc_meas_t, Transaction_t Trans_id ); -extern msg_t *msg_rrc_sensing_meas_ind( Instance_t inst, L2_ID L2_id, unsigned int NB_meas, SENSING_MEAS_T *Sensing_meas, Transaction_t Trans_id ); -extern msg_t *msg_rrc_sensing_meas_resp( Instance_t inst, Transaction_t Trans_id ) ; -extern msg_t *msg_rrc_cx_establish_ind( Instance_t inst, L2_ID L2_id, Transaction_t Trans_id,unsigned char *L3_info, L3_INFO_T L3_info_t, - RB_ID DTCH_B_id, RB_ID DTCH_id ); -extern msg_t *msg_rrc_phy_synch_to_MR_ind( Instance_t inst, L2_ID L2_id); -extern msg_t *msg_rrc_phy_synch_to_CH_ind( Instance_t inst, unsigned int Ch_index,L2_ID L2_id ); -extern msg_t *msg_rrc_rb_establish_resp( Instance_t inst, Transaction_t Trans_id ); -extern msg_t *msg_rrc_rb_establish_cfm( Instance_t inst, RB_ID Rb_id, RB_TYPE RB_type, Transaction_t Trans_id ); -extern msg_t *msg_rrc_rb_modify_resp( Instance_t inst, Transaction_t Trans_id ); -extern msg_t *msg_rrc_rb_modify_cfm(Instance_t inst, RB_ID Rb_id, Transaction_t Trans_id ); -extern msg_t *msg_rrc_rb_release_resp( Instance_t inst, Transaction_t Trans_id ); -extern msg_t *msg_rrc_MR_attach_ind( Instance_t inst, L2_ID L2_id ); -extern msg_t *msg_rrc_update_sens( Instance_t inst, L2_ID L2_id, unsigned int NB_info, Sens_ch_t *Sens_meas, Transaction_t Trans_id); -extern msg_t *msg_rrc_init_scan_req(Instance_t inst, L2_ID L2_id, unsigned int Start_fr, unsigned int Stop_fr,unsigned int Meas_band, - unsigned int Meas_tpf, unsigned int Nb_channels,unsigned int Overlap, unsigned int Sampl_freq, Transaction_t Trans_id ); -extern msg_t *msg_rrc_end_scan_conf(Instance_t inst, L2_ID L2_id, Transaction_t Trans_id ); -extern msg_t *msg_rrc_end_scan_req( Instance_t inst, L2_ID L2_id, Transaction_t Trans_id ); -extern msg_t *msg_rrc_init_mon_req(Instance_t inst, L2_ID L2_id, unsigned int *ch_to_scan, unsigned int NB_chan, float interval, Transaction_t Trans_id ); -extern msg_t *msg_rrc_open_freq( Instance_t inst, L2_ID L2_id,unsigned int NB_chan, CHANNEL_T *fr_channels, Transaction_t Trans_id); -extern msg_t *msg_rrc_ask_for_freq( Instance_t inst, L2_ID L2_id, QOS_CLASS_T QoS, Transaction_t Trans_id ); -extern msg_t *msg_rrc_update_SN_freq( Instance_t inst, L2_ID L2_id, unsigned int NB_chan, unsigned int *occ_channels, Transaction_t Trans_id); -extern msg_t *msg_rrc_clust_scan_req( Instance_t inst, L2_ID L2_id, float interv, COOPERATION_T coop, Transaction_t Trans_id); -extern msg_t *msg_rrc_clust_mon_req(Instance_t inst, L2_ID L2_id, unsigned int *ch_to_scan, unsigned int NB_chan, float interval, Transaction_t Trans_id ); -extern msg_t *msg_rrc_init_conn_conf( Instance_t inst, L2_ID L2_id, unsigned int Session_id, Transaction_t Trans_id ); -extern msg_t *msg_rrc_freq_all_prop_conf( Instance_t inst, L2_ID L2_id, unsigned int Session_id, unsigned int NB_free_ch, CHANNEL_T *fr_channels, Transaction_t Trans_id); -extern msg_t *msg_rrc_rep_freq_ack( Instance_t inst, L2_ID L2_id_ch, L2_ID L2_id_source, L2_ID L2_id_dest, unsigned int Session_id, CHANNEL_T all_channel, Transaction_t Trans_id); -extern msg_t *msg_rrc_init_conn_req( Instance_t inst, L2_ID L2_id , unsigned int Session_id, QOS_CLASS_T QoS_class, Transaction_t Trans_id ); -extern msg_t *msg_rrc_freq_all_prop( Instance_t inst, L2_ID L2_id, unsigned int Session_id, unsigned int NB_free_ch, CHANNEL_T *fr_channels, Transaction_t Trans_id); -extern msg_t *msg_rrc_rep_freq_all( Instance_t inst, L2_ID L2_id_source,L2_ID L2_id_dest, unsigned int Session_id, unsigned int NB_prop_ch, CHANNEL_T *pr_channels, Transaction_t Trans_id); - - -L2_ID L2_id_ch = {{0xAA,0xCC,0x33,0x55,0x00,0x11,0x00,0x00}}; -L2_ID L2_id_fc = {{0xAA,0xCC,0x33,0x55,0x00,0x11,0x00,0x00}}; -L2_ID L2_id_mr = {{0xAA,0xCC,0x33,0x55,0x00,0x00,0x22,0x00}}; -L2_ID L2_id_mr2 = {{0xAA,0xCC,0x33,0x55,0x00,0x00,0x33,0x00}}; -L2_ID L2_id_mr3 = {{0xAA,0xCC,0x33,0x55,0x00,0x00,0x44,0x00}}; -L2_ID L2_id_bts = {{0xAA,0xCC,0x33,0x55,0x00,0x00,0x00,0x11}}; -L2_ID L2_id_ch2 = {{0xAA,0xCC,0x33,0x55,0x00,0x22,0x00,0x00}}; - -unsigned char L3_info_mr3[MAX_L3_INFO] = { 0x0A, 0x00, 3, 3 } ; -unsigned char L3_info_mr2[MAX_L3_INFO] = { 0x0A, 0x00, 2, 2 } ; -unsigned char L3_info_mr[MAX_L3_INFO] = { 0x0A, 0x00, 1, 1 } ; -unsigned char L3_info_ch[MAX_L3_INFO] = { 0x0A, 0x00, 0, 0 } ; - -//mod_lor_10_03_12++ : init sensing global parameters -unsigned int Start_fr = 1000; -unsigned int Stop_fr = 2000; -unsigned int Meas_band = 200; -unsigned int Meas_tpf = 2; -unsigned int Nb_channels= 5; -unsigned int Overlap = 5; -unsigned int Sampl_freq = 10; -//mod_lor_10_03_12-- - -static void prg_opening_RB( sock_rrm_t *s_cmm, double date, L2_ID *src, L2_ID *dst, QOS_CLASS_T qos ) -{ - cmm_transaction++; - pthread_mutex_lock( &actdiff_exclu ) ; - add_actdiff(&list_actdiff,date, cnt_actdiff++, s_cmm, - msg_cmm_cx_setup_req(0,*src,*dst, qos, cmm_transaction ) ) ; - pthread_mutex_unlock( &actdiff_exclu ) ; - - pthread_mutex_lock( &cmm_transact_exclu ) ; - add_item_transact( &cmm_transact_list, cmm_transaction, INT_CMM,CMM_CX_SETUP_REQ,0,NO_PARENT); - pthread_mutex_unlock( &cmm_transact_exclu ) ; -} - -static void prg_modifying_RB( sock_rrm_t *s_cmm, double date, RB_ID Rb_id, QOS_CLASS_T qos ) -{ - cmm_transaction++; - pthread_mutex_lock( &actdiff_exclu ) ; - add_actdiff(&list_actdiff,date, cnt_actdiff++, s_cmm, - msg_cmm_cx_modify_req(0,Rb_id, qos, cmm_transaction ) ) ; - pthread_mutex_unlock( &actdiff_exclu ) ; - - pthread_mutex_lock( &cmm_transact_exclu ) ; - add_item_transact( &cmm_transact_list, cmm_transaction, INT_CMM,CMM_CX_MODIFY_REQ,0,NO_PARENT); - pthread_mutex_unlock( &cmm_transact_exclu ) ; -} - -static void prg_releasing_RB( sock_rrm_t *s_cmm, double date, RB_ID Rb_id ) -{ - cmm_transaction++; - pthread_mutex_lock( &actdiff_exclu ) ; - add_actdiff(&list_actdiff,date, cnt_actdiff++, s_cmm, - msg_cmm_cx_release_req(0,Rb_id, cmm_transaction ) ) ; - pthread_mutex_unlock( &actdiff_exclu ) ; - - pthread_mutex_lock( &cmm_transact_exclu ) ; - add_item_transact( &cmm_transact_list, cmm_transaction, INT_CMM,CMM_CX_RELEASE_REQ,0,NO_PARENT); - pthread_mutex_unlock( &cmm_transact_exclu ) ; -} - -static void prg_phy_synch_to_MR( sock_rrm_t *s_rrc, double date ) -{ - rrc_transaction++; - pthread_mutex_lock( &actdiff_exclu ) ; - add_actdiff(&list_actdiff,date, cnt_actdiff++, s_rrc, msg_rrc_phy_synch_to_MR_ind(0, L2_id_ch) ) ; - pthread_mutex_unlock( &actdiff_exclu ) ; - - pthread_mutex_lock( &rrc_transact_exclu ) ; - add_item_transact( &rrc_transact_list, rrc_transaction, INT_RRC,RRC_PHY_SYNCH_TO_MR_IND,0,NO_PARENT); - pthread_mutex_unlock( &rrc_transact_exclu ) ; -} - -static void prg_rrc_MR_attach_ind( sock_rrm_t *s_rrc, double date, L2_ID *L2_id_mr ) -{ - rrc_transaction++; - pthread_mutex_lock( &actdiff_exclu ) ; - add_actdiff(&list_actdiff,date, cnt_actdiff++, s_rrc, - msg_rrc_MR_attach_ind(0,*L2_id_mr ) ) ; - pthread_mutex_unlock( &actdiff_exclu ) ; - - pthread_mutex_lock( &rrc_transact_exclu ) ; - add_item_transact( &rrc_transact_list, rrc_transaction, INT_RRC,RRC_MR_ATTACH_IND,0,NO_PARENT); - pthread_mutex_unlock( &rrc_transact_exclu ) ; -} - -static void prg_rrc_cx_establish_ind( - sock_rrm_t *s_rrc, double date, - L2_ID *L2_id, - unsigned char *L3_info, - L3_INFO_T L3_info_t, - RB_ID dtch_b_id, - RB_ID dtch_id -) -{ - rrc_transaction++; - pthread_mutex_lock( &actdiff_exclu ) ; - add_actdiff(&list_actdiff,date, cnt_actdiff++, s_rrc, - msg_rrc_cx_establish_ind(0,*L2_id,rrc_transaction, L3_info, L3_info_t, dtch_b_id, dtch_id ) ) ; - pthread_mutex_unlock( &actdiff_exclu ) ; - - pthread_mutex_lock( &rrc_transact_exclu ) ; - add_item_transact( &rrc_transact_list, rrc_transaction, INT_RRC,RRC_CX_ESTABLISH_IND,0,NO_PARENT); - pthread_mutex_unlock( &rrc_transact_exclu ) ; -} - -static void prg_rrc_sensing_meas_ind( sock_rrm_t *s_rrc, double date, L2_ID *L2_id_mr, - int nb_meas, SENSING_MEAS_T *Sensing_meas ) -{ - rrc_transaction++; - pthread_mutex_lock( &actdiff_exclu ) ; - add_actdiff(&list_actdiff,date, cnt_actdiff++, s_rrc, - msg_rrc_sensing_meas_ind(0,*L2_id_mr,nb_meas,Sensing_meas, rrc_transaction ) ) ; - pthread_mutex_unlock( &actdiff_exclu ) ; - - pthread_mutex_lock( &rrc_transact_exclu ) ; - add_item_transact( &rrc_transact_list, rrc_transaction, INT_RRC,RRC_SENSING_MEAS_IND,0,NO_PARENT); - pthread_mutex_unlock( &rrc_transact_exclu ) ; -} - -static void prg_rrc_rb_meas_ind( sock_rrm_t *s_rrc, double date, RB_ID Rb_id, L2_ID *L2_id,MEAS_MODE Meas_mode, - MAC_RLC_MEAS_T *Mac_rlc_meas ) -{ - rrc_transaction++; - pthread_mutex_lock( &actdiff_exclu ) ; - add_actdiff(&list_actdiff,date, cnt_actdiff++, s_rrc, - msg_rrc_rb_meas_ind(0, Rb_id, *L2_id, Meas_mode, Mac_rlc_meas, rrc_transaction ) ) ; - pthread_mutex_unlock( &actdiff_exclu ) ; - - pthread_mutex_lock( &rrc_transact_exclu ) ; - add_item_transact( &rrc_transact_list, rrc_transaction, INT_RRC,RRC_RB_MEAS_IND,0,NO_PARENT); - pthread_mutex_unlock( &rrc_transact_exclu ) ; -} - -static void prg_cmm_init_sensing( sock_rrm_t *s_cmm, double date, unsigned int Start_fr,unsigned int Stop_fr,unsigned int Meas_band,unsigned int Meas_tpf, - unsigned int Nb_channels,unsigned int Overlap,unsigned int Sampl_freq ) -{ - cmm_transaction++; - pthread_mutex_lock( &actdiff_exclu ) ; - add_actdiff(&list_actdiff,date, cnt_actdiff++, s_cmm, msg_cmm_init_sensing ( 0, Start_fr,Stop_fr,Meas_band,Meas_tpf,Nb_channels,Overlap,Sampl_freq)); - pthread_mutex_unlock( &actdiff_exclu ) ; - - pthread_mutex_lock( &cmm_transact_exclu ) ; - add_item_transact( &cmm_transact_list, cmm_transaction, INT_CMM, CMM_INIT_SENSING,0,NO_PARENT); - pthread_mutex_unlock( &cmm_transact_exclu ) ; - -} -static void prg_rrc_update_sens( sock_rrm_t *s_rrc, double date, L2_ID *L2_id_mr, - unsigned int NB_info, Sens_ch_t *Sens_meas ) -{ - rrc_transaction++; - pthread_mutex_lock( &actdiff_exclu ) ; - add_actdiff(&list_actdiff,date, cnt_actdiff++, s_rrc, msg_rrc_update_sens ( 0, *L2_id_mr, NB_info, Sens_meas, rrc_transaction)); - pthread_mutex_unlock( &actdiff_exclu ) ; - - pthread_mutex_lock( &rrc_transact_exclu ) ; - add_item_transact( &rrc_transact_list, rrc_transaction, INT_RRC, RRC_UPDATE_SENS,0,NO_PARENT); - pthread_mutex_unlock( &rrc_transact_exclu ) ; - -} -static void prg_rrc_init_scan_req( sock_rrm_t *s_rrc, double date, L2_ID *L2_id_fc, - unsigned int Start_fr,unsigned int Stop_fr,unsigned int Meas_band,unsigned int Meas_tpf, - unsigned int Nb_channels,unsigned int Overlap,unsigned int Sampl_freq ) -{ - rrc_transaction++; - pthread_mutex_lock( &actdiff_exclu ) ; - add_actdiff(&list_actdiff,date, cnt_actdiff++, s_rrc, msg_rrc_init_scan_req ( 0, *L2_id_fc, Start_fr,Stop_fr,Meas_band,Meas_tpf,Nb_channels,Overlap,Sampl_freq, rrc_transaction)); - pthread_mutex_unlock( &actdiff_exclu ) ; - - pthread_mutex_lock( &rrc_transact_exclu ) ; - add_item_transact( &rrc_transact_list, rrc_transaction, INT_RRC, RRC_INIT_SCAN_REQ,0,NO_PARENT); - pthread_mutex_unlock( &rrc_transact_exclu ) ; - -} - -static void prg_cmm_stop_sensing( sock_rrm_t *s_cmm, double date) -{ - cmm_transaction++; - pthread_mutex_lock( &actdiff_exclu ) ; - add_actdiff(&list_actdiff,date, cnt_actdiff++, s_cmm, msg_cmm_stop_sensing ( 0 )); - pthread_mutex_unlock( &actdiff_exclu ) ; - - pthread_mutex_lock( &cmm_transact_exclu ) ; - add_item_transact( &cmm_transact_list, cmm_transaction, INT_CMM, CMM_STOP_SENSING,0,NO_PARENT); - pthread_mutex_unlock( &cmm_transact_exclu ) ; - -} - -static void prg_rrc_end_scan_conf( sock_rrm_t *s_rrc, double date, L2_ID *L2_id_mr ) -{ - rrc_transaction++; - pthread_mutex_lock( &actdiff_exclu ) ; - add_actdiff(&list_actdiff,date, cnt_actdiff++, s_rrc, msg_rrc_end_scan_conf ( 0, *L2_id_mr, rrc_transaction)); - pthread_mutex_unlock( &actdiff_exclu ) ; - - pthread_mutex_lock( &rrc_transact_exclu ) ; - add_item_transact( &rrc_transact_list, rrc_transaction, INT_RRC, RRC_END_SCAN_CONF,0,NO_PARENT); - pthread_mutex_unlock( &rrc_transact_exclu ) ; - -} - -static void prg_rrc_end_scan_req( sock_rrm_t *s_rrc, double date, L2_ID *L2_id_fc ) -{ - rrc_transaction++; - pthread_mutex_lock( &actdiff_exclu ) ; - add_actdiff(&list_actdiff,date, cnt_actdiff++, s_rrc, msg_rrc_end_scan_req ( 0, *L2_id_fc, rrc_transaction)); - pthread_mutex_unlock( &actdiff_exclu ) ; - - pthread_mutex_lock( &rrc_transact_exclu ) ; - add_item_transact( &rrc_transact_list, rrc_transaction, INT_RRC, RRC_END_SCAN_REQ,0,NO_PARENT); - pthread_mutex_unlock( &rrc_transact_exclu ) ; - -} - -static void prg_rrc_init_mon_req( sock_rrm_t *s_rrc, double date, L2_ID *L2_id_fc, unsigned int *ch_to_scan, unsigned int NB_chan, float interv ) -{ - rrc_transaction++; - pthread_mutex_lock( &actdiff_exclu ) ; - add_actdiff(&list_actdiff,date, cnt_actdiff++, s_rrc, msg_rrc_init_mon_req ( 0, *L2_id_fc, ch_to_scan, NB_chan, interv, rrc_transaction)); - pthread_mutex_unlock( &actdiff_exclu ) ; - - pthread_mutex_lock( &rrc_transact_exclu ) ; - add_item_transact( &rrc_transact_list, rrc_transaction, INT_RRC, RRC_INIT_MON_REQ,0,NO_PARENT); - pthread_mutex_unlock( &rrc_transact_exclu ) ; - -} - - -/* -static void prg_cmm_ask_freq( sock_rrm_t *s_cmm, double date) -{ - cmm_transaction++; - pthread_mutex_lock( &actdiff_exclu ) ; - add_actdiff(&list_actdiff,date, cnt_actdiff++, s_cmm, msg_cmm_ask_freq ( 0 )); - pthread_mutex_unlock( &actdiff_exclu ) ; - - pthread_mutex_lock( &cmm_transact_exclu ) ; - add_item_transact( &cmm_transact_list, cmm_transaction, INT_CMM, CMM_ASK_FREQ,0,NO_PARENT); - pthread_mutex_unlock( &cmm_transact_exclu ) ; - -} - -static void prg_rrc_open_freq( sock_rrm_t *s_rrc, double date, L2_ID *L2_id_fc, - unsigned int NB_chan, CHANNEL_T *fr_channels) -{ - rrc_transaction++; - pthread_mutex_lock( &actdiff_exclu ) ; - add_actdiff(&list_actdiff,date, cnt_actdiff++, s_rrc, msg_rrc_open_freq ( 0, *L2_id_fc, NB_chan, fr_channels, rrc_transaction )); - pthread_mutex_unlock( &actdiff_exclu ) ; - - pthread_mutex_lock( &rrc_transact_exclu ) ; - add_item_transact( &rrc_transact_list, rrc_transaction, INT_RRC, RRC_OPEN_FREQ,0,NO_PARENT); - pthread_mutex_unlock( &rrc_transact_exclu ) ; - -} - - -static void prg_rrc_ask_for_freq( sock_rrm_t *s_rrc, double date, L2_ID *L2_id_bts, - QOS_CLASS_T QoS) -{ - rrc_transaction++; - pthread_mutex_lock( &actdiff_exclu ) ; - add_actdiff(&list_actdiff,date, cnt_actdiff++, s_rrc, msg_rrc_ask_for_freq ( 0, *L2_id_bts, QoS, rrc_transaction )); - pthread_mutex_unlock( &actdiff_exclu ) ; - - pthread_mutex_lock( &rrc_transact_exclu ) ; - add_item_transact( &rrc_transact_list, rrc_transaction, INT_RRC, RRC_ASK_FOR_FREQ,0,NO_PARENT); - pthread_mutex_unlock( &rrc_transact_exclu ) ; - -} - - -static void prg_rrc_update_SN_freq( sock_rrm_t *s_rrc, double date, L2_ID *L2_id_bts, - unsigned int NB_chan, unsigned int *occ_channels) -{ - rrc_transaction++; - pthread_mutex_lock( &actdiff_exclu ) ; - add_actdiff(&list_actdiff,date, cnt_actdiff++, s_rrc, msg_rrc_update_SN_freq ( 0, *L2_id_bts, NB_chan, occ_channels, rrc_transaction )); - pthread_mutex_unlock( &actdiff_exclu ) ; - - pthread_mutex_lock( &rrc_transact_exclu ) ; - add_item_transact( &rrc_transact_list, rrc_transaction, INT_RRC, RRC_UPDATE_SN_FREQ,0,NO_PARENT); - pthread_mutex_unlock( &rrc_transact_exclu ) ; - -} - -static void prg_cmm_need_to_tx( sock_rrm_t *s_cmm, double date, QOS_CLASS_T QoS_class) -{ - cmm_transaction++; - pthread_mutex_lock( &actdiff_exclu ) ; - add_actdiff(&list_actdiff,date, cnt_actdiff++, s_cmm, msg_cmm_need_to_tx ( 0, QoS_class )); - pthread_mutex_unlock( &actdiff_exclu ) ; - - pthread_mutex_lock( &cmm_transact_exclu ) ; - add_item_transact( &cmm_transact_list, cmm_transaction, INT_CMM, CMM_NEED_TO_TX,0,NO_PARENT); - pthread_mutex_unlock( &cmm_transact_exclu ) ; - -} - -static void prg_rrc_clust_scan_req( sock_rrm_t *s_rrc, double date, L2_ID *L2_id_ch2, - float interv, COOPERATION_T coop) -{ - rrc_transaction++; - pthread_mutex_lock( &actdiff_exclu ) ; - add_actdiff(&list_actdiff,date, cnt_actdiff++, s_rrc, msg_rrc_clust_scan_req ( 0, *L2_id_ch2, interv, coop, rrc_transaction )); - pthread_mutex_unlock( &actdiff_exclu ) ; - - pthread_mutex_lock( &rrc_transact_exclu ) ; - add_item_transact( &rrc_transact_list, rrc_transaction, INT_RRC, RRC_CLUST_SCAN_REQ,0,NO_PARENT); - pthread_mutex_unlock( &rrc_transact_exclu ) ; - -} - -static void prg_rrc_clust_mon_req( sock_rrm_t *s_rrc, double date, L2_ID *L2_id_fc, unsigned int *ch_to_scan, unsigned int NB_chan, float interv ) -{ - rrc_transaction++; - pthread_mutex_lock( &actdiff_exclu ) ; - add_actdiff(&list_actdiff,date, cnt_actdiff++, s_rrc, msg_rrc_clust_mon_req ( 0, *L2_id_fc, ch_to_scan, NB_chan, interv, rrc_transaction)); - pthread_mutex_unlock( &actdiff_exclu ) ; - - pthread_mutex_lock( &rrc_transact_exclu ) ; - add_item_transact( &rrc_transact_list, rrc_transaction, INT_RRC, RRC_CLUST_MON_REQ,0,NO_PARENT); - pthread_mutex_unlock( &rrc_transact_exclu ) ; - -} - -static void prg_cmm_init_trans_req( sock_rrm_t *s_cmm, double date, L2_ID *L2_id_mr2, unsigned int Session_id, QOS_CLASS_T QoS_class) -{ - cmm_transaction++; - pthread_mutex_lock( &actdiff_exclu ) ; - add_actdiff(&list_actdiff,date, cnt_actdiff++, s_cmm, msg_cmm_init_trans_req ( 0, *L2_id_mr2, Session_id, QoS_class, cmm_transaction)); - pthread_mutex_unlock( &actdiff_exclu ) ; - - pthread_mutex_lock( &cmm_transact_exclu ) ; - add_item_transact( &cmm_transact_list, cmm_transaction, INT_CMM, CMM_INIT_TRANS_REQ,0,NO_PARENT); - pthread_mutex_unlock( &cmm_transact_exclu ) ; - -} - -static void prg_rrc_init_conn_conf ( sock_rrm_t *s_rrc, double date, L2_ID *L2_id_mr2, unsigned int Session_id ) -{ - rrc_transaction++; - pthread_mutex_lock( &actdiff_exclu ) ; - add_actdiff(&list_actdiff,date, cnt_actdiff++, s_rrc, msg_rrc_init_conn_conf ( 0, *L2_id_mr2, Session_id, rrc_transaction)); - pthread_mutex_unlock( &actdiff_exclu ) ; - - pthread_mutex_lock( &rrc_transact_exclu ) ; - add_item_transact( &rrc_transact_list, rrc_transaction, INT_RRC, RRC_INIT_CONN_CONF,0,NO_PARENT); - pthread_mutex_unlock( &rrc_transact_exclu ) ; - -} - -static void prg_rrc_freq_all_prop_conf ( sock_rrm_t *s_rrc, double date, L2_ID *L2_id_mr2, - unsigned int Session_id, unsigned int NB_free_ch, CHANNEL_T *fr_channels ) -{ - rrc_transaction++; - pthread_mutex_lock( &actdiff_exclu ) ; - add_actdiff(&list_actdiff,date, cnt_actdiff++, s_rrc, msg_rrc_freq_all_prop_conf ( 0, *L2_id_mr2, Session_id, NB_free_ch, fr_channels, rrc_transaction)); - pthread_mutex_unlock( &actdiff_exclu ) ; - - pthread_mutex_lock( &rrc_transact_exclu ) ; - add_item_transact( &rrc_transact_list, rrc_transaction, INT_RRC, RRC_FREQ_ALL_PROP_CONF,0,NO_PARENT); - pthread_mutex_unlock( &rrc_transact_exclu ) ; - -} - -static void prg_rrc_init_conn_req( sock_rrm_t *s_rrc, double date, L2_ID *L2_id_mr2, unsigned int Session_id, QOS_CLASS_T QoS_class) -{ - rrc_transaction++; - pthread_mutex_lock( &actdiff_exclu ) ; - add_actdiff(&list_actdiff,date, cnt_actdiff++, s_rrc, msg_rrc_init_conn_req ( 0, *L2_id_mr2, Session_id, QoS_class, rrc_transaction)); - pthread_mutex_unlock( &actdiff_exclu ) ; - - pthread_mutex_lock( &rrc_transact_exclu ) ; - add_item_transact( &rrc_transact_list, rrc_transaction, INT_RRC, RRC_INIT_CONN_REQ,0,NO_PARENT); - pthread_mutex_unlock( &rrc_transact_exclu ) ; - -} - -static void prg_rrc_freq_all_prop ( sock_rrm_t *s_rrc, double date, L2_ID *L2_id_mr2, - unsigned int Session_id, unsigned int NB_free_ch, CHANNEL_T *fr_channels ) -{ - rrc_transaction++; - pthread_mutex_lock( &actdiff_exclu ) ; - add_actdiff(&list_actdiff,date, cnt_actdiff++, s_rrc, msg_rrc_freq_all_prop ( 0, *L2_id_mr2, Session_id, NB_free_ch, fr_channels, rrc_transaction)); - pthread_mutex_unlock( &actdiff_exclu ) ; - - pthread_mutex_lock( &rrc_transact_exclu ) ; - add_item_transact( &rrc_transact_list, rrc_transaction, INT_RRC, RRC_FREQ_ALL_PROP,0,NO_PARENT); - pthread_mutex_unlock( &rrc_transact_exclu ) ; - -} - -static void prg_rrc_rep_freq_all ( sock_rrm_t *s_rrc, double date, L2_ID *L2_id_mr, L2_ID *L2_id_mr2, - unsigned int Session_id, unsigned int NB_prop_ch, CHANNEL_T *pr_channels ) -{ - rrc_transaction++; - pthread_mutex_lock( &actdiff_exclu ) ; - add_actdiff(&list_actdiff,date, cnt_actdiff++, s_rrc, msg_rrc_rep_freq_all ( 0, *L2_id_mr, *L2_id_mr2, Session_id, NB_prop_ch, pr_channels, rrc_transaction)); - pthread_mutex_unlock( &actdiff_exclu ) ; - - pthread_mutex_lock( &rrc_transact_exclu ) ; - add_item_transact( &rrc_transact_list, rrc_transaction, INT_RRC, RRC_REP_FREQ_ALL,0,NO_PARENT); - pthread_mutex_unlock( &rrc_transact_exclu ) ; - -} - -static void prg_rrc_rep_freq_ack ( sock_rrm_t *s_rrc, double date, L2_ID *L2_id_ch, L2_ID *L2_id_mr, L2_ID *L2_id_mr2, - unsigned int Session_id, CHANNEL_T all_channel ) -{ - rrc_transaction++; - pthread_mutex_lock( &actdiff_exclu ) ; - add_actdiff(&list_actdiff,date, cnt_actdiff++, s_rrc, msg_rrc_rep_freq_ack ( 0, *L2_id_ch, *L2_id_mr, *L2_id_mr2, Session_id, all_channel, rrc_transaction)); - pthread_mutex_unlock( &actdiff_exclu ) ; - - pthread_mutex_lock( &rrc_transact_exclu ) ; - add_item_transact( &rrc_transact_list, rrc_transaction, INT_RRC, RRC_REP_FREQ_ACK,0,NO_PARENT); - pthread_mutex_unlock( &rrc_transact_exclu ) ; - -}*/ - - - -/* =========================================================================== * - * SCENARII * - * =========================================================================== */ - -/** - * \brief Cette fonction simule le passage de IN en CH (TIMEOUT) , - * ensuite l'ouverture d'un RB, la modification et finalement la - * libération. - */ -static void scenario0(sock_rrm_t *s_rrc, sock_rrm_t *s_cmm ) -{ - printf("\nSCENARIO 0: ...\n\n" ) ; - // ========================= ISOLATED NODE to CLUSTERHEAD - prg_phy_synch_to_MR( s_rrc, 0.1 ); - - // ========================= Ouverture d'un RB - prg_opening_RB( s_cmm, 2.0, &L2_id_ch,&L2_id_mr,QOS_DTCH_USER1 ); - // ========================= Modification d'un RB - prg_modifying_RB( s_cmm, 2.2 , 5, QOS_DTCH_USER2 ); - // ========================= Fermeture d'un RB - prg_releasing_RB( s_cmm, 2.5, 5 ); -} - -/** - * \brief Cette fonction simule le passage de IN en CH par la reception du - * SYNCH d'un MR, et ensuite l'ouverture d'un RB - */ -static void scenario1(sock_rrm_t *s_rrc, sock_rrm_t *s_cmm ) -{ - printf("\nSCENARIO 1: ...\n\n" ) ; - // ========================= ISOLATED NODE to CLUSTERHEAD : RRC_PHY_SYNCH_TO_MR_IND - prg_phy_synch_to_MR( s_rrc, 0.2 ); - - // ========================= Ouverture d'un RB - prg_opening_RB( s_cmm, 2.0, &L2_id_ch,&L2_id_mr,QOS_DTCH_USER1 ); -} - -/** - * \brief Cette fonction simule le passage de IN en CH , - * puis l'attachement d'un MR et finalement l'ouverture d'un RB. - */ -static void scenario2(sock_rrm_t *s_rrc, sock_rrm_t *s_cmm) -{ - printf("\nSCENARIO 2: ...\n\n" ) ; - // ========================= ISOLATED NODE to CLUSTERHEAD - prg_phy_synch_to_MR( s_rrc, 0.1 ); - - // ========================= Attachement d'un MR - prg_rrc_MR_attach_ind( s_rrc, 2.0, &L2_id_mr ); - prg_rrc_MR_attach_ind( s_rrc, 3.0, &L2_id_mr2 ); - prg_rrc_MR_attach_ind( s_rrc, 4.0, &L2_id_mr3 ); - - // ========================= Indicateur d'une connexion établie - prg_rrc_cx_establish_ind( s_rrc, 5.0, &L2_id_mr, L3_info_mr,IPv4_ADDR,0,0); - prg_rrc_cx_establish_ind( s_rrc, 6.0, &L2_id_mr2, L3_info_mr2,IPv4_ADDR,0,0); - prg_rrc_cx_establish_ind( s_rrc, 7.0, &L2_id_mr3, L3_info_mr3,IPv4_ADDR,0,0); -} - -/** - * \brief Cette fonction simule le passage de IN en MR par la reception du - * SYNCH d'un CH - */ -static void scenario3(sock_rrm_t *s_rrc, sock_rrm_t *s_cmm) -{ - printf("\nSCENARIO 3: ...\n\n" ) ; - - // ========================= Attachement d'un MR - - rrc_transaction++; - pthread_mutex_lock( &actdiff_exclu ) ; - add_actdiff(&list_actdiff,0.2, cnt_actdiff++, s_rrc,msg_rrc_phy_synch_to_CH_ind(0, 1, L2_id_mr ) ) ; - pthread_mutex_unlock( &actdiff_exclu ) ; - - pthread_mutex_lock( &rrc_transact_exclu ) ; - add_item_transact( &rrc_transact_list, rrc_transaction, INT_RRC,RRC_PHY_SYNCH_TO_CH_IND,0,NO_PARENT); - pthread_mutex_unlock( &rrc_transact_exclu ) ; - - // ========================= Connexion etablit du MR au CH - prg_rrc_cx_establish_ind( s_rrc, 1.0, &L2_id_ch, L3_info_ch,IPv4_ADDR, 10, 20 ) ; -} - -/** - * \brief Cette fonction simule le passage de IN en CH (TIMEOUT), - * puis l'attachement d'un MR , - * puis l'ouverture d'un RB. - * puis la remontee de mesures du MR au CH. - */ -static void scenario4(sock_rrm_t *s_rrc, sock_rrm_t *s_cmm) -{ - SENSING_MEAS_T Sensing_meas[3]= { - { 15, {{0xAA,0xCC,0x33,0x55,0x11,0x00,0x22,0x00}} }, - { 20, {{0xAA,0xCC,0x33,0x55,0x22,0x00,0x22,0x00}} }, - { 10, {{0xAA,0xCC,0x33,0x55,0x33,0x00,0x22,0x00}} } - }; - printf("\nSCENARIO 4: ...\n\n" ) ; - // ========================= ISOLATED NODE to CLUSTERHEAD - prg_phy_synch_to_MR( s_rrc, 0.1 ); - - // ========================= Attachement d'un MR - prg_rrc_MR_attach_ind( s_rrc, 2.0 , &L2_id_mr ) ; - - // ========================= Indicateur d'une connexion établie - prg_rrc_cx_establish_ind( s_rrc, 5.0, &L2_id_mr, L3_info_mr, IPv4_ADDR, 0, 0 ) ; - - // ========================= Remontée de mesure par le RRC - - // Meas 1 - prg_rrc_sensing_meas_ind( s_rrc, 5.00, &L2_id_mr, 1, Sensing_meas ); - - // Meas 2 - prg_rrc_sensing_meas_ind( s_rrc, 5.25, &L2_id_mr, 3, Sensing_meas ); - - // Meas 3 - prg_rrc_sensing_meas_ind( s_rrc, 5.50, &L2_id_mr, 2, Sensing_meas ); - - // Meas 4 - prg_rrc_sensing_meas_ind( s_rrc, 5.75, &L2_id_mr, 0, Sensing_meas ); -} - -/** - * \brief Cette fonction simule le passage de IN en CH (TIMEOUT), - * puis l'attachement de 3 MR , - * puis l'ouverture d'un RB. - * puis la remontee de mesures du MR au CH. - */ -static void scenario5(sock_rrm_t *s_rrc, sock_rrm_t *s_cmm) -{ - static SENSING_MEAS_T Sensing_meas[3]= { - { 15, {{0xAA,0xCC,0x33,0x55,0x00,0x11,0x00,0x00}} }, - { 20, {{0xAA,0xCC,0x33,0x55,0x00,0x00,0x44,0x00}} }, - { 10, {{0xAA,0xCC,0x33,0x55,0x00,0x00,0x33,0x00}} } - }; - static SENSING_MEAS_T Sensing_meas2[3]= { - { 16, {{0xAA,0xCC,0x33,0x55,0x00,0x11,0x00,0x00}} }, - { 25, {{0xAA,0xCC,0x33,0x55,0x00,0x00,0x22,0x00}} }, - { 30, {{0xAA,0xCC,0x33,0x55,0x00,0x00,0x44,0x00}} } - }; - static SENSING_MEAS_T Sensing_meas3[3]= { - { 14, {{0xAA,0xCC,0x33,0x55,0x00,0x11,0x00,0x00}} }, - { 17, {{0xAA,0xCC,0x33,0x55,0x00,0x00,0x22,0x00}} }, - { 29, {{0xAA,0xCC,0x33,0x55,0x00,0x00,0x33,0x00}} } - }; - - printf("\nSCENARIO 5: ...\n\n" ) ; - // ========================= ISOLATED NODE to CLUSTERHEAD : - prg_phy_synch_to_MR( s_rrc, 0.1 ); - - // ========================= Attachement d'un MR - prg_rrc_MR_attach_ind( s_rrc, 2.0 , &L2_id_mr ) ; - prg_rrc_MR_attach_ind( s_rrc, 2.0 , &L2_id_mr2 ) ; - prg_rrc_MR_attach_ind( s_rrc, 2.0 , &L2_id_mr3 ) ; - - // ========================= Indicateur d'une connexion établie - prg_rrc_cx_establish_ind( s_rrc, 5.0, &L2_id_mr, L3_info_mr, IPv6_ADDR, 0, 0 ) ; - prg_rrc_cx_establish_ind( s_rrc, 5.0, &L2_id_mr2, L3_info_mr, IPv6_ADDR, 0, 0 ) ; - prg_rrc_cx_establish_ind( s_rrc, 5.0, &L2_id_mr3, L3_info_mr, IPv6_ADDR, 0, 0 ) ; - - // ========================= Remontée de mesure par le RRC - - // Meas 1 - prg_rrc_sensing_meas_ind( s_rrc, 5.10, &L2_id_mr, 1, Sensing_meas ); - prg_rrc_sensing_meas_ind( s_rrc, 5.10, &L2_id_mr2, 1, Sensing_meas2 ); - prg_rrc_sensing_meas_ind( s_rrc, 5.10, &L2_id_mr3, 1, Sensing_meas3 ); - - // Meas 2 - prg_rrc_sensing_meas_ind( s_rrc, 5.25, &L2_id_mr, 2, Sensing_meas ); - prg_rrc_sensing_meas_ind( s_rrc, 5.25, &L2_id_mr2, 2, Sensing_meas2 ); - prg_rrc_sensing_meas_ind( s_rrc, 5.25, &L2_id_mr3, 2, Sensing_meas3 ); - - // Meas 3 - prg_rrc_sensing_meas_ind( s_rrc, 5.50, &L2_id_mr, 3, Sensing_meas ); - prg_rrc_sensing_meas_ind( s_rrc, 5.50, &L2_id_mr2, 3, Sensing_meas2 ); - prg_rrc_sensing_meas_ind( s_rrc, 5.50, &L2_id_mr3, 3, Sensing_meas3 ); - -} - -/** - * \brief Cette fonction simule le passage de IN en CH (TIMEOUT) , - * ensuite l'ouverture d'un RB, la modification et finalement la - * libération. - */ -static void scenario6(sock_rrm_t *s_rrc, sock_rrm_t *s_cmm ) -{ - - static MAC_RLC_MEAS_T Meas1_CH= { .Rssi=25 , .Sinr={ 1,2,3,4, 5,6,7,8, 9,10,11,12, 13,14,15,16}, .Harq_delay =45, - .Bler=1234, .rlc_sdu_buffer_occ=13,.rlc_sdu_loss_indicator=25000 - }; - static MAC_RLC_MEAS_T Meas2_CH= { .Rssi=15 , .Sinr={ 1,2,3,4, 5,6,7,8, 9,10,11,12, 13,14,15,16}, .Harq_delay =35, - .Bler=4, .rlc_sdu_buffer_occ=13,.rlc_sdu_loss_indicator=35000 - }; - - static MAC_RLC_MEAS_T Meas1_MR= { .Rssi=35 , .Sinr={ 11,12,13,14, 15,16,17,18, 19,20,21,22, 23,24,25,26}, .Harq_delay =55, - .Bler=2134, .rlc_sdu_buffer_occ=23,.rlc_sdu_loss_indicator=15000 - }; - - static MAC_RLC_MEAS_T Meas2_MR= { .Rssi=45 , .Sinr={ 11,12,13,14, 15,16,17,18, 19,20,21,22, 23,24,25,26}, .Harq_delay =25, - .Bler=3000, .rlc_sdu_buffer_occ=11,.rlc_sdu_loss_indicator=300 - }; - printf("\nSCENARIO 6: ...\n\n" ) ; - // ========================= ISOLATED NODE to CLUSTERHEAD - prg_phy_synch_to_MR( s_rrc, 0.1 ); - - // ========================= Ouverture d'un RB - prg_opening_RB( s_cmm, 2.0, &L2_id_ch,&L2_id_mr,QOS_DTCH_USER1 ); - - - prg_rrc_rb_meas_ind( s_rrc, 2.5, 4 , &L2_id_mr,PERIODIC,&Meas1_MR ) ; - prg_rrc_rb_meas_ind( s_rrc, 2.5, 4 , &L2_id_ch,PERIODIC,&Meas1_CH ) ; - - prg_rrc_rb_meas_ind( s_rrc, 2.7, 4 , &L2_id_ch,PERIODIC,&Meas2_CH ) ; - prg_rrc_rb_meas_ind( s_rrc, 2.7, 4 , &L2_id_mr,PERIODIC,&Meas2_MR ) ; - -} - -/** - * \brief Cette fonction simule la phase de sensing du point de vue du FC, - * - l'attachement de 3 sensors, - * - le comancement du processus de sensing, - * - la remontee de mesures des sensors. - */ -static void scenario7(sock_rrm_t *s_rrc, sock_rrm_t *s_cmm) -{ - static Sens_ch_t Sensing_meas[3]= { - { 100.1, 200, 1, 13.5, 0, NULL }, - { 200.1, 300, 2, 7.4, 1, NULL }, - { 300.1, 400, 3, 8.5, 1, NULL } - - }; - - static Sens_ch_t Sensing_meas2[3]= { - { 100.1, 200, 1, 23.5, 0, NULL }, - { 200.1, 300, 2, 27.4, 0, NULL }, - { 300.1, 400, 3, 28.5, 0, NULL } - - }; - - unsigned int occ_channels [2]= {1, 3}; - printf("\nSCENARIO 7: ...\n\n" ) ; - - // ========================= ISOLATED NODE to CLUSTERHEAD : - prg_phy_synch_to_MR( s_rrc, 0.1 ); - - // ========================= Attachement d'un MR - prg_rrc_MR_attach_ind( s_rrc, 2.0 , &L2_id_mr ) ; - prg_rrc_MR_attach_ind( s_rrc, 2.0 , &L2_id_mr2 ) ; - prg_rrc_MR_attach_ind( s_rrc, 2.0 , &L2_id_mr3 ) ; - - // ========================= Starting sensing operation - - prg_cmm_init_sensing( s_cmm, 1, Start_fr,Stop_fr,Meas_band,Meas_tpf,Nb_channels,Overlap,Sampl_freq); - // ========================= Remontée de mesure par le RRC - - prg_rrc_update_sens( s_rrc, 5.10, &L2_id_mr,3, Sensing_meas ); - prg_rrc_update_sens( s_rrc, 5.20, &L2_id_mr2,3, Sensing_meas ); - prg_rrc_update_sens( s_rrc, 5.30, &L2_id_mr3,3, Sensing_meas ); - //prg_rrc_update_sens( s_rrc, 5.50, &L2_id_mr,2, Sensing_meas2 ); // answer to mon request - - // ========================= Frequency query - //prg_rrc_ask_for_freq( s_rrc, 5.80, &L2_id_bts, 0); - - //prg_rrc_update_SN_freq( s_rrc, 6, &L2_id_bts, 2, occ_channels); - // ========================= End sensing operation - - prg_cmm_stop_sensing( s_cmm, 5.60); - //prg_rrc_end_scan_conf( s_rrc, 5.80, &L2_id_mr); - //prg_rrc_end_scan_conf( s_rrc, 5.90, &L2_id_mr2); - //prg_rrc_end_scan_conf( s_rrc, 6.0, &L2_id_mr3); - -} - - -/** - * \brief Cette fonction simule la phase de sensing du point de vue du sensor, - * - l'attachement de 3 sensors, - * - le comancement du processus de sensing, - * - la remontee de mesures des sensors. - */ -static void scenario8(sock_rrm_t *s_rrc, sock_rrm_t *s_cmm) -{ - static Sens_ch_t Sensing_meas[3]= { - { 100, 200, 1, 13.5, 0, NULL }, - { 200, 300, 2, 7.4, 0, NULL }, - { 300, 400, 3, 8.5, 0, NULL } - - }; - static Sens_ch_t Sensing_meas2[3]= { - { 100, 200, 1, 23.5, 0, NULL }, - { 200, 300, 2, 27.4, 0, NULL }, - { 300, 400, 3, 28.5, 0, NULL } - - }; - - /*static SENSING_MEAS_T Sensing_meas2[3]={ - { 16, {{0xAA,0xCC,0x33,0x55,0x00,0x11,0x00,0x00}} }, - { 25, {{0xAA,0xCC,0x33,0x55,0x00,0x00,0x22,0x00}} }, - { 30, {{0xAA,0xCC,0x33,0x55,0x00,0x00,0x44,0x00}} } - }; - static SENSING_MEAS_T Sensing_meas3[3]={ - { 14, {{0xAA,0xCC,0x33,0x55,0x00,0x11,0x00,0x00}} }, - { 17, {{0xAA,0xCC,0x33,0x55,0x00,0x00,0x22,0x00}} }, - { 29, {{0xAA,0xCC,0x33,0x55,0x00,0x00,0x33,0x00}} } - };*/ - - printf("\nSCENARIO 8: ...\n\n" ) ; - - // ========================= Attachement d'un senseur - - rrc_transaction++; - pthread_mutex_lock( &actdiff_exclu ) ; - add_actdiff(&list_actdiff,0.2, cnt_actdiff++, s_rrc,msg_rrc_phy_synch_to_CH_ind(0, 1, L2_id_ch ) ) ; - pthread_mutex_unlock( &actdiff_exclu ) ; - - pthread_mutex_lock( &rrc_transact_exclu ) ; - add_item_transact( &rrc_transact_list, rrc_transaction, INT_RRC,RRC_PHY_SYNCH_TO_CH_IND,0,NO_PARENT); - pthread_mutex_unlock( &rrc_transact_exclu ) ; - - // ========================= Connexion etablit du MR au CH - prg_rrc_cx_establish_ind( s_rrc, 1.0, &L2_id_ch, L3_info_ch,IPv4_ADDR, 10, 20 ) ; - - // ========================= Starting sensing operation - unsigned int interv= 1; - float date = 1.5; - prg_rrc_init_scan_req( s_rrc, date, &L2_id_ch,Start_fr,Stop_fr,Meas_band,Meas_tpf,Nb_channels,Overlap,Sampl_freq); - //prg_cmm_init_sensing( s_cmm, 5.0, Start_fr,Stop_fr,Meas_band,Meas_tpf,Nb_channels,Overlap,Sampl_freq ); - // ========================= Remontée de mesure par le RRC - /*for (int i=0; i<3;i++){ - date+=interv; - prg_rrc_update_sens( s_rrc, date, &L2_id_mr,3, Sensing_meas ); - }*/ - // ========================= Monitoring - /*unsigned int ch_to_scan[3]={1,2}; - unsigned int NB_chan= 2; - date+=interv; - prg_rrc_init_mon_req( s_rrc, date, &L2_id_ch, ch_to_scan, NB_chan, interv ); - date+=interv; - prg_rrc_update_sens( s_rrc, date, &L2_id_mr,NB_chan, Sensing_meas2 );*/ - - // ========================= End of sensing - date+=interv; - prg_rrc_end_scan_req( s_rrc, date, &L2_id_ch ); - - -} - - -/** - * \brief BTS actions in SENDORA first scenario, - * - */ -static void scenario9(sock_rrm_t *s_rrc, sock_rrm_t *s_cmm) -{ - static Sens_ch_t Sensing_meas[3]= { - { 100.1, 200, 1, 13.5, 0, NULL }, - { 200.1, 300, 2, 7.4, 0, NULL }, - { 300.1, 400, 3, 8.5, 0, NULL } - - }; - - /*static CHANNEL_T Free_frequencies[3]={ - { 100, 200, 1, 1 }, - { 200, 300, 2, 2 }, - { 300, 400, 3, 3 } - - };*/ - - - printf("\nSCENARIO 9: ...\n\n" ) ; - // ========================= ISOLATED NODE to CLUSTERHEAD (FC) : - prg_phy_synch_to_MR( s_rrc, 0.1 ); - - // ========================= Attachement d'un senseur - prg_rrc_MR_attach_ind( s_rrc, 2.0 , &L2_id_mr ) ; - - // ========================= Attachement de la BTS - prg_rrc_MR_attach_ind( s_rrc, 2.0 , &L2_id_bts ) ; - - // ========================= Starting frequency query - /*if (SCEN_1) - prg_cmm_ask_freq ( s_cmm, 2.5 ); - if (SCEN_2_CENTR) - prg_cmm_need_to_tx( s_cmm, 2.5, 1); - prg_rrc_open_freq ( s_rrc, 4.0, &L2_id_fc, 3, Free_frequencies ); - */ -} - -/** - * \brief CH actions in SENDORA second scenario centralized - */ -static void scenario10(sock_rrm_t *s_rrc, sock_rrm_t *s_cmm) -{ - static Sens_ch_t Sensing_meas[3]= { - { 100.1, 200, 1, 13.5, 0, NULL }, - { 200.1, 300, 2, 7.4, 1, NULL }, - { 300.1, 400, 3, 8.5, 1, NULL } - - }; - - static Sens_ch_t Sensing_meas2[3]= { - { 100.1, 200, 1, 23.5, 0, NULL }, - { 200.1, 300, 2, 27.4, 0, NULL }, - { 300.1, 400, 3, 28.5, 0, NULL } - - }; - - unsigned int occ_channels [2]= {1, 3}; - printf("\nSCENARIO 7: ...\n\n" ) ; - // ========================= ISOLATED NODE to CLUSTERHEAD : - prg_phy_synch_to_MR( s_rrc, 0.1 ); - - // ========================= Attachement d'un MR - prg_rrc_MR_attach_ind( s_rrc, 2.0 , &L2_id_mr ) ; - prg_rrc_MR_attach_ind( s_rrc, 2.0 , &L2_id_mr2 ) ; - //prg_rrc_MR_attach_ind( s_rrc, 2.0 , &L2_id_mr3 ) ; - - // ========================= Starting sensing operation - //prg_rrc_clust_scan_req(s_rrc, 5.0, &L2_id_ch, 0.5, 1); - - // ========================= Remontée de mesure par le RRC - - prg_rrc_update_sens( s_rrc, 7.10, &L2_id_mr,3, Sensing_meas ); - prg_rrc_update_sens( s_rrc, 7.20, &L2_id_mr2,3, Sensing_meas ); - //prg_rrc_update_sens( s_rrc, 5.30, &L2_id_mr3,3, Sensing_meas ); - - // ========================= Monitoring - unsigned int ch_to_scan[3]= {1,2}; - unsigned int NB_chan= 2; - unsigned int interv = 0.5; - unsigned int date = 8.0; - //date+=interv; - //prg_rrc_clust_mon_req( s_rrc, date, &L2_id_ch, ch_to_scan, NB_chan, interv ); - date+=(interv*4); - prg_rrc_update_sens( s_rrc, date, &L2_id_mr,NB_chan, Sensing_meas2 ); - date+=interv; - prg_rrc_update_sens( s_rrc, date, &L2_id_mr2,NB_chan, Sensing_meas2 ); - - - // ========================= End sensing operation - prg_rrc_end_scan_req( s_rrc, 8.0, &L2_id_ch ); - //prg_cmm_stop_sensing( s_cmm, 5.60); - //prg_rrc_end_scan_conf( s_rrc, 9.80, &L2_id_mr); - //prg_rrc_end_scan_conf( s_rrc, 9.90, &L2_id_mr2); - //prg_rrc_end_scan_conf( s_rrc, 6.0, &L2_id_mr3); - -} - - -/** - * \brief This function simulate the connection of two SUs from the first SU point of view - * - */ -static void scenario11(sock_rrm_t *s_rrc, sock_rrm_t *s_cmm) -{ - static Sens_ch_t Sensing_meas[4]= { - { 100.1, 200, 1, 3.5, 1, NULL }, - { 200.1, 300, 2, 7.4, 1, NULL }, - { 300.1, 400, 3, 8.5, 0, NULL }, - { 400.1, 500, 4, 2.5, 1, NULL } - - }; - static Sens_ch_t Sensing_meas2[3]= { - { 100.1, 200, 1, 23.5, 0, NULL }, - { 200.1, 300, 2, 27.4, 0, NULL }, - { 300.1, 400, 3, 28.5, 0, NULL } - - }; - /*static CHANNEL_T Free_frequencies[3]={ - { 100.1, 200, 1, 0 }, - { 200.1, 300, 2, 0 }, - { 400.1, 500, 4, 0 } - - };*/ - - printf("\nSCENARIO 11: ...\n\n" ) ; - - // ========================= Starting sensing operation - unsigned int interv= 1; - float date = 1.5; - unsigned int Session_id = 7; - prg_rrc_init_scan_req( s_rrc, date, &L2_id_ch,Start_fr,Stop_fr,Meas_band,Meas_tpf,Nb_channels,Overlap,Sampl_freq); - - //prg_cmm_init_sensing( s_cmm, 5.0, Start_fr,Stop_fr,Meas_band,Meas_tpf,Nb_channels,Overlap,Sampl_freq ); - // ========================= Remontée de mesure par le RRC - for (int i=0; i<3; i++) { - date+=interv; - prg_rrc_update_sens( s_rrc, date, &L2_id_mr,4, Sensing_meas ); - } - - // ========================= Transaction - /* date+=interv; - prg_cmm_init_trans_req( s_cmm, date, &L2_id_mr2, Session_id, 1); - date+=interv; - prg_rrc_init_conn_conf ( s_rrc, date, &L2_id_mr2, Session_id ); - date+=interv; - prg_rrc_freq_all_prop_conf ( s_rrc, date, &L2_id_mr2, Session_id, 3, Free_frequencies); - */ - // ========================= End of sensing - date+=interv; - prg_rrc_end_scan_req( s_rrc, date, &L2_id_ch ); - - -} - -/** - * \brief This function simulate the connection of two SUs from the second SU point of view - * - */ -static void scenario12(sock_rrm_t *s_rrc, sock_rrm_t *s_cmm) -{ - static Sens_ch_t Sensing_meas[4]= { - { 100.1, 200, 1, 3.5, 1, NULL }, - { 200.1, 300, 2, 7.4, 0, NULL }, - { 300.1, 400, 3, 8.5, 0, NULL }, - { 400.1, 500, 4, 2.5, 1, NULL } - - }; - - /*static CHANNEL_T Free_frequencies[3]={ - { 100.1, 200, 1, 0 }, - { 200.1, 300, 2, 0 }, - { 400.1, 500, 4, 0 } - - };*/ - - printf("\nSCENARIO 12: ...\n\n" ) ; - - // ========================= Starting sensing operation - unsigned int interv= 1; - float date = 1.5; - unsigned int Session_id = 7; - prg_rrc_init_scan_req( s_rrc, date, &L2_id_ch,Start_fr,Stop_fr,Meas_band,Meas_tpf,Nb_channels,Overlap,Sampl_freq); - - //prg_cmm_init_sensing( s_cmm, 5.0, Start_fr,Stop_fr,Meas_band,Meas_tpf,Nb_channels,Overlap,Sampl_freq ); - // ========================= Remontée de mesure par le RRC - for (int i=0; i<3; i++) { - date+=interv; - prg_rrc_update_sens( s_rrc, date, &L2_id_mr,4, Sensing_meas ); - } - - // ========================= Transaction - /*date+=interv; - prg_rrc_init_conn_req( s_rrc, date, &L2_id_mr2, Session_id, 1); - date+=interv; - prg_rrc_freq_all_prop ( s_rrc, date, &L2_id_mr2, Session_id, 3, Free_frequencies); - date+=interv; - prg_rrc_rep_freq_ack ( s_rrc, date, &L2_id_ch, &L2_id_mr2, &L2_id_mr, - Session_id, Free_frequencies[2] ); - */ - // ========================= End of sensing - date+=interv; - prg_rrc_end_scan_req( s_rrc, date, &L2_id_ch ); - - -} - -/** - * \brief This function simulate the connection of two SUs from the CH point of view - * - */ -static void scenario13(sock_rrm_t *s_rrc, sock_rrm_t *s_cmm) -{ - static Sens_ch_t Sensing_meas[4]= { - { 100.1, 200, 1, 3.5, 0, NULL }, - { 200.1, 300, 2, 7.4, 1, NULL }, - { 300.1, 400, 3, 8.5, 0, NULL }, - { 400.1, 500, 4, 2.5, 1, NULL } - - }; - - /*static CHANNEL_T Free_frequencies[3]={ - { 100.1, 200, 1, 0 }, - { 200.1, 300, 2, 0 }, - { 400.1, 500, 4, 0 } - - };*/ - - printf("\nSCENARIO 13: ...\n\n" ) ; - - // ========================= ISOLATED NODE to CLUSTERHEAD : - prg_phy_synch_to_MR( s_rrc, 0.1 ); - - // ========================= Attachement d'un MR - prg_rrc_MR_attach_ind( s_rrc, 2.0 , &L2_id_mr ) ; - //prg_rrc_MR_attach_ind( s_rrc, 2.0 , &L2_id_mr2 ) ; - //prg_rrc_MR_attach_ind( s_rrc, 2.0 , &L2_id_mr3 ) ; - // ========================= Starting sensing operation - unsigned int interv= 1; - float date = 1.5; - unsigned int Session_id = 7; - prg_rrc_init_scan_req( s_rrc, date, &L2_id_ch,Start_fr,Stop_fr,Meas_band,Meas_tpf,Nb_channels,Overlap,Sampl_freq); - - //prg_cmm_init_sensing( s_cmm, 5.0, Start_fr,Stop_fr,Meas_band,Meas_tpf,Nb_channels,Overlap,Sampl_freq ); - // ========================= Remontée de mesure par le RRC - for (int i=0; i<3; i++) { - date+=interv; - prg_rrc_update_sens( s_rrc, date, &L2_id_mr,4, Sensing_meas ); - } - - // ========================= Transaction - /* date+=interv; - prg_rrc_rep_freq_all ( s_rrc, date, &L2_id_mr, &L2_id_mr2, - Session_id, 3, Free_frequencies ); - */ - // ========================= End of sensing - //date+=interv; - //prg_rrc_end_scan_req( s_rrc, date, &L2_id_ch ); - - -} - -/** - * \brief Sensor node simulation: - * - the node is connected to FC - * - the node receives the init scan request order - * - the node receive the end scan order - */ -static void scenario14(sock_rrm_t *s_rrc, sock_rrm_t *s_cmm, sock_rrm_t *s_sns) -{ - static Sens_ch_t Sensing_meas[3]= { - { 100, 200, 1, 13.5, 0, NULL }, - { 200, 300, 2, 7.4, 0, NULL }, - { 300, 400, 3, 8.5, 0, NULL } - - }; - static Sens_ch_t Sensing_meas2[3]= { - { 100, 200, 1, 23.5, 0, NULL }, - { 200, 300, 2, 27.4, 0, NULL }, - { 300, 400, 3, 28.5, 0, NULL } - - }; - - /*static SENSING_MEAS_T Sensing_meas2[3]={ - { 16, {{0xAA,0xCC,0x33,0x55,0x00,0x11,0x00,0x00}} }, - { 25, {{0xAA,0xCC,0x33,0x55,0x00,0x00,0x22,0x00}} }, - { 30, {{0xAA,0xCC,0x33,0x55,0x00,0x00,0x44,0x00}} } - }; - static SENSING_MEAS_T Sensing_meas3[3]={ - { 14, {{0xAA,0xCC,0x33,0x55,0x00,0x11,0x00,0x00}} }, - { 17, {{0xAA,0xCC,0x33,0x55,0x00,0x00,0x22,0x00}} }, - { 29, {{0xAA,0xCC,0x33,0x55,0x00,0x00,0x33,0x00}} } - };*/ - - printf("\nSCENARIO 14: ...\n\n" ) ; - - // ========================= Attachement d'un senseur - - rrc_transaction++; - pthread_mutex_lock( &actdiff_exclu ) ; - add_actdiff(&list_actdiff,0.2, cnt_actdiff++, s_rrc,msg_rrc_phy_synch_to_CH_ind(0, 1, L2_id_ch ) ) ; - pthread_mutex_unlock( &actdiff_exclu ) ; - - pthread_mutex_lock( &rrc_transact_exclu ) ; - add_item_transact( &rrc_transact_list, rrc_transaction, INT_RRC,RRC_PHY_SYNCH_TO_CH_IND,0,NO_PARENT); - pthread_mutex_unlock( &rrc_transact_exclu ) ; - - // ========================= Connexion etablit du MR au CH - prg_rrc_cx_establish_ind( s_rrc, 1.0, &L2_id_ch, L3_info_ch,IPv4_ADDR, 10, 20 ) ; - - // ========================= Starting sensing operation - unsigned int interv= 1; - float date = 1.5; - prg_rrc_init_scan_req( s_rrc, date, &L2_id_ch,Start_fr,Stop_fr,Meas_band,Meas_tpf,Nb_channels,Overlap,Sampl_freq); - //prg_cmm_init_sensing( s_cmm, 5.0, Start_fr,Stop_fr,Meas_band,Meas_tpf,Nb_channels,Overlap,Sampl_freq ); - // ========================= Remontée de mesure par le RRC - /*for (int i=0; i<3;i++){ - date+=interv; - prg_rrc_update_sens( s_rrc, date, &L2_id_mr,3, Sensing_meas ); - }*/ - // ========================= Monitoring - /*unsigned int ch_to_scan[3]={1,2}; - unsigned int NB_chan= 2; - date+=interv; - prg_rrc_init_mon_req( s_rrc, date, &L2_id_ch, ch_to_scan, NB_chan, interv ); - date+=interv; - prg_rrc_update_sens( s_rrc, date, &L2_id_mr,NB_chan, Sensing_meas2 );*/ - - // ========================= End of sensing - date+=interv; - printf( "prima sns socket -> %d\n" , s_sns->s ) ;//dbg - prg_rrc_end_scan_req( s_rrc, date, &L2_id_ch ); - printf( "dopo sns socket -> %d\n" , s_sns->s ) ;//dbg - -} - - - -void scenario(int num , sock_rrm_t *s_rrc, sock_rrm_t *s_cmm, sock_rrm_t *s_sns ) -{ - switch ( num ) { - case 0 : - scenario0(s_rrc, s_cmm ) ; - break ; - - case 1 : - scenario1(s_rrc, s_cmm ) ; - break ; - - case 2 : - scenario2(s_rrc, s_cmm ) ; - break ; - - case 3 : - scenario3(s_rrc, s_cmm ) ; - break ; - - case 4 : - scenario4(s_rrc, s_cmm ) ; - break ; - - case 5 : - scenario5(s_rrc, s_cmm ) ; - break ; - - case 6 : - scenario6(s_rrc, s_cmm ) ; - break ; - - case 7 : - scenario7(s_rrc, s_cmm ) ; - break ; - - case 8 : - scenario8(s_rrc, s_cmm ) ; - break ; - - case 9 : - scenario9(s_rrc, s_cmm ) ; - break ; - - case 10 : - scenario10(s_rrc, s_cmm ) ; - break ; - - case 11 : - scenario11(s_rrc, s_cmm ) ; - break ; - - case 12 : - scenario12(s_rrc, s_cmm ) ; - break ; - - case 13 : - scenario13(s_rrc, s_cmm ) ; - break ; - - //mod_lor_10_04_15 -> from here scenarios with sensing unit included - case 14 : - scenario14(s_rrc, s_cmm, s_sns ) ; - break ; - - default: - fprintf( stderr,"Erreur : '%d' => Numero de test inconnu\n" , num ) ; - } -} diff --git a/openair3/MESH/RRM/GRAPH/Makefile b/openair3/MESH/RRM/GRAPH/Makefile deleted file mode 100755 index 069b1c714a..0000000000 --- a/openair3/MESH/RRM/GRAPH/Makefile +++ /dev/null @@ -1,31 +0,0 @@ -CCC = gcc - - -OPENAIR3_DIR = ../../../openair3 -OPENAIR2_DIR = ../../../openair2 - -OPENAIR3_MESH_RRM_GRAPH = $(OPENAIR3_DIR)/MESH/RRM/GRAPH -OPENAIR3_MESH_RRM = $(OPENAIR3_DIR)/MESH/RRM -OPENAIR3_MESH = $(OPENAIR3_DIR)/MESH - -GRAPH_OBJS = graph_sock.o - -OBJ += $(GRAPH_OBJS) - -CFLAGS += -DOPENAIR2_IN -DUSER_MODE - -all: graph -$(OBJ) : %.o : %.c - $(CC) -c $(CFLAGS) -I$(OPENAIR2_DIR) -I$(OPENAIR3_MESH) -I$(OPENAIR3_MESH_RRM) -I$(OPENAIR3_MESH_RRM_GRAPH) -o $@ $< - -graph : $(OBJ) graph_int.c - $(CC) graph_int.c -o graph -I$(OPENAIR2_DIR) -I$(OPENAIR3_MESH) -I$(OPENAIR3_MESH_RRM) -I$(OPENAIR3_MESH_RRM_GRAPH) $(CFLAGS) $(OBJ) -clean : - rm -rf *.o - - - - - - - diff --git a/openair3/MESH/RRM/GRAPH/graph b/openair3/MESH/RRM/GRAPH/graph deleted file mode 100755 index 08b1c62f6d..0000000000 Binary files a/openair3/MESH/RRM/GRAPH/graph and /dev/null differ diff --git a/openair3/MESH/RRM/GRAPH/graph_enum.h b/openair3/MESH/RRM/GRAPH/graph_enum.h deleted file mode 100644 index 1a61b4842a..0000000000 --- a/openair3/MESH/RRM/GRAPH/graph_enum.h +++ /dev/null @@ -1,196 +0,0 @@ - -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/*! -******************************************************************************* - -\file graph_enum.h - -\brief Fichier d'entete contenant les declarations des types, des defines , -et des fonctions relatives aux messages RRC-RRM ou RRC-RRCI. - - - -\author IACOBELLI Lorenzo - -\date 20/04/10 - -\par Historique: - - -******************************************************************************* -*/ - -#ifndef __GRAPH_ENUM_H -#define __GRAPH_ENUM_H - -//mod_lor_10_05_12++ - -/*! \brief SENDORA scenario active: flags to set at the beginning of the simulation -*/ -#define WSN 1 ///if wsn = 0 -> secondary network, else sensor network -#define SCEN_1 1 -#define SCEN_2_CENTR 0 -#define SCEN_2_DISTR 0 -#define COLL_CLUST 0 //mod_lor_10_11_04 - -//mod_lor_10_05_12--*/ - -#define BTS_ID -1 //put -1 in case we are not in SCEN_1 -#define FC_ID -1 -#define CH_COLL_ID -1 -#define NB_SENS_MAX 4 -#define FIRST_SENSOR_ID 0 -#define FIRST_SECOND_CLUSTER_USER_ID 5 //add_lor_11_01_06 - -#ifdef __cplusplus -extern "C" { -#endif - - - -/*! -******************************************************************************* -\brief Enumeration des messages entre RRM/RRCI et le RRC -*/ -typedef enum { - SNS_UPDATE_SENS , ///< Message SENSING->RRM : update of the sensing information measured by the nodes - RRM_SCAN_ORD , ///< Message RRM->SENSING : order to scann indicated channels - RRM_END_SCAN_ORD , ///< Message RRM->SENSING : end of a scanning process in sensors - SNS_END_SCAN_CONF , ///< Message SENSING->RRC : end of a scanning process in sensors - NB_MSG_SNS_RRM ///< Nombre de message RRM-SENSING -} -MSG_SENSING_RRM_T ; - - -/*! -******************************************************************************* -\brief Enumeration des messages entre RRM/RRCI et le RRC -*/ -typedef enum { - RRM_RB_ESTABLISH_REQ = 0 , ///< Message RRM->RRC : requete d'etablissement d'un RB - RRC_RB_ESTABLISH_RESP , ///< Message RRC->RRM : reponse d'etablissement d'un RB - RRC_RB_ESTABLISH_CFM , ///< Message RRC->RRM : confirmation d'etablissement d'un RB - RRM_RB_MODIFY_REQ , ///< Message RRM->RRC : requete de modification d'un RB - RRC_RB_MODIFY_RESP , ///< Message RRC->RRM : reponse de modification d'un RB - RRC_RB_MODIFY_CFM , ///< Message RRC->RRM : confirmation de modification d'un RB - RRM_RB_RELEASE_REQ , ///< Message RRM->RRC : requete de liberation d'un RB - RRC_RB_RELEASE_RESP , ///< Message RRC->RRM : reponse de liberation d'un RB - RRC_MR_ATTACH_IND , ///< Message RRC->RRM : indication d'attachement d'un MR - RRM_SENSING_MEAS_REQ , ///< Message RRM->RRC : requete de configuration de mesure sensing - RRC_SENSING_MEAS_RESP , ///< Message RRC->RRM : reponse de configuration de mesure sensing - RRC_CX_ESTABLISH_IND , ///< Message RRC->RRM : indication de connexion etablie - RRC_PHY_SYNCH_TO_MR_IND , ///< Message RRC->RRM : indication de synchronisation physique a un MR - RRC_PHY_SYNCH_TO_CH_IND , ///< Message RRC->RRM : indication de synchronisation physique a un CH - RRCI_CX_ESTABLISH_RESP , ///< Message RRCI->RRC : reponse de connexion etablie - RRC_SENSING_MEAS_IND , ///< Message RRC->RRM : indication de nouvel mesure de sensing - RRM_SENSING_MEAS_RESP , ///< Message RRM->RRC : reponse a l'indication de nouvel mesure de sensing - RRC_RB_MEAS_IND , ///< Message RRC->RRM : indication de nouvel mesure sur un RB - RRM_RB_MEAS_RESP , ///< Message RRM->RRC : reponse a l'indication de nouvel mesure sur un RB - RRM_INIT_CH_REQ , ///< Message RRM->RRC : init d'un CH - RRCI_INIT_MR_REQ , ///< Message RRM->RRC : init d'un MR - RRM_INIT_MON_REQ , ///< Message RRM->RRC : initiation of a scanning monitoring - RRM_INIT_SCAN_REQ , ///< Message RRM->RRC : initiation of a scanning process - RRC_INIT_SCAN_REQ , ///< Message RRC->RRM : initiation of a scanning process - //UPDATE_SENS_RESULTS_3 , ///< Message IP : update to send to CH/FC //mod_lor_10_01_25 - RRM_END_SCAN_REQ , ///< Message RRM->RRC : end of a scanning process - RRC_END_SCAN_REQ , ///< Message RRC->RRM : end of a scanning process - RRC_END_SCAN_CONF , ///< Message RRC->RRM : end of a scanning process ack - RRC_INIT_MON_REQ , ///< Message IP : initiation of a scanning monitoring - RRM_UP_FREQ_ASS , ///< Message RRM->RRC : BTS assigns channels to SUs - RRM_END_SCAN_CONF , ///< Message RRM->RRC : end of a scanning process - RRC_UP_FREQ_ASS , ///< Message RRC->RRM ://mod_lor_10_06_04 - RRM_UP_FREQ_ASS_SEC , ///< Message RRM->RRC : CH assigns channels to SUs (scen2) //add_lor_10_11_05 - RRC_UP_FREQ_ASS_SEC , ///< Message RRC->RRM : frequencies assigned by CH (scen2) //add_lor_10_11_05 - NB_MSG_RRC_RRM ///< Nombre de message RRM-RRC - -} MSG_RRC_RRM_T ; - -/*! -******************************************************************************* -\brief Enumeration des messages entre le RRM/RRCI et le CMM -*/ -typedef enum { - CMM_CX_SETUP_REQ = 0 , ///< Message CMM->RRM : requete de configuration d'une connexion - RRM_CX_SETUP_CNF , ///< Message RRM->CMM : confirmation de configuration d'une connexion - CMM_CX_MODIFY_REQ , ///< Message CMM->RRM : requete de modification d'une connexion - RRM_CX_MODIFY_CNF , ///< Message RRM->CMM : confirmation de modification d'une connexion - CMM_CX_RELEASE_REQ , ///< Message CMM->RRM : requete de liberation d'une connexion - RRM_CX_RELEASE_CNF , ///< Message RRM->CMM : confirmation de liberation d'une connexion - CMM_CX_RELEASE_ALL_REQ , ///< Message CMM->RRM : requete de liberation de toutes les connexions - RRM_CX_RELEASE_ALL_CNF , ///< Message RRM->CMM : confirmation de liberation de toutes les connexions - RRCI_ATTACH_REQ , ///< Message RRCI->CMM : requete de d'attachement d'un MR - RRM_ATTACH_IND , ///< Message RRM->CMM : indicateur d'attachement d'un MR - CMM_ATTACH_CNF , ///< Message CMM->RRM : confirmation d'attachement d'un MR - RRM_MR_ATTACH_IND , ///< Message RRM->CMM : indicateur d'attachement d'un MR - ROUTER_IS_CH_IND , ///< Message RRM->CMM : indicateur que le noeud est un cluster head - RRCI_CH_SYNCH_IND , ///< Message RRCI->CMM : indicateur que le noeud est synchronise sur un CH - CMM_INIT_MR_REQ , ///< Message CMM->RRM : requete d'initialisation de l'attachement d'un MR - RRM_MR_SYNCH_IND , ///< Message RRM->CMM : indicateur que le noeud est synchronise sur un MR - RRM_NO_SYNCH_IND , ///< Message RRM->CMM : indicateur que le noeud n'est pas synchronise sur un CH ou MR - CMM_INIT_CH_REQ , ///< Message CMM->RRM : requete d'initialisation d'un CH - CMM_INIT_SENSING , ///< Message CMM->RRM : requete d'initialisation du sensing - CMM_STOP_SENSING , ///< Message CMM->RRM : requete de stop du sensing - CMM_ASK_FREQ , ///< Message CMM->RRM : in BTS, message to start an open freq. query - CMM_NEED_TO_TX , ///< Message CMM->RRM : in SU, second scenario centr, message to start an open freq. query - CMM_INIT_COLL_SENSING , ///< Message CMM->RRM : requete d'initialisation du sensing collaborative //add_lor_10_11_08 - CMM_USER_DISC , ///< Message CMM->RRM : user disconnected -> delete all active com //add_lor_10_11_08 - CMM_LINK_DISC , ///< Message CMM->RRM : stop comm -> delete an active link //add_lor_10_11_08 - NB_MSG_CMM_RRM ///< Nombre de message de l'interface -} MSG_CMM_RRM_T ; -//mod_lor_10_04_27++ -typedef enum { - UPDATE_SENS_RESULTS_3 = 0 , ///< Message IP : update to send to CH/FC //mod_lor_10_01_25 - OPEN_FREQ_QUERY_4 , ///< Message IP : BTS to ask free frequencies to FC - UPDATE_OPEN_FREQ_7 , ///< Message IP : list of frequencies usable by the secondary network - UPDATE_SN_OCC_FREQ_5 , ///< Message IP : BTS sends used freq. to FC - INIT_COLL_SENS_REQ , ///< Message IP : CH1 sends request to start collaboration to CH2 - STOP_COLL_SENS , ///< Message IP : CH1 sends order to stop collaboration to CH2 - UP_CLUST_SENS_RESULTS , ///< Message IP : update to send to CH from CH_COLL - STOP_COLL_SENS_CONF , ///< Message IP : CH2 sends confirmationof stop collaboration to CH1 - ASK_FREQ_TO_CH_3 , ///< Message IP : user that wants to transmits ask channels to CH - USER_DISCONNECT_9 , ///< Message IP : user wants to disconnect - CLOSE_LINK , ///< Message IP : user wants to stop a link - NB_MSG_IP ///< Nombre de message IP -} MSG_IP_T ; -//mod_lor_10_04_27-- - -typedef enum { - SNS=0, - RRC, - CMM, - IP, //mod_lor_10_04_27 - NB_INTERF -} INTERF_T; - - - - -#endif /* GRAPH_ENUM_H */ diff --git a/openair3/MESH/RRM/GRAPH/graph_int.c b/openair3/MESH/RRM/GRAPH/graph_int.c deleted file mode 100755 index d70308c86b..0000000000 --- a/openair3/MESH/RRM/GRAPH/graph_int.c +++ /dev/null @@ -1,887 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/*! -******************************************************************************* - -\file graph_int.c - -\brief Emulation des interfaces du RRM (Radio Ressource Manager ) - - Cette application d'envoyer des stimuli sur les interfaces RRM: - - RRC -> RRM - - CMM -> RRM - -\author IACOBELLI Lorenzo - -\date 20/04/10 - - -\par Historique: - L.IACOBELLI 2009-10-19 - + new messages - L.IACOBELLI 2010-04-15 - + add sensing unit emulation - -******************************************************************************* -*/ -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include - -#include "graph_sock.h" -//#include "rrm_sock.h" -#include "graph_int.h" -#include "graph_enum.h" - - - - -#define msg_fct printf -#define msg printf - - -sock_rrm_t S_graph; -static int flag_not_exit = 1 ; -static int SN_active = 0; -//mod_lor_10_04_21++ -typedef struct { - unsigned int NB_chan ; //!< Number of channels - unsigned int NB_val ; //!< Number of values - unsigned int channels[3*NB_SENS_MAX]; //!< Vector of channels - unsigned int values[3*NB_SENS_MAX] ; //!< Vector of values - -} gen_sens_info_t ; -//mod_lor_10_04_21-- - -int rrm_xface_init(int rrm_inst) -{ - - int sock ; - printf("[CRRM_XFACE] init de l'interface "); - sleep(3); - - if(open_socket(&S_graph, RRM_SOCK_PATH, RRM_SOCK_PATH,rrm_inst)==-1) - return (-1); - - if (S_graph.s == -1) { - printf("ciao"); - return (-1); - } - - - printf("Graphical Interface Connected... CRRM of node %d on socket %d\n",rrm_inst, S_graph.s); - return 0 ; - -} - - -main(int argc,char **argv) -{ - int c = 0; - int rrm_inst=-1; - - while ((c = getopt(argc,argv,"i:")) != -1) - switch (c) { - case 'i': - rrm_inst=atoi(optarg); - break; - - default: - exit(0); - } - - //mod_lor_10_04_21++ - //int colorbg; - int colorfg; - int colorBTS_msg = 30; - int colorfree=2; - int colorbusy=9; - int comments=88;//mod_lor_10_04_22 - int i,j; - - if (rrm_inst == FC_ID) { - //colorbg = 223; - colorfg = 21; - //dbg_color++ - /*for (i=0; i<256; i++){ - printf("\e[38;5;%dm",i); - printf("%d ",i); - - }//dbg_color--*/ - } else if (rrm_inst == BTS_ID ||((rrm_inst == CH_COLL_ID || rrm_inst >= FIRST_SECOND_CLUSTER_USER_ID )&& SCEN_2_CENTR)) { //mod_lor_10_05_12 AAA - //colorbg = 103; - colorfg = 11; - } - - else { - //colorbg = 223; - colorfg = 21; - } - - printf("\e[38;5;%dm",colorfg); //mod_lor_10_04_21 - printf("MAIN Graphical Interface Connected\n"); - - rrm_xface_init(rrm_inst); - msg_head_t *Header ; - char *Data; - unsigned short Data_to_read; - - while (1) { - Header = (msg_head_t *) recv_msg(&S_graph) ; - - if (Header == NULL) { - break; - - } - - //mod_lor_10_04_21++ - Data_to_read=Header->size; - - if (Data_to_read > 0 ) { - Data = (char *) (Header +1) ; - } - - //mod_lor_10_04_21-- - INTERF_T msg_interf; - int msg_type = Header->msg_type; - - if (Header->msg_typemsg_type); - break; - } - - // msg("Got MSG of Type %d on Inst %d\n",Header->msg_type,Header->inst); - switch ( msg_interf ) { - case SNS: { - switch ( msg_type ) { - case SNS_UPDATE_SENS : { //mod_lor_10_06_02 - msg_fct( "[SENSING]>[CRRM]:UPDATE_SENSING_RESULTS number %d \n",(Header->Trans_id - 4096)) ; - gen_sens_info_t *p = (gen_sens_info_t *)Data ; - printf("\e[38;5;%dm",comments); //mod_lor_10_04_22 - msg_fct( "Sensing information received from sensing unit about frequencies from\n"); - //msg_fct( "Results about frequencies from "); - printf("\e[38;5;%dm",colorfree); - msg_fct( "%d ",(p->channels[0]/1000)); - printf("\e[38;5;%dm",comments); - msg_fct( "MHz and "); - printf("\e[38;5;%dm",colorfree); - msg_fct( "%d ",(p->channels[1]/1000)); - printf("\e[38;5;%dm",comments); - msg_fct( "MHz\nBandwidth of analyzed subbands: "); - printf("\e[38;5;%dm",colorfree); - msg_fct( "%d ",p->values[0]); - printf("\e[38;5;%dm",comments); - msg_fct( "KHz\n"); - msg_fct( "Updating of local sensing database with recived data ...\n"); - - //mod_lor_10_04_21++ - - /*for (i=0;iNB_chan;i++){ //com_lor_10_11_09 - if(p->values[i]==1){ - printf("\e[38;5;%dm",colorfree); //mod_lor_10_04_21 - msg_fct( " Channel %d: no primary user detected\n",p->channels[i]); - //printf("\e[38;5;%dm",colorfg); //mod_lor_10_04_21 - } - else{ - printf("\e[38;5;%dm",colorbusy); //mod_lor_10_04_21 - msg_fct( " Channel %d: primary user detected\n",p->channels[i]); - //printf("\e[38;5;%dm",colorfg); //mod_lor_10_04_21 - } - }*/ - printf("\e[38;5;%dm",comments); //mod_lor_10_04_22*/ - - if (SCEN_1)//mod_lor_10_05_12++ - msg_fct( "Trasmission of the new information to the Fusion Center\n"); - else - msg_fct( "Trasmission of the new information to the Cluster Head\n");//mod_lor_10_05_12-- - - msg_fct( "Waiting for next sensing update ...\n"); - printf("\e[38;5;%dm",colorfg); //mod_lor_10_04_21 - //mod_lor_10_04_21-- - - } - break ; - - case SNS_END_SCAN_CONF : { - - msg_fct( "[SENSING]>[CRRM]:END_SENSING_CONFIRMATION\n"); - printf("\e[38;5;%dm",comments); //mod_lor_10_04_22 - - if (SCEN_1)//mod_lor_10_05_12++ - msg_fct( "Sending confirmation of stopped sensing to Fusion Center ...\n"); - else - msg_fct( "Sending confirmation of stopped sensing to Cluster Head ...\n");//mod_lor_10_05_12-- - - printf("\e[38;5;%dm",colorfg); - } - break ; - - default : - msg("[SNS]WARNING: msg unknown %d switched as %d\n",Header->msg_type,msg_type) ; - } - - break; - } - - case RRC: { - switch ( msg_type ) { - case RRC_RB_ESTABLISH_RESP: { - msg_fct( "[CRRC]>[CRRM]:%d:RRC_RB_ESTABLISH_RESP \n",Header->inst); - - } - break ; - - case RRC_RB_ESTABLISH_CFM: { - - msg_fct( "[CRRC]>[CRRM]:%d:RRC_RB_ESTABLISH_CFM \n",Header->inst); - /*if (Header->inst == BTS_ID && SCEN_1){//mod_lor_10_05_12 - printf("\e[38;5;%dm",comments); //mod_lor_10_04_22 - msg_fct( "******************************************************************\n"); - msg_fct( "Link between Fusion Center and BTS opened\n"); - msg_fct( "******************************************************************\n"); - printf("\e[38;5;%dm",colorfg); //mod_lor_10_04_22 - }*/ - - } - break ; - - case RRC_RB_MODIFY_RESP: { - msg_fct( "[CRRC]>[CRRM]:%d:RRC_RB_MODIFY_RESP \n",Header->inst); - - } - break ; - - case RRC_RB_MODIFY_CFM: { - - msg_fct( "[CRRC]>[CRRM]:%d:RRC_RB_MODIFY_CFM\n",Header->inst); - - } - break ; - - case RRC_RB_RELEASE_RESP: { - msg_fct( "[CRRC]>[CRRM]:%d:RRC_RB_RELEASE_RESP \n",Header->inst); - - } - break ; - - case RRC_MR_ATTACH_IND : { - - msg_fct( "[CRRC]>[CRRM]:%d:RRC_MR_ATTACH_IND \n",Header->inst); - - } - break ; - - case RRC_SENSING_MEAS_RESP: { - msg_fct( "[CRRC]>[CRRM]:%d:RRC_SENSING_MEAS_RESP \n",Header->inst); - } - break ; - - case RRC_CX_ESTABLISH_IND: { - - msg_fct( "[CRRC]>[CRRM]:%d:RRC_CX_ESTABLISH_IND \n",Header->inst); - - } - break ; - - case RRC_PHY_SYNCH_TO_MR_IND : { - - msg_fct( "[CRRC]>[CRRM]:%d:RRC_PHY_SYNCH_TO_MR_IND.... \n",Header->inst); - - } - break ; - - case RRC_PHY_SYNCH_TO_CH_IND : { - msg_fct( "[CRRC]>[CRRM]:%d:RRC_PHY_SYNCH_TO_CH_IND.... \n",Header->inst); - - - } - break ; - - case RRC_SENSING_MEAS_IND : { - - msg_fct( "[CRRC]>[CRRM]:%d:RRC_SENSING_MEAS_IND \n",Header->inst); - - } - break ; - - case RRC_RB_MEAS_IND : { - - msg_fct( "[CRRC]>[CRRM]:%d:RRC_RB_MEAS_IND \n",Header->inst); - } - break ; - - - case RRC_INIT_SCAN_REQ : { - msg_fct( "[CRRC]>[CRRM]:START_SENSING_REQUEST\n"); - printf("\e[38;5;%dm",comments); //mod_lor_10_04_22 - - if (SCEN_1)//mod_lor_10_05_12++ - msg_fct( "Order to start sensing activity received from Fusion Center\n"); - else - msg_fct( "Order to start sensing activity received from Cluster Head\n");//mod_lor_10_05_12-- - - msg_fct( "Activation of sensing unit ...\n"); - msg_fct( "Waiting for sensing results ...\n"); - printf("\e[38;5;%dm",colorfg); //mod_lor_10_04_22 - - - } - break ; - - case RRC_END_SCAN_CONF : { - - msg_fct( "[CRRC]>[CRRM]:END_SENSINS_ACTIVITY_CONFIRMATION\n"); - printf("\e[38;5;%dm",comments); //mod_lor_10_04_22 - - if (SCEN_1)//mod_lor_10_05_12++ - msg_fct( "Sensor %d confirms the end of sensing activity\n",(Header->inst -FIRST_SENSOR_ID+ 1)); - else - msg_fct( "Secondary User %d confirms the end of sensing activity\n",(Header->inst -FIRST_SENSOR_ID+ 1));//mod_lor_10_05_12-- - - printf("\e[38;5;%dm",colorfg); //mod_lor_10_04_22 - } - break ; - - case RRC_END_SCAN_REQ : { - - msg_fct( "[CRRC]>[CRRM]:END_SENSINS_ACTIVITY_REQUEST\n"); - printf("\e[38;5;%dm",comments); //mod_lor_10_04_22 - - if (SCEN_1)//mod_lor_10_05_12++ - msg_fct( "Order to stop sensing activity received from Fusion Center\n"); - else - msg_fct( "Order to stop sensing activity received from Cluster Head\n");//mod_lor_10_05_12-- - - msg_fct( "Command to stop sensing activity transmitted to sensing unit\n"); - msg_fct( "Waiting for confirmation from sensing unit ...\n"); - printf("\e[38;5;%dm",colorfg); //mod_lor_10_04_22 - - } - break ; - - case RRC_INIT_MON_REQ : { - msg_fct( "[CRRC]>[CRRM]:RRC_INIT_MON_REQ \n",Header->inst); - } - break ; - - case RRC_UP_FREQ_ASS : { - gen_sens_info_t *p = (gen_sens_info_t *)Data ; - msg_fct( "[CRRC]>[CRRM]:UPDATE_FREQUENCIES_ASSIGNED\n",Header->inst); - - if (p->NB_chan!=0) { - printf("\e[38;5;%dm",comments); - msg_fct( "Channel to use: from "); - printf("\e[38;5;%dm",colorfree); - msg_fct( "%d ",(p->channels[0])); - printf("\e[38;5;%dm",comments); - msg_fct( "KHz to "); - printf("\e[38;5;%dm",colorfree); - msg_fct( "%d ",(p->channels[1])); - printf("\e[38;5;%dm",comments); - msg_fct( "KHz\n"); - printf("\e[38;5;%dm",colorfg); - } else { - printf("\e[38;5;%dm",colorbusy); - msg_fct( "No channels available\n"); - printf("\e[38;5;%dm",colorfg); - } - } - break; - - case RRC_UP_FREQ_ASS_SEC : { //add_lor_10_11_09 - gen_sens_info_t *p = (gen_sens_info_t *)Data ; - msg_fct( "[CRRC]>[CRRM]:UPDATE_FREQUENCIES_ASSIGNED_SEC \n",Header->inst); - - for (i=0; iNB_val; i++) { - if (p->values[i]) { - printf("\e[38;5;%dm",comments); - msg_fct( "Transmitting on channel from "); - printf("\e[38;5;%dm",colorfree); - msg_fct( "%d ",(p->channels[i*2])); - printf("\e[38;5;%dm",comments); - msg_fct( "KHz to "); - printf("\e[38;5;%dm",colorfree); - msg_fct( "%d ",(p->channels[(i*2)+1])); - printf("\e[38;5;%dm",comments); - msg_fct( "KHz\n"); - printf("\e[38;5;%dm",colorfg); - } else { - printf("\e[38;5;%dm",comments); - msg_fct( "Receiving on channel from "); - printf("\e[38;5;%dm",colorfree); - msg_fct( "%d ",(p->channels[i*2])); - printf("\e[38;5;%dm",comments); - msg_fct( "KHz to "); - printf("\e[38;5;%dm",colorfree); - msg_fct( "%d ",(p->channels[(i*2)+1])); - printf("\e[38;5;%dm",comments); - msg_fct( "KHz\n"); - printf("\e[38;5;%dm",colorfg); - } - } - } - break ; - - default : - msg("[CRRC]WARNING: msg unknown %d switched as %d\n",Header->msg_type,msg_type) ; - } - - break; - } - - case IP: { - switch ( msg_type ) { - - case UPDATE_SENS_RESULTS_3 : { //mod_lor_10_06_02 - gen_sens_info_t *p = (gen_sens_info_t *)Data ; - - if (SCEN_1) { //mod_lor_10_05_12++ - msg_fct( "[SENSOR %d msg]:UPDATE_SENSING_MEASUREMENT\n",(Header->inst-FIRST_SENSOR_ID+1)); - printf("\e[38;5;%dm",comments); //mod_lor_10_04_22 - msg_fct( "Sensing information received from sensor %d (local update number: %d)\n",(Header->inst-FIRST_SENSOR_ID+1),(Header->Trans_id - 4096)); - } else { - msg_fct( "[S.U. %d msg]:UPDATE_SENSING_MEASUREMENT\n",(Header->inst-FIRST_SENSOR_ID+1)); - printf("\e[38;5;%dm",comments); //mod_lor_10_04_22 - msg_fct( "Sensing information received from Secondary User %d (local update number: %d)\n",(Header->inst-FIRST_SENSOR_ID+1),(Header->Trans_id - 4096)); - }//mod_lor_10_05_12-- - - msg_fct( "Sensing results about frequencies from "); - printf("\e[38;5;%dm",colorfree); - msg_fct( "%d ",(p->channels[0]/1000)); - printf("\e[38;5;%dm",comments); - msg_fct( "MHz and "); - printf("\e[38;5;%dm",colorfree); - msg_fct( "%d ",(p->channels[1]/1000)); - printf("\e[38;5;%dm",comments); - msg_fct( "MHz\nUpdating of sensing database using recived data ...\n"); - - /*if(SN_active &&p->values[1]!=3){ //comm_lor_10_11_09 - msg_fct( "Checking if frequencies in use by Secondary Network are still free ...\n"); - if(p->values[1]==1){ - printf("\e[38;5;%dm",colorbusy); - printf("Primary detected on frequencies in use by Secondary Network\n"); - printf("\e[38;5;%dm",comments); - msg_fct( "Sending update of open frequencies to Secondary Network\n"); - } - else if (p->values[1]==0){ - printf("\e[38;5;%dm",colorfree); - printf("No primary communication detected on frequencies in use by Secondary Network\n"); - - } - } - else if (p->values[1]==1){ - printf("\e[38;5;%dm",comments); - msg_fct( "Sending update of open frequencies to Secondary Network\n"); - }*/ - //mod_lor_10_04_21++ - /* - unsigned int up_to_send = 0; - for (i=(p->NB_chan-1);i>=0;i--){ - if(p->values[i]==1){ - printf("\e[38;5;%dm",colorfree); //mod_lor_10_04_21 - msg_fct( " Channel %d: no primary user detected\n",p->channels[i]); - }else{ - printf("\e[38;5;%dm",colorbusy); //mod_lor_10_04_21 - msg_fct( " Channel %d: primary user detected\n",p->channels[i]); - if(p->values[i]==3){ - up_to_send = 1; - msg_fct( " -> Channel used by SN\n"); - msg_fct( " -> Need to send update of open frequencies\n"); - } - } - } - if (up_to_send){ - printf("\e[38;5;%dm",comments); //mod_lor_10_04_22 - msg_fct( "Sending update of open frequencies to Secondary Network\n"); - }*/ - printf("\e[38;5;%dm",colorfg); //mod_lor_10_04_21 - //mod_lor_10_04_21-- - - - } - break ; - - case OPEN_FREQ_QUERY_4 : { - printf("\e[38;5;%dm",colorBTS_msg); //mod_lor_10_04_23 - msg_fct( "[BTS msg]:OPEN_FREQUENCIES_QUERY \n"); - printf("\e[38;5;%dm",comments); //mod_lor_10_04_23 - msg_fct( "Received a request from the secondary network BTS to know the available frequencies to use\n"); - msg_fct( "Sending to BTS information about available frequencies\n"); - printf("\e[38;5;%dm",colorfg); //mod_lor_10_04_23 - - } - break ; - - case ASK_FREQ_TO_CH_3 : { //add_lor_10_11_03 - gen_sens_info_t *p = (gen_sens_info_t *)Data ; - - if (p->NB_val==0) { - msg_fct( "[SU %d msg]:ASK_FREQUENCIES \n", Header->inst); - printf("\e[38;5;%dm",comments); //mod_lor_10_04_23 - msg_fct( "Received a request from secondary user #%d to have a channel to communicate with Secondary User #%d\n",Header->inst,p->channels[0]); - msg_fct( "Looking for available channels...\n"); - printf("\e[38;5;%dm",colorfg); //mod_lor_10_04_23 - } else { - printf("\e[38;5;%dm",comments); //mod_lor_10_04_23 - msg_fct( "None channel is available...\n"); - msg_fct( "Saving channel request...\n"); - printf("\e[38;5;%dm",colorfg); //mod_lor_10_04_23 - } - - } - break ; - - case UPDATE_OPEN_FREQ_7 : { //mod_lor_10_06_02 - gen_sens_info_t *p = (gen_sens_info_t *)Data ; - msg_fct( "[FC msg]:UPDATE_OPEN_FREQUENCIES\n",Header->inst); - printf("\e[38;5;%dm",comments); //mod_lor_10_04_23 - msg_fct( "Received information about available frequencies from Fusion Center\n"); - - if (p->NB_chan==0) { - printf("\e[38;5;%dm",colorbusy); - msg_fct( "No available channels for Secondary Network \n"); - } else { - msg_fct( "Updating of channel database ...\n"); - - for (i=(p->NB_chan-1); i>=0; i--) { - printf("\e[38;5;%dm",colorfree); //mod_lor_10_04_21 - msg_fct( " Channel from %d KHz to %d KHz is available\n",p->channels[i-1], p->channels[i]); - i=i-2; - } - - printf("\e[38;5;%dm",comments); //mod_lor_10_04_23 - msg_fct( "Selection of frequencies for Secondary network ...\n"); - - //mod_lor_10_05_18++ - for (i=(p->NB_val-1); i>=0; i--) { - for (j=(p->NB_chan-3); j>=0; j=j-3) { - if (p->channels[j]==p->values[i]) { - printf("\e[38;5;%dm",colorfree); - msg_fct( " Channel from %d KHz to %d KHz selected for SN\n",p->channels[j+1],p->channels[j+2]); - break; - } - } - } - } - - printf("\e[38;5;%dm",comments); //mod_lor_10_04_23 - //mod_lor_10_05_18-- - msg_fct( "Sending update of frequencies used by Secondary Network to Fusion Center ...\n"); - printf("\e[38;5;%dm",colorfg); //mod_lor_10_04_23 - - - } - break ; - - case UPDATE_SN_OCC_FREQ_5 : { //mod_lor_10_06_02 - gen_sens_info_t *p = (gen_sens_info_t *)Data ; - - if (p->NB_chan>0) - SN_active = 1; //mod_lor_10_06_02 - - printf("\e[38;5;%dm",colorBTS_msg); //mod_lor_10_04_23 - msg_fct( "[BTS msg]:UPDATE_SN_OCCUPIED_FREQUENCIES\n", Header->inst); - printf("\e[38;5;%dm",comments); //mod_lor_10_04_22 - msg_fct( "Update received from BTS about frequencies used by Secondary Network\n"); - msg_fct( "Updating CHANNEL DATABASE :\n"); - - if (p->NB_chan == 0) { - msg_fct( "SN did not select any channel\n"); - SN_active = 0; - } - - //printf("\e[38;5;%dm",colorBTS_msg); - for (i=0; iNB_chan; i++) { - printf("\e[38;5;%dm",comments); - msg_fct( " Channel from " ); - printf("\e[38;5;%dm",colorfree); - msg_fct( "%d ",p->channels[i] ); - printf("\e[38;5;%dm",comments); - msg_fct( "MHz to"); - printf("\e[38;5;%dm",colorfree); - msg_fct( " %d ",p->channels[++i] ); - printf("\e[38;5;%dm",comments); - msg_fct( " used by Secondary Network\n" ); - } - - if (p->values[0]) { - if (p->NB_chan != 0) { - printf("\e[38;5;%dm",colorbusy); - msg_fct( " -> Channels in use by SN are not available anymore!\n"); - printf("\e[38;5;%dm",comments); - } - - msg_fct( "Sending update of open frequencies to BTS ...\n"); - } - - printf("\e[38;5;%dm",colorfg); //mod_lor_10_04_23 - - } - break ; - - //mod_lor_10_05_10++ - case INIT_COLL_SENS_REQ : { - msg_fct( "******************************************************************\n"); - msg_fct( "[CH 1 msg]:INIT_COLL_SENS_REQ from %d\n", Header->inst); - printf("\e[38;5;%dm",comments); //mod_lor_10_04_22 - msg_fct( "Request from another cluster to collaborate in sensing operations\n"); - msg_fct( "Sending sensing parameters to sensors connected ...\n"); - printf("\e[38;5;%dm",colorfg); //mod_lor_10_04_23 - - } - break ; - - case STOP_COLL_SENS : { - msg_fct( "[CH 1 msg]:STOP_COLL_SENS from %d\n", Header->inst); - printf("\e[38;5;%dm",comments); //mod_lor_10_04_22 - msg_fct( "Request to stop the collaboration in sensing operations\n"); - msg_fct( "Sending stop sensing order to sensors connected ...\n"); - printf("\e[38;5;%dm",colorfg); //mod_lor_10_04_23 - - } - break ; - - case STOP_COLL_SENS_CONF : { - printf("\e[38;5;%dm",colorBTS_msg); //mod_lor_10_04_23 - msg_fct( "[CH coll msg]:STOP_COLL_SENS_CONF from %d\n", Header->inst); - printf("\e[38;5;%dm",comments); //mod_lor_10_04_22 - msg_fct( "Collaborative Cluster Head confirms the end of sensing activity\n"); - printf("\e[38;5;%dm",colorfg); //mod_lor_10_04_23 - - } - break ; - - case UP_CLUST_SENS_RESULTS : { - gen_sens_info_t *p = (gen_sens_info_t *)Data ; - printf("\e[38;5;%dm",colorBTS_msg); //mod_lor_10_04_23 - msg_fct( "[CH coll msg]:UP_CLUST_SENS_RESULTS from %d\n", Header->inst); - printf("\e[38;5;%dm",comments); //mod_lor_10_04_22 - msg_fct( "Update received from collaborative Cluster about frequencies from\n"); - printf("\e[38;5;%dm",colorfree); - msg_fct( "%d ",(p->channels[0]/1000)); - printf("\e[38;5;%dm",comments); - msg_fct( "MHz and "); - printf("\e[38;5;%dm",colorfree); - msg_fct( "%d ",(p->channels[1]/1000)); - printf("\e[38;5;%dm",comments); - msg_fct( "MHz\nBandwidth of analyzed subbands: "); - printf("\e[38;5;%dm",colorfree); - msg_fct( "%d ",p->values[0]); - printf("\e[38;5;%dm",comments); - msg_fct( "KHz\n"); - msg_fct( "Updating of sensing database using recived data...\n"); - printf("\e[38;5;%dm",colorfg); - } - break ; - - //mod_lor_10_05_10-- - case USER_DISCONNECT_9 : { //add_lor_10_11_09 - msg_fct( "[SU %d msg]:USER_DISCONNECTION\n", Header->inst); - printf("\e[38;5;%dm",comments); //mod_lor_10_04_22 - msg_fct( "Secondary User %d wants to interrupt all its current communications.\n", Header->inst); - msg_fct( "Sending update to all Secondary Users\n"); - printf("\e[38;5;%dm",colorfg); //mod_lor_10_04_23 - - } - break ; - - case CLOSE_LINK : { //add_lor_10_11_09 - gen_sens_info_t *p = (gen_sens_info_t *)Data ; - int i; - msg_fct( "[SU %d msg]:CLOSE_LINK\n", Header->inst); - printf("\e[38;5;%dm",comments); //mod_lor_10_04_22 - msg_fct( "Secondary User %d wants to close communication channel from user %d to user %d\n", Header->inst, p->channels[0],p->values[0]); - msg_fct( "Sending update to all Secondary Users\n"); - printf("\e[38;5;%dm",colorfg); //mod_lor_10_04_23 - } - break ; - - default : - msg("[IP]WARNING: msg unknown %d switched as %d\n",Header->msg_type,msg_type) ; - } - - break; - } - - case CMM: { - switch ( msg_type ) { - case CMM_CX_SETUP_REQ: { - - msg_fct( "[CMM]>[CRRM]:%d:CMM_CX_SETUP_REQ\n",Header->inst); - - } - break ; - - case CMM_CX_MODIFY_REQ: { - - msg_fct( "[CMM]>[CRRM]:%d:CMM_CX_MODIFY_REQ\n",Header->inst); - - } - break ; - - case CMM_CX_RELEASE_REQ : { - - msg_fct( "[CMM]>[CRRM]:%d:CMM_CX_RELEASE_REQ\n",Header->inst); - - } - break ; - - case CMM_CX_RELEASE_ALL_REQ : { - - msg_fct( "[CMM]>[CRRM]:%d:CMM_CX_RELEASE_ALL_REQ\n",Header->inst); - - } - break ; - - case CMM_ATTACH_CNF : { - msg_fct( "[CMM]>[CRRM]:%d:CMM_ATTACH_CNF\n",Header->inst); - printf("\e[38;5;%dm",comments); //mod_lor_10_04_22 - msg_fct( "******************************************************************\n"); - - //mod_lor_10_05_12++ - if (SCEN_1) { //mod_lor_11_02_15++ : reorganization sendora scen 1 - if (BTS_ID>=0 && FC_ID>=0) - msg_fct( "The sensor is now connected to the fusion center\n"); //AAA to fix - else if (BTS_ID>=0) - msg_fct( "Secondary User is now connected to the BTS\n"); - else if (FC_ID>=0) - msg_fct( "The sensor is now connected to the fusion center\n"); - }//mod_lor_11_02_15-- - else if(SCEN_2_DISTR) - msg_fct( "Secondary User is now connected to Cluster Head\n"); - else if(Header->inst < FIRST_SECOND_CLUSTER_USER_ID) - msg_fct( "Secondary User is now connected to Cluster Head #1\n"); - else - msg_fct( "Secondary User is now connected to Cluster Head #2\n");//mod_lor_10_05_12-- - - msg_fct( "******************************************************************\n"); - printf("\e[38;5;%dm",colorfg); //mod_lor_10_04_22 - } - break ; - - case CMM_INIT_MR_REQ : { - msg_fct( "[CMM]>[CRRM]:%d:CMM_INIT_MR_REQ \n",Header->inst); - - } - break ; - - case CMM_INIT_CH_REQ : { - msg_fct( "[CMM]>[CRRM]:%d:CMM_INIT_CH_REQ \n",Header->inst); - - - } - break ; - - case CMM_INIT_SENSING : { - printf("\e[38;5;%dm",comments); //mod_lor_10_04_22 - msg_fct( "******************************************************************\n"); - printf("\e[38;5;%dm",colorfg); //mod_lor_10_04_22 - msg_fct( "[CMM]>[CRRM]:START_SENSING\n"); - printf("\e[38;5;%dm",comments); //mod_lor_10_04_22 - msg_fct( "Order to activate sensing received \n"); - - if (SCEN_1)//mod_lor_10_05_12++ - msg_fct( "Sending sensing parameters to sensors connected ...\n"); - else - msg_fct( "Sending sensing parameters to Secondary Users connected ...\n");//mod_lor_10_05_12-- - - printf("\e[38;5;%dm",colorfg); //mod_lor_10_04_22 - } - break ; - - case CMM_STOP_SENSING : { - msg_fct( "[CMM]>[CRRM]:STOP_SENSING\n",Header->inst); - printf("\e[38;5;%dm",comments); //mod_lor_10_04_22 - msg_fct( "Order to stop sensing operations received \n"); - - if (SCEN_1)//mod_lor_10_05_12++ - msg_fct( "Sending order to stop sensing activity to sensors connected ...\n"); - else { - if (SCEN_2_CENTR) - msg_fct( "Sending order to stop collaborative sensing to collaborative CH ...\n"); - - msg_fct( "Sending order to stop sensing actions to secondary users connected ...\n"); - }//mod_lor_10_05_12-- - - sleep(1); - msg_fct( "Waiting for stop sensing confirmations ...\n"); - printf("\e[38;5;%dm",colorfg); //mod_lor_10_04_22 - - } - break ; - - case CMM_ASK_FREQ : { - printf("\e[38;5;%dm",comments); //mod_lor_10_04_22 - msg_fct( "******************************************************************\n"); - printf("\e[38;5;%dm",colorfg); //mod_lor_10_04_22 - msg_fct( "[CMM]>[CRRM]:ASK_FOR_AVAILABLE_FREQUENCIES\n",Header->inst); - printf("\e[38;5;%dm",comments); //mod_lor_10_04_22 - msg_fct( "Need of frequencies for secondary users \n"); - msg_fct( "Sending request of available channels to Fusion Center ...\n"); - sleep(1); - msg_fct( "Waiting for available channels information ...\n"); - printf("\e[38;5;%dm",colorfg); //mod_lor_10_04_22 - - } - break ; - - - default : - msg("[CMM]WARNING: msg unknown %d switched as %d\n",Header->msg_type,msg_type) ; - } - - break; - } - - default : - msg("[Graph_xface]WARNING: msg unknown %d switched as %d\n",Header->msg_type,msg_type) ; - - } - } - - close_socket(&S_graph) ; -} diff --git a/openair3/MESH/RRM/GRAPH/graph_int.h b/openair3/MESH/RRM/GRAPH/graph_int.h deleted file mode 100755 index 5879ef91b8..0000000000 --- a/openair3/MESH/RRM/GRAPH/graph_int.h +++ /dev/null @@ -1,67 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/*! -******************************************************************************* - -\file graph_int.h - -\brief Fichier d'entête - - Il contient les declarations de type, des defines relatif aux - fonctions d'emulation des interfaces du RRM (Radio Resource - Management ). - -\author IACOBELLI Lorenzo - -\date 20/04/10 - - -\par Historique: - $Author$ $Date$ $Revision$ - $Id$ - $Log$ - -******************************************************************************* -*/ - - -#ifndef GRAPH_INT_H -#define GRAPH_INT_H - -#ifdef __cplusplus -extern "C" { -#endif - - -#ifdef __cplusplus -} -#endif - -#endif /* GRAPH_INT_H */ diff --git a/openair3/MESH/RRM/GRAPH/graph_sock.c b/openair3/MESH/RRM/GRAPH/graph_sock.c deleted file mode 100644 index 6de4210204..0000000000 --- a/openair3/MESH/RRM/GRAPH/graph_sock.c +++ /dev/null @@ -1,293 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ -/*! -******************************************************************************* - -\file sensing_rrm_interface.c - -\brief Sensing unit sockets - -\author IACOBELLI Lorenzo, KNOPP Raymond - -\date 01/04/2010 - - -\par Historique: - - -******************************************************************************* -*/ - - -#include -#include -#include -#include -#include - -#include -#include - -#include "graph_sock.h" - -//! \brief Taille maximale de la charge utile -#define SIZE_MAX_PAYLOAD 2048 -//! \brief PID de l'espace utilisateur (Netlink mode) -//#define PID_USERSPACE 0xAA - - -#define msg printf -#define RRM_FREE free - -#ifndef SENSING_RRM_FIFOS_XFACE -/*! -******************************************************************************* -\brief This function opens a unix socket for the rrm communication -\return The return value is a socket handle -*/ -int open_socket( - sock_rrm_t *s , ///< socket descriptor - char *path_local, ///< local socket path if unix socket - char *path_dest , ///< host Socket path if unix socket - int rrm_inst ///< instance of the rrm entity -) -{ - /* Unix socket */ - int socket_fd ; - int len ; - - if ((socket_fd = socket(AF_UNIX, SOCK_DGRAM, 0)) == -1) { - perror("unix socket"); - return -1 ; - } - - memset(&(s->un_local_addr), 0, sizeof(struct sockaddr_un)); - s->un_local_addr.sun_family = AF_UNIX; - sprintf(s->un_local_addr.sun_path,"%s%d", path_local, rrm_inst ); - unlink(s->un_local_addr.sun_path); - msg("local %s\n",s->un_local_addr.sun_path); - len = strlen((s->un_local_addr).sun_path) + sizeof((s->un_local_addr).sun_family); - - if (bind(socket_fd, (struct sockaddr *)&(s->un_local_addr), len) == -1) { - perror("bind"); - return -1 ; - } - - memset(&(s->un_dest_addr), 0, sizeof(struct sockaddr_un)); - s->un_dest_addr.sun_family = AF_UNIX; - sprintf(s->un_dest_addr.sun_path,"%s%d", path_dest, rrm_inst ); - msg("Dest %s\n",s->un_dest_addr.sun_path); - - - s->s = socket_fd ; - return socket_fd ; -} -/*! -******************************************************************************* -\brief This function closes a RRM socket -\return none -*/ -void close_socket( - sock_rrm_t *sock ///< the socket handle -) -{ - shutdown(sock->s, SHUT_RDWR); - close(sock->s); -} - -/*! -******************************************************************************* -\brief This function send a buffer message to the unix socket -\return if OK then "0" is returned else "-1" -*/ -char BUFF[2048]; -int send_msg_sock( - sock_rrm_t *s ,///< socket descriptor - msg_t *smsg ///< the message to send -) -{ - /* Unix socket */ - int ret = 0 ; - // char *buf = NULL; - struct msghdr msghd ; - struct iovec iov; - int taille = sizeof(msg_head_t) ; - - if ( smsg == NULL ) - return -1 ; - - if ( smsg->data != NULL ) - taille += smsg->head.size ; - - //buf = RRM_MALLOC(char, taille); - //if (buf ==NULL) - //return -1 ; - - memcpy( BUFF , &(smsg->head) , sizeof(msg_head_t) ) ; - memcpy( BUFF+sizeof(msg_head_t), smsg->data, smsg->head.size ) ; - - iov.iov_base = (void *)BUFF; - iov.iov_len = taille ; - - msghd.msg_name = (void *)&(s->un_dest_addr); - msghd.msg_namelen = sizeof(s->un_dest_addr); - msghd.msg_iov = &iov; - msghd.msg_iovlen = 1; - msghd.msg_control = NULL ; - msghd.msg_controllen = 0 ; - - if ( sendmsg(s->s, &msghd, 0) < 0 ) { - ret = -1; - msg("socket %d, dest %s\n",s->s,s->un_dest_addr.sun_path); - perror("sendmsg:unix socket"); - } - - //RRM_FREE(buf) ; - //RRM_FREE(msg->data) ; - //RRM_FREE(msg) ; - - return ret ; -} - -/*! -******************************************************************************* -\brief This function read a buffer from a unix socket -\return the function returns a message pointer. If the pointeur is NULL, a error -is happened. -*/ -char *recv_msg( - sock_rrm_t *s ///< socket descriptor -) -{ - /* Unix socket */ - char *buf = NULL; - char *smsg = NULL; - struct msghdr msghd ; - struct iovec iov; - int size_msg ; - msg_head_t *head ; - int ret ; - - int taille = SIZE_MAX_PAYLOAD ; - - buf = (char *)calloc(taille,sizeof(char)); - - if ( buf == NULL ) { - fprintf(stderr,"Buf null\n"); - return NULL ; - } - - iov.iov_base = (void *)buf; - iov.iov_len = taille ; - msghd.msg_name = (void *)&(s->un_dest_addr); - msghd.msg_namelen = sizeof(s->un_dest_addr); - msghd.msg_iov = &iov; - msghd.msg_iovlen = 1; - msghd.msg_control = NULL ; - msghd.msg_controllen= 0 ; - - ret = recvmsg(s->s, &msghd , 0 ) ; - - if ( ret <= 0 ) { - // non-blocking socket - // perror("PB recvmsg_un"); - fprintf(stderr,"PB recvmsg_un\n"); - RRM_FREE(buf); - return NULL ; - } - - if (msghd.msg_flags != 0 ) { - fprintf(stderr,"error recvmsg_un: 0x%02x\n", msghd.msg_flags) ; - RRM_FREE(buf); - return NULL ; - } - - head = (msg_head_t *) buf ; - size_msg = sizeof(msg_head_t) + head->size ; - - smsg = (char *)calloc(size_msg,sizeof(char)) ; - - if ( smsg != NULL ) - memcpy( smsg , buf , size_msg ) ; - - RRM_FREE( buf ) ; - - return smsg ; -} - -#else //XFACE - -int send_msg_fifo(int *s, msg_t *fmsg) -{ - int ret = 0, ret1; - int taille = sizeof(msg_head_t) ; - msg("write on fifos %d, msg %p\n",*s,fmsg); - - if ( fmsg == NULL ) - return -1 ; - - // envoi le header - - - ret1 = rtf_put (*s,(char*) &(fmsg->head) , taille); - - if(ret1 <0) { - msg("rtf_put H ERR %d\n",ret1); - rtf_reset(*s); - return ret1; - } - - ret=ret1; - - // envoi les datas si elles sont definis - if ( fmsg->data != NULL ) { - ret1 += rtf_put (*s,(char*) fmsg->data, fmsg->head.size); - - if(ret1 <0) { - msg("rtf_put D ERR %d\n",ret1); - rtf_reset(*s); - return ret1; - } - } - - ret+=ret1; - return ret; -} - -#endif //XFACE - -int send_msg(void *s, msg_t *smsg) -{ -#ifdef USER_MODE - send_msg_sock((sock_rrm_t *)s, smsg); -#else - send_msg_fifo((int *)s,smsg); -#endif - -} diff --git a/openair3/MESH/RRM/GRAPH/graph_sock.h b/openair3/MESH/RRM/GRAPH/graph_sock.h deleted file mode 100644 index 00c7b705ea..0000000000 --- a/openair3/MESH/RRM/GRAPH/graph_sock.h +++ /dev/null @@ -1,129 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/*! -******************************************************************************* - -\file sensing_rrm_interface.h - -\brief Fichier d'entete contenant les declarations des types, des defines , - et des fonctions relatives aux fonctions de communication. - -\author IACOBELLI Lorenzo, KNOPP Raymond - -\date 01/04/2010 - - -\par Historique: - $Author$ $Date$ $Revision$ - $Id$ - $Log$ - -******************************************************************************* -*/ - -#ifndef __SENSING_RRM_INTERFACE_H__ -#define __SENSING_RRM_INTERFACE_H__ - - -//#ifdef SENSING_RRM_XFACE - -/*! -******************************************************************************* -\brief Entete des messages de RRM/CMM/RRC/SENSING -*/ -typedef struct { - unsigned short start ; ///< Identification du debut de message - unsigned char inst ; ///< Identification de l'instance RRM - unsigned char msg_type ; ///< Identification du type message - unsigned int size ; ///< taille du message - unsigned int Trans_id ; ///< Identification de la transaction -} msg_head_t ; - -/*! -******************************************************************************* -\brief Definition de la structure d'un message a envoyer sur un socket: - - RRM->RRC - - RRC->RRM - - RRCI->RRC - - RRC->RRCI - - CMM->RRM - - RRM->CMM -*/ -typedef struct { - msg_head_t head ; ///< entete du message - char *data ; ///< message -} msg_t ; - - - - -#ifdef __cplusplus -extern "C" { -#endif - - - -#define RRM_SOCK_PATH "/tmp/rrm_socket" -#define TO_RRM_SOCK_PATH "/tmp/to_rrm_socket" - -//! \brief Identification of the RRM/CMM/RRC message begin -#define START_MSG 0xA533 -//! \brief Identification of the PUSU message begin -#define START_MSG_PUSU 0xCC - - - -#include -#include - - -/*! -******************************************************************************* -\brief Definition de la structure definissant le socket pour envoyer les messages -*/ -typedef struct { - int s ; ///< identification du socket - struct sockaddr_un un_local_addr ; ///< Adresse local si unix socket - struct sockaddr_un un_dest_addr ; ///< Adresse destinataire si unix socket -} sock_rrm_t ; - - -/* *** Fonctions relatives aux interfaces CMM ou SENSING *** */ - -int open_socket( sock_rrm_t *s ,char *path_local, char *path_dest , int rrm_inst ) ; -void close_socket(sock_rrm_t *sock ) ; -int send_msg_sock(sock_rrm_t *s ,msg_t *msg ) ; -char *recv_msg( sock_rrm_t *s ) ; -#ifdef __cplusplus -} -#endif - - -#endif diff --git a/openair3/MESH/RRM/Makefile b/openair3/MESH/RRM/Makefile deleted file mode 100644 index fb095f2f0b..0000000000 --- a/openair3/MESH/RRM/Makefile +++ /dev/null @@ -1,142 +0,0 @@ -include $(OPENAIR_DIR)/common/utils/Makefile.inc -OSTYPE = $(shell uname -o ) - -#AAA: if rrc emulated remove comment from next line -#EMUL_RRC = 1 -#AAA: if sns emulated remove comment from next line -#EMUL_SNS = 1 -RRC_KERNEL_MODE = 0 - - -#VPATH =.:./deps:./obj -# en ABSOLU pour utiliser les tags avec nedit de n'importe ou -CHEMIN = $(shell pwd) -OPENAIR1_DIR= $(CHEMIN)/../../../openair1 -OPENAIR2_DIR= $(CHEMIN)/../../../openair2 -OPENAIR2_RRC= $(OPENAIR2_DIR)/RRC/MESH/ -OPENAIR1_SENSING= $(OPENAIR1_DIR)/USERSPACE_TOOLS/SENDORA -OPENAIR3_RRM= $(CHEMIN) -INTERFACE = $(CHEMIN)/.. -EMUL = $(CHEMIN)/EMUL -VPATH = $(CHEMIN):$(EMUL):$(CHEMIN)/deps:$(CHEMIN)/obj - -INCLUDE = -I. -I$(OPENAIR2_RRC) -I$(OPENAIR3_RRM) -I$(INTERFACE) -I$(OPENAIR2_DIR) -I$(OPENAIR1_SENSING) -CFLAGS += -std=gnu99 $(INCLUDE) -DDEBUG -DNOTRACE -DOPENAIR2_IN -LDFLAGS = -lm -lforms -lX11 -L/usr/X11R6/lib -lXpm -lpthread - -ifeq ($(OSTYPE),Cygwin) - -LDFLAGS += -lpthread -CFLAGS += -DCYGWIN - -else - -LDFLAGS += -lpthread -lrt -CFLAGS += -DLINUX - -endif - -# ifdef RRC_KERNEL_MODE -ifeq ($(RRC_KERNEL_MODE),1) -CFLAGS += -DRRC_KERNEL_MODE -endif - -TARGET = emul_int rrm - -#put rrm_graph.c instead of rrm.c to connect the graphic interface block to the rrm -SRC = rrm_graph.c -SRC += rrm_sock.c -SRC += rrm_util.c -SRC += rrm_2_rrc_msg.c -SRC += cmm_msg.c -SRC += pusu_msg.c -SRC += transact.c -SRC += rrm_constant.c -SRC += ch_init.c -SRC += mr_attach.c -SRC += rb_mngt.c -SRC += neighbor_db.c -SRC += rb_db.c -SRC += sens_db.c -SRC += channels_db.c -SRC += msg_mngt.c -SRC += sens_op.c -SRC += freq_ass_op.c -SRC += rrm_2_sensing_msg.c -SRC += ip_msg.c -SRC += sensing_form.c -SRC += SN_freq_form.c -SRC += sens_scen_2_form.c -SRC += all_freq_to_users_form.c -SRC += sens_CH1_scen_2.c -SRC += sens_sensor.c - -SRC_EMUL = emul_interface.c -SRC_EMUL += rrm_sock.c -SRC_EMUL += rrm_util.c -SRC_EMUL += cmm_msg.c -SRC_EMUL += pusu_msg.c -SRC_EMUL += transact.c -SRC_EMUL += actdiff.c - -#ifeq ($(EMUL_RRC),0) -ifndef EMUL_RRC -CFLAGS += -DPHY_EMUL -else -CFLAGS += -DRRC_EMUL -SRC_EMUL += rrc_2_rrm_msg.c -SRC_EMUL += scenario.c -endif - -ifdef EMUL_SNS -CFLAGS += -DSNS_EMUL -SRC_EMUL += sensing_2_rrm_msg.c -endif - -OBJ = $(SRC:%.c=./obj/%.o) -OBJ_EMUL = $(SRC_EMUL:%.c=./obj/%.o) - -DEP = $(SRC:%.c=./deps/%.d) $(SRC_EMUL:%.c=./deps/%.d) - -all : Makefile deps $(TARGET) - -emul_int: $(OBJ_EMUL) - @echo '==============================' - @echo "Linkage $@ ($(OSTYPE))" - @echo '------------------------------' - $(CC) -o $@ $^ $(LDFLAGS) - -rrm: $(OBJ) - @echo '==============================' - @echo "Linkage $@ ($(OSTYPE))" - @echo '------------------------------' - $(CC) -o $@ $^ $(LDFLAGS) - -deps/%.d : %.c - @echo '------------------------------' - @echo Dependance $@ - @echo '------------------------------' - $(CC) $(CFLAGS) -M -MM $< | sed -e "1s/^/obj\//" -e "s/: /: Makefile /" > $@ - -obj/%.o:%.c - @echo '------------------------------' - @echo Compilation $@ - @echo '------------------------------' - @echo Dependance $^ - @echo Dependance plus recente $? - $(CC) $(CFLAGS) -c -o $@ $< - - --include deps/*.d - -.PHONY: clean cleanexe deps - -deps: $(DEP) - -clean: - rm -f $(TARGET) $(OBJ) *.o obj/*.o tags deps/*.d *.stackdump - -cleanexe: - rm -f *.exe - - diff --git a/openair3/MESH/RRM/SN_freq_form.c b/openair3/MESH/RRM/SN_freq_form.c deleted file mode 100644 index cdb17ee386..0000000000 --- a/openair3/MESH/RRM/SN_freq_form.c +++ /dev/null @@ -1,53 +0,0 @@ - -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ -/* Form definition file generated with fdesign. */ - -#include "forms.h" -#include -#include "SN_freq_form.h" - -FD_Secondary_Network_frequencies *create_form_Secondary_Network_frequencies(void) -{ - FL_OBJECT *obj; - FD_Secondary_Network_frequencies *fdui = (FD_Secondary_Network_frequencies *) fl_calloc(1, sizeof(*fdui)); - - fdui->Secondary_Network_frequencies = fl_bgn_form(FL_NO_BOX, 620, 200); - obj = fl_add_box(FL_UP_BOX,0,0,620,200,""); - fdui->Selected_frequencies = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,70,50,500,100,"Selected_frequencies"); - fl_set_object_color(obj,FL_BLACK,FL_GREEN); - fl_set_object_lsize(obj,FL_NORMAL_SIZE); - fl_end_form(); - - fdui->Secondary_Network_frequencies->fdui = fdui; - - return fdui; -} -/*---------------------------------------*/ - diff --git a/openair3/MESH/RRM/SN_freq_form.fd b/openair3/MESH/RRM/SN_freq_form.fd deleted file mode 100644 index 23972fa842..0000000000 --- a/openair3/MESH/RRM/SN_freq_form.fd +++ /dev/null @@ -1,52 +0,0 @@ -Magic: 13000 - -Internal Form Definition File - (do not change) - -Number of forms: 1 -Unit of measure: FL_COORD_PIXEL - -=============== FORM =============== -Name: Secondary_Network_frequencies -Width: 590 -Height: 230 -Number of Objects: 2 - --------------------- -class: FL_BOX -type: UP_BOX -box: 0 0 590 230 -boxtype: FL_UP_BOX -colors: FL_COL1 FL_COL1 -alignment: FL_ALIGN_CENTER -style: FL_NORMAL_STYLE -size: FL_DEFAULT_SIZE -lcol: FL_BLACK -label: -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: -callback: -argument: - --------------------- -class: FL_XYPLOT -type: NORMAL_XYPLOT -box: 60 40 490 120 -boxtype: FL_FLAT_BOX -colors: FL_BLACK FL_GREEN -alignment: FL_ALIGN_BOTTOM -style: FL_NORMAL_STYLE -size: FL_TINY_SIZE -lcol: FL_BLACK -label: -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: Selected_frequencies -callback: -argument: - -============================== -create_the_forms diff --git a/openair3/MESH/RRM/SN_freq_form.h b/openair3/MESH/RRM/SN_freq_form.h deleted file mode 100644 index 63be229394..0000000000 --- a/openair3/MESH/RRM/SN_freq_form.h +++ /dev/null @@ -1,49 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/** Header file generated with fdesign on Tue Jun 1 09:25:58 2010.**/ - -#ifndef FD_Secondary_Network_frequencies_h_ -#define FD_Secondary_Network_frequencies_h_ - -/** Callbacks, globals and object handlers **/ - - -/**** Forms and Objects ****/ -typedef struct { - FL_FORM *Secondary_Network_frequencies; - void *vdata; - char *cdata; - long ldata; - FL_OBJECT *Selected_frequencies; -} FD_Secondary_Network_frequencies; - -extern FD_Secondary_Network_frequencies * create_form_Secondary_Network_frequencies(void); - -#endif /* FD_Secondary_Network_frequencies_h_ */ diff --git a/openair3/MESH/RRM/VCD/Config_wave.xxx b/openair3/MESH/RRM/VCD/Config_wave.xxx deleted file mode 100755 index 2c5b83ca44..0000000000 --- a/openair3/MESH/RRM/VCD/Config_wave.xxx +++ /dev/null @@ -1,10 +0,0 @@ -*-18,000000 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -@28 -instance -transaction -CMM-->RRM -RRM-->CCM -RRM-->RRC -RRC-->RRM -RRM-->PUSU -PUSU-->RRM diff --git a/openair3/MESH/RRM/VCD/gtkwave.ini b/openair3/MESH/RRM/VCD/gtkwave.ini deleted file mode 100755 index fb705819de..0000000000 --- a/openair3/MESH/RRM/VCD/gtkwave.ini +++ /dev/null @@ -1,46 +0,0 @@ -# -# sample .gtkwaverc file that works fine with verilog xl -# -hier_max_level 1 -dynamic_resizing 1 -use_maxtime_display 0 - -enable_vcd_autosave 0 -use_roundcaps 1 - -use_nonprop_fonts yes -enable_horiz_grid yes -use_big_fonts no -constant_marker_update yes -show_grid yes -show_base_symbols no -use_roundcaps yes - -atomic_vectors yes -vcd_explicit_zero_subscripts no - - -# -# color additions -# -color_back 000000 -color_grid 808070 -color_high 00ff00 -color_low 00ffff -color_trans 00ffff -color_mid a0c040 - -color_value 00ffff -color_vbox 00ff00 -color_vtrans 00ff00 - -color_x ff0000 -color_xfill 800000 - -color_umark ff8080 -color_mark ffff80 - -color_time ff8000 -color_timeb 000040 - - diff --git a/openair3/MESH/RRM/VCD/mkvcd b/openair3/MESH/RRM/VCD/mkvcd deleted file mode 100755 index b1e1650191..0000000000 --- a/openair3/MESH/RRM/VCD/mkvcd +++ /dev/null @@ -1,131 +0,0 @@ -#!/usr/bin/perl - -use strict; - -my $t_old ; -my $t ; -my $tt ; -my $inst ; -my $interf; -my $funct; -my $nfunc; -my $transid; -my $transaction_mode = 1; - -my %wire = ( "CMM->RRM" => "w00" ,"RRM->CMM" => "w01", - "RRC->RRM" => "w02" ,"RRM->RRC" => "w03", - "PUSU->RRM" => "w06" ,"RRM->PUSU" => "w07" - ); - -my %old_value = ( "CMM->RRM" => "x" ,"RRM->CMM" => "x", - "PUSU->RRM" => "x" ,"RRM->PUSU" => "x", - "RRC->RRM" => "x" ,"RRM->RRC" => "x" ); - -my %value = ( "CMM->RRM" => "..." ,"RRM->CMM" => "...", - "PUSU->RRM" => "..." ,"RRM->PUSU" => "...", - "RRC->RRM" => "..." ,"RRM->RRC" => "..." ); - -open( FDOUT, ">wave.vcd" ); - -printf( FDOUT "\$comment -Affichage des echanges du RRM avec le RRC et le CMM -utiliser GTKwave pour visualiser ce fichier --> http://linux-workshop.com/bybell/ver/wave/gtkwave9x.html -\$end -\$timescale - 1us -\$end - -\$version - timing simulation -\$end - -\$var real 1 w00 CMM-->RRM \$end -\$var real 1 w01 RRM-->CCM \$end -\$var real 1 w02 RRC-->RRM \$end -\$var real 1 w03 RRM-->RRC \$end -\$var real 1 w04 transaction \$end -\$var real 1 w05 instance \$end -\$var real 1 w06 PUSU-->RRM \$end -\$var real 1 w07 RRM-->PUSU \$end - -\$enddefinitions \$end -" ); - - -#open( FDIN, ") -{ - chomp ; - ( $t, $interf, $inst, $funct, $nfunc, $transid ) = split ; - - $t_old = $t-0.1 if ($t_old ==0 ) ; - - foreach my $k ( keys %old_value ) - { - $value{$k} = "..." ; - } - - $value{"$interf"}=$funct; - - if ( $transaction_mode == 1) - { - printf( FDOUT "#%d\n", $tt *1e6 ) ; - } - else - { - printf( FDOUT "#%d\n", ( ($t -$t_old) *1e6) ) ; - } - - printf( FDOUT "r%d w04\n", $transid ) ; - printf( FDOUT "r%d w05\n", $inst ) ; - - foreach my $k ( keys %old_value ) - { - if ( $value{$k} ne $old_value{$k}) - { - printf( FDOUT "s%s %s\n", $value{$k}, $wire{$k} ) ; - } - - $old_value{$k} = $value{$k} ; - } - - $tt+=0.1; - -} - -foreach my $k ( keys %old_value ) -{ - $value{$k} = "..." ; -} - - -if ( $transaction_mode == 1) -{ - printf( FDOUT "#%d\ns... w04\n", ($tt+0.1 )*1e6 ) ; -} -else -{ - printf( FDOUT "#%d\ns... w04\n", int( ($t+0.1 -$t_old) *1e6 )) ; -} - -foreach my $k ( keys %old_value ) -{ - if ( $value{$k} ne $old_value{$k}) - { - printf( FDOUT "s%s %s\n", $value{$k}, $wire{$k} ) ; - } -} - -if ( $transaction_mode == 1) -{ - printf( FDOUT "#%d\ns... w04\n", ($tt+0.2 )*1e6 ) ; -} -else -{ - printf( FDOUT "#%d\ns... w04\n", int( ($t+0.2 -$t_old) *1e6 )) ; -} - -close(FDIN); -close(FDOUT); diff --git a/openair3/MESH/RRM/all_freq_to_users_form.c b/openair3/MESH/RRM/all_freq_to_users_form.c deleted file mode 100644 index 8bc4b37228..0000000000 --- a/openair3/MESH/RRM/all_freq_to_users_form.c +++ /dev/null @@ -1,76 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/* Form definition file generated with fdesign. */ - -#include "forms.h" -#include -#include "all_freq_to_users_form.h" - -FD_all_freq_to_users *create_form_all_freq_to_users(void) -{ - FL_OBJECT *obj; - FD_all_freq_to_users *fdui = (FD_all_freq_to_users *) fl_calloc(1, sizeof(*fdui)); - - //mod_lor_10_12_07++ - /*fdui->all_freq_to_users = fl_bgn_form(FL_NO_BOX, 460, 300); - obj = fl_add_box(FL_UP_BOX,0,0,460,300,""); - fdui->User_2_channels = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,20,160,420,100,"User_2_channels"); - fl_set_object_color(obj,FL_BLACK,FL_CHARTREUSE); - fl_set_object_lsize(obj,FL_NORMAL_SIZE); - fdui->User_1_channels = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,20,20,420,100,"User_1_channels"); - fl_set_object_color(obj,FL_BLACK,FL_PALEGREEN); - fl_set_object_lsize(obj,FL_NORMAL_SIZE); - - fl_end_form();*/ - //mod_lor_10_12_07--: remove upper part and put part below when on 2 PCs - - - fdui->all_freq_to_users = fl_bgn_form(FL_NO_BOX, 460, 420); - obj = fl_add_box(FL_UP_BOX,0,0,460,420,""); - fdui->User_1_channels = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,20,20,420,100,"User_1_channels"); - fl_set_object_color(obj,FL_BLACK,FL_PALEGREEN); - fl_set_object_lsize(obj,FL_NORMAL_SIZE); - fdui->User_2_channels = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,20,155,420,100,"User_2_channels"); - fl_set_object_color(obj,FL_BLACK,FL_CHARTREUSE); - fl_set_object_lsize(obj,FL_NORMAL_SIZE); - fdui->User_3_channels = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,20,290,420,100,"User_3_channels"); - fl_set_object_color(obj,FL_BLACK,FL_CYAN); - fl_set_object_lsize(obj,FL_NORMAL_SIZE); - /*fdui->User_4_channels = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,20,440,420,100,"User_4_channels"); - fl_set_object_color(obj,FL_BLACK,FL_SLATEBLUE); - fl_set_object_lsize(obj,FL_NORMAL_SIZE);*/ - fl_end_form(); - - fdui->all_freq_to_users->fdui = fdui; - - return fdui; -} -/*---------------------------------------*/ - diff --git a/openair3/MESH/RRM/all_freq_to_users_form.fd b/openair3/MESH/RRM/all_freq_to_users_form.fd deleted file mode 100644 index 04350a6467..0000000000 --- a/openair3/MESH/RRM/all_freq_to_users_form.fd +++ /dev/null @@ -1,106 +0,0 @@ -Magic: 13000 - -Internal Form Definition File - (do not change) - -Number of forms: 1 -Unit of measure: FL_COORD_PIXEL - -=============== FORM =============== -Name: all_freq_to_users -Width: 580 -Height: 590 -Number of Objects: 5 - --------------------- -class: FL_BOX -type: UP_BOX -box: 0 0 580 590 -boxtype: FL_UP_BOX -colors: FL_COL1 FL_COL1 -alignment: FL_ALIGN_CENTER -style: FL_NORMAL_STYLE -size: FL_DEFAULT_SIZE -lcol: FL_BLACK -label: -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: -callback: -argument: - --------------------- -class: FL_XYPLOT -type: IMPULSE_XYPLOT -box: 40 20 490 100 -boxtype: FL_FLAT_BOX -colors: FL_BLACK FL_PALEGREEN -alignment: FL_ALIGN_BOTTOM -style: FL_NORMAL_STYLE -size: FL_NORMAL_SIZE -lcol: FL_BLACK -label: User_1_channels -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: User_1_channels -callback: -argument: - --------------------- -class: FL_XYPLOT -type: IMPULSE_XYPLOT -box: 40 160 490 100 -boxtype: FL_FLAT_BOX -colors: FL_BLACK FL_CHARTREUSE -alignment: FL_ALIGN_BOTTOM -style: FL_NORMAL_STYLE -size: FL_NORMAL_SIZE -lcol: FL_BLACK -label: User_2_channels -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: User_2_channels -callback: -argument: - --------------------- -class: FL_XYPLOT -type: IMPULSE_XYPLOT -box: 40 300 490 100 -boxtype: FL_FLAT_BOX -colors: FL_BLACK FL_CYAN -alignment: FL_ALIGN_BOTTOM -style: FL_NORMAL_STYLE -size: FL_NORMAL_SIZE -lcol: FL_BLACK -label: User_3_channels -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: User_3_channels -callback: -argument: - --------------------- -class: FL_XYPLOT -type: IMPULSE_XYPLOT -box: 40 440 490 100 -boxtype: FL_FLAT_BOX -colors: FL_BLACK FL_SLATEBLUE -alignment: FL_ALIGN_BOTTOM -style: FL_NORMAL_STYLE -size: FL_NORMAL_SIZE -lcol: FL_BLACK -label: User_4_channels -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: User_4_channels -callback: -argument: - -============================== -create_the_forms diff --git a/openair3/MESH/RRM/all_freq_to_users_form.h b/openair3/MESH/RRM/all_freq_to_users_form.h deleted file mode 100644 index 8a2def5aa3..0000000000 --- a/openair3/MESH/RRM/all_freq_to_users_form.h +++ /dev/null @@ -1,52 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/** Header file generated with fdesign on Fri Nov 5 18:43:31 2010.**/ - -#ifndef FD_all_freq_to_users_h_ -#define FD_all_freq_to_users_h_ - -/** Callbacks, globals and object handlers **/ - - -/**** Forms and Objects ****/ -typedef struct { - FL_FORM *all_freq_to_users; - void *vdata; - char *cdata; - long ldata; - FL_OBJECT *User_1_channels; - FL_OBJECT *User_2_channels; - FL_OBJECT *User_3_channels; - FL_OBJECT *User_4_channels; -} FD_all_freq_to_users; - -extern FD_all_freq_to_users * create_form_all_freq_to_users(void); - -#endif /* FD_all_freq_to_users_h_ */ diff --git a/openair3/MESH/RRM/ch_init.c b/openair3/MESH/RRM/ch_init.c deleted file mode 100644 index aa16c2da57..0000000000 --- a/openair3/MESH/RRM/ch_init.c +++ /dev/null @@ -1,197 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/*! -******************************************************************************* - -\file ch_init.c - -\brief Fonctions permettant la gestion de la phase d'initialisation du - cluster head. - -\author BURLOT Pascal - -\date 29/08/08 - - -\par Historique: - P.BURLOT 2009-01-20 - + separation de la file de message CMM/RRM a envoyer en 2 files - distinctes ( file_send_cmm_msg, file_send_rrc_msg) - L.IACOBELLI 2009-10-19 - + include - -******************************************************************************* -*/ -#include -#include -#include -#include -#include - -#include -#include - -#include - -#include "debug.h" -#include "L3_rrc_defs.h" -#include "L3_rrc_interface.h" -#include "cmm_rrm_interface.h" -#include "rrm_sock.h" -#include "rrc_rrm_msg.h" -#include "cmm_msg.h" -#include "msg_mngt.h" -#include "pusu_msg.h" -#include "rb_db.h" -#include "neighbor_db.h" -#include "sens_db.h" -#include "channels_db.h" -#include "rrm_util.h" -#include "transact.h" -#include "rrm_constant.h" -#include "rrm.h" -#include "ch_init.h" - - - -//! Met un message dans la file des messages a envoyer -#define PUT_CMM_MSG(m) put_msg( &(rrm->file_send_cmm_msg), 0, rrm->cmm.s,m ) //mod_lor_10_01_25 -#define PUT_PUSU_MSG(m) put_msg( &(rrm->file_send_cmm_msg), 0, rrm->pusu.s,m) //mod_lor_10_01_25 -#define PUT_RRC_MSG(m) put_msg( &(rrm->file_send_rrc_msg), 0, rrm->rrc.s,m ) //mod_lor_10_01_25 - -/*! -******************************************************************************* -\brief Request to initialize the Cluster Head with L3 Information -*/ -void cmm_init_ch_req( - Instance_t inst , //!< Identification de l'instance - L3_INFO_T L3_info_t , //!< Type of L3 Information - void *L3_info //!< L3 addressing Information -) -{ - rrm_t *rrm = &rrm_inst[inst] ; - - if ( rrm->state == CLUSTERHEAD_INIT0 ) { - L2_ID src_dst[2] ; - memcpy(&src_dst[0], &rrm->L2_id, sizeof(L2_ID)) ; - memcpy(&src_dst[1], &rrm->L2_id, sizeof(L2_ID)) ; - - if ( L3_info != NULL ) { - rrm->L3_info_t = L3_info_t ; - - if ( L3_info_t != NONE_L3 ) - memcpy( rrm->L3_info, L3_info, L3_info_t ); - } - - //fprintf(stderr,"L3_ch_init ");//dbg - //print_L3_id( IPv4_ADDR, rrm->L3_info ); - //fprintf(stderr,"\n");//dbg - - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; - rrm->rrc.trans_cnt++ ; - - PUT_RRC_MSG( - msg_rrm_init_ch_req( inst, - rrm->rrc.trans_cnt, - &Lchan_desc[QOS_SRB0], - &Lchan_desc[QOS_SRB1], - rrm->L2_id - ) - ) ; - - // On ne gere pas SRB0/1 car implicite - // add_rb( &(rrm->rrc.pRbEntry), rrm->rrc.trans_cnt, QOS_SRB0, &src_dst[0] ) ; - // add_rb( &(rrm->rrc.pRbEntry), rrm->rrc.trans_cnt, QOS_SRB1, &src_dst[0] ) ; - - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - - pthread_mutex_lock( &( rrm->pusu.exclu ) ) ; - rrm->pusu.trans_cnt++ ; - add_item_transact( &(rrm->pusu.transaction), rrm->pusu.trans_cnt,INT_PUSU,RRM_PUBLISH_IND,0,NO_PARENT); - pthread_mutex_unlock( &( rrm->pusu.exclu ) ) ; - PUT_PUSU_MSG(msg_rrm_publish_ind( inst, PUSU_RRM_SERVICE, rrm->pusu.trans_cnt )) ; - - } -} - -/*! -******************************************************************************* -\brief Mesh router PHY-Synch Indication -*/ -void rrc_phy_synch_to_MR_ind( - Instance_t inst , //!< Identification de l'instance - L2_ID L2_id //!< L2 ID of MR -) -{ - rrm_t *rrm = &rrm_inst[inst] ; - - if ( rrm->state == ISOLATEDNODE ) { - /* Memorisation du L2_id du noeud ( c'est le niveau RRC qui a l'info ) */ - memcpy( &rrm->L2_id, &L2_id, sizeof(L2_ID)); - - //-------------------------------------------- - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; - - if ( rrm->rrc.pNeighborEntry != NULL ) // Reset Neighborhood - del_all_neighbor( &(rrm->rrc.pNeighborEntry) ); - - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - - //mod_lor_10_03_01++ - //if (WSN){ - if (WSN && rrm->id == FC_ID) { - rrm->role = FUSIONCENTER; - fprintf(stderr,"[CRRM] FUSIONCENTER\n"); - } else if (rrm->id == BTS_ID && SCEN_1) { - rrm->role = BTS; - fprintf(stderr,"[CRRM] BTS\n"); - } - //mod_lor_10_04_27++ - else if (rrm->id == FC_ID && SCEN_2_CENTR) { - rrm->role = FUSIONCENTER; - fprintf(stderr,"[CRRM] CH1\n"); - } else if (rrm->id == CH_COLL_ID &&SCEN_2_CENTR) { - rrm->role = CH_COLL; - fprintf(stderr,"[CRRM] CH2\n"); - } else - fprintf(stderr,"Warning!!! No role assigned\n"); - - //mod_lor_10_04_27-- - //mod_lor_10_03_01-- - - PUT_CMM_MSG( msg_router_is_CH_ind( inst,rrm->L2_id)) ; - - rrm->state = CLUSTERHEAD_INIT0 ; - fprintf(stderr,"[CRRM] CLUSTERHEAD_INIT0\n"); - } else - fprintf(stderr,"[CRRM] RRC_PHY_SYNCH_TO_MR_IND/TIMEOUT_IN is not allowed (Only IN):etat=%d\n",rrm->state); -} - - diff --git a/openair3/MESH/RRM/ch_init.h b/openair3/MESH/RRM/ch_init.h deleted file mode 100644 index 95e9095e8c..0000000000 --- a/openair3/MESH/RRM/ch_init.h +++ /dev/null @@ -1,66 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/*! -******************************************************************************* - -\file ch_init.h - -\brief Fichier d'entete contenant les declarations des types, des defines , - et des fonctions relatives a la gestion de la phase d'initialisation - du cluster head. - -\author BURLOT Pascal - -\date 29/08/08 - - -\par Historique: - $Author$ $Date$ $Revision$ - $Id$ - $Log$ - -******************************************************************************* -*/ - -#ifndef CH_INIT_H -#define CH_INIT_H - -#ifdef __cplusplus -extern "C" { -#endif - -// --------------------------------------------------------------------------- - - -#ifdef __cplusplus -} -#endif - -#endif /* CH_INIT_H */ diff --git a/openair3/MESH/RRM/channels_db.c b/openair3/MESH/RRM/channels_db.c deleted file mode 100755 index d8d7ca54d0..0000000000 --- a/openair3/MESH/RRM/channels_db.c +++ /dev/null @@ -1,385 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/*! -******************************************************************************* - -\file channels_db.c - -\brief Fonctions permettant la gestion de la base de donnée sur les canaux - -\author IACOBELLI Lorenzo - -\date 16/10/09 - - -\par Historique: - $Author$ $Date$ $Revision$ - $Id$ - $Log$ - -******************************************************************************* -*/ -#include -#include -#include -#include -#include - -#include -#include - -#include - -#include "debug.h" -#include "L3_rrc_defs.h" -#include "rrm_util.h" -#include "sens_db.h" -#include "channels_db.h" - - -//! Selection locale du mode de debug -#define DBG_CHANNELS_DB 1 - -#if DBG_CHANNELS_DB==0 -//! Macro inactive -#define PRINT_CHANNELS_DB(...) -#else -//! Macro affichant la liste des radio bearers -#define PRINT_CHANNELS_DB(...) print_channels_db( __VA_ARGS__ ) -#endif - -/*! -******************************************************************************* -\brief La fonction affiche a l'ecran la liste (pour du debug) - -\return aucune valeur retournee -*/ -void print_channels_db( - CHANNELS_DB_T *pEntry ///< pointeur sur le debut de liste -) -{ - //unsigned int i; //dbg - CHANNELS_DB_T *pCurrentItem = pEntry; - int i; - - //fprintf(stderr,"channels entry @%p \n", pEntry);//dbg - //fprintf(stderr,"sens list=[\n"); - while ( pCurrentItem != NULL) { - //fprintf(stderr,"curr channel %d is free? %d \n", pCurrentItem->channel.Ch_id,pCurrentItem->is_free);//dbg - - pCurrentItem = pCurrentItem->next ; - } - - fprintf(stderr," ]\n"); -} - - - - - -/*! -******************************************************************************* -\brief Comparaison de deux ID de niveau 2 - -\return si 0 alors les IDs sont identiques -*/ -static int L2_ID_cmp( - L2_ID *L2_id1, ///< ID de niveau 2 - L2_ID *L2_id2 ///< ID de niveau 2 -) -{ - return memcmp( L2_id1, L2_id2, sizeof(L2_ID) ) ; -} - - -/*! -******************************************************************************* -\brief La fonction ajoute un nouveau canal. - -\return retourne la valeur du nouvel element -*/ -CHANNELS_DB_T *add_chann_db( - CHANNELS_DB_T **ch_entry , ///< pointeur sur l'entree de la liste de noeuds - CHANNEL_T channel , ///< channel to insert in the list - unsigned int is_free , ///< Information about the availability of the channel //mod_lor_10_05_28 ->char instead of int - double info_time ///< Date of information update -) -{ - //fprintf(stderr,"starting ch pointer @%p \n", *ch_entry);//dbg - //fprintf(stderr,"\n NB_info=%d \n", NB_info); //dbg - CHANNELS_DB_T *pOldEntry = *ch_entry; - CHANNELS_DB_T *pNewItem = RRM_CALLOC( CHANNELS_DB_T , 1 ) ; - - PNULL(pNewItem) ; - - if ( pNewItem == NULL ) - return NULL ; - - memcpy( &(pNewItem->channel) ,&channel, sizeof(CHANNEL_T) ) ; - pNewItem->info_time = info_time ; - pNewItem->is_free = is_free; - pNewItem->priority = 0; - pNewItem->is_ass = 0; - //fprintf(stderr,"starting ch pointer @%p \n", pNewItem->info_hd);//dbg - - - *ch_entry = pNewItem ; - pNewItem->next = pOldEntry; - /*fprintf(stderr,"add_node\n\n");//dbg - fprintf(stderr,"node entry @%p \n", (*node_entry)->info_hd);//dbg - fprintf(stderr,"node entry @%p \n", pNewItem->info_hd);//dbg - fprintf(stderr,"passed par @%p \n", ch_info_hd);//dbg*/ - - return pNewItem ; -} - -/*! -******************************************************************************* -\brief La fonction detruit entierement les info sur les canaux memorizées à l'adresse indiqué - -\return aucune valeur. -*/ -void del_all_channels( - CHANNELS_DB_T **ch_entry ///< pointeur sur l'entree de la liste -) -{ - CHANNELS_DB_T *pCurrentItem = *ch_entry; - CHANNELS_DB_T *pNextItem ; - - if ( (pCurrentItem == NULL) || (ch_entry==NULL)) - return ; - - while ( pCurrentItem != NULL ) { - pNextItem = pCurrentItem->next ; - RRM_FREE( pCurrentItem ) ; - pCurrentItem = pNextItem ; - } - - *ch_entry = NULL ; -} - -/*! -******************************************************************************* -\brief La fonction retire l'element identifie par le Ch_id de la liste des canaux - -\return aucune valeur. -*/ -void del_channel( - CHANNELS_DB_T **ch_entry , ///< pointeur sur l'entree de la liste de noeuds - unsigned int Ch_id ///< channel ID -) -{ - CHANNELS_DB_T *pCurrentItem = *ch_entry; - CHANNELS_DB_T *pNextItem ; - CHANNELS_DB_T **ppPrevItem = ch_entry ; - - if ( (pCurrentItem == NULL) || (ch_entry==NULL)) - return ; - - while ( pCurrentItem != NULL ) { - pNextItem = pCurrentItem->next ; - - if ( pCurrentItem->channel.Ch_id == Ch_id ) { - *ppPrevItem = pNextItem; - - RRM_FREE( pCurrentItem ) ; - fprintf( stdout,"channel %d deleted from database\n", Ch_id); - - return ; - } - - ppPrevItem = &(pCurrentItem->next) ; - pCurrentItem = pNextItem ; - } - - if ( pCurrentItem == NULL ) - fprintf(stderr, "ERROR: channel_id unknown\n") ; - -} - - - -/*! -******************************************************************************* -\brief La fonction recherche le descripteur du canal identifie par le Ch_id - dans la liste des canaux - -\return pointeur sur le descripteur de canal trouve sinon NULL . -*/ -CHANNELS_DB_T *get_chann_db_info( - CHANNELS_DB_T *ch_entry , ///< pointeur sur l'entree de la liste de noeuds - unsigned int Ch_id ///< channel ID -) -{ - CHANNELS_DB_T *pCurrentItem = ch_entry; - - while ( pCurrentItem != NULL) { - if ( pCurrentItem->channel.Ch_id == Ch_id) - break ; - - pCurrentItem = pCurrentItem->next ; - } - - return pCurrentItem ; -} - -/*! -******************************************************************************* -\brief La fonction ajoute ou update un canal. - -\return retourne la valeur du nouvel element -*/ -CHANNELS_DB_T *up_chann_db( - CHANNELS_DB_T **ch_entry , ///< pointeur sur l'entree de la liste de noeuds - CHANNEL_T channel , ///< channel to insert in the list - unsigned int is_free , ///< Information about the availability of the channel //mod_lor_10_05_28 ->char instead of int - double info_time ///< Date of information update -) -{ - if (ch_entry == NULL) { - fprintf(stderr,"ERROR! invalid database pointer \n"); - return(NULL); - } - - CHANNELS_DB_T *pNewItem = get_chann_db_info( *ch_entry, channel.Ch_id ); - - if ( pNewItem == NULL ) { - pNewItem = add_chann_db( ch_entry, channel, is_free, info_time); - return pNewItem; - } - - pNewItem->info_time = info_time ; - //mod_lor_10_05_17++ - pNewItem->is_free=is_free; - /*if (is_free == pNewItem->is_free) - return pNewItem; - if (!(pNewItem->is_ass)){ - pNewItem->is_free=is_free; - return pNewItem; - }*/ - return pNewItem; - //else - // fprintf(stderr,"Primary User detected on channel %d in use by secondary network\n", channel.Ch_id);//mod_lor_10_05_12 - //mod_lor_10_05_17-- - //PRINT_CHANNELS_DB(*ch_entry); //dbg - return NULL; -} - -/*! -******************************************************************************* -\brief La fonction mis à jour les canaux assignés. - -\return retourne la valeur du nouvel element -*/ -CHANNELS_DB_T *up_chann_ass( - CHANNELS_DB_T *ch_entry , ///< pointeur sur l'entree de la liste de noeuds - unsigned int Ch_id , ///< ID of the channel to update - unsigned int is_ass , ///< Information about the use of the channel by the secondary network - L2_ID source_id , ///< In case of channel assigned: address of the source node that is using it - L2_ID dest_id ///< In case of channel assigned: address of the destination node that is using it -) - -{ - //fprintf(stderr,"up_channels 1 inizio\n");//dbg - CHANNELS_DB_T *pChannels = get_chann_db_info( ch_entry , Ch_id ); - - if (pChannels == NULL) { - fprintf(stderr,"ERROR! Channel %d not in database!\n", Ch_id); - return (NULL); - } - - //fprintf(stderr,"up_channels 2 trovato\n");//dbg - //fprintf(stderr,"up_channels 2b is_free: %d is_ass: %d\n",pChannels->is_free,pChannels->is_ass);//dbg - if (!(pChannels->is_free)) { - fprintf(stderr,"The channel %d is not free!\n", Ch_id); - return (NULL); //mod_lor_10_05_17 - } else if (pChannels->is_ass == is_ass) { - //fprintf(stderr,"up_channels 3 is_ass\n");//dbg - if (is_ass && L2_ID_cmp (&(source_id), &(pChannels->source_id))!=0) - fprintf(stderr,"The channel %d is already assigned \n", Ch_id); - - //fprintf(stderr,"No updating performed for channel %d \n", Ch_id);//dbg - - } else { - pChannels->is_ass = is_ass; - - //fprintf(stderr,"up_channels 4 is_ass\n");//dbg - if (is_ass) { - //fprintf(stderr,"up_channels 5 is_ass\n");//dbg - memcpy( pChannels->source_id.L2_id, source_id.L2_id, sizeof(L2_ID) ) ; - memcpy( pChannels->dest_id.L2_id, dest_id.L2_id, sizeof(L2_ID) ) ; - } - - //fprintf(stdout,"Channel %d assignement updated in %d\n", Ch_id, is_ass);//dbg - } - - //fprintf(stderr,"up_channels 6 END\n");//dbg - return (pChannels); -} - -//mod_lor_10_05_17++ -/*! -******************************************************************************* -\brief The function select a new channel among the free ones. It selects the - first channel marked as free and not assigned in the channels database - and assigns it to the nodes whose L2_ids are passed as imput - -\return the pointer to selected channel entry; NULL if not available channels are found -*/ -CHANNELS_DB_T *select_new_channel( - CHANNELS_DB_T *ch_entry , ///< pointeur sur l'entree de la liste de noeuds - L2_ID source_id , ///< In case of channel assigned: address of the source node that is using it - L2_ID dest_id ///< In case of channel assigned: address of the destination node that is using it -) - -{ - - CHANNELS_DB_T *pChannels = ch_entry; - - while ( pChannels != NULL) { - if ( pChannels->is_free && !(pChannels->is_ass) ) - break ; - - pChannels = pChannels->next ; - } - - - if (pChannels == NULL) { - fprintf(stderr,"*SELECT NEW CHANNEL* -> No free channels available!\n"); - return (NULL); - } else { - pChannels->is_ass = 1; - memcpy( pChannels->source_id.L2_id, source_id.L2_id, sizeof(L2_ID) ) ; - memcpy( pChannels->dest_id.L2_id, dest_id.L2_id, sizeof(L2_ID) ) ; - } - - return (pChannels); -} -//mod_lor_10_05_17-- diff --git a/openair3/MESH/RRM/channels_db.h b/openair3/MESH/RRM/channels_db.h deleted file mode 100755 index 0f80616830..0000000000 --- a/openair3/MESH/RRM/channels_db.h +++ /dev/null @@ -1,73 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/*! -******************************************************************************* - -\file channels_db.h - -\brief Fichier d'entete contenant les declarations des types, des defines , - et des fonctions relatives a la gestion de la base de donnée sur - les canaux. - -\author IACOBELLI Lorenzo - -\date 16/10/09 - - -\par Historique: - $Author$ $Date$ $Revision$ - $Id$ - $Log$ - -******************************************************************************* -*/ -#ifndef CHANNELS_DB_H -#define CHANNELS_DB_H - -#ifdef __cplusplus -extern "C" { -#endif - - - -// --------------------------------------------------------------------------- - -CHANNELS_DB_T *add_chann_db( CHANNELS_DB_T **ch_entry, CHANNEL_T channel, unsigned int is_free, double info_time); //mod_lor_10_05_28 ->char instead of int -void del_channel( CHANNELS_DB_T **ch_entry, unsigned int Ch_id); -void del_all_channels( CHANNELS_DB_T **ch_entry ) ; -CHANNELS_DB_T *get_chann_db_info( CHANNELS_DB_T *ch_entry , unsigned int Ch_id ); -CHANNELS_DB_T *up_chann_db( CHANNELS_DB_T **ch_entry, CHANNEL_T channel, unsigned int is_free, double info_time); //mod_lor_10_05_28 ->char instead of int -CHANNELS_DB_T *up_chann_ass( CHANNELS_DB_T *ch_entry, unsigned int Ch_id, unsigned int is_ass, L2_ID source_id, L2_ID dest_id); -CHANNELS_DB_T *select_new_channel( CHANNELS_DB_T *ch_entry, L2_ID source_id, L2_ID dest_id); //mod_lor_10_05_17 -#ifdef __cplusplus -} -#endif - -#endif /* CHANNELS_DB_H */ diff --git a/openair3/MESH/RRM/cmm_msg.c b/openair3/MESH/RRM/cmm_msg.c deleted file mode 100644 index d317520aae..0000000000 --- a/openair3/MESH/RRM/cmm_msg.c +++ /dev/null @@ -1,793 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/*! -******************************************************************************* - -\file cmm_msg.c - -\brief Fonctions permettant le formattage des donnees pour l'envoi d'un - message sur le socket entre le CMM et le RRM - -\author BURLOT Pascal - -\date 16/07/08 - - -\par Historique: - L.IACOBELLI 2009-10-19 - + new messages - -******************************************************************************* -*/ -#include -#include -#include -#include -#include - -#include -#include - -#include - -#include "L3_rrc_defs.h" -#include "rrm_sock.h" -#include "cmm_rrm_interface.h" -#include "cmm_msg.h" -#include "rrm_util.h" - -#ifdef TRACE -//! Macro creant la chaine a partir du nom de la variable -#define STRINGIZER(x) #x -//! Tableau pour le mode trace faisant la translation entre le numero et le nom du message -const char *Str_msg_cmm_rrm[NB_MSG_CMM_RRM] = { - STRINGIZER(CMM_CX_SETUP_REQ ), - STRINGIZER(RRM_CX_SETUP_CNF ), - STRINGIZER(CMM_CX_MODIFY_REQ ), - STRINGIZER(RRM_CX_MODIFY_CNF ), - STRINGIZER(CMM_CX_RELEASE_REQ ), - STRINGIZER(RRM_CX_RELEASE_CNF ), - STRINGIZER(CMM_CX_RELEASE_ALL_REQ ), - STRINGIZER(RRM_CX_RELEASE_ALL_CNF ), - STRINGIZER(RRCI_ATTACH_REQ ), - STRINGIZER(RRM_ATTACH_IND ), - STRINGIZER(CMM_ATTACH_CNF ), - STRINGIZER(RRM_MR_ATTACH_IND ), - STRINGIZER(ROUTER_IS_CH_IND ), - STRINGIZER(RRCI_CH_SYNCH_IND ), - STRINGIZER(CMM_INIT_MR_REQ ), - STRINGIZER(RRM_MR_SYNCH_IND ), - STRINGIZER(RRM_NO_SYNCH_IND ), - STRINGIZER(CMM_INIT_CH_REQ ), - STRINGIZER(CMM_INIT_SENSING ), - STRINGIZER(CMM_STOP_SENSING ), - STRINGIZER(CMM_ASK_FREQ ), - STRINGIZER(CMM_NEED_TO_TX ), - STRINGIZER(CMM_INIT_COLL_SENSING ),//add_lor_10_11_08 - STRINGIZER(CMM_USER_DISC ),//add_lor_10_11_08 - STRINGIZER(CMM_LINK_DISC )//,//add_lor_10_11_08 - //STRINGIZER(CMM_INIT_TRANS_REQ ), - //STRINGIZER(RRM_INIT_TRANS_CONF ) -}; -#endif - -/*! -******************************************************************************* -\brief This function initialize the message header -\return any return value -*/ -static void init_cmm_msg_head( - msg_head_t *msg_head , //!< message header to initialize - Instance_t inst , //!< identification de l'instance - MSG_CMM_RRM_T msg_type , //!< type of message to initialize - unsigned int size , //!< size of message - Transaction_t Trans_id //!< transaction id associated to this message -) -{ - if ( msg_head != NULL ) { - msg_head->start = START_MSG ; - msg_head->msg_type = 0xFF & msg_type ; - msg_head->inst = inst ; - msg_head->Trans_id = Trans_id ; - msg_head->size = size ; - } -} - -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - cmm_cx_setup_req(). -\return message formate -*/ -msg_t * msg_cmm_cx_setup_req( - Instance_t inst , //!< identification de l'instance - L2_ID Src , //!< L2 source MAC address - L2_ID Dst , //!< L2 destination MAC address - QOS_CLASS_T QoS_class , //!< QOS class index - Transaction_t Trans_id //!< Transaction ID -) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - cmm_cx_setup_req_t *p = RRM_CALLOC(cmm_cx_setup_req_t , 1 ) ; - - if ( p != NULL ) { - init_cmm_msg_head(&(msg->head),inst,CMM_CX_SETUP_REQ, sizeof( cmm_cx_setup_req_t) ,Trans_id); - - memcpy( p->Src.L2_id, Src.L2_id, sizeof(L2_ID) ) ; - memcpy( p->Dst.L2_id, Dst.L2_id, sizeof(L2_ID) ) ; - p->QoS_class = QoS_class; - } - - msg->data = (char *) p ; - } - - return msg ; -} -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - rrm_cx_setup_cnf(). -\return message formate -*/ -msg_t * msg_rrm_cx_setup_cnf( - Instance_t inst , //!< identification de l'instance - RB_ID Rb_id , //!< L2 Rb_id - Transaction_t Trans_id //!< Transaction ID -) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - rrm_cx_setup_cnf_t *p = RRM_CALLOC(rrm_cx_setup_cnf_t , 1 ) ; - - if ( p != NULL ) { - init_cmm_msg_head(&(msg->head),inst,RRM_CX_SETUP_CNF, sizeof( rrm_cx_setup_cnf_t) ,Trans_id); - - p->Rb_id = Rb_id ; - } - - msg->data = (char *) p ; - } - - return msg ; -} -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - cmm_cx_modify_req(). -\return message formate -*/ -msg_t * msg_cmm_cx_modify_req( - Instance_t inst , //!< identification de l'instance - RB_ID Rb_id , //!< L2 Rb_id - QOS_CLASS_T QoS_class , //!< QOS class index - Transaction_t Trans_id //!< Transaction ID -) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - cmm_cx_modify_req_t *p = RRM_CALLOC(cmm_cx_modify_req_t, 1 ) ; - - if ( p != NULL ) { - init_cmm_msg_head(&(msg->head),inst,CMM_CX_MODIFY_REQ, sizeof( cmm_cx_modify_req_t ) ,Trans_id); - p->Rb_id = Rb_id ; - p->QoS_class = QoS_class ; - } - - msg->data = (char *) p ; - } - - return msg ; -} -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - rrm_cx_modify_cnf(). -\return message formate -*/ -msg_t * msg_rrm_cx_modify_cnf( - Instance_t inst , //!< identification de l'instance - Transaction_t Trans_id //!< Transaction ID -) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - init_cmm_msg_head(&(msg->head),inst,RRM_CX_MODIFY_CNF, 0 ,Trans_id); - msg->data = NULL ; - } - - return msg ; -} -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - cmm_cx_release_req(). -\return message formate -*/ -msg_t * msg_cmm_cx_release_req( - Instance_t inst , //!< identification de l'instance - RB_ID Rb_id , //!< L2 Rb_id - Transaction_t Trans_id //!< Transaction ID -) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - cmm_cx_release_req_t *p = RRM_CALLOC(cmm_cx_release_req_t , 1) ; - - if ( p != NULL ) { - init_cmm_msg_head(&(msg->head),inst,CMM_CX_RELEASE_REQ, sizeof( cmm_cx_release_req_t ) ,Trans_id); - p->Rb_id = Rb_id ; - } - - msg->data = (char *) p ; - } - - return msg ; -} -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - rrm_cx_release_cnf(). -\return message formate -*/ -msg_t * msg_rrm_cx_release_cnf( - Instance_t inst , //!< identification de l'instance - Transaction_t Trans_id //!< Transaction ID -) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - init_cmm_msg_head(&(msg->head),inst,RRM_CX_RELEASE_CNF, 0 ,Trans_id); - msg->data = NULL ; - } - - return msg ; -} -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - cmm_cx_release_all_req(). -\return message formate -*/ -msg_t * msg_cmm_cx_release_all_req( - Instance_t inst , //!< identification de l'instance - L2_ID L2_id , //!< L2 Rb_id - Transaction_t Trans_id //!< Transaction ID -) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - cmm_cx_release_all_req_t *p = RRM_CALLOC(cmm_cx_release_all_req_t , 1 ) ; - - if ( p != NULL ) { - init_cmm_msg_head(&(msg->head),inst,CMM_CX_RELEASE_ALL_REQ, sizeof( cmm_cx_release_all_req_t) ,Trans_id); - memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ; - } - - msg->data = (char *) p ; - } - - return msg ; -} -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - rrm_cx_release_all_cnf(). -\return message formate -*/ -msg_t * msg_rrm_cx_release_all_cnf( - Instance_t inst , //!< identification de l'instance - Transaction_t Trans_id //!< Transaction ID -) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - init_cmm_msg_head(&(msg->head),inst,RRM_CX_RELEASE_ALL_CNF, 0 ,Trans_id); - msg->data = NULL ; - } - - return msg ; -} -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - rrci_attach_req(). -\return message formate -*/ -msg_t * msg_rrci_attach_req( - Instance_t inst , //!< identification de l'instance - L2_ID L2_id , //!< Layer 2 (MAC) ID - L3_INFO_T L3_info_t , //!< Type of L3 Information - unsigned char *L3_info , //!< L3 addressing Information - RB_ID DTCH_B_id , //!< RBID of broadcast IP service (MR only) - RB_ID DTCH_id , //!< RBID of default IP service (MR only) - Transaction_t Trans_id //!< Transaction ID -) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - rrci_attach_req_t *p = RRM_CALLOC(rrci_attach_req_t , 1 ) ; - - if ( p != NULL ) { - init_cmm_msg_head(&(msg->head),inst,RRCI_ATTACH_REQ, sizeof( rrci_attach_req_t) ,Trans_id); - - memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ; - p->L3_info_t = L3_info_t ; - - if ( L3_info_t != NONE_L3 ) - memcpy( p->L3_info, L3_info, L3_info_t ); - - p->DTCH_B_id = DTCH_B_id ; - p->DTCH_id = DTCH_id ; - } - - msg->data = (char *) p ; - } - - return msg ; -} -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - rrm_attach_ind(). -\return message formate -*/ -msg_t * msg_rrm_attach_ind( - Instance_t inst , //!< identification de l'instance - L2_ID L2_id , //!< Layer 2 (MAC) ID - L3_INFO_T L3_info_t , //!< Type of L3 Information - unsigned char *L3_info , //!< L3 addressing Information - RB_ID DTCH_id //!< RBID of default IP service (MR only) -) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - rrm_attach_ind_t *p = RRM_CALLOC(rrm_attach_ind_t , 1) ; - - if ( p != NULL ) { - init_cmm_msg_head(&(msg->head),inst,RRM_ATTACH_IND, sizeof( rrm_attach_ind_t) ,0); - - memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ; - p->L3_info_t = L3_info_t ; - - if ( L3_info_t != NONE_L3 ) - memcpy( p->L3_info, L3_info, L3_info_t ); - - p->DTCH_id = DTCH_id ; - } - - msg->data = (char *) p ; - } - - return msg ; -} -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - cmm_attach_cnf(). -\return message formate -*/ -msg_t * msg_cmm_attach_cnf( - Instance_t inst , //!< identification de l'instance - L2_ID L2_id , //!< Layer 2 (MAC) ID - L3_INFO_T L3_info_t , //!< Type of L3 Information - unsigned char *L3_info , //!< L3 addressing Information - Transaction_t Trans_id //!< Transaction ID -) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - cmm_attach_cnf_t *p = RRM_CALLOC(cmm_attach_cnf_t, 1 ) ; - - if ( p != NULL ) { - init_cmm_msg_head(&(msg->head),inst,CMM_ATTACH_CNF, sizeof( cmm_attach_cnf_t) ,Trans_id); - - p->L3_info_t = L3_info_t ; - - if ( L3_info_t != NONE_L3 ) - memcpy( p->L3_info, L3_info, L3_info_t ); - - memcpy( &p->L2_id, &L2_id, sizeof(L2_ID) ); - } - - msg->data = (char *) p ; - } - - return msg ; -} -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - rrm_MR_attach_ind(). -\return message formate -*/ -msg_t * msg_rrm_MR_attach_ind( - Instance_t inst , //!< identification de l'instance - L2_ID L2_id //!< MR Layer 2 (MAC) ID -) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - rrm_MR_attach_ind_t *p = RRM_CALLOC( rrm_MR_attach_ind_t , 1 ) ; - - if ( p != NULL ) { - init_cmm_msg_head(&(msg->head),inst,RRM_MR_ATTACH_IND, sizeof( rrm_MR_attach_ind_t) ,0); - memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ; - } - - msg->data = (char *) p ; - } - - return msg ; -} -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - router_is_CH_ind(). -\return message formate -*/ -msg_t * msg_router_is_CH_ind( - Instance_t inst , //!< identification de l'instance - L2_ID L2_id //!< CH Layer 2 (MAC) ID -) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - router_is_CH_ind_t *p = RRM_CALLOC(router_is_CH_ind_t , 1 ) ; - - if ( p != NULL ) { - init_cmm_msg_head(&(msg->head),inst,ROUTER_IS_CH_IND, sizeof( router_is_CH_ind_t) ,0); - memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ; - } - - msg->data = (char *) p ; - } - - return msg ; -} -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - rrci_CH_synch_ind(). -\return message formate -*/ -msg_t * msg_rrci_CH_synch_ind( - Instance_t inst //!< identification de l'instance -) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - init_cmm_msg_head(&(msg->head),inst,RRCI_CH_SYNCH_IND, 0 ,0); - msg->data = NULL ; - } - - return msg ; -} -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - cmm_init_mr_req(). -\return message formate -*/ -msg_t * msg_cmm_init_mr_req( - Instance_t inst //!< identification de l'instance -) -{ - msg_t *msg = RRM_CALLOC( msg_t , 1 ) ; - - if ( msg != NULL ) { - init_cmm_msg_head(&(msg->head),inst,RRCI_CH_SYNCH_IND, 0 ,0); - - msg->data = NULL ; - } - - return msg ; -} -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - rrm_MR_synch_ind(). -\return message formate -*/ -msg_t * msg_rrm_MR_synch_ind( - Instance_t inst //!< identification de l'instance -) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - init_cmm_msg_head(&(msg->head),inst, RRM_MR_SYNCH_IND, 0 ,0); - msg->data = NULL ; - } - - return msg ; -} -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - rm_no_synch_ind(). -\return message formate -*/ -msg_t * msg_rrm_no_synch_ind( - Instance_t inst //!< identification de l'instance -) -{ - msg_t *msg = RRM_CALLOC(msg_t ,1 ) ; - - if ( msg != NULL ) { - init_cmm_msg_head(&(msg->head),inst,RRM_NO_SYNCH_IND, 0 ,0); - msg->data = NULL ; - } - - return msg ; -} -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - cmm_init_ch_req. -\return message formate -*/ -msg_t * msg_cmm_init_ch_req( - Instance_t inst , //!< identification de l'instance - L3_INFO_T L3_info_t , //!< Type of L3 Information - void *L3_info //!< L3 addressing Information -) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - cmm_init_ch_req_t *p = RRM_CALLOC(cmm_init_ch_req_t , 1 ) ; - - if ( p != NULL ) { - init_cmm_msg_head(&(msg->head),inst, CMM_INIT_CH_REQ, sizeof( cmm_init_ch_req_t) ,0); - - p->L3_info_t = L3_info_t ; - - if ( L3_info_t != NONE_L3 ) - memcpy( p->L3_info, L3_info, L3_info_t ); - } - - msg->data = (char *) p ; - } - - return msg ; -} - -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - cmm_init_sensing. -\return message formate -*/ -msg_t *msg_cmm_init_sensing( //mod_lor_10_03_12: change of parameters - Instance_t inst, //!< identification de l'instance - unsigned int Start_fr, - unsigned int Stop_fr, - unsigned int Meas_band, - unsigned int Meas_tpf, - unsigned int Nb_channels, - unsigned int Overlap, - unsigned int Sampl_freq -) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - cmm_init_sensing_t *p = RRM_CALLOC(cmm_init_sensing_t , 1 ) ; - - if ( p != NULL ) { - init_cmm_msg_head(&(msg->head),inst, CMM_INIT_SENSING, sizeof( cmm_init_sensing_t) ,0); - //mod_lor_10_03_12++ - p->Start_fr = Start_fr; - p->Stop_fr = Stop_fr; - p->Meas_band = Meas_band; - p->Meas_tpf = Meas_tpf; - p->Nb_channels = Nb_channels; - p->Overlap = Overlap; - p->Sampl_freq = Sampl_freq; - //mod_lor_10_03_12-- - } - - msg->data = (char *) p ; - } - - return msg ; -} - - -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - cmm_stop_sensing. -\return message formate -*/ -msg_t *msg_cmm_stop_sensing( - Instance_t inst //!< identification de l'instance -) -{ - msg_t *msg = RRM_CALLOC(msg_t ,1 ) ; - - if ( msg != NULL ) { - init_cmm_msg_head(&(msg->head),inst,CMM_STOP_SENSING, 0 ,0); - msg->data = NULL ; - } - - return msg ; -} - -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - cmm_ask_freq. -\return message formate -*/ -msg_t *msg_cmm_ask_freq( - Instance_t inst //!< identification de l'instance -) -{ - msg_t *msg = RRM_CALLOC(msg_t ,1 ) ; - - if ( msg != NULL ) { - init_cmm_msg_head(&(msg->head),inst,CMM_ASK_FREQ, 0 ,0); - msg->data = NULL ; - } - - return msg ; -} - -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - cmm_need_to_tx. //add: mod_lor_10_10_28 -\return message formate -*/ -msg_t *msg_cmm_need_to_tx( - Instance_t inst ,//!< identification de l'instance du noeud qui veut transmettre - Instance_t dest ,//!< identification de l'instance du noeud destinataire - QOS_CLASS_T QoS_class //!< Required quality of service (i.e. number of channels) -) -{ - msg_t *msg = RRM_CALLOC(msg_t ,1 ) ; - - if ( msg != NULL ) { - cmm_need_to_tx_t *p = RRM_CALLOC(cmm_need_to_tx_t , 1 ) ; - - if ( p != NULL ) { - init_cmm_msg_head(&(msg->head),inst, CMM_NEED_TO_TX, sizeof( cmm_need_to_tx_t) ,0); - p->dest = dest; - p->QoS_class = QoS_class; - } - - msg->data = (char *) p ; - } - - return msg ; -} - -/*! //add_lor_10_11_08 -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - cmm_init_coll_sensing. -\return message formate -*/ -msg_t *msg_cmm_init_coll_sensing( - Instance_t inst, //!< identification de l'instance - unsigned int Start_fr, - unsigned int Stop_fr, - unsigned int Meas_band, - unsigned int Meas_tpf, - unsigned int Nb_channels, - unsigned int Overlap, - unsigned int Sampl_freq -) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - cmm_init_coll_sensing_t *p = RRM_CALLOC(cmm_init_coll_sensing_t , 1 ) ; - - if ( p != NULL ) { - init_cmm_msg_head(&(msg->head),inst, CMM_INIT_COLL_SENSING, sizeof( cmm_init_coll_sensing_t) ,0); - p->Start_fr = Start_fr; - p->Stop_fr = Stop_fr; - p->Meas_band = Meas_band; - p->Meas_tpf = Meas_tpf; - p->Nb_channels = Nb_channels; - p->Overlap = Overlap; - p->Sampl_freq = Sampl_freq; - } - - msg->data = (char *) p ; - } - - return msg ; -} - -/*!//add_lor_10_11_09 -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - cmm_user_disc. msg received by a secondary user that wants to disconnect -\return message formate -*/ -msg_t *msg_cmm_user_disc( - Instance_t inst //!< identification de l'instance -) -{ - msg_t *msg = RRM_CALLOC(msg_t ,1 ) ; - - if ( msg != NULL ) { - init_cmm_msg_head(&(msg->head),inst,CMM_USER_DISC, 0 ,0); - msg->data = NULL ; - } - - return msg ; -} - -/*!//add_lor_10_11_09 -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - cmm_linkr_disc. msg received by a secondary user that wants to stop a link -\return message formate -*/ -msg_t *msg_cmm_link_disc( - Instance_t inst ,//!< identification de l'instance - Instance_t dest //!< identification du destinataire -) -{ - msg_t *msg = RRM_CALLOC(msg_t ,1 ) ; - - if ( msg != NULL ) { - cmm_link_disk_t *p = RRM_CALLOC(cmm_link_disk_t , 1 ) ; - - if ( p != NULL ) { - init_cmm_msg_head(&(msg->head),inst, CMM_LINK_DISC, sizeof( cmm_link_disk_t) ,0); - p->dest = dest; - } - - msg->data = (char *) p ; - - } - - return msg ; -} diff --git a/openair3/MESH/RRM/cmm_msg.h b/openair3/MESH/RRM/cmm_msg.h deleted file mode 100644 index 5adc2ffee7..0000000000 --- a/openair3/MESH/RRM/cmm_msg.h +++ /dev/null @@ -1,297 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ -/*! -******************************************************************************* - -\file cmm_msg.h - -\brief Fichier d'entete contenant les declarations des types, des defines , - et des fonctions relatives aux messages CMM-RRM ou CMM-RRCI. - - Les fonctions servent à créer le buffer de message, remplir l'entete - et copier les parametres de fonction. Chaque fonction retourne le - message qui pourra être envoye sur le socket entre le CMM et le - RRM ou RRCI . - -\author BURLOT Pascal - -\date 16/07/08 - - -\par Historique: - $Author$ $Date$ $Revision$ - $Id$ - $Log$ - -******************************************************************************* -*/ - -#ifndef CMM_MSG_H -#define CMM_MSG_H - -#ifdef __cplusplus -extern "C" { -#endif - -/*! -******************************************************************************* -\brief Enumeration des messages entre le RRM/RRCI et le CMM -*/ -typedef enum { - CMM_CX_SETUP_REQ = 0 , ///< Message CMM->RRM : requete de configuration d'une connexion - RRM_CX_SETUP_CNF , ///< Message RRM->CMM : confirmation de configuration d'une connexion - CMM_CX_MODIFY_REQ , ///< Message CMM->RRM : requete de modification d'une connexion - RRM_CX_MODIFY_CNF , ///< Message RRM->CMM : confirmation de modification d'une connexion - CMM_CX_RELEASE_REQ , ///< Message CMM->RRM : requete de liberation d'une connexion - RRM_CX_RELEASE_CNF , ///< Message RRM->CMM : confirmation de liberation d'une connexion - CMM_CX_RELEASE_ALL_REQ , ///< Message CMM->RRM : requete de liberation de toutes les connexions - RRM_CX_RELEASE_ALL_CNF , ///< Message RRM->CMM : confirmation de liberation de toutes les connexions - RRCI_ATTACH_REQ , ///< Message RRCI->CMM : requete de d'attachement d'un MR - RRM_ATTACH_IND , ///< Message RRM->CMM : indicateur d'attachement d'un MR - CMM_ATTACH_CNF , ///< Message CMM->RRM : confirmation d'attachement d'un MR - RRM_MR_ATTACH_IND , ///< Message RRM->CMM : indicateur d'attachement d'un MR - ROUTER_IS_CH_IND , ///< Message RRM->CMM : indicateur que le noeud est un cluster head - RRCI_CH_SYNCH_IND , ///< Message RRCI->CMM : indicateur que le noeud est synchronise sur un CH - CMM_INIT_MR_REQ , ///< Message CMM->RRM : requete d'initialisation de l'attachement d'un MR - RRM_MR_SYNCH_IND , ///< Message RRM->CMM : indicateur que le noeud est synchronise sur un MR - RRM_NO_SYNCH_IND , ///< Message RRM->CMM : indicateur que le noeud n'est pas synchronise sur un CH ou MR - CMM_INIT_CH_REQ , ///< Message CMM->RRM : requete d'initialisation d'un CH - CMM_INIT_SENSING , ///< Message CMM->RRM : requete d'initialisation du sensing - CMM_STOP_SENSING , ///< Message CMM->RRM : requete de stop du sensing - CMM_ASK_FREQ , ///< Message CMM->RRM : in BTS, message to start an open freq. query - CMM_NEED_TO_TX , ///< Message CMM->RRM : in SU, second scenario centr, message to start an open freq. query - CMM_INIT_COLL_SENSING , ///< Message CMM->RRM : requete d'initialisation du sensing collaborative //add_lor_10_11_08 - CMM_USER_DISC , ///< Message CMM->RRM : user disconnected -> delete all active com //add_lor_10_11_08 - CMM_LINK_DISC , ///< Message CMM->RRM : stop comm -> delete an active link //add_lor_10_11_08 - //CMM_INIT_TRANS_REQ , ///< Message CMM->RRM : in SU, second scenario distr, message to start a connection with another SU - //RRM_INIT_TRANS_CONF , ///< Message RRM->CMM : confirmation de l'ouverture de la transition - NB_MSG_CMM_RRM ///< Nombre de message de l'interface -} -MSG_CMM_RRM_T ; - - -/*! -******************************************************************************* -\brief Definition des parametres de la fonction cmm_cx_setup_req() dans - une structure permettant le passage des parametres via un socket -*/ -typedef struct { - L2_ID Src ; //!< L2 source MAC address - L2_ID Dst ; //!< L2 destination MAC address - QOS_CLASS_T QoS_class ; //!< QOS class index -} cmm_cx_setup_req_t ; - -/*! -******************************************************************************* -\brief Definition des parametres des fonctions rrm_cx_setup_cnf() et cmm_cx_release_req() - dans une structure permettant le passage des parametres via un socket -*/ -typedef struct { - RB_ID Rb_id ; //!< L2 Rb_id -} rrm_cx_setup_cnf_t , -cmm_cx_release_req_t ; - -/*! -******************************************************************************* -\brief Definition des parametres de la fonction cmm_cx_modify_req() - dans une structure permettant le passage des parametres via un socket -*/ -typedef struct { - RB_ID Rb_id ; //!< L2 Rb_id - QOS_CLASS_T QoS_class ; //!< QOS class index -} cmm_cx_modify_req_t; - -/*! -******************************************************************************* -\brief Definition des parametres de la fonction cmm_cx_release_all_req() - dans une structure permettant le passage des parametres via un socket -*/ -typedef struct { - L2_ID L2_id ; //!< L2 Rb_id -} cmm_cx_release_all_req_t; - -/*! -******************************************************************************* -\brief Definition des parametres de la fonction rrci_attach_req() - dans une structure permettant le passage des parametres via un socket -*/ -typedef struct { - L2_ID L2_id ; //!< Layer 2 (MAC) ID - L3_INFO_T L3_info_t ; //!< Type of L3 Information - unsigned char L3_info[MAX_L3_INFO] ; //!< L3 addressing Information - RB_ID DTCH_B_id ; //!< RBID of broadcast IP service (MR only) - RB_ID DTCH_id ; //!< RBID of default IP service (MR only) -} rrci_attach_req_t ; - -/*! -******************************************************************************* -\brief Definition des parametres de la fonction rrm_attach_ind() - dans une structure permettant le passage des parametres via un socket -*/ -typedef struct { - L2_ID L2_id ; //!< Layer 2 (MAC) ID - L3_INFO_T L3_info_t ; //!< Type of L3 Information - unsigned char L3_info[MAX_L3_INFO] ; //!< L3 addressing Information - RB_ID DTCH_id ; //!< RBID of default IP service (MR only) -} rrm_attach_ind_t; - -/*! -******************************************************************************* -\brief Definition des parametres des fonctions rrm_MR_attach_ind() et router_is_CH_ind() - dans une structure permettant le passage des parametres via un socket -*/ -typedef struct { - L2_ID L2_id ; //!< MR Layer 2 (MAC) ID -} rrm_MR_attach_ind_t , -router_is_CH_ind_t ; - -/*! -******************************************************************************* -\brief Definition des parametres de la fonction cmm_init_ch_req() - dans une structure permettant le passage des parametres via un socket -*/ -typedef struct { - L3_INFO_T L3_info_t ; //!< Type of L3 Information - unsigned char L3_info[MAX_L3_INFO] ; //!< L3 addressing Information -} cmm_init_ch_req_t ; - -/*! -******************************************************************************* -\brief Definition des parametres de la fonction cmm_attach_cnf() - dans une structure permettant le passage des parametres via un socket -*/ -typedef struct { - L2_ID L2_id; - L3_INFO_T L3_info_t ; //!< Type of L3 Information - unsigned char L3_info[MAX_L3_INFO] ; //!< L3 addressing Information -} cmm_attach_cnf_t ; - -/*! -******************************************************************************* -\brief Definition des parametres de la fonction cmm_attach_cnf() - dans une structure permettant le passage des parametres via un socket -*/ -//mod_lor_10_03_12++ -typedef struct { - unsigned int Start_fr; - unsigned int Stop_fr; - unsigned int Meas_band; - unsigned int Meas_tpf; - unsigned int Nb_channels; - unsigned int Overlap; - unsigned int Sampl_freq; -} cmm_init_sensing_t, cmm_init_coll_sensing_t ; -//mod_lor_10_03_12++ - -/*!//add_lor_10_11_03 -******************************************************************************* -\brief Definition des parametres de la fonction cmm_cx_setup_req() dans - une structure permettant le passage des parametres via un socket -*/ -typedef struct { - Instance_t dest ; //!< Destination of the message - QOS_CLASS_T QoS_class ; //!< QOS class index -} cmm_need_to_tx_t ; - -/*! -******************************************************************************* -\brief Definition des parametres de la fonction cmm_init_trans_req() - dans une structure permettant le passage des parametres via un socket -*/ -typedef struct { - L2_ID L2_id ; //!< Layer 2 (MAC) ID of SU2 - unsigned int Session_id ; //!< Session id - QOS_CLASS_T QoS_class ; //!< QOS class index -} cmm_init_trans_req_t ; - -/*! -******************************************************************************* -\brief Definition des parametres de la fonction rrm_init_trans_conf() - dans une structure permettant le passage des parametres via un socket -*/ -typedef struct { - unsigned int Session_id ; //!< Session id - CHANNEL_T all_channel ; //!< QOS class index -} rrm_init_trans_conf_t ; - -/*!//add_lor_10_11_09 -******************************************************************************* -\brief Definition des parametres de la fonction cmm_cx_setup_req() dans - une structure permettant le passage des parametres via un socket -*/ -typedef struct { - Instance_t dest ; //!< Destination of the message -} cmm_link_disk_t ; - - - - -#ifdef TRACE -extern const char *Str_msg_cmm_rrm[NB_MSG_CMM_RRM] ; -#endif - -/* Rappel : les paramètres sont identiques aux fonctions - * (sans le prefixe msg_ ) du fichier: cmm_rrm_interface.h - */ -msg_t *msg_cmm_cx_setup_req( Instance_t inst, L2_ID Src, L2_ID Dst, QOS_CLASS_T QoS_class, Transaction_t Trans_id ); -msg_t *msg_rrm_cx_setup_cnf( Instance_t inst, RB_ID Rb_id, Transaction_t Trans_id ); -msg_t *msg_cmm_cx_modify_req( Instance_t inst, RB_ID Rb_id , QOS_CLASS_T QoS_class, Transaction_t Trans_id ); -msg_t *msg_rrm_cx_modify_cnf( Instance_t inst, Transaction_t Trans_id ); -msg_t *msg_cmm_cx_release_req( Instance_t inst, RB_ID Rb_id , Transaction_t Trans_id ); -msg_t *msg_rrm_cx_release_cnf( Instance_t inst, Transaction_t Trans_id ); -msg_t *msg_cmm_cx_release_all_req( Instance_t inst, L2_ID L2_id , Transaction_t Trans_id ); -msg_t *msg_rrm_cx_release_all_cnf( Instance_t inst, Transaction_t Trans_id ); -msg_t *msg_rrci_attach_req( Instance_t inst, L2_ID L2_id, L3_INFO_T L3_info_t, unsigned char *L3_info, - RB_ID DTCH_B_id, RB_ID DTCH_id, Transaction_t Trans_id ); -msg_t *msg_rrm_attach_ind( Instance_t inst, L2_ID L2_id, L3_INFO_T L3_info_t, unsigned char *L3_info, RB_ID DTCH_id ); -msg_t *msg_cmm_attach_cnf( Instance_t inst, L2_ID L2_id, L3_INFO_T L3_info_t, unsigned char *L3_info,Transaction_t Trans_id ); -msg_t *msg_rrm_MR_attach_ind( Instance_t inst, L2_ID L2_id ); -msg_t *msg_router_is_CH_ind( Instance_t inst, L2_ID L2_id ); -msg_t *msg_rrci_CH_synch_ind( Instance_t inst); -msg_t *msg_cmm_init_mr_req( Instance_t inst); -msg_t *msg_rrm_MR_synch_ind(Instance_t inst); -msg_t *msg_rrm_no_synch_ind( Instance_t inst); -msg_t *msg_cmm_init_ch_req( Instance_t inst, L3_INFO_T L3_info_t, void *L3_info ); -msg_t *msg_cmm_init_sensing( Instance_t inst, unsigned int Start_fr, unsigned int Stop_fr,unsigned int Meas_band, - unsigned int Meas_tpf, unsigned int Nb_channels,unsigned int Overlap, unsigned int Sampl_freq ); //mod_lor_10_03_12 -msg_t *msg_cmm_stop_sensing( Instance_t inst); -msg_t *msg_cmm_ask_freq( Instance_t inst); -msg_t *msg_cmm_need_to_tx( Instance_t inst, Instance_t dest,QOS_CLASS_T QoS_class); -msg_t *msg_cmm_init_trans_req( Instance_t inst, L2_ID L2_id , unsigned int Session_id, QOS_CLASS_T QoS_class, Transaction_t Trans_id ); -msg_t *msg_rrm_init_trans_conf( Instance_t inst, unsigned int Session_id, CHANNEL_T all_channel, Transaction_t Trans_id ); -msg_t *msg_cmm_ask_freq( Instance_t inst); -msg_t *msg_cmm_init_sensing( Instance_t inst, unsigned int Start_fr, unsigned int Stop_fr,unsigned int Meas_band, - unsigned int Meas_tpf, unsigned int Nb_channels,unsigned int Overlap, unsigned int Sampl_freq ); //add_lor_10_11_08 -msg_t *msg_cmm_user_disc( Instance_t inst); //add_lor_10_11_08 -msg_t *msg_cmm_link_disc( Instance_t inst, Instance_t dest); //add_lor_10_11_09 -#ifdef __cplusplus -} -#endif - -#endif /* CMM_MSG_H */ diff --git a/openair3/MESH/RRM/debug.h b/openair3/MESH/RRM/debug.h deleted file mode 100644 index b895c090f9..0000000000 --- a/openair3/MESH/RRM/debug.h +++ /dev/null @@ -1,136 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/*! -******************************************************************************* - -\file debug.h - -\brief Fichier d'entete contenant les declarations des types, des defines , - et des fonctions relatives au debug . - -\author BURLOT Pascal - -\date 29/08/08 - - -\par Historique: - $Author$ $Date$ $Revision$ - $Id$ - $Log$ - -******************************************************************************* -*/ -/* - * - * Si le flag DEBUG est defini, la macro ASSERT() ne fait rien et la - * macro CALL() se contente d'appeler la fonction sans tester le code d'erreur. - */ - -#ifdef DEBUG - -#include -#include -#include -#include - -///< Check si le retour de fonction est egale à -1 alors abort() -#define CALL(f) \ - \ - if (((int)(f)) == -1) \ - { \ - int err = errno; \ - char *strerr = strerror(err); \ - \ - fprintf(stderr, \ - "CALL(%s): Error at line %u, file %s: %s (errno=%d)\n", \ - #f, __LINE__, __FILE__, \ - strerr == NULL ? "Bad error number" : strerr, \ - err); \ - abort(); \ - } - -///< Check si le pointeur est NULL alors abort() -#define PNULL(pp) \ - \ - if ( (pp) == NULL) \ - { \ - fprintf(stderr, \ - "PNULL(%s): Error at line %u, file %s: null pointer \n",\ - #pp, __LINE__, __FILE__ ); \ - abort(); \ - } - -#define FOPEN(pp,arg) \ - pp=fopen arg ; \ - if ( (pp) == NULL) \ - { \ - int err = errno; \ - char *strerr = strerror(err); \ - \ - fprintf(stderr, \ - "%s=fopen%s: \n\tError at line %u, file %s: %s (errno=%d)\n",\ - #pp, #arg, __LINE__, __FILE__ , \ - strerr == NULL ? "Bad error number" : strerr, \ - err); \ - abort(); \ - } - -#define DBG_FPRINT(msg) fprintf msg -#define DBG_PRINT(msg) printf msg - -#define ASSERT(cc) \ - \ - if (!(cc)) \ - { \ - fprintf(stderr, \ - "ASSERT(%s): at line %u, file %s\n", \ - #cc, __LINE__, __FILE__); \ - abort(); \ - } - -#define WARNING(cc) \ - \ - if ((cc)) \ - { \ - fprintf(stderr, \ - "WARNING(%s): at line %u, file %s\n", \ - #cc, __LINE__, __FILE__); \ - } -#else - -#define CALL(f) (f) -#define ASSERT(cc) -#define WARNING(cc) -#define PNULL(pp) -#define DBG_FPRINT(msg) -#define DBG_PRINT(msg) -#define FOPEN(pp,arg) pp=fopen arg - -#endif diff --git a/openair3/MESH/RRM/freq_ass_op.c b/openair3/MESH/RRM/freq_ass_op.c deleted file mode 100755 index 0dc9087301..0000000000 --- a/openair3/MESH/RRM/freq_ass_op.c +++ /dev/null @@ -1,969 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/*! -******************************************************************************* - -\file freq_ass_op.c - -\brief Fonctions permettant la gestion des frequences - -\author IACOBELLI Lorenzo - -\date 21/10/09 - - -\par Historique: - $Author$ $Date$ $Revision$ - $Id$ - $Log$ - - -******************************************************************************* -*/ -#include -#include -#include -#include -#include - -#include -#include - -#include - -#include "debug.h" -#include "L3_rrc_defs.h" -#include "L3_rrc_interface.h" -#include "cmm_rrm_interface.h" -#include "rrm_sock.h" -#include "rrc_rrm_msg.h" -#include "sensing_rrm_msg.h" -#include "ip_msg.h" //mod_lor_10_04_27 -#include "cmm_msg.h" -#include "msg_mngt.h" -#include "pusu_msg.h" -#include "rb_db.h" -#include "neighbor_db.h" -#include "sens_db.h" -#include "channels_db.h" -#include "rrm_util.h" -#include "transact.h" -#include "rrm_constant.h" -#include "rrm.h" -#include "freq_ass_op.h" - - - - -//! Met un message dans la file des messages a envoyer -#define PUT_CMM_MSG(m) put_msg( &(rrm->file_send_cmm_msg), 0, rrm->cmm.s,m ) //mod_lor_10_01_25 -#define PUT_PUSU_MSG(m) put_msg( &(rrm->file_send_cmm_msg), 0, rrm->pusu.s,m) //mod_lor_10_01_25 -#define PUT_RRC_MSG(m) put_msg( &(rrm->file_send_rrc_msg), 0, rrm->rrc.s,m ) //mod_lor_10_01_25 -#define PUT_IP_MSG(m) put_msg( &(rrm->file_send_ip_msg) , 1, rrm->ip.s,m ) //mod_lor_10_01_25 - - -/*! -******************************************************************************* -\brief Comparaison de deux ID de niveau 2 - -\return si 0 alors les IDs sont identiques -*/ -static int L2_ID_cmp( - L2_ID *L2_id1, ///< ID de niveau 2 - L2_ID *L2_id2 ///< ID de niveau 2 -) -{ - return memcmp( L2_id1, L2_id2, sizeof(L2_ID) ) ; -} -//mod_lor_10_03_19++ -/*! -******************************************************************************* -\brief Function that decides if a channel is free: - applyed rule: strict majority -\return 1 if channel is free, 0 otherwise -*/ -//mod_eure_lor -void take_decision( - Sens_node_t *SensDB , //!< pointer to the sensing database - unsigned int Ch_id , //!< channel ID - unsigned int *is_free //mod_lor_10_05_28 ->char instead of int - -) -{ - Sens_node_t *pSensNode = SensDB; - Sens_ch_t *pSensChann; - //char is_free = 0; - int i; - - while (pSensNode!= NULL) { - if((pSensChann = get_chann_info( pSensNode->info_hd , Ch_id)) != NULL) { - for (i = 0; iis_free[i]==1) - is_free[i]++; - else if (pSensChann->is_free[i]==0) - is_free[i]--; - } - } - - pSensNode = pSensNode->next; - } - - //mod_lor_10_05_07++ - for (i = 0; i0) - is_free[i]=1; - else - is_free[i]=0; - } - - //return pSensChann; - /*if (is_free>0) - return 1; - else - return 0;*/ - //return is_free; - //mod_lor_10_05_07-- - -} -//mod_lor_10_03_19-- -//mod_lor_10_05_26++ -/*! -******************************************************************************* -\brief Function that decides if a channel is free: - applyed rule: strict majority -\return 0 if operation ended correctly, 1 if info on sensing channel does not exist -*/ - -unsigned int take_decision_sens( - Sens_node_t *SensDB , //!< pointer to the sensing database - Sens_ch_t *finalSensChann, //!< info that will be returned after decision - unsigned int Ch_id //!< channel ID - -) -{ - Sens_node_t *pSensNode = SensDB; - Sens_ch_t *pSensChann; - int i, flag=0; - - for (i = 0; iis_free[i]=10; //TO DO: to change when is_free becomes char instead of unsigned int - - while (pSensNode!= NULL ) { - - if((pSensChann = get_chann_info( pSensNode->info_hd , Ch_id)) != NULL) { - flag++; - - for (i = 0; iis_free[i]);//dbg - if (pSensChann->is_free[i]==1) - finalSensChann->is_free[i]++; - else if (pSensChann->is_free[i]==0) - finalSensChann->is_free[i]--; - } - } - - pSensNode = pSensNode->next; - } - - if (flag==0) // case in which information on the channel requested is not in the database - return 1; - - for (i = 0; iis_free[i]>10) - finalSensChann->is_free[i]=1; - else - finalSensChann->is_free[i]=0; - - //printf ("ch %d is_free %d \n", i, finalSensChann->is_free[i]); - } - - finalSensChann->Start_f = pSensChann->Start_f; - finalSensChann->Final_f = pSensChann->Final_f; - finalSensChann->Ch_id = pSensChann->Ch_id; - return 0; - -} -/*! -******************************************************************************* -\brief Function that identify free block of SB_NEEDED_FOR_SN subbands analysing the -* sensing information present in the sensing database; it saves the available channels -* in the channels database - -\return -*/ -unsigned int find_available_channels( - Sens_node_t *Sens_db, - CHANNELS_DB_T **channels_db -) -{ - int sens_ch_id=1, sb, sb_f; - unsigned int curr_fr; - CHANNEL_T channel; - Sens_ch_t curr_sens_ch; - - del_all_channels( channels_db ); //to remove all old entries - //printf("channels eliminated\n");//dbg - channel.Ch_id = 0; - channel.QoS = 0; - - sb_f = 0; - - // printf("beginning of find_available_channels\n\n\n");//dbg - while(take_decision_sens( Sens_db,&curr_sens_ch,sens_ch_id)==0) { - //printf("\nsens_ch_id in while :%d found channel id %d\n\n\n", sens_ch_id, curr_sens_ch.Ch_id);//dbg - curr_fr = curr_sens_ch.Start_f; - - for (sb=0; sbinfo_hd; - - while (ac_chann!= NULL ) { - // printf("actual ch_id %d actual start_f %d final_f %d\n",ac_chann->Ch_id, ac_chann->Start_f,ac_chann->Final_f);//dbg - if (ac_chann->Start_f < Final_f && ac_chann->Final_f > Start_f) { - sb = 0; - curr_freq = ac_chann->Start_f; - - while (sb < NUM_SB && curr_freq= MIN_NB_SB_CH) { - printf("ERROR!\n"); - return 2; - } - - if (ac_chann->is_free[sb]==1) - is_free[i]++; - - if (ac_chann->is_free[sb]==0) - is_free[i]--; - - sb++; - curr_freq+=SB_BANDWIDTH; - } - - - } - - ac_chann=ac_chann->next; - } - - ac_node = ac_node->next; - } - - for (i=0; ichannel.Start_f, channel_2_check->channel.Final_f);//dbg - if( evalaute_sens_info(Sens_db, channel_2_check->channel.Start_f, channel_2_check->channel.Final_f)) - need_to_update = 1; - - //printf("need_to_update: %d\n",need_to_update);//dbg - } - - return need_to_update; - -} -//mod_lor_10_05_28-- - - -/*! -******************************************************************************* - \brief CMM frequency query request. This message has also the scope to - * initialize the RRM in BTS state. -*/ -void cmm_ask_freq( - Instance_t inst //!< identification de l'instance -) -{ - rrm_t *rrm = &rrm_inst[inst] ; - - pthread_mutex_lock( &( rrm->ip.exclu ) ) ; - rrm->ip.trans_cnt++ ; - PUT_IP_MSG(msg_open_freq_query_4( inst, rrm->L2_id_FC, 0, rrm->ip.trans_cnt)); - pthread_mutex_unlock( &( rrm->ip.exclu ) ) ; - - -} - -/*!//mod_lor_10_10_28 -******************************************************************************* - \brief CMM of secondary user ask activate a transmission requirement. - * In the message it pass its L2_id to be identified by its Cluster Head -*/ -void cmm_need_to_tx( - Instance_t inst ,//!< identification de l'instance - Instance_t dest ,//!< identification de l'instance du noeud destinataire - QOS_CLASS_T QoS_class //!< Required quality of service (i.e. number of channels) -) -{ - rrm_t *rrm = &rrm_inst[inst] ; - rrm_t *rrm_dest = &rrm_inst[dest]; - pthread_mutex_lock( &( rrm->ip.exclu ) ) ; - rrm->ip.trans_cnt++ ; - PUT_IP_MSG(msg_ask_freq_to_CH_3( inst, rrm->L2_id, rrm_dest->L2_id, QoS_class, rrm->ip.trans_cnt)); - pthread_mutex_unlock( &( rrm->ip.exclu ) ) ; -} - -/*! -******************************************************************************* - \brief BTS ask for frequency -*/ -unsigned int open_freq_query( //mod_lor_10_06_02 - Instance_t inst , //!< identification de l'instance - L2_ID L2_id , //!< L2_id of the BTS/SU - QOS_CLASS_T QoS , //!< quality of service required (0 means all available QoS) - Transaction_t Trans_id //!< Transaction ID -) -{ - rrm_t *rrm = &rrm_inst[inst] ; - unsigned int NB_chan=0, ind = 0; - CHANNELS_DB_T *pChannels; - CHANNELS_DB_T channels_hd[NB_SENS_MAX]; - //mod_lor_10_05_26++ - /*pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; //mod_lor_10_03_08 - CHANNELS_DB_T *pChannelsEntry=rrm->rrc.pChannelsEntry; - CHANNELS_DB_T *pChannels = pChannelsEntry; - - //fprintf(stdout,"cp3 : NB_free_chan %d\n", NB_free_ch); //dbg - //mod_lor_10_05_17++: send vector with all frequencies (not only free ones) - CHANNELS_DB_T channels_hd[NB_SENS_MAX]; - pChannels = pChannelsEntry; - while (pChannels!=NULL){//mod_lor_10_03_08 - memcpy(&(channels_hd[NB_chan]) , pChannels, sizeof(CHANNELS_DB_T)); - pChannels = pChannels->next; - NB_chan++; - } - //mod_lor_10_05_17-- - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; //mod_lor_10_03_08 - - //fprintf(stdout,"NB_free_chan %d\n", NB_free_ch); //dbg - //for (int i = 0; irrc.exclu ) ) ; - NB_chan = find_available_channels(rrm->rrc.pSensEntry,&(rrm->rrc.pChannelsEntry)); - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - - pChannels = rrm->rrc.pChannelsEntry; - - while (pChannels!=NULL) { //mod_lor_10_03_08 - memcpy(&(channels_hd[ind]) , pChannels, sizeof(CHANNELS_DB_T)); - //printf ("copied channel: %d start %d end %d\n",channels_hd[ind].channel.Ch_id,channels_hd[ind].channel.Start_f,channels_hd[ind].channel.Final_f);//dbg - pChannels = pChannels->next; - ind++; - } - - if (ind!=NB_chan) - printf("Error!!! Found free channels: %d, copyed channels: %d\n",NB_chan, ind); - - //mod_lor_10_05_26-- - if (Trans_id!=1 || NB_chan!=0) { //mod_lor_10_06_02 - - pthread_mutex_lock( &( rrm->ip.exclu ) ) ; - rrm->ip.trans_cnt++ ; - PUT_IP_MSG(msg_update_open_freq_7( inst, L2_id, NB_chan, channels_hd, rrm->ip.trans_cnt)); - rrm->ip.waiting_SN_update=1; - pthread_mutex_unlock( &( rrm->ip.exclu ) ) ; - } - - return (NB_chan);//mod_lor_10_06_02 -} - -/*! -******************************************************************************* - \brief RRC open frequency. - * -*/ -unsigned int update_open_freq( //mod_lor_10_05_18 - Instance_t inst , //!< identification de l'instance - L2_ID L2_id , //!< L2_id of the FC/CH - unsigned int NB_chan , //!< Number of channels - unsigned int *occ_channels , //!< vector on wich the selected frequencies will be saved //mod_lor_10_05_18 - CHANNELS_DB_T *channels , //!< List of channels - Transaction_t Trans_id //!< Transaction ID -) -{ - rrm_t *rrm = &rrm_inst[inst] ; - unsigned int NB_occ_chan = 0 ; - //unsigned int occ_channels[NB_chan]; - CHANNELS_DB_T *chann_checked; - CHANNEL_T ass_channels[NB_chan]; - //printf("In update_open_freq: NB_chan: %d\n",NB_chan); - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; //mod_lor_10_03_08 - del_all_channels( &(rrm->rrc.pChannelsEntry) ) ; //mod_lor_10_06_01 - - for (int i=0; irrc.pChannelsEntry), channels[i].channel, channels[i].is_free, 0); - - if(chann_checked == NULL) //info_time still to evaluate - fprintf(stderr, "error in updating free channels in BTS \n"); - - /* else if (chann_checked->is_ass && !(chann_checked->is_free)){ - fprintf(stderr, " -> Channel %d in use not free anymore! \n",channels[i].channel.Ch_id); - chann_checked->is_ass = 0; - }else if (chann_checked->is_ass && chann_checked->is_free){ - ass_channels[NB_occ_chan]=chann_checked->channel; - occ_channels[NB_occ_chan]=chann_checked->channel.Ch_id ; - NB_occ_chan++; - }*/ - } - - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; //mod_lor_10_03_08 - - while (NB_occ_chanrrc.pChannelsEntry, rrm->L2_id, rrm->L2_id); - - if (chann_checked == NULL) { - //fprintf(stderr, "Channel is null \n"); //dbg - break; - } - - ass_channels[NB_occ_chan]=chann_checked->channel; - occ_channels[NB_occ_chan]=chann_checked->channel.Ch_id ; - NB_occ_chan++; - } - - - - /*fprintf(stderr, "Channels for SN selected by BTS: \n"); //dbg - for (int i=0; iip.exclu ) ) ; - rrm->ip.trans_cnt++ ; - PUT_IP_MSG(msg_update_SN_occ_freq_5( inst, rrm->L2_id, NB_occ_chan, occ_channels, rrm->ip.trans_cnt)); - pthread_mutex_unlock( &( rrm->ip.exclu ) ) ; - - //AAA: BTS sends a vector containing the channels that have to be used by secondary users - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; - //printf("In update_open_freq: NB_chan passed: %d\n",NB_occ_chan); - PUT_RRC_MSG(msg_rrm_up_freq_ass( inst, rrm->L2_id, NB_occ_chan, ass_channels)); - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - - return (NB_occ_chan);//mod_lor_10_05_18 -} - -/*! -\brief RRC update secondary network frequencies in use (SENDORA first scenario) - */ -unsigned int update_SN_occ_freq( //mod_lor_10_05_18 - Instance_t inst , //!< instance ID - L2_ID L2_id , //!< Layer 2 (MAC) ID of BTS - unsigned int NB_chan , //!< number of channels used by secondary network - unsigned int *occ_channels , //!< channels used by secondary network - Transaction_t Trans_id //!< Transaction ID -) - -{ - rrm_t *rrm = &rrm_inst[inst] ; - pthread_mutex_lock( &( rrm->ip.exclu ) ) ; //mod_lor_10_05_18 - rrm->ip.waiting_SN_update=0; //mod_lor_10_05_18 - pthread_mutex_unlock( &( rrm->ip.exclu ) ) ;//mod_lor_10_05_18 - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; //mod_lor_10_03_08 - CHANNELS_DB_T *pChannelsEntry=rrm->rrc.pChannelsEntry; - CHANNELS_DB_T *pChannels; - unsigned int need_to_update = 0; - - //Sens_node_t *nodes_db = rrm->rrc.pSensEntry; - //fprintf(stderr,"update_SN_occ_freq %d \n", inst);//dbg - //for (pChannels = rrm->rrc.pChannelsEntry; pChannels!=NULL; pChannels=pChannels->next)//dbg - // fprintf(stderr,"channel %d in db\n", pChannels->channel.Ch_id);//dbg - for (int i=0; irrc.pSensEntry,rrm->rrc.pChannelsEntry,occ_channels,NB_chan); - - if (need_to_update==0) { - pChannels = up_chann_ass( pChannelsEntry , occ_channels[i], 1, L2_id, L2_id ); - - if (pChannels==NULL) - printf ("ERROR! Channel not updated\n"); - } - - //mod_lor_10_05_28-- - - } - - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; //mod_lor_10_03_08 - - return (need_to_update); //mod_lor_10_05_17 - -} - -/*!//add_lor_10_10_28 -******************************************************************************* - \brief User ask for frequency - * it checks available channels to attribute channels to users. It sends an - * update message to users with attributed channels -*/ -unsigned int ask_freq_to_CH( - Instance_t inst , //!< identification de l'instance - L2_ID L2_id[NB_SENS_MAX] , //!< L2_id of the SU - L2_ID L2_id_dest[NB_SENS_MAX], //!< L2_id of the SU dest - unsigned int N_users , //!< quality of service required (i.e. number of channels required) - Transaction_t Trans_id //!< Transaction ID -) -{ - rrm_t *rrm = &rrm_inst[inst] ; - unsigned int NB_chan=0, ind = 0, act_us=0; - CHANNELS_DB_T *pChannels; - CHANNEL_T ass_channels[NB_SENS_MAX]; - L2_ID source_L2_id[NB_SENS_MAX]; - L2_ID dest_L2_id[NB_SENS_MAX]; - - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; - - ///Identify the number of available channels - if (rrm->rrc.pChannelsEntry==NULL) { - NB_chan = find_available_channels(rrm->rrc.pSensEntry,&(rrm->rrc.pChannelsEntry)); - printf ("found channels: %d \n", NB_chan);//dbg - } - - ///Analysing the list of identified channels - pChannels = rrm->rrc.pChannelsEntry; - - while (pChannels!=NULL) { - if (pChannels->is_free && !pChannels->is_ass && act_uschannel), sizeof(CHANNEL_T)); - pChannels = up_chann_ass( rrm->rrc.pChannelsEntry , ass_channels[ind].Ch_id, 1, L2_id[act_us], L2_id_dest[act_us] ); - //printf ("copied channel: %d start %d end %d\n",ass_channels[ind].Ch_id,ass_channels[ind].Start_f,ass_channels[ind].Final_f);//dbg - memcpy(source_L2_id[ind].L2_id , L2_id[act_us].L2_id, sizeof(L2_ID)); - memcpy(dest_L2_id[ind].L2_id , L2_id_dest[act_us].L2_id, sizeof(L2_ID)); - ind++; - act_us++; - } else if (pChannels->is_free && pChannels->is_ass) { - memcpy(&(ass_channels[ind]) , &(pChannels->channel), sizeof(CHANNEL_T)); - memcpy(source_L2_id[ind].L2_id , pChannels->source_id.L2_id, sizeof(L2_ID)); - memcpy(dest_L2_id[ind].L2_id , pChannels->dest_id.L2_id, sizeof(L2_ID)); - ind++; - } - - pChannels = pChannels->next; - } - - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - - - //printf ( "ind: %d\n",ind);//dbg - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; - rrm->rrc.trans_cnt++ ; - //PUT_RRC_MSG(msg_rrm_up_freq_ass( inst, source_L2_id[0], 1, ass_channels));//dbg - PUT_RRC_MSG(msg_rrm_up_freq_ass_sec( inst, source_L2_id, dest_L2_id, ind, ass_channels)); - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - - //else - // printf ("Error! not enough free channels"); - if (act_us==N_users) - return (0); - else { - printf ("Not enough free channels. Link not allocated\n"); - return (N_users-act_us); - } - -} - - -/*!//add_lor_10_11_03 -******************************************************************************* -\brief Function that prepare information in CH_coll to send to fusion center: - is_free depends on the number of information and it is a number between - 0 and 10 that indicates the probability of busy channel -\return 0 if operation ended correctly, 1 if info on sensing channel does not exist -*/ - -unsigned int take_ch_coll_decision( - Sens_node_t *SensDB , //!< pointer to the sensing database - Sens_ch_t *finalSensChann, //!< info that will be returned after decision - unsigned int Ch_id //!< channel ID - -) -{ - Sens_node_t *pSensNode = SensDB; - Sens_ch_t *pSensChann; - int i, flag=0; - - for (i = 0; iis_free[i]=0; - - while (pSensNode!= NULL ) { - - if((pSensChann = get_chann_info( pSensNode->info_hd , Ch_id)) != NULL) { - flag++; - - for (i = 0; iis_free[i]); - if (pSensChann->is_free[i]==1) - finalSensChann->is_free[i]+=10; - } - } - - pSensNode = pSensNode->next; - } - - if (flag==0) // case in which information on the channel requested is not in the database - return 1; - - for (i = 0; iis_free[i]=finalSensChann->is_free[i]/flag; - - ///AAA: to change when using weights for collaborating sensing - if (finalSensChann->is_free[i]>5) - finalSensChann->is_free[i]=1; - else - finalSensChann->is_free[i]=0; - - // printf ("ch %d is_free %d \n", i, finalSensChann->is_free[i]); - } - - finalSensChann->Start_f = pSensChann->Start_f; - finalSensChann->Final_f = pSensChann->Final_f; - finalSensChann->Ch_id = pSensChann->Ch_id; - return 0; - -} - - -/*!add_lor_10_11_09 -******************************************************************************* - \brief CMM user disconnect. Request to disconnect the user. - * Sending message to CH in order to stop all communications related to this user - * (also stop sensing activity of the user) -*/ -void cmm_user_disc( - Instance_t inst //!< identification de l'instance -) -{ - rrm_t *rrm = &rrm_inst[inst] ; - - pthread_mutex_lock( &( rrm->ip.exclu ) ) ; - rrm->ip.trans_cnt++ ; - PUT_IP_MSG(msg_user_disconnect_9( inst, rrm->L2_id, rrm->ip.trans_cnt)); - pthread_mutex_unlock( &( rrm->ip.exclu ) ) ; - - -} - -/*!add_lor_10_11_09 -******************************************************************************* - \brief CMM user disconnect. Request to disconnect the user. - * Sending message to CH in order to stop all communications related to this user - * (also stop sensing activity of the user) -*/ -void cmm_link_disc( - Instance_t inst ,//!< identification de l'instance - Instance_t dest //!< identification du destinataire -) -{ - rrm_t *rrm = &rrm_inst[inst] ; - rrm_t *rrm_dest = &rrm_inst[dest] ; - - pthread_mutex_lock( &( rrm->ip.exclu ) ) ; - rrm->ip.trans_cnt++ ; - PUT_IP_MSG(msg_close_link( inst, rrm->L2_id, rrm_dest->L2_id, rrm->ip.trans_cnt)); - pthread_mutex_unlock( &( rrm->ip.exclu ) ) ; - - -} - -/*!add_lor_10_11_09 -******************************************************************************* - \brief disconnect user. Ch removes all communications of the user -*/ -void disconnect_user( - Instance_t inst , //!< identification de l'instance - L2_ID L2_id //!< L2_id of the SU -) -{ - rrm_t *rrm = &rrm_inst[inst] ; - CHANNELS_DB_T *pChannels; - L2_ID User_active_L2_id[MAX_USER_NB]; - L2_ID User_dest_L2_id[MAX_USER_NB]; - int i, new_free = 0; - int chan_up = 0; - int all_result; - - ///remove waiting communications - pthread_mutex_lock( &( rrm->ip.exclu ) ) ; - printf ("T1 tot waiting before: %d\n",rrm->ip.users_waiting_update);//dbg - - for(i = 0; i < rrm->ip.users_waiting_update; i++) { - if ( L2_ID_cmp(&L2_id, &(rrm->ip.L2_id_wait_users[i][0]))==0 || L2_ID_cmp(&L2_id, &(rrm->ip.L2_id_wait_users[i][1]) )==0 ) { - if (i < rrm->ip.users_waiting_update-1) {///check if there are still waiting communications to consider - memcpy(rrm->ip.L2_id_wait_users[i][0].L2_id , rrm->ip.L2_id_wait_users[rrm->ip.users_waiting_update-1][0].L2_id, sizeof(L2_ID)); - memcpy(rrm->ip.L2_id_wait_users[i][1].L2_id , rrm->ip.L2_id_wait_users[rrm->ip.users_waiting_update-1][1].L2_id, sizeof(L2_ID)); - i--; - } - - rrm->ip.users_waiting_update--; - printf ("N1 tot waiting: %d\n",rrm->ip.users_waiting_update);//db - } - } - - printf ("T2 tot waiting after: %d\n",rrm->ip.users_waiting_update);//dbg - - ///remove active communications - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; - pChannels = rrm->rrc.pChannelsEntry; - - while (pChannels!=NULL) { - if (pChannels->is_ass && ( L2_ID_cmp(&L2_id, &(pChannels->source_id))==0 || L2_ID_cmp(&L2_id, &(pChannels->dest_id) )==0 )) { - pChannels->is_ass = 0; - new_free++; - //printf ("T3 removed channel: %d\n",pChannels->channel.Ch_id);//dbg - } - - pChannels=pChannels->next; - } - - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - printf("[CH %d]: Communications of user ",rrm->id); - - for ( i=0; i<8; i++) - printf("%02X", L2_id.L2_id[i]); - - printf( " removed\n"); - - ///sending update - while (rrm->ip.users_waiting_update > 0 && new_free>0) { - memcpy(User_active_L2_id[chan_up].L2_id , rrm->ip.L2_id_wait_users[rrm->ip.users_waiting_update-1][0].L2_id, sizeof(L2_ID)); - memcpy(User_dest_L2_id[chan_up].L2_id , rrm->ip.L2_id_wait_users[rrm->ip.users_waiting_update-1][1].L2_id, sizeof(L2_ID)); - chan_up++; - new_free--; - rrm->ip.users_waiting_update--; - printf ("N2 tot waiting: %d\n",rrm->ip.users_waiting_update);//db - } - - // printf ("New_free: %d\n",new_free);//dbg - all_result = ask_freq_to_CH( inst, User_active_L2_id, User_dest_L2_id,chan_up, 0 ); ///Update of channels - - if (all_result != 0) - printf ("Error in reassigning free channels new_free: %d all_result: %d\n",new_free, all_result);//dbg - - pthread_mutex_unlock( &( rrm->ip.exclu ) ) ; -} - -/*!add_lor_10_11_09 -******************************************************************************* - \brief close link. Ch removes an active (or waiting link) -*/ -int close_active_link( - Instance_t inst , //!< identification de l'instance - L2_ID L2_id , //!< L2_id of the SU - L2_ID L2_id_dest //!< L2_id of the SU dest -) -{ - rrm_t *rrm = &rrm_inst[inst] ; - CHANNELS_DB_T *pChannels; - int i, new_free = 0; - int all_result; - int removed = 0; - - ///check waiting communications - pthread_mutex_lock( &( rrm->ip.exclu ) ) ; - printf ("T1 tot waiting before: %d\n",rrm->ip.users_waiting_update);//dbg - - for(i = 0; i < rrm->ip.users_waiting_update && removed == 0; i++) { - if ( (L2_ID_cmp(&L2_id, &(rrm->ip.L2_id_wait_users[i][0]))==0 && L2_ID_cmp(&L2_id_dest, &(rrm->ip.L2_id_wait_users[i][1]) )==0 ) || (L2_ID_cmp(&L2_id, &(rrm->ip.L2_id_wait_users[i][1]))==0 - && L2_ID_cmp(&L2_id_dest, &(rrm->ip.L2_id_wait_users[i][0]) )==0 )) { - removed = 1; - - if (i < rrm->ip.users_waiting_update-1) {///check if there are still waiting communications to consider - memcpy(rrm->ip.L2_id_wait_users[i][0].L2_id , rrm->ip.L2_id_wait_users[rrm->ip.users_waiting_update-1][0].L2_id, sizeof(L2_ID)); - memcpy(rrm->ip.L2_id_wait_users[i][1].L2_id , rrm->ip.L2_id_wait_users[rrm->ip.users_waiting_update-1][1].L2_id, sizeof(L2_ID)); - i--; - } - - rrm->ip.users_waiting_update--; - printf ("T1bis tot waiting inside: %d\n",rrm->ip.users_waiting_update);//dbg - } - } - - printf ("T2 tot waiting after: %d removed %d\n",rrm->ip.users_waiting_update, removed);//dbg - pthread_mutex_unlock( &( rrm->ip.exclu ) ) ; - - - ///check active communications - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; - pChannels = rrm->rrc.pChannelsEntry; - - while (removed == 0 && pChannels!=NULL) { - if (pChannels->is_ass && ( (L2_ID_cmp(&L2_id, &(pChannels->source_id))==0 - && L2_ID_cmp(&L2_id_dest, &(pChannels->dest_id) )==0 ) /*|| (L2_ID_cmp(&L2_id, &(pChannels->dest_id))==0 && L2_ID_cmp(&L2_id_dest, &(pChannels->source_id) )==0 )*/)) { //mod_lor_07_12_10 - pChannels->is_ass = 0; - new_free++; - removed = 1; - printf ("T3 removed channel: %d\n",pChannels->channel.Ch_id);//dbg - } - - pChannels=pChannels->next; - } - - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - - ///link does not exist - if (removed == 0) { - printf("[CH %d]: Requested link to remove does not exist.\n ",rrm->id); - return 1; - } - - printf("[CH %d]: Link between ",rrm->id); - - for ( i=0; i<8; i++) - printf("%02X", L2_id.L2_id[i]); - - printf( " and "); - - for ( i=0; i<8; i++) - printf("%02X", L2_id_dest.L2_id[i]); - - printf( " removed\n"); - - ///sending update only if channel removed among active links - if (new_free>0 && removed) { - pthread_mutex_lock( &( rrm->ip.exclu ) ) ; - printf ("New_free: %d\n",new_free);//dbg - //rrm->ip.users_waiting_update--; //mod_lor_10_12_09 - printf ("N3 tot waiting: %d\n",rrm->ip.users_waiting_update);//db - - if(rrm->ip.users_waiting_update>0)//mod_lor_10_12_09 - all_result = ask_freq_to_CH( inst, &(rrm->ip.L2_id_wait_users[rrm->ip.users_waiting_update][0]), &(rrm->ip.L2_id_wait_users[rrm->ip.users_waiting_update][1]), 1, 0 ); ///Update of channels - else//mod_lor_10_12_09 - all_result = ask_freq_to_CH( inst, &(rrm->ip.L2_id_wait_users[rrm->ip.users_waiting_update][0]), &(rrm->ip.L2_id_wait_users[rrm->ip.users_waiting_update][1]), 0, - 0 ); ///Update of channels//mod_lor_10_12_09 - - if (all_result != 0) - printf ("Error in reassigning free channels new_free: %d all_result: %d\n",new_free, all_result);//dbg - - pthread_mutex_unlock( &( rrm->ip.exclu ) ) ; - } - - return 0; -} diff --git a/openair3/MESH/RRM/freq_ass_op.h b/openair3/MESH/RRM/freq_ass_op.h deleted file mode 100755 index 78d0b1bd65..0000000000 --- a/openair3/MESH/RRM/freq_ass_op.h +++ /dev/null @@ -1,114 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/*! -******************************************************************************* - -\file freq_ass_op.h - -\brief Fichier d'entete contenant les declarations des types, des defines , - et des fonctions relatives a la gestion des frequences. - -\author IACOBELLI Lorenzo - -\date 21/10/09 - - -\par Historique: - $Author$ $Date$ $Revision$ - $Id$ - $Log$ - -******************************************************************************* -*/ - -#ifndef FREQ_ASS_OP_H -#define FREQ_ASS_OP_H - -#ifdef __cplusplus -extern "C" { -#endif - -//mod_lor_10_05_28: declaration of function for sensing and frequency allocation -unsigned int evalaute_sens_info( - Sens_node_t *Sens_db, - unsigned int Start_f, - unsigned int Final_f -); - -void take_decision( - Sens_node_t *SensDB , //!< pointer to the sensing database - unsigned int Ch_id , //!< channel ID - unsigned int *is_free //mod_lor_10_05_28 ->char instead of int - -); - -unsigned int take_decision_sens( - Sens_node_t *SensDB , //!< pointer to the sensing database - Sens_ch_t *finalSensChann, //!< info that will be returned after decision - unsigned int Ch_id //!< channel ID - -); - -unsigned int find_available_channels( - Sens_node_t *Sens_db, - CHANNELS_DB_T **channels_db -); - -unsigned int check_SN_channels( - Sens_node_t *Sens_db, - CHANNELS_DB_T *channels_db, - unsigned int *used_channels, - unsigned int nb_used_ch -); - -void take_local_decision( - Sens_ch_t *Sens_info -); - -unsigned int take_ch_coll_decision( - Sens_node_t *SensDB , //!< pointer to the sensing database - Sens_ch_t *finalSensChann, //!< info that will be returned after decision - unsigned int Ch_id //!< channel ID -); - -void disconnect_user( - Instance_t inst , //!< identification de l'instance - L2_ID L2_id //!< L2_id of the SU -); - - -// --------------------------------------------------------------------------- - - -#ifdef __cplusplus -} -#endif - -#endif /* FREQ_ASS_OP_H */ diff --git a/openair3/MESH/RRM/ip_msg.c b/openair3/MESH/RRM/ip_msg.c deleted file mode 100644 index 4749068eda..0000000000 --- a/openair3/MESH/RRM/ip_msg.c +++ /dev/null @@ -1,524 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/*! -******************************************************************************* - -\file ip_msg.c - -\brief Fonctions permettant le formattage des donnees pour l'envoi d'un - message sur le socket entre le RRC et le RRM - -\author IACOBELLI Lorenzo - -\date 27/04/10 - - -\par Historique: - - -******************************************************************************* -*/ -#include -#include -#include -#include -#include -#include - -#include -#include - -#include "L3_rrc_defs.h" -#include "rrm_sock.h" -#include "L3_rrc_interface.h" -#include "ip_msg.h" -#include "rrm_util.h" - -#ifdef TRACE -//! Macro creant la chaine a partir du nom de la variable -#define STRINGIZER(x) #x -//! Tableau pour le mode trace faisant la translation entre le numero et le nom du message -const char *Str_msg_ip[NB_MSG_IP] = { - STRINGIZER(UPDATE_SENS_RESULTS_3 ), - STRINGIZER(OPEN_FREQ_QUERY_4 ), - STRINGIZER(UPDATE_OPEN_FREQ_7 ), - STRINGIZER(UPDATE_SN_OCC_FREQ_5 ), - STRINGIZER(INIT_COLL_SENS_REQ ), - STRINGIZER(STOP_COLL_SENS ), - STRINGIZER(UP_CLUST_SENS_RESULTS ), - STRINGIZER(STOP_COLL_SENS_CONF ), - STRINGIZER(ASK_FREQ_TO_CH_3 ), - STRINGIZER(USER_DISCONNECT_9 ), - STRINGIZER(CLOSE_LINK )/*, - STRINGIZER(RRC_CLUST_SCAN_REQ ), - STRINGIZER(RRM_CLUST_SCAN_CONF ), - STRINGIZER(RRM_CLUST_MON_REQ ), - STRINGIZER(RRC_CLUST_MON_REQ ), - STRINGIZER(RRM_CLUST_MON_CONF ), - STRINGIZER(RRM_END_SCAN_CONF ), - STRINGIZER(RRM_INIT_CONN_REQ ), - STRINGIZER(RRC_INIT_CONN_CONF ), - STRINGIZER(RRM_FREQ_ALL_PROP ), - STRINGIZER(RRC_FREQ_ALL_PROP_CONF ), - STRINGIZER(RRM_REP_FREQ_ALL ), - STRINGIZER(RRC_REP_FREQ_ACK ), - STRINGIZER(RRC_INIT_CONN_REQ ), - STRINGIZER(RRM_CONN_SET ), - STRINGIZER(RRC_FREQ_ALL_PROP ), - STRINGIZER(RRM_FREQ_ALL_PROP_CONF ), - STRINGIZER(RRC_REP_FREQ_ALL ), - STRINGIZER(RRM_REP_FREQ_ACK ) */ - -} ; -#endif - - -/*! -******************************************************************************* -\brief This function initialize the message header -\return any return value -*/ -static void init_ip_msg_head( - msg_head_t *msg_head , //!< message header to initialize - Instance_t inst , //!< Instance ID - MSG_IP_T msg_type , //!< type of message to initialize - unsigned int size , //!< size of message - Transaction_t Trans_id //!< transaction id associated to this message -) -{ - if ( msg_head != NULL ) { - msg_head->start = START_MSG ; - msg_head->msg_type = 0xFF & msg_type ; - msg_head->inst = inst ; - msg_head->Trans_id = Trans_id ; - msg_head->size = size; - } -} - - -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - update_sens_results(). -\return message formate -*/ - -msg_t *msg_update_sens_results_3( - Instance_t inst, - L2_ID L2_id, //!< FC L2_id - unsigned int NB_info, - Sens_ch_t *Sens_meas, - Transaction_t Trans_id -) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - unsigned int size = sizeof( rrm_update_sens_t );// + (NB_info-1) * sizeof(Sens_ch_t) ; //mod_lor_10_04_23 - - rrm_update_sens_t *p = RRM_CALLOC2(rrm_update_sens_t , size ) ; - - if ( p != NULL ) { - //fprintf(stderr,"rrmUSR 1 \n");//dbg - init_ip_msg_head(&(msg->head),inst, UPDATE_SENS_RESULTS_3, size ,Trans_id); - - memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ; - - p->NB_info = NB_info ; - p->info_time = 0 ; - - if ( NB_info > 0 ) { - memcpy( p->Sens_meas , Sens_meas, NB_info * sizeof(Sens_ch_t) ) ; - } - - //fprintf(stdout,"msg_rrm_update_sens()2 : NB_chan %d\n", p->NB_info);//dbg - //fprintf(stdout,"NB_chan %d\n", p->NB_info); - // for (int i=0; iSens_meas; ch!=NULL; ch=ch->next) - //fprintf(stdout,"channel in msg arr: %d\n", ch->Ch_id); //dbg - - } - - //fprintf(stderr,"rrmUSR end \n");//dbg - msg->data = (char *) p ; - } - - return msg ; - -} - -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - open_freq_query_4(). -\return message formate -*/ -msg_t *msg_open_freq_query_4( - Instance_t inst, - L2_ID L2_id , - QOS_CLASS_T QoS , - Transaction_t Trans_id -) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - open_freq_query_t *p = RRM_CALLOC(open_freq_query_t , 1 ) ; - - if ( p != NULL ) { - init_ip_msg_head(&(msg->head),inst,OPEN_FREQ_QUERY_4, sizeof( open_freq_query_t ) ,Trans_id); - memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ; - p->QoS = QoS; - } - - msg->data = (char *) p ; - } - - return msg ; -} - -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - ask_freq_to_CH_3(). -\return message formate -*/ -msg_t *msg_ask_freq_to_CH_3( - Instance_t inst, - L2_ID L2_id , - L2_ID L2_id_dest , - QOS_CLASS_T QoS , - Transaction_t Trans_id -) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - ask_freq_to_CH_t *p = RRM_CALLOC(ask_freq_to_CH_t , 1 ) ; - - if ( p != NULL ) { - init_ip_msg_head(&(msg->head),inst,ASK_FREQ_TO_CH_3, sizeof( ask_freq_to_CH_t ) ,Trans_id); - memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ; - memcpy( p->L2_id_dest.L2_id, L2_id_dest.L2_id, sizeof(L2_ID) ) ; - p->QoS = QoS; - } - - msg->data = (char *) p ; - } - - return msg ; -} - -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - rrm_open_freq(). -\return message formate -*/ -msg_t *msg_update_open_freq_7( - Instance_t inst, - L2_ID L2_id , - unsigned int NB_ch, - CHANNELS_DB_T *channels, //mod_lor_10_05_17 - Transaction_t Trans_id -) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - unsigned int size = sizeof( update_open_freq_t );// + (NB_free_ch-1) * sizeof(CHANNEL_T) ;//mod_lor_10_04_23 - - update_open_freq_t *p = RRM_CALLOC2(update_open_freq_t , size ) ; - - if ( p != NULL ) { - init_ip_msg_head(&(msg->head),inst,UPDATE_OPEN_FREQ_7, size ,Trans_id); - memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ; - p->NB_chan = NB_ch ; - - if ( NB_ch > 0 ) { - memcpy( p->channels , channels, NB_ch * sizeof(CHANNELS_DB_T) ) ; - } - } - - msg->data = (char *) p ; - } - - return msg ; -} - -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - rrm_update_SN_freq(). -\return message formate -*/ - -msg_t *msg_update_SN_occ_freq_5( - Instance_t inst , //!< instance ID - L2_ID L2_id , //!< Layer 2 (MAC) ID of FC - unsigned int NB_chan , - unsigned int *occ_channels , - Transaction_t Trans_id //!< Transaction ID -) - -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - //fprintf(stdout,"rrc_end_scan_ord() cp1\n"); //dbg - - if ( msg != NULL ) { - unsigned int size = sizeof( update_SN_occ_freq_t );// + (NB_chan-1) * sizeof(unsigned int) ;//mod_lor_10_04_23 - update_SN_occ_freq_t *p = RRM_CALLOC2(update_SN_occ_freq_t , size ) ; - - if ( p != NULL ) { - - - init_ip_msg_head(&(msg->head),inst,UPDATE_SN_OCC_FREQ_5, size,Trans_id); - - memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ; - - - p->NB_chan = NB_chan; - - if ( NB_chan != 0 ) { - - memcpy( p->occ_channels, occ_channels, NB_chan*sizeof(unsigned int) ); - - } - - - } - - msg->data = (char *) p ; - - } - - return msg ; -} - -//mod_lor_10_05_05++ -/*! -******************************************************************************* -\brief Message to be sent to a CH that will collaborate in sensing operation. -\return message formate -*/ -msg_t *msg_init_coll_sens_req( - Instance_t inst, //!< instance ID of asking CH - L2_ID L2_id , //!< Layer 2 (MAC) ID of asking CH - unsigned int Start_fr, - unsigned int Stop_fr, - unsigned int Meas_band, - unsigned int Meas_tpf, - unsigned int Nb_channels, - unsigned int Overlap, - unsigned int Sampl_freq, - Transaction_t Trans_id //!< Transaction ID -) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - init_coll_sens_req_t *p = RRM_CALLOC(init_coll_sens_req_t , 1 ) ; - - if ( p != NULL ) { - init_ip_msg_head(&(msg->head),inst, INIT_COLL_SENS_REQ, sizeof( init_coll_sens_req_t) ,0); - memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ; - p->Start_fr = Start_fr; - p->Stop_fr = Stop_fr; - p->Meas_band = Meas_band; - p->Meas_tpf = Meas_tpf; - p->Nb_channels = Nb_channels; - p->Overlap = Overlap; - p->Sampl_freq = Sampl_freq; - - } - - msg->data = (char *) p ; - } - - return msg ; -} - -//mod_lor_10_05_05-- -//mod_lor_10_05_06++ -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - cmm_stop_sensing. -\return message formate -*/ -msg_t *msg_stop_coll_sens( - Instance_t inst //!< identification de l'instance -) -{ - msg_t *msg = RRM_CALLOC(msg_t ,1 ) ; - - if ( msg != NULL ) { - init_ip_msg_head(&(msg->head),inst,STOP_COLL_SENS, 0 ,0); - msg->data = NULL ; - } - - return msg ; -} -//mod_lor_10_05_06-- -//mod_lor_10_05_12++ -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - cmm_stop_sensing. -\return message formate -*/ -msg_t *msg_stop_coll_sens_conf( - Instance_t inst, //!< identification de l'instance - L2_ID L2_id -) -{ - msg_t *msg = RRM_CALLOC(msg_t ,1 ) ; - - if ( msg != NULL ) { - stop_coll_sens_conf_t *p = RRM_CALLOC(stop_coll_sens_conf_t , 1 ) ; - - if ( p != NULL ) { - init_ip_msg_head(&(msg->head),inst,STOP_COLL_SENS_CONF, sizeof( stop_coll_sens_conf_t) ,0); - memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ; - } - - msg->data = (char *) p ; - } - - return msg ; -} -//mod_lor_10_05_12-- - -//mod_lor_10_05_07++ -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - up_clust_sens_results(). -\return message formate -*/ - -msg_t *msg_up_clust_sens_results( - Instance_t inst, - L2_ID L2_id, //!< FC L2_id - unsigned int NB_info, - unsigned int info_value, - Sens_ch_t *Sens_meas, - Transaction_t Trans_id -) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - unsigned int size = sizeof( update_coll_sens_t );// + (NB_info-1) * sizeof(Sens_ch_t) ; //mod_lor_10_04_23 - - update_coll_sens_t *p = RRM_CALLOC2(update_coll_sens_t , size ) ; - - if ( p != NULL ) { - init_ip_msg_head(&(msg->head),inst, UP_CLUST_SENS_RESULTS, size ,Trans_id); - - memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ; - - p->NB_info = NB_info ; - p->info_time = 0 ; - p->info_value = info_value; - - if ( NB_info > 0 ) { - memcpy( p->Sens_meas , Sens_meas, NB_info * sizeof(Sens_ch_t) ) ; - } - } - - msg->data = (char *) p ; - } - - return msg ; - -} - -//mod_lor_10_05_07-- - -/*!add_lor_10_11_09 -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - user_disconnect. -\return message formate -*/ -msg_t *msg_user_disconnect_9( - Instance_t inst, //!< identification de l'instance - L2_ID L2_id, //!< L2_id of the user that wants to disconnect - Transaction_t Trans_id -) -{ - msg_t *msg = RRM_CALLOC(msg_t ,1 ) ; - - if ( msg != NULL ) { - user_disconnect_t *p = RRM_CALLOC(user_disconnect_t , 1 ) ; - - if ( p != NULL ) { - init_ip_msg_head(&(msg->head),inst,USER_DISCONNECT_9, sizeof( user_disconnect_t) ,Trans_id); - memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ; - } - - msg->data = (char *) p ; - } - - return msg ; - -} - -/*!add_lor_10_11_09 -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - user_disconnect. -\return message formate -*/ -msg_t *msg_close_link( - Instance_t inst, //!< identification de l'instance - L2_ID L2_id, //!< L2_id of the user that wants to stop the link - L2_ID L2_id_dest, //!< L2_id of the destination - Transaction_t Trans_id -) -{ - msg_t *msg = RRM_CALLOC(msg_t ,1 ) ; - - if ( msg != NULL ) { - close_link_t *p = RRM_CALLOC(close_link_t , 1 ) ; - - if ( p != NULL ) { - init_ip_msg_head(&(msg->head),inst,CLOSE_LINK, sizeof( close_link_t) ,Trans_id); - memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ; - memcpy( p->L2_id_dest.L2_id, L2_id_dest.L2_id, sizeof(L2_ID) ) ; - } - - msg->data = (char *) p ; - } - - return msg ; - -} diff --git a/openair3/MESH/RRM/ip_msg.h b/openair3/MESH/RRM/ip_msg.h deleted file mode 100644 index 5fd11e8a04..0000000000 --- a/openair3/MESH/RRM/ip_msg.h +++ /dev/null @@ -1,253 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/*! -******************************************************************************* - -\file ip_msg.h - -\brief Fichier d'entete contenant les declarations des types, des defines , - et des fonctions relatives aux messages RRC-RRM ou RRC-RRCI. - - Les fonctions servent à créer le buffer de message, remplir - l'entete et copier les parametres de fonction. Chaque fonction - retourne le message qui pourra être envoye sur le socket entre le - CMM et le RRM ou RRCI. - -\author IACOBELLI Lorenzo - -\date 27/04/10 - -\par Historique: - - -******************************************************************************* -*/ -#ifndef __IP_MSG_H -#define __IP_MSG_H - -#include "L3_rrc_defs.h" -#include "COMMON/mac_rrc_primitives.h" - - -#ifdef OPENAIR2_IN -#include "rrm_sock.h" -#else -#include "RRC/MESH/rrc_rrm_interface.h" -#endif -//#include "../../../openair2/RRC/MESH/rrc_rrm_interface.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/*! -******************************************************************************* -\brief Enumeration des messages entre RRM/RRCI et le RRC -*/ -typedef enum { - UPDATE_SENS_RESULTS_3 , ///< Message IP : update to send to CH/FC //mod_lor_10_01_25 - OPEN_FREQ_QUERY_4 , ///< Message IP : BTS to ask free frequencies to FC - UPDATE_OPEN_FREQ_7 , ///< Message IP : list of frequencies usable by the secondary network - UPDATE_SN_OCC_FREQ_5 , ///< Message IP : BTS sends used freq. to FC - INIT_COLL_SENS_REQ , ///< Message IP : CH1 sends request to start collaboration to CH2 - STOP_COLL_SENS , ///< Message IP : CH1 sends order to stop collaboration to CH2 - UP_CLUST_SENS_RESULTS , ///< Message IP : update to send to CH from CH_COLL - STOP_COLL_SENS_CONF , ///< Message IP : CH2 sends confirmationof stop collaboration to CH1 - ASK_FREQ_TO_CH_3 , ///< Message IP : user that wants to transmits ask channels to CH - USER_DISCONNECT_9 , ///< Message IP : user wants to disconnect - CLOSE_LINK , ///< Message IP : user wants to stop a link - /*STOP_COLL_SENS , ///< Message RRC->RRM : in FC/CH to report a frequency query - RRM_OPEN_FREQ , ///< Message RRM->RRC : FC communicates open frequencies - RRM_UPDATE_SN_FREQ , ///< Message RRM->RRC : BTS sends used freq. to FC - RRC_UPDATE_SN_FREQ , ///< Message RRC->RRM : FC receives used freq. from BTS - RRM_CLUST_SCAN_REQ , ///< Message RRM->RRC : CH1 contacts CH2 to collaborate for the sensing process - RRC_CLUST_SCAN_REQ , ///< Message RRC->RRM : CH2 receive request to collaborate for the sensing process from CH1 - RRM_CLUST_SCAN_CONF , ///< Message RRM->RRC : CH2 confirmrs the beginning of a collaboration process - RRM_CLUST_MON_REQ , ///< Message RRM->RRC : CH1 contacts CH2 to collaborate for the monitoring process - RRC_CLUST_MON_REQ , ///< Message RRC->RRM : CH2 receive request to collaborate for the monitoring process from CH1 - RRM_CLUST_MON_CONF , ///< Message RRM->RRC : CH2 confirmrs the beginning of a monitoring process - RRM_END_SCAN_CONF , ///< Message RRM->RRC : CH2 confirmrs the end of the collaborative sensing process at CH1 - RRM_INIT_CONN_REQ , ///< Message RRM->RRC : SU 1 requests a connection to SU 2 - RRC_INIT_CONN_CONF , ///< Message RRM->RRC : Confirm from SU2 about the requested connection - RRM_FREQ_ALL_PROP , ///< Message RRM->RRC : SU1 sends a proposition of teh frequencies to use - RRC_FREQ_ALL_PROP_CONF , ///< Message RRC->RRM : SU1 receives a confirm on the usable channels - RRM_REP_FREQ_ALL , ///< Message RRM->RRC : SU1 reports to CH the possible channels - RRC_REP_FREQ_ACK , ///< Message RRC->RRM : CH informs all SUs about a channel allocated to 2 SUs - RRC_INIT_CONN_REQ , ///< Message RRC->RRM : Request from SU1 to establish a connection - RRM_CONN_SET , ///< Message RRC->RRM : Response to SU1 and connection settings communicated to rcc - RRC_FREQ_ALL_PROP , ///< Message RRC->RRM : SU1 proposition of frequencies to use - RRM_FREQ_ALL_PROP_CONF , ///< Message RRC->RRM : SU2 choise of frequencies to use - RRC_REP_FREQ_ALL , ///< Message RRM->RRC : SU1 reports to CH the possible channels - RRM_REP_FREQ_ACK , ///< Message RRC->RRM : CH informs all SUs about a channel allocated to 2 SUs - */NB_MSG_IP ///< Nombre de message RRM-RRC - -} -MSG_IP_T ; - -//mod_lor_10_05_05++ -/*! -******************************************************************************* -\brief Definition des parametres de la fonction init_coll_sens_req() dans - une structure permettant le passage des parametres via un socket -*/ -typedef struct { - L2_ID L2_id ; //!< Layer 2 (MAC) ID of Fusion Centre - unsigned int Start_fr; //!< Lowest frequency considered (MHz) - unsigned int Stop_fr; //!< Highest frequency considered (MHz) - unsigned int Meas_band; //!< Measurement bandwidth (KHz) - unsigned int Meas_tpf; //!< Measurement time per sub-band - unsigned int Nb_channels; //!< Number of sub-bands - unsigned int Overlap; //!< Overlap factor (%) - unsigned int Sampl_freq; //!< Sampling frequency (Ms/s) -} init_coll_sens_req_t; -//mod_lor_10_05_05-- - -/*! -******************************************************************************* -\brief Definition des parametres de les fonctions - rrm_update_sens()dans une structure permettant le passage - des parametres via un socket -*/ -typedef struct { - L2_ID L2_id ; //!< Layer 2 ID (MAC) of sensing node - unsigned int NB_info ; //!< Number of sensed channels - Sens_ch_t Sens_meas[NB_SENS_MAX] ; //!< Sensing information - double info_time ; //!< Data of the information -} rrm_update_sens_t ; - -//mod_lor_10_05_07++ -/*! -******************************************************************************* -\brief Definition des parametres de les fonctions - rrm_update_sens()dans une structure permettant le passage - des parametres via un socket -*/ -typedef struct { - L2_ID L2_id ; //!< Layer 2 ID (MAC) of sensing node - unsigned int NB_info ; //!< Number of sensed channels - unsigned int info_value ; //!< value assigned to information - Sens_ch_t Sens_meas[NB_SENS_MAX] ; //!< Sensing information - double info_time ; //!< Data of the information -} update_coll_sens_t ; -//mod_lor_10_05_07-- - -/*! -******************************************************************************* -\brief Definition des parametres de les fonctions rrm_ask_for_freq() et rrc_ask_for_freq()dans - une structure permettant le passage des parametres via un socket -*/ -typedef struct { - L2_ID L2_id ; //!< Layer 2 (MAC) ID of Fusion Centre - QOS_CLASS_T QoS ; //!< QoS required; if 0 all QoS at disposition -} open_freq_query_t; - -/*! //mod_lor_10_10_29 -******************************************************************************* -\brief Definition des parametres de les fonctions rrm_ask_freq_to_CH() dans - une structure permettant le passage des parametres via un socket -*/ -typedef struct { - L2_ID L2_id ; //!< Layer 2 (MAC) ID of source user - L2_ID L2_id_dest ; //!< Layer 2 (MAC) ID of destination user - QOS_CLASS_T QoS ; //!< QoS required; it corresponds to the mumber of channels required -} ask_freq_to_CH_t; - -/*! -******************************************************************************* -\brief Definition des parametres de les fonctions - rrc_open_freq() et rrm_open_freq() dans une structure permettant le passage - des parametres via un socket -*/ -typedef struct { - double date; - L2_ID L2_id ; //!< Layer 2 ID (MAC) of FC/CH - unsigned int NB_chan ; //!< number of channels - CHANNELS_DB_T channels[NB_SENS_MAX]; //!< description of channelS -} update_open_freq_t; - - -/*! -******************************************************************************* -\brief Definition des parametres des fonctions rrm_update_SN_freq() et - rrm_update_SN_freq()dans - une structure permettant le passage des parametres via un socket -*/ -typedef struct { - L2_ID L2_id ; //!< Layer 2 (MAC) ID of FC/BTS - unsigned int NB_chan ; //!< Number of channels - unsigned int occ_channels[NB_SENS_MAX]; //!< Vector of channels -} update_SN_occ_freq_t; - -/*! -******************************************************************************* -\brief -*/ -typedef struct { - L2_ID L2_id ; //!< Layer 2 (MAC) ID -} stop_coll_sens_conf_t, user_disconnect_t; //add_lor_10_11_09 - -/*! //add_lor_10_11_09 -******************************************************************************* -\brief -*/ -typedef struct { - L2_ID L2_id ; //!< Layer 2 (MAC) ID - L2_ID L2_id_dest ; //!< Layer 2 (MAC) ID of dest -} close_link_t; - -#ifdef TRACE -extern const char *Str_msg_ip[NB_MSG_IP] ; -#endif - -/* Rappel : les paramètres sont identiques aux fonctions - * (sans le prefixe msg_ ) du fichier: L3_rrc_interface.h - */ - - -///MESSAGES VIA IP -msg_t *msg_update_sens_results_3( Instance_t inst, L2_ID L2_id, unsigned int NB_chan, Sens_ch_t *Sens_meas, Transaction_t Trans_id ); -msg_t *msg_open_freq_query_4( Instance_t inst, L2_ID L2_id, QOS_CLASS_T QoS, Transaction_t Trans_id ); -msg_t *msg_update_open_freq_7( Instance_t inst, L2_ID L2_id, unsigned int NB_ch, CHANNELS_DB_T *channels, Transaction_t Trans_id); -msg_t *msg_update_SN_occ_freq_5( Instance_t inst, L2_ID L2_id, unsigned int NB_chan, unsigned int *occ_channels, Transaction_t Trans_id); -msg_t *msg_init_coll_sens_req( Instance_t inst, L2_ID L2_id, unsigned int Start_fr, unsigned int Stop_fr,unsigned int Meas_band, - unsigned int Meas_tpf, unsigned int Nb_channels,unsigned int Overlap, unsigned int Sampl_freq, Transaction_t Trans_id ); //mod_lor_10_05_05 -msg_t *msg_stop_coll_sens( Instance_t inst);//mod_lor_10_05_06 -msg_t *msg_up_clust_sens_results( Instance_t inst, L2_ID L2_id, unsigned int NB_info, - unsigned int info_value, Sens_ch_t *Sens_meas, Transaction_t Trans_id ); //mod_lor_10_05_07 -msg_t *msg_stop_coll_sens_conf( Instance_t inst, L2_ID L2_id);//mod_lor_10_05_12 -msg_t *msg_ask_freq_to_CH_3( Instance_t inst, L2_ID L2_id, L2_ID L2_id_dest, QOS_CLASS_T QoS, Transaction_t Trans_id );//mod_lor_10_10_28 -msg_t *msg_user_disconnect_9( Instance_t inst, L2_ID L2_id, Transaction_t Trans_id); //add_lor_10_11_09 -msg_t *msg_close_link( Instance_t inst, L2_ID L2_id, L2_ID L2_id_dest, Transaction_t Trans_id); //add_lor_10_11_09 - -#ifdef __cplusplus -} -#endif - -#endif /* RRC_MSG_H */ diff --git a/openair3/MESH/RRM/mr_attach.c b/openair3/MESH/RRM/mr_attach.c deleted file mode 100644 index 4ef9c6130e..0000000000 --- a/openair3/MESH/RRM/mr_attach.c +++ /dev/null @@ -1,312 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/*! -******************************************************************************* - -\file mr_attach.c - -\brief Fonctions permettant la gestion de l'attachement d'un Mesh Router - a un cluster. - -\author BURLOT Pascal - -\date 29/08/08 - - -\par Historique: - P.BURLOT 2009-01-20 - + separation de la file de message CMM/RRM a envoyer en 2 files - distinctes ( file_send_cmm_msg, file_send_rrc_msg) - L.IACOBELLI 2009-10-19 - + inclusions - -******************************************************************************* -*/ -#include -#include -#include -#include -#include - -#include -#include - -#include - -#include "debug.h" -#include "L3_rrc_defs.h" -#include "L3_rrc_interface.h" -#include "cmm_rrm_interface.h" -#include "rrm_sock.h" -#include "rrc_rrm_msg.h" -#include "cmm_msg.h" -#include "pusu_msg.h" -#include "msg_mngt.h" -#include "rb_db.h" -#include "neighbor_db.h" -#include "sens_db.h" -#include "channels_db.h" -#include "rrm_util.h" -#include "transact.h" -#include "rrm_constant.h" -#include "rrm.h" -#include "mr_attach.h" - - -//! Met un message dans la file des messages a envoyer -#define PUT_CMM_MSG(m) put_msg( &(rrm->file_send_cmm_msg), 0, rrm->cmm.s,m ) //mod_lor_10_01_25 -#define PUT_PUSU_MSG(m) put_msg( &(rrm->file_send_cmm_msg), 0, rrm->pusu.s,m) //mod_lor_10_01_25 -#define PUT_RRC_MSG(m) put_msg( &(rrm->file_send_rrc_msg), 0, rrm->rrc.s,m ) //mod_lor_10_01_25 - -/*! -******************************************************************************* -\brief MR attachement indication. Sent by RRC to RRM to indicate the MAC ID of - a new MR attached to CH at layer 2 -*/ -void rrc_MR_attach_ind( - Instance_t inst , //!< Identification de l'instance - L2_ID L2_id //!< Layer 2 (MAC) ID -) -{ - rrm_t *rrm = &rrm_inst[inst] ; - - if ( (rrm->state == CLUSTERHEAD_INIT1 )|| (rrm->state == CLUSTERHEAD )) { - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; - add_neighbor( &(rrm->rrc.pNeighborEntry), &L2_id ) ; - rrm->rrc.trans_cnt++ ; - //fprintf(stderr,"item_trans in RRM_SENSING_MEAS_REQ=%d node %d\n",rrm->rrc.trans_cnt,rrm->id);//dbg - add_item_transact( &(rrm->rrc.transaction), rrm->rrc.trans_cnt ,INT_RRC,RRM_SENSING_MEAS_REQ,0,NO_PARENT ); - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - - PUT_RRC_MSG( msg_rrm_sensing_meas_req( inst, L2_id ,Sensing_meas_desc, rrm->rrc.trans_cnt)); - - PUT_CMM_MSG( msg_rrm_MR_attach_ind(inst,L2_id )); - } else - fprintf(stderr,"[RRM] RRC_MR_ATTACH_IND is not allowed (Only CH):etat=%d\n",rrm->state); - -} - -/*! -******************************************************************************* -\brief RRC response to sensing_meas_req -*/ -void rrc_sensing_meas_resp( - Instance_t inst , //!< Identification de l'instance - Transaction_t Trans_id //!< Transaction ID -) -{ - rrm_t *rrm = &rrm_inst[inst] ; - - if ( (rrm->state == CLUSTERHEAD_INIT1 )|| (rrm->state == CLUSTERHEAD ) ) { - //fprintf(stderr, "[RRM] RRC_SENSING_MEAS_RESP is not coded %s %d \n",__FILE__ , __LINE__ ); - - transact_t *pTransact ; - - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; - pTransact = get_item_transact(rrm->rrc.transaction,Trans_id ) ; - - if ( pTransact == NULL ) { - fprintf(stderr,"[RRM] rrc_sensing_meas_resp (%d) unknown transaction\n",Trans_id); - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - } else { - del_item_transact( &(rrm->rrc.transaction),Trans_id ) ; - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - } - } else - fprintf(stderr,"[RRM] RRC_SENSING_MEAS_RESP (%d) is not allowed (Only CH):etat=%d\n",Trans_id,rrm->state); -} - -/*! -******************************************************************************* -\brief RRC Connection Establishment indication. Message received by RRM in CH - at completion of attachment phase of a new MR (after configuration MR IPAddr). - Here L3_info contains MR IPAddr. Message received by RRCI in MR after - configuration of initial RBs and reception of CH IPAddr. Here L3_info - contains CH IPAddr. For MR the RBID's of basic IP services are also required. -*/ -void rrc_cx_establish_ind( - Instance_t inst , //!< Identification de l'instance - L2_ID L2_id , //!< Layer 2 (MAC) ID - Transaction_t Trans_id , //!< Transaction ID - unsigned char *L3_info , //!< Optional L3 Information - L3_INFO_T L3_info_t , //!< Type of L3 Information - RB_ID DTCH_B_id , //!< RBID of broadcast IP service (MR only) - RB_ID DTCH_id //!< RBID of default IP service (MR only) -) -{ - rrm_t *rrm = &rrm_inst[inst] ; - //fprintf(stderr,"[RRM] RRC_CX_ESTABLISH_IND (%d) :status=%d\n",Trans_id,rrm->state); - - if ( (rrm->state == CLUSTERHEAD) ) { - //fprintf(stderr,"[RRM] RRC_CX_ESTABLISH_IND (%d) :status=CH %d\n",Trans_id,rrm->state); - PUT_CMM_MSG( msg_rrm_attach_ind(inst,L2_id,L3_info_t,L3_info, 0 )) ; - } else if ( rrm->state == MESHROUTER ) { - fprintf(stderr,"[RRM] RRC_CX_ESTABLISH_IND (%d) :status=MR %d\n",Trans_id,rrm->state); - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; - //fprintf(stderr,"item_trans in RRC_CX_ESTABLISH_IND=%d node %d\n",rrm->rrc.trans_cnt,rrm->id);//dbg - add_item_transact( &(rrm->rrc.transaction), Trans_id,INT_RRC,RRC_CX_ESTABLISH_IND,0,NO_PARENT); - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - - pthread_mutex_lock( &( rrm->cmm.exclu ) ) ; - rrm->cmm.trans_cnt++ ; - //fprintf(stderr,"item_trans in RRCI_ATTACH_REQ=%d node %d\n",rrm->cmm.trans_cnt,rrm->id);//dbg - add_item_transact( &(rrm->cmm.transaction), rrm->cmm.trans_cnt,INT_CMM,RRCI_ATTACH_REQ,Trans_id,PARENT); - pthread_mutex_unlock( &( rrm->cmm.exclu ) ) ; - - PUT_CMM_MSG( msg_rrci_attach_req(inst,L2_id,L3_info_t,L3_info, DTCH_B_id, DTCH_id ,rrm->cmm.trans_cnt)) ; - } else - fprintf(stderr,"[RRM] RRC_CX_ESTABLISH_IND (%d) is not allowed (Only CH):status=%d\n",Trans_id,rrm->state); - -} -/*! -******************************************************************************* -\brief Clusterhead PHY-Synch Indication - */ -void rrc_phy_synch_to_CH_ind( - Instance_t inst , //!< Identification de l'instance - unsigned int Ch_index , //!< Clusterhead index - L2_ID L2_id -) -{ - rrm_t *rrm = &rrm_inst[inst] ; - - if ( (rrm->state == ISOLATEDNODE) || (rrm->state == MESHROUTER) ) { - rrm->state = MESHROUTER ; - - /* Memorisation du L2_id du noeud ( c'est le niveau RRC qui a l'info ) */ - memcpy( &rrm->L2_id, &L2_id, sizeof(L2_ID)); - - PUT_RRC_MSG( - msg_rrci_init_mr_req( inst, - rrm->rrc.trans_cnt, - &Lchan_desc[QOS_SRB0], - &Lchan_desc[QOS_SRB1], - Ch_index) - ); - - - } else - fprintf(stderr,"[RRM] RRC_PHY_SYNCH_TO_CH_IND is not allowed (Only IN):etat=%d\n",rrm->state); -} - -/*! -******************************************************************************* -\brief L3 Connection Attachment confirmation. Message sent by CMM in MR at - completion of L3 attachment phase of a new MR Here L3_info contains - MR IPAddr. -*/ -void cmm_attach_cnf( - Instance_t inst , //!< Identification de l'instance - L2_ID L2_id , //!< L2_id of CH ( Mesh Router can see 2 CH ) - L3_INFO_T L3_info_t , //!< Type of L3 Information - unsigned char *L3_info , //!< L3 addressing Information - Transaction_t Trans_id //!< Transaction ID -) -{ - rrm_t *rrm = &rrm_inst[inst] ; - - if ( rrm->state == MESHROUTER ) { - transact_t *pTransact ; - - pthread_mutex_lock( &( rrm->cmm.exclu ) ) ; - pTransact = get_item_transact(rrm->cmm.transaction,Trans_id ) ; - - if ( pTransact == NULL ) { - fprintf(stderr,"[RRM] CMM_ATTACH_CNF (%d): unknown transaction\n",Trans_id); - pthread_mutex_unlock( &( rrm->cmm.exclu ) ) ; - } else { - unsigned int parent_id = pTransact->parent_id ; - unsigned int status_parent = pTransact->parent_status ; - - del_item_transact( &(rrm->cmm.transaction),Trans_id ) ; - pthread_mutex_unlock( &( rrm->cmm.exclu ) ) ; - - if ( status_parent ) { - transact_t *pTransactParent ; - - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; - pTransactParent =get_item_transact(rrm->rrc.transaction,parent_id ) ; - - if ( pTransactParent != NULL ) { - rrm->L3_info_t = L3_info_t; //mod_lor_10_01_25 - memcpy (&(rrm->L3_info), L3_info, L3_info_t); //mod_lor_10_01_25 - PUT_RRC_MSG( msg_rrci_cx_establish_resp(inst,pTransactParent->id,L2_id,L3_info,L3_info_t )); - del_item_transact( &(rrm->rrc.transaction),pTransactParent->id ) ; - } else // la transaction parent est inconnue, on ne fait rien - fprintf(stderr,"[RRM] CMM_ATTACH_CNF (%d) : the parent transaction (%d) is unknown\n",Trans_id,parent_id); - - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - - } - } - } else - fprintf(stderr,"[RRM] CMM_ATTACH_CNF (%d) is not allowed (Only MR):etat=%d\n",Trans_id,rrm->state); -} -/*! -******************************************************************************* -\brief RRC sensing measurement indication -*/ -void rrc_sensing_meas_ind( - Instance_t inst , //!< Identification de l'instance - L2_ID L2_id , //!< Layer 2 ID (MAC) of sensing node - unsigned int NB_meas , //!< Number of measurements - SENSING_MEAS_T *Sensing_meas , //!< Sensing Information - Transaction_t Trans_id //!< Transaction ID -) -{ - int i ; - - rrm_t *rrm = &rrm_inst[inst] ; - - if ( (rrm->state == CLUSTERHEAD) ) { - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; - - // update database of neighbor - set_Sensing_meas_neighbor( rrm->rrc.pNeighborEntry, &L2_id , NB_meas, Sensing_meas ); - - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - // send the response to rrc - PUT_RRC_MSG( msg_rrm_sensing_meas_resp(inst,Trans_id) ); - - for ( i = 0 ; i< NB_meas ; i++) { - pthread_mutex_lock( &( rrm->pusu.exclu ) ) ; - rrm->pusu.trans_cnt++ ; - add_item_transact( &(rrm->pusu.transaction), rrm->pusu.trans_cnt,INT_PUSU,RRM_SENSING_INFO_IND,0,NO_PARENT); - pthread_mutex_unlock( &( rrm->pusu.exclu ) ) ; - - PUT_PUSU_MSG( msg_rrm_sensing_info_ind(inst, L2_id,Sensing_meas[i].L2_id, Sensing_meas[i].Rssi, rrm->pusu.trans_cnt ) ) ; - } - - } else - fprintf(stderr,"[RRM] RRC_SENSING_MEAS_IND is not allowed (Only CH):etat=%d\n",rrm->state); -} - - - diff --git a/openair3/MESH/RRM/mr_attach.h b/openair3/MESH/RRM/mr_attach.h deleted file mode 100644 index 3dcdd16007..0000000000 --- a/openair3/MESH/RRM/mr_attach.h +++ /dev/null @@ -1,66 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/*! -******************************************************************************* - -\file mr_attach.h - -\brief Fichier d'entete contenant les declarations des types, des defines , - et des fonctions relatives a la gestion de l'attachement d'un Mesh - Router a un cluster. - -\author BURLOT Pascal - -\date 29/08/08 - - -\par Historique: - $Author$ $Date$ $Revision$ - $Id$ - $Log$ - -******************************************************************************* -*/ - -#ifndef MR_ATTACH_H -#define MR_ATTACH_H - -#ifdef __cplusplus -extern "C" { -#endif - -// --------------------------------------------------------------------------- - - -#ifdef __cplusplus -} -#endif - -#endif /* MR_ATTACH_H */ diff --git a/openair3/MESH/RRM/msg_mngt.c b/openair3/MESH/RRM/msg_mngt.c deleted file mode 100644 index 6d90e9bd30..0000000000 --- a/openair3/MESH/RRM/msg_mngt.c +++ /dev/null @@ -1,206 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/*! -******************************************************************************* - -\file msg_mngt.c - -\brief Gestion de l'envoi et la reception de message. - -\author BURLOT Pascal - -\date 17/07/08 - -\par Historique: - $Author$ $Date$ $Revision$ - $Id$ - $Log$ - -******************************************************************************* -*/ -#include -#include -#include -#include -#include - -#include -#include - -#include - -#include "debug.h" -#include "L3_rrc_defs.h" -#include "rrm_util.h" -#include "rrm_sock.h" -#include "msg_mngt.h" - -//! Selection locale du mode de debug -#define DBG_MSG_MNGT 0 - -#if DBG_MSG_MNGT==0 -//! Macro inactive -#define PRINT_MSG_MNGT(...) -#else -//! Macro affichant la file de message -#define PRINT_MSG_MNGT(...) print_msg_mngt( __VA_ARGS__ ) -#endif - -/*! -******************************************************************************* -\brief La fonction affiche a l'ecran la liste des messages - -\return aucune valeur retournee -*/ -static void print_msg_mngt( file_msg_t *pEntry , int id ) -{ - file_msg_t *pCurrentItem = pEntry; - - fprintf(stderr,"file_msg_t(%d)=[\n", id); - - while ( pCurrentItem != NULL) { - fprintf(stderr," @%p(.s=%p, .msg=%p, .next=%p)\n", pCurrentItem, pCurrentItem->s, - pCurrentItem->msg, pCurrentItem->next); - pCurrentItem = pCurrentItem->next ; - } - - fprintf(stderr," ]\n"); -} - -/*! -******************************************************************************* -\brief La fonction initialise la file des messages. - -\return aucune valeur. -*/ -void init_file_msg( - file_head_t *file_hd , ///< descripteur de la file des messages - int id ///< file id -) -{ - pthread_mutex_init( &( file_hd->mutex ), NULL ) ; - - file_hd->id = id; - file_hd->file = NULL ; -} - -/*! -******************************************************************************* -\brief La fonction ajoute un element en debut de la file des messages. - -\return retourne le pointeur le nouvel element de la liste. -*/ -file_msg_t *put_msg( - file_head_t *file_hd , ///< descripteur de la file des messages - //mod_lor_10_01_25 - int s_type , ///< socket type: 0 -> unix; 1 -> internet - //sock_rrm_t *s, ///< socket associe au message - void *s , ///< socket associe au message - - msg_t *msg ///< le message a ajouter dans la liste -) -{ - file_msg_t *pOldEntry = file_hd->file; - - file_msg_t *pNewItem = RRM_MALLOC( file_msg_t , 1 ) ; - - if ( pNewItem == NULL ) - return NULL ; - - //fprintf(stderr,"put_msg 1 \n");//dbg - CALL(pthread_mutex_lock( &(file_hd->mutex) )); - - file_hd->file = pNewItem ; - pNewItem->next = pOldEntry ; - //mod_lor_10_01_25++ - pNewItem->s_type = s_type ; - - //fprintf(stderr,"put_msg 2 \n");//dbg - if (s_type) { - pNewItem->s = NULL ; - pNewItem->s_int = s ; - } else { - pNewItem->s = s ; - pNewItem->s_int = NULL ; - } - - //mod_lor_10_01_25-- - pNewItem->msg = msg ; - - //fprintf(stderr,"put_msg 3 \n");//dbg - PRINT_MSG_MNGT( file_hd->file , file_hd->id ); - - //fprintf(stderr,"put_msg 4 \n");//dbg - CALL(pthread_mutex_unlock( &(file_hd->mutex) )); - - //fprintf(stderr,"put_msg end \n");//dbg - return pNewItem ; -} - -/*! -******************************************************************************* -\brief La fonction retire le dernier element de la file des messages. - -\return retourne le pointeur sur l'element enleve de la liste. -*/ -file_msg_t *get_msg( - file_head_t *file_hd ///< descripteur de la file des messages -) -{ - file_msg_t *pCurrentItem = file_hd->file ; - file_msg_t *pNextItem ; - file_msg_t **ppPrevItem = &(file_hd->file) ; - - if ( (pCurrentItem == NULL) ) - return NULL ; - - CALL(pthread_mutex_lock( &(file_hd->mutex) )); - - while ( pCurrentItem != NULL ) { - - pNextItem = pCurrentItem->next ; - - if ( pNextItem == NULL ) { - /* Dernier element */ - *ppPrevItem = NULL ; - break ; - } - - ppPrevItem = &(pCurrentItem->next) ; - pCurrentItem = pNextItem ; - } - - PRINT_MSG_MNGT( file_hd->file , file_hd->id ); - PRINT_MSG_MNGT( pCurrentItem , file_hd->id *-1 ); - - CALL(pthread_mutex_unlock( &(file_hd->mutex) )); - return pCurrentItem ; -} - diff --git a/openair3/MESH/RRM/msg_mngt.h b/openair3/MESH/RRM/msg_mngt.h deleted file mode 100644 index 2d9b8ab318..0000000000 --- a/openair3/MESH/RRM/msg_mngt.h +++ /dev/null @@ -1,93 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/*! -******************************************************************************* - -\file msg_mngt.h - -\brief Fichier d'entete contenant les declarations des types, des defines , - et des fonctions relatives a la gestion de l'envoi et la reception - de message. - -\author BURLOT Pascal - -\date 17/07/08 - -\par Historique: - $Author$ $Date$ $Revision$ - $Id$ - $Log$ - -******************************************************************************* -*/ - -#ifndef MSG_MNGT_H -#define MSG_MNGT_H - -#ifdef __cplusplus -extern "C" { -#endif - -/*! -******************************************************************************* -\brief File des messages reçus ou a envoyer -*/ -typedef struct msg_file_s { - //mod_lor_10_01_25 - int s_type ; /// socket type: 0 -> unix; 1 -> internet - sock_rrm_t *s ; ///< socket origine ou destinataire si unix - sock_rrm_int_t *s_int ; ///< socket origine ou destinataire si internet - - msg_t *msg ; ///< data of message - struct msg_file_s *next ; ///< next message of file -} file_msg_t ; - -/*! -******************************************************************************* -\brief Entete de la file des messages reçus ou a envoyer -*/ -typedef struct { - int id ; ///< id - pthread_mutex_t mutex ; ///< Mutex associee - file_msg_t *file ; ///< point d'entree sur la file des messages -} file_head_t ; - -/* -******************************************************************************* -*/ -void init_file_msg( file_head_t *file_hd , int id ) ; -file_msg_t *put_msg( file_head_t *file_hd , int s_type, void *s, msg_t *msg) ; //mod_lor_10_01_25 -file_msg_t *get_msg( file_head_t *file_hd ) ; - -#ifdef __cplusplus -} -#endif - -#endif /* MSG_MNGT_H */ diff --git a/openair3/MESH/RRM/neighbor_db.c b/openair3/MESH/RRM/neighbor_db.c deleted file mode 100644 index 75f0a3459b..0000000000 --- a/openair3/MESH/RRM/neighbor_db.c +++ /dev/null @@ -1,485 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/*! -******************************************************************************* - -\file neighbor_db.c - -\brief Fonctions permettant la gestion de la base de donnée sur le voisinage - directe (1 saut) du cluster head et indirecte a 2 sauts. - -\author BURLOT Pascal - -\date 29/08/08 - - -\par Historique: - $Author$ $Date$ $Revision$ - $Id$ - $Log$ - -******************************************************************************* -*/ -#include -#include -#include -#include -#include - -#include -#include - -#include - -#include "debug.h" -#include "L3_rrc_defs.h" -#include "rrm_sock.h" -#include "rrc_rrm_msg.h" -#include "rrm_util.h" -#include "neighbor_db.h" - -//! Selection locale du mode de debug -#define DBG_NEIGHBOR_DB 0 - -#if DBG_NEIGHBOR_DB==0 -//! Macro inactive -#define PRINT_NEIGHBOR_DB(...) -#else -//! Macro affichant la liste du voisnage d'un cluster -#define PRINT_NEIGHBOR_DB(...) print_neighbor_db( __VA_ARGS__ ) -#endif - -/*! -******************************************************************************* -\brief Comparaison de deux ID de niveau 2 - -\return si 0 alors les IDs sont identiques -*/ -static int L2_ID_cmp( - L2_ID *L2_id1, ///< ID de niveau 2 - L2_ID *L2_id2 ///< ID de niveau 2 -) -{ - return memcmp( L2_id1, L2_id2, sizeof(L2_ID) ) ; -} - -/*! -******************************************************************************* -\brief La fonction affiche a l'ecran la liste (pour DEBUG ) - -\return aucune valeur retournee -*/ -static void print_neighbor_db( - neighbor_desc_t *pEntry ///< pointeur sur le debut de liste -) -{ - unsigned int i , j ; - neighbor_desc_t *pCurrentItem = pEntry; - - fprintf(stderr,"neighbor list=[\n"); - - while ( pCurrentItem != NULL) { - fprintf(stderr," @%p(.L2_id=", pCurrentItem ); - - for ( i=0; i<8; i++) - fprintf(stderr,"%02X", pCurrentItem->L2_id.L2_id[i]); - - fprintf(stderr,", .NB_neighbor=%u, .Sensing_meas=%p, .next=%p)\n", - pCurrentItem->NB_neighbor, pCurrentItem->Sensing_meas,pCurrentItem->next ); - - if ( pCurrentItem->Sensing_meas != NULL ) - for ( j=0; jNB_neighbor; j++) { - fprintf(stderr,"\tNeighbor(%d):.L2_id=",j); - - for ( i=0; i<8; i++) - fprintf(stderr,"%02X", pCurrentItem->Sensing_meas[j].L2_id.L2_id[i]); - - fprintf(stderr," .RSSI=%02X\n", pCurrentItem->Sensing_meas[j].Rssi); - } - - pCurrentItem = pCurrentItem->next ; - } - - fprintf(stderr," ]\n"); -} - -/*! -******************************************************************************* -\brief La fonction ajoute un voisin dans la liste des voisins du Cluster head. - -\return retourne la valeur du nouvel element -*/ -neighbor_desc_t *add_neighbor( - neighbor_desc_t **neighbor_entry, ///< pointeur sur l'entree de la liste de voisinage - L2_ID *L2_id ///< ID du nouveau noeud -) -{ - neighbor_desc_t *pNewItem = get_neighbor( *neighbor_entry, L2_id ); - - if ( pNewItem == NULL ) { - // If not Exist then create a new item - neighbor_desc_t *pOldEntry = *neighbor_entry; - - pNewItem = RRM_MALLOC(neighbor_desc_t , 1 ) ; - - PNULL(pNewItem) ; - - if ( pNewItem == NULL ) - return NULL ; - - memcpy( pNewItem->L2_id.L2_id , L2_id->L2_id, sizeof(L2_ID) ) ; - //pNewItem->RSSI = 0 ; - pNewItem->NB_neighbor = 0 ; - pNewItem->Sensing_meas= NULL; - - *neighbor_entry = pNewItem ; - pNewItem->next = pOldEntry; - } - - PRINT_NEIGHBOR_DB( *neighbor_entry ); - return pNewItem ; -} - -/*! -******************************************************************************* -\brief La fonction retire un element de la liste des voisins - -\return aucune valeur. -*/ -void del_neighbor( - neighbor_desc_t **neighbor_entry, ///< pointeur sur l'entree de la liste de voisinage - L2_ID *L2_id ///< ID niveau 2 du voisin a detruire -) -{ - neighbor_desc_t *pCurrentItem = *neighbor_entry; - neighbor_desc_t *pNextItem ; - neighbor_desc_t **ppPrevItem = neighbor_entry ; - - if ( (pCurrentItem == NULL) || (neighbor_entry==NULL)) - return ; - - while ( pCurrentItem != NULL ) { - pNextItem = pCurrentItem->next ; - - if ( L2_ID_cmp( &(pCurrentItem->L2_id),L2_id) == 0 ) { - *ppPrevItem = pNextItem; - - RRM_FREE( pCurrentItem->Sensing_meas) ; - RRM_FREE( pCurrentItem ) ; - break ; - } - - ppPrevItem = &(pCurrentItem->next) ; - pCurrentItem = pNextItem ; - } - - PRINT_NEIGHBOR_DB( *neighbor_entry ); -} - -/*! -******************************************************************************* -\brief La fonction detruit entierement la liste des voisins - -\return aucune valeur. -*/ -void del_all_neighbor( - neighbor_desc_t **neighbor_entry ///< pointeur sur l'entree de la liste de voisinage -) -{ - neighbor_desc_t *pCurrentItem = *neighbor_entry; - neighbor_desc_t *pNextItem ; - - if ( (pCurrentItem == NULL) || (neighbor_entry==NULL)) - return ; - - while ( pCurrentItem != NULL ) { - pNextItem = pCurrentItem->next ; - - RRM_FREE( pCurrentItem->Sensing_meas ) ; - RRM_FREE( pCurrentItem ) ; - - pCurrentItem = pNextItem ; - } - - *neighbor_entry = NULL ; -} - -/*! -******************************************************************************* -\brief La fonction recherche les informations de voisinage d'un noeud - -\return descripteur sur les infos de voisinage du noeud ou NULL -*/ -neighbor_desc_t *get_neighbor( - neighbor_desc_t *neighbor_entry, ///< pointeur sur l'entree de la liste de voisinage - L2_ID *L2_id ///< ID du noeud -) -{ - neighbor_desc_t *pCurrentItem = neighbor_entry; - - while ( pCurrentItem != NULL) { - if ( L2_ID_cmp( &(pCurrentItem->L2_id),L2_id) == 0 ) - break ; - - pCurrentItem = pCurrentItem->next ; - } - - return pCurrentItem ; -} - -/*! -******************************************************************************* -\brief La fonction met a jour les informations de mesure de voisinage d'un noeud - -\return aucune valeur -*/ -void set_Sensing_meas_neighbor( - neighbor_desc_t *neighbor_entry, ///< pointeur sur l'entree de la liste de voisinage - L2_ID *L2_id , ///< ID du noeud - unsigned int nb_meas , ///< Nombre de mesure associe au noeud - SENSING_MEAS_T *sensing_meas ///< Mesures de voisinage -) -{ - neighbor_desc_t *pCurrentItem = neighbor_entry; - - while ( pCurrentItem != NULL) { - if ( L2_ID_cmp( &(pCurrentItem->L2_id),L2_id) == 0 ) { - pCurrentItem->NB_neighbor = 0 ; - - RRM_FREE(pCurrentItem->Sensing_meas ); - - if ( nb_meas > 0 ) { - SENSING_MEAS_T *p = RRM_MALLOC(SENSING_MEAS_T, nb_meas ) ; - - if ( p != NULL ) { - int size = nb_meas * sizeof(SENSING_MEAS_T) ; - memcpy( p,sensing_meas , size ); - pCurrentItem->NB_neighbor = nb_meas ; - pCurrentItem->Sensing_meas = p ; - } - } - - break ; - } - - pCurrentItem = pCurrentItem->next ; - } - - if (pCurrentItem==NULL) { - fprintf(stderr,"ERROR: Unknown MR L2_id :"); - print_L2_id(L2_id) ; - fprintf(stderr,"\n"); - } - - PRINT_NEIGHBOR_DB( neighbor_entry ); -} - -/*! -******************************************************************************* -\brief La fonction lit l'information de RSSI entre un noeud et un noeud voisin - -\return la valeur de RSSI -*/ -unsigned char get_RSSI_neighbor( - neighbor_desc_t *neighbor_entry , ///< pointeur sur l'entree de la liste de voisinage - L2_ID *L2_id , ///< ID du noeud - L2_ID *neighbor_id ///< ID du noeud voisin -) -{ - neighbor_desc_t *pCurrentItem = neighbor_entry; - unsigned char rssi = 0xFF ; - int i ; - - while ( pCurrentItem != NULL) { - if ( L2_ID_cmp( &(pCurrentItem->L2_id),L2_id) == 0 ) { - for ( i = 0 ; i < pCurrentItem->NB_neighbor ; i++ ) { - if ( L2_ID_cmp( &(pCurrentItem->Sensing_meas[i].L2_id),neighbor_id) == 0 ) { - rssi = pCurrentItem->Sensing_meas[i].Rssi ; - return (rssi) ; - } - } - } - - pCurrentItem = pCurrentItem->next ; - } - - return rssi ; -} - -/*! -******************************************************************************* -\brief La fonction ajoute un couple de voisin a la liste de type neighbor_list_t - -\return le nouvel element de liste -*/ -static neighbor_list_t *add_item_neighbor_list( - neighbor_list_t **neighbor_list_entry , ///< pointeur sur l'entree de la liste des couples de voisins - L2_ID *L2_id1 , ///< ID du noeud 1 - L2_ID *L2_id2 ///< ID du noeud 2 -) -{ - neighbor_list_t *pOldEntry = *neighbor_list_entry; - - neighbor_list_t *pNewItem = RRM_MALLOC(neighbor_list_t, 1 ) ; - - PNULL(pNewItem) ; - - if ( pNewItem == NULL ) - return NULL ; - - memcpy( &(pNewItem->L2_id[0]) , L2_id1, sizeof(L2_ID) ) ; - memcpy( &(pNewItem->L2_id[1]) , L2_id2, sizeof(L2_ID) ) ; - pNewItem->Rssi[0] = 0xFF ; - pNewItem->Rssi[1] = 0xFF ; - pNewItem->nb_opened_rb = 0 ; - pNewItem->rb_meas = NULL; - - *neighbor_list_entry = pNewItem ; - pNewItem->next = pOldEntry; - - return pNewItem ; -} - -/*! -******************************************************************************* -\brief La fonction touve un couple de voisin dans la liste de type neighbor_list_t - -\return l'element trouve -*/ -static neighbor_list_t *get_item_neighbor_list( - neighbor_list_t *neighbor_list_entry, ///< pointeur sur l'entree de la liste des couples de voisins - L2_ID *L2_id1 , ///< ID du noeud 1 - L2_ID *L2_id2 ///< ID du noeud 2 -) -{ - neighbor_list_t *pCurrentItem = neighbor_list_entry; - L2_ID L2_id[2] ; - - memcpy( &(L2_id[0]), L2_id1, sizeof(L2_ID) ) ; - memcpy( &(L2_id[1]), L2_id2, sizeof(L2_ID) ) ; - - while ( pCurrentItem != NULL) { - if ( memcmp( &(pCurrentItem->L2_id),L2_id,2*sizeof(L2_ID)) == 0 ) - break ; - - pCurrentItem = pCurrentItem->next ; - } - - return pCurrentItem ; -} - -/*! -******************************************************************************* -\brief La fonction cree la liste de type neighbor_list_t a partie d'une liste - de type neighbor_desc_t: - - Elle construit la liste des MR en vue directe du CH (voisinage directe) - - Elle construit la liste des MR voyant d'autre MR (voisinage a 2 sauts) - -\return retourne la liste de type neighbor_list_t. -*/ -neighbor_list_t *create_neighbor_list( - neighbor_desc_t *neighbor_entry , ///< pointeur sur l'entree de la liste de voisinage - L2_ID *L2_id_CH ///< ID du Cluster Head -) -{ - neighbor_desc_t *pCurrentItem = neighbor_entry; - neighbor_list_t *pList=NULL ; - - // construit la liste des MR voyant le CH en directe (voisinage directe) - while ( pCurrentItem != NULL) { - add_item_neighbor_list( &pList, L2_id_CH, &(pCurrentItem->L2_id) ) ; - pCurrentItem = pCurrentItem->next ; - } - - // construit la liste des MR voyant d'autre MR (voisinage a 2 sauts) - pCurrentItem = neighbor_entry; - - while ( pCurrentItem != NULL) { - int i ; - - for ( i = 0 ; iNB_neighbor; i++ ) { - neighbor_list_t *pItemFound ; - // Recherche du couple de voisin dans la liste - pItemFound = get_item_neighbor_list(pList , - &(pCurrentItem->L2_id) , - &(pCurrentItem->Sensing_meas[i].L2_id) - ); - - if ( pItemFound == NULL ) { - // si le couple n'est pas trouve alors on inverse les adresses MAC - pItemFound = get_item_neighbor_list(pList , - &(pCurrentItem->Sensing_meas[i].L2_id) , - &(pCurrentItem->L2_id) - ); - - if ( pItemFound == NULL ) { - // si ce couple n'est pas dans la liste alors on l'y ajoute - pItemFound = add_item_neighbor_list( &pList, &(pCurrentItem->L2_id), &(pCurrentItem->Sensing_meas[i].L2_id)) ; - pItemFound->Rssi[1] = pCurrentItem->Sensing_meas[i].Rssi ; - } - } else { - // Met a jour le champs Rssi - pItemFound->Rssi[0] = pCurrentItem->Sensing_meas[i].Rssi ; - } - } - - pCurrentItem = pCurrentItem->next ; - } - - return pList ; -} - -/*! -******************************************************************************* -\brief La fonction detruit la liste de type neighbor_list_t . - -\return Aucune valeur -*/ -void del_neighbor_list( - neighbor_list_t **neighbor_list_entry ///< pointeur sur l'entree de la liste de voisinage -) -{ - neighbor_list_t *pCurrentItem = *neighbor_list_entry; - neighbor_list_t *pNextItem ; - - if ( (pCurrentItem == NULL) || (neighbor_list_entry==NULL)) - return ; - - while ( pCurrentItem != NULL ) { - pNextItem = pCurrentItem->next ; - - RRM_FREE( pCurrentItem->rb_meas ) ; - RRM_FREE( pCurrentItem ) ; - - pCurrentItem = pNextItem ; - } - - *neighbor_list_entry = NULL ; -} diff --git a/openair3/MESH/RRM/neighbor_db.h b/openair3/MESH/RRM/neighbor_db.h deleted file mode 100644 index 40bc52a9c0..0000000000 --- a/openair3/MESH/RRM/neighbor_db.h +++ /dev/null @@ -1,112 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/*! -******************************************************************************* - -\file neighbor_db.h - -\brief Fichier d'entete contenant les declarations des types, des defines , - et des fonctions relatives a la gestion de la base de donnée sur le - voisinage directe (1 saut) du cluster head et indirecte a 2 sauts. - -\author BURLOT Pascal - -\date 29/08/08 - - -\par Historique: - $Author$ $Date$ $Revision$ - $Id$ - $Log$ - -******************************************************************************* -*/ - -#ifndef NEIGHBOR_DB_H -#define NEIGHBOR_DB_H - -#ifdef __cplusplus -extern "C" { -#endif - - -/*! -******************************************************************************* -\brief Description de la structure de voisinage d'un noeud attache a un cluster -*/ -typedef struct neighbor_desc_s { - L2_ID L2_id ; /*!< L2_id of a node */ - // Note: suppression du champ RSSI a ce niveau car le RSSI CH-MR n'est - // a priori pas mesuré , seul le RSSI des mesures de voisinage ou le RSSI - // sur les canaux logiques (RB) logiques - //unsigned char RSSI ; /*!< RSSI (minus in dBm) with the CH */ - - unsigned int NB_neighbor ; /*!< Number de neighbor (2hops) */ - SENSING_MEAS_T *Sensing_meas ; /*!< RSSI measurement information - and list of neighbor L2_id */ - struct neighbor_desc_s *next ; /*!< Next neighbor to 1 hop */ -} neighbor_desc_t ; - -/*! -******************************************************************************* -\brief Description de la liste de voisinage par couple de voisin -*/ -typedef struct neighbor_list_s { - L2_ID L2_id[2] ; /*!< L2_id of a neighbor couple */ - unsigned char Rssi[2] ; /*!< Rssi of each neighbor */ - unsigned int nb_opened_rb ; /*!< Number of opened RBs */ - rrc_rb_meas_ind_t *rb_meas ; /*!< Measure of opened RBs */ - struct neighbor_list_s *next ; /*!< Next item */ -} neighbor_list_t ; - -// --------------------------------------------------------------------------- - -neighbor_desc_t *add_neighbor( neighbor_desc_t **neighbor_entry, L2_ID *L2_id ) ; -void del_neighbor( neighbor_desc_t **neighbor_entry, L2_ID *L2_id ) ; -void del_all_neighbor( neighbor_desc_t **neighbor_entry ) ; -neighbor_desc_t *get_neighbor( neighbor_desc_t *neighbor_entry, L2_ID *L2_id ) ; - -void set_Sensing_meas_neighbor( neighbor_desc_t *neighbor_entry, L2_ID *L2_id , - unsigned int nb_meas, SENSING_MEAS_T *sensing_meas ) ; - - -unsigned char get_RSSI_neighbor(neighbor_desc_t *neighbor_entry,L2_ID *L2_id, L2_ID *neighbor_id ); - -// --------------------------------------------------------------------------- -/* NOT USED -neighbor_list_t *create_neighbor_list( neighbor_desc_t *neighbor_entry, L2_ID *L2_id_CH ); -void del_neighbor_list( neighbor_list_t **neighbor_list_entry ); -*/ - -#ifdef __cplusplus -} -#endif - -#endif /* NEIGHBOR_DB_H */ diff --git a/openair3/MESH/RRM/pusu_msg.c b/openair3/MESH/RRM/pusu_msg.c deleted file mode 100644 index 08ca2b1411..0000000000 --- a/openair3/MESH/RRM/pusu_msg.c +++ /dev/null @@ -1,285 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/*! -******************************************************************************* - -\file pusu_msg.c - -\brief Fonctions permettant le formattage des donnees pour l'envoi d'un - message sur le socket entre le RRM et PuSu (intra/inter Routing) - -\author BURLOT Pascal - -\date 29/08/08 - - -\par Historique: - $Author$ $Date$ $Revision$ - $Id$ - $Log$ - -******************************************************************************* -*/ -#include -#include -#include -#include -#include - -#include -#include - -#include - -#include "L3_rrc_defs.h" -#include "rrm_sock.h" -#include "cmm_rrm_interface.h" -#include "pusu_msg.h" -#include "rrm_util.h" - -#ifdef TRACE -//! Macro creant la chaine a partir du nom de la variable -#define STRINGIZER(x) #x -//! Tableau pour le mode trace faisant la translation entre le numero et le nom du message -const char *Str_msg_pusu_rrm[NB_MSG_RRM_PUSU] = { - STRINGIZER(RRM_PUBLISH_IND ) , - STRINGIZER(PUSU_PUBLISH_RESP ) , - STRINGIZER(RRM_UNPUBLISH_IND ) , - STRINGIZER(PUSU_UNPUBLISH_RESP ) , - STRINGIZER(RRM_LINK_INFO_IND ) , - STRINGIZER(PUSU_LINK_INFO_RESP ) , - STRINGIZER(RRM_SENSING_INFO_IND ) , - STRINGIZER(PUSU_SENSING_NFO_RESP) , - STRINGIZER(RRM_CH_LOAD_IND ) , - STRINGIZER(PUSU_CH_LOAD_RESP ) -}; -#endif - -/*! -******************************************************************************* -\brief This function initialize the message header -\return any return value -*/ -static void init_pusu_msg_head( - msg_head_t *msg_head , ///< message header to initialize - Instance_t inst , ///< Instance associated to this message - MSG_RRM_PUSU_T msg_type , ///< type of message to initialize - unsigned int size , ///< size of message - Transaction_t Trans_id ///< transaction id associated to this message -) -{ - if ( msg_head != NULL ) { - msg_head->start = START_MSG ; - msg_head->msg_type = 0xFF & msg_type ; - msg_head->inst = inst ; - msg_head->Trans_id = Trans_id ; - msg_head->size = size ; - } -} - -/*! -******************************************************************************* -\brief La fonction formate en un message d'annonce de nouveau service - envoyer sur le socket du PUSU. -\return message formate -*/ -msg_t *msg_rrm_publish_ind( - Instance_t inst , ///< Instance associated to this message - int service , ///< service type - Transaction_t Trans_id ///< transaction id associated to this message -) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - pusu_publish_t *p = RRM_CALLOC(pusu_publish_t , 1 ); - - if ( p != NULL ) { - init_pusu_msg_head(&msg->head, inst, RRM_PUBLISH_IND, sizeof(pusu_publish_t),Trans_id); - - p->service_type = service ; - } - - msg->data = (char *) p ; - } - - return msg ; -} -/*! -******************************************************************************* -\brief La fonction formate en un message de retrait d'un service - envoyer sur le socket du PUSU. -\return message formate -*/ -msg_t *msg_rrm_unpublish_ind( - Instance_t inst , ///< Instance associated to this message - int service , ///< type de service a retirer - Transaction_t Trans_id ///< transaction id associated to this message -) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - pusu_publish_t *p = RRM_CALLOC(pusu_publish_t , 1 ); - - if ( p != NULL ) { - init_pusu_msg_head(&msg->head, inst, RRM_UNPUBLISH_IND, sizeof(pusu_unpublish_t),Trans_id); - - p->service_type = service ; - } - - msg->data = (char *) p ; - } - - return msg ; -} - -/*! -******************************************************************************* -\brief La fonction formate en un message de mesure a envoyer sur le socket du PUSU. -\return message formate -*/ -msg_t *msg_rrm_link_info_ind( - Instance_t inst , ///< Instance associated to this message - L2_ID noeud1 , ///< L2_ID du noeud 1 - L2_ID noeud2 , ///< L2_ID du noeud 2 - RB_ID rb_id , ///< identtification du lien RB - unsigned char rssi , ///< RSSI du noeud2 mesure par le noeud1 - unsigned char spec_eff , ///< Efficacite spectrale du noeud2 mesure par le noeud1 - Transaction_t Trans_id ///< transaction id associated to this message -) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - pusu_link_info_t *p = RRM_CALLOC(pusu_link_info_t , 1 ); - - if ( p != NULL ) { - init_pusu_msg_head(&msg->head, inst, RRM_LINK_INFO_IND, sizeof(pusu_link_info_t),Trans_id); - - p->rssi = rssi ; - p->spec_eff = spec_eff ; - memcpy( &p->noeud1, &noeud1, sizeof(L2_ID) ) ; - memcpy( &p->noeud2, &noeud2, sizeof(L2_ID) ) ; - } - - msg->data = (char *) p ; - } - - return msg ; -} - -/*! -******************************************************************************* -\brief La fonction formate en un message de mesure de voisnage a envoyer sur - le socket du PUSU. - -\return message formate -*/ -msg_t *msg_rrm_sensing_info_ind( - Instance_t inst , ///< Instance associated to this message - L2_ID noeud1 , ///< L2_ID du noeud 1 - L2_ID noeud2 , ///< L2_ID du noeud 2 - unsigned char rssi , ///< RSSI du noeud2 mesure par le noeud1 - Transaction_t Trans_id ///< transaction id associated to this message -) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - pusu_sensing_info_t *p = RRM_CALLOC(pusu_sensing_info_t , 1 ); - - if ( p != NULL ) { - init_pusu_msg_head(&msg->head, inst, RRM_SENSING_INFO_IND, sizeof(pusu_sensing_info_t),Trans_id); - - p->rssi = rssi ; - memcpy( &p->noeud1, &noeud1, sizeof(L2_ID) ) ; - memcpy( &p->noeud2, &noeud2, sizeof(L2_ID) ) ; - } - - msg->data = (char *) p ; - } - - return msg ; -} - -/*! -******************************************************************************* -\brief La fonction formate en un message de charge de cluster a envoyer sur - le socket du PUSU. -\return message formate -*/ -msg_t *msg_rrm_ch_load_ind( - Instance_t inst , ///< Instance associated to this message - unsigned char load , ///< Charge du cluster - Transaction_t Trans_id ///< transaction id associated to this message -) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - pusu_ch_load_t *p = RRM_CALLOC(pusu_ch_load_t , 1 ); - - if ( p != NULL ) { - init_pusu_msg_head(&msg->head, inst, RRM_CH_LOAD_IND, sizeof(pusu_ch_load_t),Trans_id); - - p->load = load ; - } - - msg->data = (char *) p ; - } - - return msg ; -} - -/*! -******************************************************************************* -\brief La fonction formate en un message d'annonce de nouveau service - envoyer sur le socket du PUSU. -\return message formate -*/ -msg_t *msg_pusu_resp( - Instance_t inst , ///< Instance associated to this message - MSG_RRM_PUSU_T response , ///< identification de la reponse - Transaction_t Trans_id ///< transaction id associated to this message -) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - // Header only - init_pusu_msg_head(&msg->head, inst, response, 0,Trans_id); - - msg->data = NULL ; - } - - return msg ; -} - diff --git a/openair3/MESH/RRM/pusu_msg.h b/openair3/MESH/RRM/pusu_msg.h deleted file mode 100644 index f852e096cd..0000000000 --- a/openair3/MESH/RRM/pusu_msg.h +++ /dev/null @@ -1,148 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/*! -******************************************************************************* - -\file pusu_msg.h - -\brief Fichier d'entete contenant les declarations des types, des defines , - et des fonctions relatives aux messages RRM->PUSU. - - Les fonctions servent à créer le buffer de message, remplir l'entete - et copier les parametres de fonction. Chaque fonction retourne le - message qui pourra être envoye sur le socket. - -\author BURLOT Pascal - -\date 29/08/08 - - -\par Historique: - $Author$ $Date$ $Revision$ - $Id$ - $Log$ - -******************************************************************************* -*/ - -#ifndef PUSU_MSG_H -#define PUSU_MSG_H - -#ifdef __cplusplus -extern "C" { -#endif - -//! Definition de la taille de l'identification niveau 2 -#define IEEE80211_MAC_ADDR_LEN 8 - - -/*! -******************************************************************************* -\brief Enumeration des messages entre le RRM et PUSU -*/ -typedef enum { - RRM_PUBLISH_IND = 0 , ///< Annonce de nouveau service - PUSU_PUBLISH_RESP , ///< Reponse de PUSU_PUBLISH_IND - RRM_UNPUBLISH_IND , ///< Annonce de retrait d'un service - PUSU_UNPUBLISH_RESP , ///< Reponse de PUSU_UNPUBLISH_IND - RRM_LINK_INFO_IND , ///< Info sur un lien (oriente) - PUSU_LINK_INFO_RESP , ///< Reponse de PUSU_LINK_INFO_IND - RRM_SENSING_INFO_IND , ///< Info sur un voisin (oriente) - PUSU_SENSING_INFO_RESP , ///< Reponse de RRM_SENSING_INFO_IND - RRM_CH_LOAD_IND , ///< Info sur la charge d'un cluster - PUSU_CH_LOAD_RESP , ///< Reponse de PUSU_CH_LOAD_IND - NB_MSG_RRM_PUSU ///< Nombre de message de l'interface -} -MSG_RRM_PUSU_T ; - -/*! -******************************************************************************* -\brief Enumeration des services entre le RRM et PUSU -*/ -typedef enum { - PUSU_RRM_SERVICE = 0xAA ///< service d'un information RRM vers le TRM -} SERVICE_RRM_PUSU_T ; - -/*! -******************************************************************************* -\brief Definition de publish/unpublish -*/ -typedef struct { - int service_type ; ///< type de service -} pusu_publish_t , pusu_unpublish_t ; - -/*! -******************************************************************************* -\brief Definition des informations remontees au TRM relatives a un lien -*/ -typedef struct { - L2_ID noeud1 ; ///< L2_ID du noeud 1 - L2_ID noeud2 ; ///< L2_ID du noeud 2 - RB_ID rb_id ; ///< identification du lien - unsigned char rssi ; ///< metrique RSSI - unsigned char spec_eff ; ///< metrique Efficacite spectrale -} pusu_link_info_t; - -/*! -******************************************************************************* -\brief Definition des informations remontees au TRM relatives a un voisin - sans notion de lien etabli obligatoirement -*/ -typedef struct { - L2_ID noeud1 ; ///< L2_ID du noeud 1 - L2_ID noeud2 ; ///< L2_ID du noeud 2 - unsigned char rssi ; ///< metrique RSSI -} pusu_sensing_info_t; - -/*! -******************************************************************************* -\brief Definition de la structure d'information de charge du cluster remontee - au TRM -*/ -typedef struct { - unsigned char load ; ///< la charge du cluster -} pusu_ch_load_t; - -#ifdef TRACE -extern const char *Str_msg_pusu_rrm[NB_MSG_RRM_PUSU] ; -#endif - -msg_t *msg_rrm_publish_ind(Instance_t inst, int service, Transaction_t Trans_id ); -msg_t *msg_rrm_unpublish_ind(Instance_t inst, int service, Transaction_t Trans_id ); -msg_t *msg_rrm_link_info_ind(Instance_t inst, L2_ID noeud1, L2_ID noeud2, RB_ID rb_id, unsigned char rssi ,unsigned char spec_eff, Transaction_t Trans_id ) ; -msg_t *msg_rrm_sensing_info_ind(Instance_t inst, L2_ID noeud1, L2_ID noeud2, unsigned char rssi, Transaction_t Trans_id ) ; -msg_t *msg_rrm_ch_load_ind(Instance_t inst, unsigned char load, Transaction_t Trans_id ); -msg_t *msg_pusu_resp(Instance_t inst, MSG_RRM_PUSU_T response, Transaction_t Trans_id ); - -#ifdef __cplusplus -} -#endif - -#endif /* PUSU_MSG_H */ diff --git a/openair3/MESH/RRM/rb_db.c b/openair3/MESH/RRM/rb_db.c deleted file mode 100644 index 2eb3505997..0000000000 --- a/openair3/MESH/RRM/rb_db.c +++ /dev/null @@ -1,377 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/*! -******************************************************************************* - -\file rb_db.c - -\brief Fonctions permettant la gestion de la base de donnée sur les radio- - bearers du cluster par le cluster head - -\author BURLOT Pascal - -\date 29/08/08 - - -\par Historique: - $Author$ $Date$ $Revision$ - $Id$ - $Log$ - -******************************************************************************* -*/ -#include -#include -#include -#include -#include - -#include -#include - -#include - -#include "debug.h" -#include "L3_rrc_defs.h" -#include "rrm_util.h" -#include "rb_db.h" - -//! Selection locale du mode de debug -#define DBG_RB_DB 0 - -#if DBG_RB_DB==0 -//! Macro inactive -#define PRINT_RB_DB(...) -#else -//! Macro affichant la liste des radio bearers -#define PRINT_RB_DB(...) print_rb_db( __VA_ARGS__ ) -#endif - -/*! -******************************************************************************* -\brief La fonction affiche a l'ecran la liste (pour du debug) - -\return aucune valeur retournee -*/ -static void print_rb_db( - RB_desc_t *pEntry ///< pointeur sur le debut de liste -) -{ - unsigned int i ; - RB_desc_t *pCurrentItem = pEntry; - - fprintf(stderr,"RB list=[\n"); - - while ( pCurrentItem != NULL) { - fprintf(stderr," @%p(.Trans_id=%d, .Rb_id=%d, .Rb_type=%d", - pCurrentItem, pCurrentItem->Trans_id, - pCurrentItem->Rb_id, pCurrentItem->RB_type); - - fprintf(stderr,", @SRC="); - - for ( i=0; i<8; i++) - fprintf(stderr,"%02X", pCurrentItem->L2_id[0].L2_id[i]); - - fprintf(stderr,", @DST="); - - for ( i=0; i<8; i++) - fprintf(stderr,"%02X", pCurrentItem->L2_id[1].L2_id[i]); - - fprintf(stderr,", .QoS_class=%d", pCurrentItem->QoS_class ); - - /* - fprintf(stderr,",\n .Lchan_desc=%p(",&(pCurrentItem->Lchan_desc)); - fprintf(stderr,".transport_block_size=%d,",pCurrentItem->Lchan_desc.transport_block_size); - fprintf(stderr,".max_transport_blocks=%d,",pCurrentItem->Lchan_desc.max_transport_blocks); - fprintf(stderr,".Guaranteed_bit_rate=%ld,",pCurrentItem->Lchan_desc.Guaranteed_bit_rate); - fprintf(stderr,".Max_bit_rate=%ld,",pCurrentItem->Lchan_desc.Max_bit_rate); - fprintf(stderr,".Delay_class=%d,",pCurrentItem->Lchan_desc.Delay_class); - fprintf(stderr,".Target_bler=%d,",pCurrentItem->Lchan_desc.Target_bler); - fprintf(stderr,".LCHAN_t=%d),",pCurrentItem->Lchan_desc.LCHAN_t); - - fprintf(stderr,",\n .Mac_rlc_meas_desc=%p(",&(pCurrentItem->Mac_rlc_meas_desc)); - fprintf(stderr,".Meas_trigger=%p(",&(pCurrentItem->Mac_rlc_meas_desc.Meas_trigger)); - fprintf(stderr,".Rssi=%d, ",pCurrentItem->Mac_rlc_meas_desc.Meas_trigger.Rssi); - fprintf(stderr,".Sinr=%d, ",pCurrentItem->Mac_rlc_meas_desc.Meas_trigger.Sinr); - fprintf(stderr,".Harq_delay=%u, ",pCurrentItem->Mac_rlc_meas_desc.Meas_trigger.Harq_delay); - fprintf(stderr,".Bler=%u,",pCurrentItem->Mac_rlc_meas_desc.Meas_trigger.Bler); - fprintf(stderr,".Spec_eff=%u), ",pCurrentItem->Mac_rlc_meas_desc.Meas_trigger.Spec_eff); - fprintf(stderr,".Mac_avg=%p(",&(pCurrentItem->Mac_rlc_meas_desc.Mac_avg)); - fprintf(stderr,".Rssi_forgetting_factor=%u, ",pCurrentItem->Mac_rlc_meas_desc.Mac_avg.Rssi_forgetting_factor); - fprintf(stderr,".Sinr_forgetting_factor=%u, ",pCurrentItem->Mac_rlc_meas_desc.Mac_avg.Sinr_forgetting_factor); - fprintf(stderr,".Harq_delay_forgetting_factor=%u, ",pCurrentItem->Mac_rlc_meas_desc.Mac_avg.Harq_delay_forgetting_factor); - fprintf(stderr,".Bler_forgetting_factor=%u, ",pCurrentItem->Mac_rlc_meas_desc.Mac_avg.Bler_forgetting_factor); - fprintf(stderr,".Spec_eff_forgetting_factor=%u),\n",pCurrentItem->Mac_rlc_meas_desc.Mac_avg.Spec_eff_forgetting_factor); - fprintf(stderr," .bo_forgetting_factor=%u,",pCurrentItem->Mac_rlc_meas_desc.bo_forgetting_factor); - fprintf(stderr,".sdu_loss_trigger=%u,",pCurrentItem->Mac_rlc_meas_desc.sdu_loss_trigger); - fprintf(stderr,".Rep_amount=%u,",pCurrentItem->Mac_rlc_meas_desc.Rep_amount); - fprintf(stderr,".Rep_interval=%d,",pCurrentItem->Mac_rlc_meas_desc.Rep_interval); - */ - - fprintf(stderr,", .next=%p)\n", pCurrentItem->next ); - - pCurrentItem = pCurrentItem->next ; - } - - fprintf(stderr," ]\n"); -} - -/*! -******************************************************************************* -\brief La fonction ajoute un rb dans la liste des RB ouverts du Cluster head. - -\return retourne la valeur du nouvel element -*/ -RB_desc_t *add_rb( - RB_desc_t **rb_entry , ///< pointeur sur l'entree de la liste des RB - Transaction_t Trans_id , ///< transaction associee - QOS_CLASS_T QoS_class , ///< index de la classe de QoS - L2_ID *L2_id ///< ID de niveau 2 des noeuds associes au RB -) -{ - RB_desc_t *pOldEntry = *rb_entry; - RB_desc_t *pNewItem = RRM_CALLOC( RB_desc_t , 1 ) ; - - PNULL(pNewItem) ; - - if ( pNewItem == NULL ) - return NULL ; - - pNewItem->QoS_class = QoS_class ; - - memcpy( &(pNewItem->L2_id[0]) , L2_id, 2*sizeof(L2_ID) ) ; - - pNewItem->Trans_id = Trans_id ; - pNewItem->Rb_id = 0 ; - pNewItem->RB_type = 0; - - *rb_entry = pNewItem ; - pNewItem->next = pOldEntry; - - PRINT_RB_DB( *rb_entry ); - return pNewItem ; -} - -/*! -******************************************************************************* -\brief La fonction retire l'element identifie par le RB_id de la liste des RB - -\return aucune valeur. -*/ -void del_rb_by_rbid( - RB_desc_t **rb_entry , ///< pointeur sur l'entree de la liste des RB - RB_ID Rb_id ///< ID du RB a detruire -) -{ - RB_desc_t *pCurrentItem = *rb_entry; - RB_desc_t *pNextItem ; - RB_desc_t **ppPrevItem = rb_entry ; - - if ( (pCurrentItem == NULL) || (rb_entry==NULL)) - return ; - - while ( pCurrentItem != NULL ) { - pNextItem = pCurrentItem->next ; - - if ( Rb_id == pCurrentItem->Rb_id ) { - *ppPrevItem = pNextItem; - RRM_FREE( pCurrentItem ) ; - PRINT_RB_DB( *rb_entry ); - return ; - } - - ppPrevItem = &(pCurrentItem->next) ; - pCurrentItem = pNextItem ; - } - - if ( pCurrentItem == NULL ) - fprintf(stderr, "ERROR: RB_id (%d) unknown\n", Rb_id ) ; - - PRINT_RB_DB( *rb_entry ); -} - -/*! -******************************************************************************* -\brief La fonction retire l'element identifie par le Trans_id de la liste des RB - -\return aucune valeur. -*/ -void del_rb_by_transid( - RB_desc_t **rb_entry , ///< pointeur sur l'entree de la liste des RB - Transaction_t Trans_id ///< transaction identifiant le RB -) -{ - RB_desc_t *pCurrentItem = *rb_entry; - RB_desc_t *pNextItem ; - RB_desc_t **ppPrevItem = rb_entry ; - - if ( (pCurrentItem == NULL) || (rb_entry==NULL)) - return ; - - while ( pCurrentItem != NULL ) { - pNextItem = pCurrentItem->next ; - - if ( Trans_id == pCurrentItem->Trans_id ) { - *ppPrevItem = pNextItem; - RRM_FREE( pCurrentItem ) ; - PRINT_RB_DB( *rb_entry ); - return ; - } - - ppPrevItem = &(pCurrentItem->next) ; - pCurrentItem = pNextItem ; - } - - PRINT_RB_DB( *rb_entry ); -} - -/*! -******************************************************************************* -\brief La fonction detruit entierement la liste des RB - -\return aucune valeur. -*/ -void del_all_rb( - RB_desc_t **rb_entry ///< pointeur sur l'entree de la liste des RB -) -{ - RB_desc_t *pCurrentItem = *rb_entry; - RB_desc_t *pNextItem ; - - if ( (pCurrentItem == NULL) || (rb_entry==NULL)) - return ; - - while ( pCurrentItem != NULL ) { - pNextItem = pCurrentItem->next ; - RRM_FREE( pCurrentItem ) ; - pCurrentItem = pNextItem ; - } - - *rb_entry = NULL ; -} - -/*! -******************************************************************************* -\brief La fonction recherche le descripteur de RB identifie par le RB_id - la liste des RBs - -\return pointeur sur le descripteur de RB trouve sinon NULL . -*/ -RB_desc_t *get_rb_desc_by_rbid( - RB_desc_t *rb_entry , ///< pointeur sur l'entree de la liste des RB - RB_ID Rb_id ///< Id du descripteur de RB recherchee -) -{ - RB_desc_t *pCurrentItem = rb_entry; - - while ( pCurrentItem != NULL) { - if ( Rb_id == pCurrentItem->Rb_id ) - break ; - - pCurrentItem = pCurrentItem->next ; - } - - return pCurrentItem ; -} - -/*! -******************************************************************************* -\brief La fonction recherche le descripteur de RB identifie par le Trans_id - la liste des RBs - -\return pointeur sur le descripteur de RB trouve sinon NULL . -*/ -RB_desc_t *get_rb_desc_by_transid( - RB_desc_t *rb_entry , ///< pointeur sur l'entree de la liste des RB - Transaction_t Trans_id ///< transaction du descripteur de RB recherchee -) -{ - RB_desc_t *pCurrentItem = rb_entry; - - while ( pCurrentItem != NULL) { - if ( Trans_id == pCurrentItem->Trans_id ) - break ; - - pCurrentItem = pCurrentItem->next ; - } - - return pCurrentItem ; -} - -/*! -******************************************************************************* -\brief La fonction rafraichit les champs Rb_id, RB_type d'un descripteur - de RB identifie par le Trans_id la liste des RBs . - -\return aucune valeur -*/ -void update_rb_desc( - RB_desc_t *rb_entry , ///< pointeur sur un element de la liste des RB - Transaction_t Trans_id , ///< transaction id - RB_ID Rb_id , ///< RB id - RB_TYPE RB_type ///< type de RB -) -{ - RB_desc_t *pItem = get_rb_desc_by_transid(rb_entry,Trans_id); - - if ( pItem != NULL) { - pItem->Trans_id= -1 ; - pItem->Rb_id = Rb_id ; - pItem->RB_type = RB_type ; - } - - PRINT_RB_DB( rb_entry ); -} - -/*! -******************************************************************************* -\brief La fonction rafraichit le champs Rb_meas d'un RB identifie dans la - liste des RBs . - -\return aucune valeur -*/ -void update_rb_meas( - RB_desc_t *rb_entry , ///< pointeur sur un element de la liste des RB - RB_ID Rb_id , ///< RB id - L2_ID *L2_id , ///< ID de niveau 2 d'un des noeuds du RB - MAC_RLC_MEAS_T *Rb_meas ///< mesure RB effectue par le noeud -) -{ - RB_desc_t *pItem = get_rb_desc_by_rbid(rb_entry,Rb_id); - - if ( pItem != NULL) { - if ( memcmp(L2_id, &pItem->L2_id[0], sizeof(L2_ID) ) == 0 ) { - memcpy( &pItem->Rb_meas[0],Rb_meas, sizeof(MAC_RLC_MEAS_T) ) ; - } else if ( memcmp(L2_id, &pItem->L2_id[1], sizeof(L2_ID) ) == 0 ) { - memcpy( &pItem->Rb_meas[1],Rb_meas, sizeof(MAC_RLC_MEAS_T) ) ; - } - } - -} diff --git a/openair3/MESH/RRM/rb_db.h b/openair3/MESH/RRM/rb_db.h deleted file mode 100644 index b2f3495cb9..0000000000 --- a/openair3/MESH/RRM/rb_db.h +++ /dev/null @@ -1,88 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/*! -******************************************************************************* - -\file rb_db.h - -\brief Fichier d'entete contenant les declarations des types, des defines , - et des fonctions relatives a la gestion de la base de donnée sur - les radio bearers par le cluster head. - -\author BURLOT Pascal - -\date 29/08/08 - - -\par Historique: - $Author$ $Date$ $Revision$ - $Id$ - $Log$ - -******************************************************************************* -*/ -#ifndef RB_DB_H -#define RB_DB_H - -#ifdef __cplusplus -extern "C" { -#endif - -/*! -******************************************************************************* -\brief Structure de liste decrivant un radio bearer (RB) -*/ -typedef struct RB_desc_s { - Transaction_t Trans_id ; ///< transaction associe au RB - RB_ID Rb_id ; ///< ID du RB - RB_TYPE RB_type ; ///< type de RB - QOS_CLASS_T QoS_class ; ///< index sur la classe de QoS du RB - L2_ID L2_id[2] ; ///< ID de niveau 2 des noeuds du RB - MAC_RLC_MEAS_T Rb_meas[2] ; ///< Description de mesures RB associes a chaque noeud - struct RB_desc_s *next ; ///< pointeur sur le prochain descripteur de RB -} RB_desc_t ; - -// --------------------------------------------------------------------------- - - -RB_desc_t *add_rb( RB_desc_t **rb_entry,Transaction_t Trans_id, QOS_CLASS_T QoS_class, L2_ID *L2_id ) ; -void del_rb_by_rbid( RB_desc_t **rb_entry, RB_ID Rb_id ) ; -void del_rb_by_transid( RB_desc_t **rb_entry, Transaction_t Trans_id ) ; -void del_all_rb( RB_desc_t **rb_entry ) ; -RB_desc_t *get_rb_desc_by_rbid( RB_desc_t *rb_entry, RB_ID Rb_id ) ; -RB_desc_t *get_rb_desc_by_transid(RB_desc_t *rb_entry, Transaction_t Trans_id ) ; -void update_rb_desc( RB_desc_t *rb_entry, Transaction_t Trans_id, RB_ID Rb_id, RB_TYPE RB_type ); -void update_rb_meas( RB_desc_t *rb_entry, RB_ID Rb_id, L2_ID*L2_id, MAC_RLC_MEAS_T *Rb_meas ); - -#ifdef __cplusplus -} -#endif - -#endif /* RB_DB_H */ diff --git a/openair3/MESH/RRM/rb_mngt.c b/openair3/MESH/RRM/rb_mngt.c deleted file mode 100644 index f049bc96a7..0000000000 --- a/openair3/MESH/RRM/rb_mngt.c +++ /dev/null @@ -1,571 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/*! -******************************************************************************* - -\file rb_mngt.c - -\brief Fonctions permettant la gestion des radio bearers du cluster par - le cluster head - -\author BURLOT Pascal - -\date 29/08/08 - - -\par Historique: - P.BURLOT 2009-01-20 - + separation de la file de message CMM/RRM a envoyer en 2 files - distinctes ( file_send_cmm_msg, file_send_rrc_msg) - L. IACOBELLI 2010-01-05 - + inclusions - -******************************************************************************* -*/ -#include -#include -#include -#include -#include - -#include -#include - -#include - -#include "debug.h" -#include "L3_rrc_defs.h" -#include "L3_rrc_interface.h" -#include "cmm_rrm_interface.h" -#include "rrm_sock.h" -#include "rrc_rrm_msg.h" -#include "cmm_msg.h" -#include "pusu_msg.h" -#include "msg_mngt.h" -#include "rb_db.h" -#include "neighbor_db.h" -#include "sens_db.h" -#include "channels_db.h" -#include "rrm_util.h" -#include "transact.h" -#include "rrm_constant.h" -#include "rrm.h" -#include "rb_mngt.h" - -//! Met un message dans la file des messages a envoyer -#define PUT_CMM_MSG(m) put_msg( &(rrm->file_send_cmm_msg), 0, rrm->cmm.s,m ) //mod_lor_10_01_25 -#define PUT_PUSU_MSG(m) put_msg( &(rrm->file_send_cmm_msg), 0, rrm->pusu.s,m) //mod_lor_10_01_25 -#define PUT_RRC_MSG(m) put_msg( &(rrm->file_send_rrc_msg), 0, rrm->rrc.s,m ) //mod_lor_10_01_25 - -/* - * ========================================================================= - * OUVERTURE D'UN RADIO BEARER - * ========================================================================= - */ - -/*! -******************************************************************************* - \brief CMM connection setup request. Only in CH. It asks to create a - * connection p2p between CH and MR -*/ -int cmm_cx_setup_req( - Instance_t inst , //!< Identification de l'instance - L2_ID Src , //!< L2 source MAC address - L2_ID Dst , //!< L2 destination MAC address - QOS_CLASS_T QoS_class , //!< QOS class index - Transaction_t Trans_id //!< Transaction ID -) -{ - int ret = -1 ; - rrm_t *rrm = &rrm_inst[inst] ; - - if ( (rrm->state == CLUSTERHEAD_INIT1 ) || (rrm->state == CLUSTERHEAD ) ) { - L2_ID src_dst[2] ; - memcpy(&src_dst[0], &Src, sizeof(L2_ID)) ; - memcpy(&src_dst[1], &Dst, sizeof(L2_ID)) ; - - pthread_mutex_lock( &( rrm->cmm.exclu ) ) ; - //fprintf(stderr,"item_trans in CMM_CX_SETUP_REQ=%d node %d\n",rrm->cmm.trans_cnt,rrm->id);//dbg - add_item_transact( &(rrm->cmm.transaction), Trans_id,INT_CMM,CMM_CX_SETUP_REQ, 0,NO_PARENT); - pthread_mutex_unlock( &( rrm->cmm.exclu ) ) ; - - /** \todo Evaluer si le RB peut etre cree avant d'envoyer la commande au RRC */ - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; - rrm->rrc.trans_cnt++ ; - //fprintf(stderr,"item_trans in RRM_RB_ESTABLISH_REQ=%d node %d\n",rrm->rrc.trans_cnt,rrm->id);//dbg - add_item_transact( &(rrm->rrc.transaction), rrm->rrc.trans_cnt ,INT_RRC,RRM_RB_ESTABLISH_REQ,Trans_id,PARENT); - add_rb( &(rrm->rrc.pRbEntry), rrm->rrc.trans_cnt, QoS_class, &src_dst[0] ) ; - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - - PUT_RRC_MSG( - msg_rrm_rb_establish_req(inst, - &Lchan_desc[QoS_class], - &Mac_rlc_meas_desc[QoS_class], - &src_dst[0] , - rrm->rrc.trans_cnt, - NULL,NONE_L3) - ) ; - - if(QoS_class == QOS_DTCH_D) { //faire le srb2 seulement a l'attachement (ouverture du DTCH IP par Defaut) - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; - rrm->rrc.trans_cnt++ ; - //fprintf(stderr,"item_trans in RRM_RB_ESTABLISH_REQ 2=%d node %d\n",rrm->rrc.trans_cnt,rrm->id);//dbg - add_item_transact( &(rrm->rrc.transaction), rrm->rrc.trans_cnt ,INT_RRC,RRM_RB_ESTABLISH_REQ,0,NO_PARENT); - add_rb( &(rrm->rrc.pRbEntry), rrm->rrc.trans_cnt, QOS_SRB2, &src_dst[0] ) ; - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - - - PUT_RRC_MSG( - msg_rrm_rb_establish_req(inst, - &Lchan_desc[QOS_SRB2], - &Mac_rlc_meas_desc[QOS_SRB2], - &src_dst[0] , - rrm->rrc.trans_cnt, - rrm->L3_info,rrm->L3_info_t) - ) ; - } - - ret = 0 ; - } else { - if ( rrm->state == CLUSTERHEAD_INIT0 ) { - L2_ID src_dst[2] ; - - pthread_mutex_lock( &( rrm->cmm.exclu ) ) ; - //fprintf(stderr,"item_trans in CMM_CX_SETUP_REQ 2=%d node %d\n",rrm->cmm.trans_cnt,rrm->id);//dbg - add_item_transact( &(rrm->cmm.transaction), Trans_id, INT_CMM, CMM_CX_SETUP_REQ,0,NO_PARENT); - pthread_mutex_unlock( &( rrm->cmm.exclu ) ) ; - - /** \todo Evaluer si le RB peut etre cree avant de solliciter le RRC */ - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; - - memcpy(&src_dst[0], &Src, sizeof(L2_ID)) ; - memcpy(&src_dst[1], &Dst, sizeof(L2_ID)) ; - - rrm->rrc.trans_cnt++ ; - PUT_RRC_MSG( - msg_rrm_rb_establish_req(inst, - &Lchan_desc[QOS_DTCH_B], - &Mac_rlc_meas_desc[QOS_DTCH_B], - &src_dst[0] , - rrm->rrc.trans_cnt, - rrm->L3_info,rrm->L3_info_t) - ) ; - //fprintf(stderr,"item_trans in RRM_RB_ESTABLISH_REQ 3=%d node %d\n",rrm->rrc.trans_cnt,rrm->id);//dbg - add_item_transact( &(rrm->rrc.transaction), rrm->rrc.trans_cnt ,INT_RRC,RRM_RB_ESTABLISH_REQ,Trans_id,PARENT); - - add_rb( &(rrm->rrc.pRbEntry), rrm->rrc.trans_cnt, QOS_DTCH_B, &src_dst[0] ) ; - - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - - rrm->state = CLUSTERHEAD_INIT1 ; - fprintf(stderr,"[RRM] CLUSTERHEAD_INIT1\n" ); - ret = 0 ; - } else - fprintf(stderr,"[RRM] CMM_CX_SETUP_REQ (%d) is not allowed (Only CH):etat=%d\n", Trans_id, rrm->state); - } - - return ret ; -} - -/*! -******************************************************************************* -\brief RRC response to rb_establish_req. RRC Acknowledgement of reception of - rrc_rb_establishment_req. -*/ -void rrc_rb_establish_resp( - Instance_t inst , //!< Identification de l'instance - Transaction_t Trans_id //!< Transaction ID -) -{ - rrm_t *rrm = &rrm_inst[inst] ; - - if ( (rrm->state == CLUSTERHEAD) - || (rrm->state == CLUSTERHEAD_INIT0) - || (rrm->state == CLUSTERHEAD_INIT1) - ) { - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; - set_ttl_transact(rrm->rrc.transaction, Trans_id, TTL_DEFAULT_VALUE ) ; - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - } else - fprintf(stderr,"[RRM] RRC_RB_ESTABLISH_RESP (%d) is not allowed (Only CH):etat=%d\n",Trans_id,rrm->state); -} -/*! -******************************************************************************* -\brief Liberation d'un radio bearer - */ -static void rb_release_req( - Instance_t inst , ///< Identification de l'instance - rrm_t *rrm , ///< pointeur sur l'instance du RRM - RB_ID Rb_id , ///< Id du RB a liberer - unsigned int parentTransact , ///< Transaction parent ( a l'origne de la requete ) - unsigned int status_parent ///< Status du parent -) -{ - rrm->rrc.trans_cnt++ ; - PUT_RRC_MSG( msg_rrm_rb_release_req(inst,Rb_id, rrm->rrc.trans_cnt) ); - add_item_transact( &(rrm->rrc.transaction), rrm->rrc.trans_cnt, INT_RRC, RRM_RB_RELEASE_REQ, parentTransact,status_parent); -} - -/*! -******************************************************************************* -\brief RRC confirmation of rb_establish_req. RRC confirmation of - rrc_rb_establishment_req after transactions are complete. - Essentially for CH only (except SRB0/1) -*/ -void rrc_rb_establish_cfm( - Instance_t inst , //!< Identification de l'instance - RB_ID Rb_id , //!< Radio Bearer ID used by RRC - RB_TYPE RB_type , //!< Radio Bearer Type - Transaction_t Trans_id //!< Transaction ID -) -{ - rrm_t *rrm = &rrm_inst[inst] ; - - if ( (rrm->state == CLUSTERHEAD) - || (rrm->state == CLUSTERHEAD_INIT0) - || (rrm->state == CLUSTERHEAD_INIT1) - ) { - transact_t *pTransact ; - - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; - pTransact = get_item_transact(rrm->rrc.transaction,Trans_id ) ; - - if ( pTransact == NULL ) { - fprintf(stderr,"[RRM] rrc_rb_establish_cfm (%d) unknown transaction\n",Trans_id); - // comme la transaction est inconnue, on libere immediatement le - // tuyau nouvellement cree (au niveau du RRC uniquement) - rb_release_req( inst, rrm,Rb_id,0,NO_PARENT ); - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - } else { - unsigned int parent_id = pTransact->parent_id ; - unsigned int status_parent = pTransact->parent_status ; - - update_rb_desc(rrm->rrc.pRbEntry, Trans_id, Rb_id, RB_type ); - del_item_transact( &(rrm->rrc.transaction),Trans_id ) ; - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - - if ( status_parent ) { - transact_t *pTransactParent; - - pthread_mutex_lock( &( rrm->cmm.exclu ) ) ; - pTransactParent = get_item_transact(rrm->cmm.transaction,parent_id ) ; - - if ( pTransactParent != NULL ) { - PUT_CMM_MSG( msg_rrm_cx_setup_cnf(inst,Rb_id,pTransactParent->id )); - - if ( rrm->state == CLUSTERHEAD_INIT1 ) - rrm->state = CLUSTERHEAD ; - - del_item_transact( &(rrm->cmm.transaction),pTransactParent->id ) ; - pthread_mutex_unlock( &( rrm->cmm.exclu ) ) ; - } else { - // comme la transaction parent est inconnue, on libere - // immediatement le tuyau nouvellement cree (au niveau - // du RRC uniquement) - pthread_mutex_unlock( &( rrm->cmm.exclu ) ) ; - - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; - rb_release_req( inst, rrm,Rb_id, 0, NO_PARENT ); - del_rb_by_rbid( &(rrm->rrc.pRbEntry), Rb_id ) ; - pthread_mutex_unlock( &( rrm->rrc.exclu ) ); - } - } - - pthread_mutex_unlock( &( rrm->cmm.exclu ) ) ; - } - } else - fprintf(stderr,"[RRM] RRC_RB_ESTABLISH_CFM (%d) is not allowed (Only CH):etat=%d\n",Trans_id,rrm->state); -} - -/* - * ========================================================================= - * MODICATION D'UN RADIO BEARER - * ========================================================================= - */ - -/*! -******************************************************************************* -\brief CMM connection modify request. Only in CH. - -*/ -int cmm_cx_modify_req( - Instance_t inst , //!< Identification de l'instance - RB_ID Rb_id , //!< L2 Rb_id - QOS_CLASS_T QoS_class , //!< QOS class index - Transaction_t Trans_id //!< Transaction ID -) -{ - int ret = -1 ; - rrm_t *rrm = &rrm_inst[inst] ; - - if ( rrm->state == CLUSTERHEAD ) { - RB_desc_t *pRb ; - - pthread_mutex_lock( &( rrm->cmm.exclu ) ) ; - add_item_transact( &(rrm->cmm.transaction), Trans_id,INT_CMM,CMM_CX_MODIFY_REQ,0,NO_PARENT); - pthread_mutex_unlock( &( rrm->cmm.exclu ) ) ; - - /** \todo Evaluer si le RB peut etre modifier avant de solliciter le RRC */ - pRb = (RB_desc_t *) get_rb_desc_by_rbid( rrm->rrc.pRbEntry, Rb_id ) ; - - if ( pRb != NULL ) { - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; - rrm->rrc.trans_cnt++ ; - - PUT_RRC_MSG( - msg_rrm_rb_modify_req( inst, - &Lchan_desc[QoS_class], - &Mac_rlc_meas_desc[QoS_class], - Rb_id, - rrm->rrc.trans_cnt) - ) ; - - add_item_transact( &(rrm->rrc.transaction), rrm->rrc.trans_cnt ,INT_RRC,RRM_RB_MODIFY_REQ,Trans_id,PARENT); - add_rb( &(rrm->rrc.pRbEntry), rrm->rrc.trans_cnt, QoS_class, &pRb->L2_id[0] ) ; - - pRb->QoS_class = QoS_class ; - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - } - - ret = 0 ; - } else - fprintf(stderr,"[RRM] CMM_CX_MODIFY_REQ (%d) is not allowed (Only CH):etat=%d\n",Trans_id,rrm->state); - - return ret ; -} -/*! -******************************************************************************* -\brief RRC response to rb_modify_req -*/ -void rrc_rb_modify_resp( - Instance_t inst , //!< Identification de l'instance - Transaction_t Trans_id //!< Transaction ID -) -{ - rrm_t *rrm = &rrm_inst[inst] ; - - if ( (rrm->state == CLUSTERHEAD) - || (rrm->state == CLUSTERHEAD_INIT0) - || (rrm->state == CLUSTERHEAD_INIT1) - ) { - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; - set_ttl_transact(rrm->rrc.transaction,Trans_id, TTL_DEFAULT_VALUE) ; - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - } else - fprintf(stderr,"[RRM] RRC_RB_MODIFY_RESP (%d) is not allowed (Only CH):etat=%d\n",Trans_id,rrm->state); -} -/*! -******************************************************************************* -\brief RRC confirmation of rb_modify_req -*/ -void rrc_rb_modify_cfm( - Instance_t inst , //!< Identification de l'instance - RB_ID Rb_id , //!< Radio Bearer ID used by RRC - Transaction_t Trans_id //!< Transaction ID -) -{ - rrm_t *rrm = &rrm_inst[inst] ; - - if ( rrm->state == CLUSTERHEAD ) { - transact_t *pTransact ; - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; - pTransact = get_item_transact(rrm->rrc.transaction,Trans_id ) ; - - if ( pTransact == NULL ) { - fprintf(stderr,"[RRM] rrc_rb_modify_cfm (%d) unknown transaction\n",Trans_id); - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - } else { - unsigned int parent_id = pTransact->parent_id ; - unsigned int status_parent = pTransact->parent_status ; - - RB_desc_t * pRb = (RB_desc_t *) get_rb_desc_by_rbid( rrm->rrc.pRbEntry, Rb_id ) ; - - if ( pRb != NULL ) { - RB_TYPE RB_type = pRb->RB_type ; - // détruit l'ancienne description - del_rb_by_rbid( &(rrm->rrc.pRbEntry), Rb_id ) ; - // mise à jour de la nouvelle - update_rb_desc(rrm->rrc.pRbEntry, Trans_id, Rb_id, RB_type ); - } - - del_item_transact( &(rrm->rrc.transaction),Trans_id ) ; - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - - pthread_mutex_lock( &( rrm->cmm.exclu ) ) ; - - if ( status_parent ) { - transact_t *pTransactParent = get_item_transact(rrm->cmm.transaction,parent_id ) ; - - if ( pTransactParent != NULL ) { - PUT_CMM_MSG( msg_rrm_cx_modify_cnf(inst,pTransactParent->id )); - del_item_transact( &(rrm->cmm.transaction),pTransactParent->id ) ; - } else // la transaction parent est inconnue, on ne fait rien - fprintf(stderr, "[RRM] RRC_RB_MODIFY_CFM (%d) : the parent transaction (%d) is unknown\n",Trans_id,parent_id); - } - - pthread_mutex_unlock( &( rrm->cmm.exclu ) ) ; - } - } else - fprintf(stderr,"[RRM] RRC_RB_MODIFY_CFM (%d) is not allowed (Only CH):etat=%d\n",Trans_id,rrm->state); -} - -/* - * ========================================================================= - * LIBERATION D'UN RADIO BEARER - * ========================================================================= - */ - -/*! -******************************************************************************* -\brief CMM connection release request. Only in CH. - */ -int cmm_cx_release_req( - Instance_t inst , //!< Identification de l'instance - RB_ID Rb_id , //!< L2 Rb_id - Transaction_t Trans_id //!< Transaction ID -) -{ - int ret = -1 ; - rrm_t *rrm = &rrm_inst[inst] ; - - if ( rrm->state == CLUSTERHEAD ) { - pthread_mutex_lock( &( rrm->cmm.exclu ) ) ; - add_item_transact( &(rrm->cmm.transaction), Trans_id,INT_CMM,CMM_CX_RELEASE_REQ,0,NO_PARENT); - pthread_mutex_unlock( &( rrm->cmm.exclu ) ) ; - - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; - rb_release_req( inst, rrm,Rb_id,Trans_id, PARENT ); - del_rb_by_rbid( &(rrm->rrc.pRbEntry), Rb_id ) ; - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - - ret = 0 ; - } else - fprintf(stderr,"[RRM] CMM_CX_RELEASE_REQ (%d) is not allowed (Only CH):etat=%d\n",Trans_id,rrm->state); - - return ret ; -} - -/*! -******************************************************************************* -\brief RRC response to rb_release_req -*/ -void rrc_rb_release_resp( - Instance_t inst , //!< Identification de l'instance - Transaction_t Trans_id //!< Transaction ID -) -{ - rrm_t *rrm = &rrm_inst[inst] ; - - if ( rrm->state == CLUSTERHEAD ) { - transact_t *pTransact ; - - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; - pTransact = get_item_transact(rrm->rrc.transaction,Trans_id ) ; - - if ( pTransact == NULL ) { - fprintf(stderr,"[RRM] rrc_rb_release_resp (%d) unknown transaction\n",Trans_id); - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - } else { - unsigned int parent_id = pTransact->parent_id ; - unsigned int status_parent = pTransact->parent_status ; - - del_item_transact( &(rrm->rrc.transaction),Trans_id ) ; - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - - pthread_mutex_lock( &( rrm->cmm.exclu ) ) ; - - if ( status_parent ) { - transact_t *pTransactParent = get_item_transact(rrm->cmm.transaction,parent_id ) ; - - if ( pTransactParent != NULL ) { - PUT_CMM_MSG( msg_rrm_cx_release_cnf(inst,pTransactParent->id ) ); - del_item_transact( &(rrm->cmm.transaction),pTransactParent->id ) ; - } else // la transaction parent est inconnue, on ne fait rien - fprintf(stderr,"[RRM] RRC_RB_RELEASE_RESP (%d) : the parent transaction (%d) is unknown\n",Trans_id,parent_id); - } - - pthread_mutex_unlock( &( rrm->cmm.exclu ) ) ; - } - } else - fprintf(stderr,"[RRM] RRC_RB_RELEASE_RESP (%d) is not allowed (Only CH):etat=%d\n",Trans_id,rrm->state); -} - -/* - * ========================================================================= - * MESURES SUR UN RADIO BEARER - * ========================================================================= - */ -/*! -******************************************************************************* -\brief RRC measurement indication - */ -void rrc_rb_meas_ind( - Instance_t inst , //!< Identification de l'instance - RB_ID Rb_id , //!< Radio Bearer ID - L2_ID L2_id , //!< Layer 2 (MAC) IDs for link - MEAS_MODE Meas_mode , //!< Measurement mode (periodic or event-driven) - MAC_RLC_MEAS_T Mac_rlc_meas , //!< MAC/RLC measurements - Transaction_t Trans_id //!< Transaction ID -) -{ - rrm_t *rrm = &rrm_inst[inst] ; - - if ( rrm->state == CLUSTERHEAD ) { - PUT_RRC_MSG( msg_rrm_rb_meas_resp(inst,Trans_id) ); - - if ( Meas_mode == PERIODIC ) { - RB_desc_t *pRb ; - int ii_rb = 1 ; - int transaction_link_info ; - - // update database of RB - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; - update_rb_meas( rrm->rrc.pRbEntry, Rb_id, &L2_id, &Mac_rlc_meas ); - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - - pthread_mutex_lock( &( rrm->pusu.exclu ) ) ; - rrm->pusu.trans_cnt++ ; - transaction_link_info = rrm->pusu.trans_cnt ; - add_item_transact( &(rrm->pusu.transaction), transaction_link_info,INT_PUSU,RRM_LINK_INFO_IND,0,NO_PARENT); - pthread_mutex_unlock( &( rrm->pusu.exclu ) ) ; - - pRb = get_rb_desc_by_rbid( rrm->rrc.pRbEntry, Rb_id ) ; - - if ( memcmp(&L2_id, &pRb->L2_id[1], sizeof(L2_ID ) ) == 0 ) - ii_rb=0 ; - - PUT_PUSU_MSG( - msg_rrm_link_info_ind(inst, L2_id , pRb->L2_id[ii_rb] , Rb_id, - Mac_rlc_meas.Rssi ,Mac_rlc_meas.Spec_eff, transaction_link_info ) - ); - } - } else - fprintf(stderr,"[RRM] RRC_RB_MEAS_IND (%d) is not allowed (Only CH):etat=%d\n",Trans_id,rrm->state); -} diff --git a/openair3/MESH/RRM/rb_mngt.h b/openair3/MESH/RRM/rb_mngt.h deleted file mode 100644 index dafe810975..0000000000 --- a/openair3/MESH/RRM/rb_mngt.h +++ /dev/null @@ -1,66 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/*! -******************************************************************************* - -\file rb_mngt.h - -\brief Fichier d'entete contenant les declarations des types, des defines , - et des fonctions relatives a la gestion des radio bearers par - le cluster head. - -\author BURLOT Pascal - -\date 29/08/08 - - -\par Historique: - $Author$ $Date$ $Revision$ - $Id$ - $Log$ - -******************************************************************************* -*/ - -#ifndef RB_MNGT_H -#define RB_MNGT_H - -#ifdef __cplusplus -extern "C" { -#endif - -// --------------------------------------------------------------------------- - - -#ifdef __cplusplus -} -#endif - -#endif /* RB_MNGT_H */ diff --git a/openair3/MESH/RRM/rrc_2_rrm_msg.c b/openair3/MESH/RRM/rrc_2_rrm_msg.c deleted file mode 100644 index b6294d1727..0000000000 --- a/openair3/MESH/RRM/rrc_2_rrm_msg.c +++ /dev/null @@ -1,724 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/*! -******************************************************************************* - -\file rrc_2_rrm_msg.c - -\brief Fonctions permettant le formattage des donnees pour l'envoi d'un - message sur le socket entre le RRC et le RRM - -\author BURLOT Pascal - -\date 16/07/08 - - -\par Historique: - P.BURLOT 2009-01-20 - Correction de bug (debordement memoire) remplacement de la macro - RRM_CALLOC() par RRM_CALLOC2() dans la fonction msg_rrc_sensing_meas_ind() - L. IACOBELLI 2010-01-05 - + new messages for sensing - -******************************************************************************* -*/ -#ifdef RRC_EMUL - -#include -#include -#include -#include -#include "L3_rrc_defs.h" -#include "rrm_sock.h" -#include "L3_rrc_interface.h" -#include "rrc_rrm_msg.h" -#include "rrm_util.h" -//#include "sensing_rrm_msg.h" //mod_lor_10_04_15 - -#else - -#include "defs.h" - -#endif - -#ifdef TRACE -//! Macro creant la chaine a partir du nom de la variable -#define STRINGIZER(x) #x -//! Tableau pour le mode trace faisant la translation entre le numero et le nom du message -const char *Str_msg_rrc_rrm[NB_MSG_RRC_RRM] = { - STRINGIZER(RRM_RB_ESTABLISH_REQ ), - STRINGIZER(RRC_RB_ESTABLISH_RESP ), - STRINGIZER(RRC_RB_ESTABLISH_CFM ), - STRINGIZER(RRM_RB_MODIFY_REQ ), - STRINGIZER(RRC_RB_MODIFY_RESP ), - STRINGIZER(RRC_RB_MODIFY_CFM ), - STRINGIZER(RRM_RB_RELEASE_REQ ), - STRINGIZER(RRC_RB_RELEASE_RESP ), - STRINGIZER(RRC_MR_ATTACH_IND ), - STRINGIZER(RRM_SENSING_MEAS_REQ ), - STRINGIZER(RRC_SENSING_MEAS_RESP ), - STRINGIZER(RRC_CX_ESTABLISH_IND ), - STRINGIZER(RRC_PHY_SYNCH_TO_MR_IND ), - STRINGIZER(RRC_PHY_SYNCH_TO_CH_IND ), - STRINGIZER(RRCI_CX_ESTABLISH_RESP ), - STRINGIZER(RRC_SENSING_MEAS_IND ), - STRINGIZER(RRM_SENSING_MEAS_RESP ), - STRINGIZER(RRC_RB_MEAS_IND ), - STRINGIZER(RRM_RB_MEAS_RESP ), - STRINGIZER(RRM_INIT_CH_REQ ), - STRINGIZER(RRCI_INIT_MR_REQ ), - STRINGIZER(RRC_UPDATE_SENS ), - STRINGIZER(RRM_INIT_MON_REQ ), - STRINGIZER(RRM_INIT_SCAN_REQ ), - STRINGIZER(RRC_INIT_SCAN_REQ ), - STRINGIZER(RRM_SCAN_ORD ), - // STRINGIZER(UPDATE_SENS_RESULTS_3 ), //mod_lor_10_01_25 - STRINGIZER(RRM_END_SCAN_REQ ), - STRINGIZER(RRC_END_SCAN_REQ ), - STRINGIZER(RRC_END_SCAN_CONF ), - // STRINGIZER(OPEN_FREQ_QUERY_4 ), - // STRINGIZER(UPDATE_OPEN_FREQ_7 ), - // STRINGIZER(UPDATE_SN_OCC_FREQ_5 ), - STRINGIZER(RRM_UP_FREQ_ASS ), - STRINGIZER(RRM_END_SCAN_CONF ), - STRINGIZER(RRC_UP_FREQ_ASS ),//add_lor_10_11_05 - STRINGIZER(RRM_UP_FREQ_ASS_SEC ),//add_lor_10_11_05 - STRINGIZER(RRC_UP_FREQ_ASS_SEC )/*,//add_lor_10_11_05 - STRINGIZER(RRC_OPEN_FREQ ), - STRINGIZER(RRM_OPEN_FREQ ), - STRINGIZER(RRM_UPDATE_SN_FREQ ), - STRINGIZER(RRC_UPDATE_SN_FREQ ), - STRINGIZER(RRM_CLUST_SCAN_REQ ), - STRINGIZER(RRC_CLUST_SCAN_REQ ), - STRINGIZER(RRM_CLUST_SCAN_CONF ), - STRINGIZER(RRM_CLUST_MON_REQ ), - STRINGIZER(RRC_CLUST_MON_REQ ), - STRINGIZER(RRM_CLUST_MON_CONF ), - STRINGIZER(RRM_END_SCAN_CONF ), - STRINGIZER(RRM_INIT_CONN_REQ ), - STRINGIZER(RRC_INIT_CONN_CONF ), - STRINGIZER(RRM_FREQ_ALL_PROP ), - STRINGIZER(RRC_FREQ_ALL_PROP_CONF ), - STRINGIZER(RRM_REP_FREQ_ALL ), - STRINGIZER(RRC_REP_FREQ_ACK ), - STRINGIZER(RRC_INIT_CONN_REQ ), - STRINGIZER(RRM_CONN_SET ), - STRINGIZER(RRC_FREQ_ALL_PROP ), - STRINGIZER(RRM_FREQ_ALL_PROP_CONF ), - STRINGIZER(RRC_REP_FREQ_ALL ), - STRINGIZER(RRM_REP_FREQ_ACK ) */ - -} ; -#endif - -/*! -******************************************************************************* -\brief This function initialize the message header -\return any return value -*/ -static void init_rrc_msg_head( - msg_head_t *msg_head , //!< message header to initialize - Instance_t inst , //!< Instance ID - MSG_RRC_RRM_T msg_type , //!< type of message to initialize - unsigned int size , //!< size of message - Transaction_t Trans_id //!< transaction id associated to this message -) -{ - if ( msg_head != NULL ) { - msg_head->start = START_MSG ; - msg_head->msg_type = 0xFF & msg_type ; - msg_head->inst = inst ; - msg_head->Trans_id = Trans_id ; - msg_head->size = size; - } -} - - -/*! -******************************************************************************* -\brief La fonction formate en un message generique de reponse pour les - fonctions : - - rrc_rb_establish_resp(),rrc_rb_modify_resp(),rrc_rb_modify_resp(), - - rrc_rb_release_resp() et rrc_sensing_meas_resp() . -\return message formate -*/ -static msg_t *msg_rrc_generic_resp( - Instance_t inst , //!< Instance ID - MSG_RRC_RRM_T msg_type , //!< type of message - Transaction_t Trans_id //!< Transaction ID -) -{ - - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - init_rrc_msg_head(&(msg->head),inst, msg_type, 0 , Trans_id); - msg->data = NULL ; - } - - return msg ; -} - -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - rrc_rb_establish_resp(). -\return message formate -*/ -msg_t *msg_rrc_rb_establish_resp( - Instance_t inst , //!< Instance ID - Transaction_t Trans_id //!< Transaction ID -) -{ - return msg_rrc_generic_resp( inst, RRC_RB_ESTABLISH_RESP, Trans_id) ; -} -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - rrc_rb_establish_cfm(). -\return message formate -*/ -msg_t *msg_rrc_rb_establish_cfm( - Instance_t inst , //!< Instance ID - RB_ID Rb_id , //!< Radio Bearer ID used by RRC - RB_TYPE RB_type , //!< Radio Bearer Type - Transaction_t Trans_id //!< Transaction ID -) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - rrc_rb_establish_cfm_t *p = RRM_CALLOC(rrc_rb_establish_cfm_t , 1 ) ; - - if ( p != NULL ) { - init_rrc_msg_head(&(msg->head),inst,RRC_RB_ESTABLISH_CFM, sizeof( rrc_rb_establish_cfm_t ) ,Trans_id); - - - p->Rb_id = Rb_id ; - p->RB_type = RB_type ; - } - - msg->data = (char *) p ; - } - - return msg ; - -} - -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - rrc_rb_modify_resp(). -\return message formate -*/ -msg_t *msg_rrc_rb_modify_resp( - Instance_t inst , //!< Instance ID - Transaction_t Trans_id //!< Transaction ID -) -{ - return msg_rrc_generic_resp( inst,RRC_RB_MODIFY_RESP, Trans_id) ; -} -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - rrc_rb_modify_cfm(). -\return message formate -*/ -msg_t *msg_rrc_rb_modify_cfm( - Instance_t inst , //!< Instance ID - RB_ID Rb_id , //!< Radio Bearer ID used by RRC - Transaction_t Trans_id //!< Transaction ID -) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - rrc_rb_modify_cfm_t *p = RRM_CALLOC(rrc_rb_modify_cfm_t , 1 ) ; - - if ( p != NULL ) { - init_rrc_msg_head(&(msg->head),inst,RRC_RB_MODIFY_CFM, sizeof( rrc_rb_modify_cfm_t ) ,Trans_id); - - - p->Rb_id = Rb_id ; - } - - msg->data = (char *) p ; - } - - return msg ; - -} - -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - rrc_rb_release_resp(). -\return message formate -*/ -msg_t *msg_rrc_rb_release_resp( - Instance_t inst , //!< Instance ID - Transaction_t Trans_id //!< Transaction ID -) -{ - return msg_rrc_generic_resp( inst,RRC_RB_RELEASE_RESP, Trans_id) ; -} -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - rrc_MR_attach_ind(). -\return message formate -*/ -msg_t * msg_rrc_MR_attach_ind( - Instance_t inst , //!< Instance ID - L2_ID L2_id -) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - rrc_MR_attach_ind_t *p = RRM_CALLOC(rrc_MR_attach_ind_t , 1 ) ; - - if ( p != NULL ) { - init_rrc_msg_head(&(msg->head),inst,RRC_MR_ATTACH_IND, sizeof( rrc_MR_attach_ind_t ) ,0); - - memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ; - } - - msg->data = (char *) p ; - } - - return msg ; -} - -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - rrc_sensing_meas_resp(). -\return message formate -*/ -msg_t *msg_rrc_sensing_meas_resp( - Instance_t inst , //!< Instance ID - Transaction_t Trans_id //!< Transaction ID -) -{ - return msg_rrc_generic_resp( inst,RRC_SENSING_MEAS_RESP, Trans_id) ; -} -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - rrc_cx_establish_ind(). -\return message formate -*/ -msg_t * msg_rrc_cx_establish_ind( - Instance_t inst , //!< Instance ID - L2_ID L2_id , //!< Layer 2 (MAC) ID - Transaction_t Trans_id , //!< Transaction ID - unsigned char *L3_info , //!< Optional L3 Information - L3_INFO_T L3_info_t , //!< Type of L3 Information - RB_ID DTCH_B_id , //!< RBID of broadcast IP service (MR only) - RB_ID DTCH_id //!< RBID of default IP service (MR only) -) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - rrc_cx_establish_ind_t *p = RRM_CALLOC(rrc_cx_establish_ind_t , 1 ) ; - - if ( p != NULL ) { - init_rrc_msg_head(&(msg->head),inst,RRC_CX_ESTABLISH_IND, sizeof( rrc_cx_establish_ind_t ) ,Trans_id); - - - memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ; - - p->DTCH_B_id = DTCH_B_id ; - p->DTCH_id = DTCH_id ; - - p->L3_info_t = L3_info_t ; - - if ( L3_info_t == IPv4_ADDR ) - memcpy( p->L3_info, L3_info, 4 ); - else if ( L3_info_t == IPv6_ADDR ) - memcpy( p->L3_info, L3_info, 16 ); - } - - msg->data = (char *) p ; - } - - return msg ; - -} -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - rrc_phy_synch_to_MR_ind(). -\return message formate -*/ -msg_t * msg_rrc_phy_synch_to_MR_ind( - Instance_t inst , //!< Instance ID - L2_ID L2_id -) -{ - - msg_t *smsg = RRM_CALLOC(msg_t , 1 ) ; - - if ( smsg != NULL ) { - rrc_phy_synch_to_MR_ind_t *p = RRM_CALLOC(rrc_phy_synch_to_MR_ind_t , 1) ; - - if ( p != NULL ) { - init_rrc_msg_head(&(smsg->head),inst,RRC_PHY_SYNCH_TO_MR_IND, sizeof( rrc_phy_synch_to_MR_ind_t ) ,0); - memcpy(&p->L2_id,(L2_ID*)&L2_id,sizeof(L2_ID)); - } - - smsg->data = (char *)p ; - msg("[msg_rrc_phy_synch_to_MR_ind] from Inst :%d\n",smsg->head.inst); - } - - return smsg ; -} -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - rrc_phy_synch_to_CH_ind(). -\return message formate -*/ -msg_t * msg_rrc_phy_synch_to_CH_ind( - Instance_t inst , //!< Instance ID - unsigned int Ch_index , //!< Clusterhead index - L2_ID L2_id -) -{ - msg_t *smsg = RRM_CALLOC(msg_t , 1 ) ; - - if ( smsg != NULL ) { - rrc_phy_synch_to_CH_ind_t *p = RRM_CALLOC(rrc_phy_synch_to_CH_ind_t , 1) ; - - if ( p != NULL ) { - init_rrc_msg_head(&(smsg->head),inst, RRC_PHY_SYNCH_TO_CH_IND, sizeof( rrc_phy_synch_to_CH_ind_t ) ,0); - - p->Ch_index = Ch_index ; - memcpy(&p->L2_id,(L2_ID*)&L2_id,sizeof(L2_ID)); - } - - smsg->data = (char *) p ; - msg("[msg_rrc_phy_synch_to_CH_ind] from Inst :%d\n",smsg->head.inst); - } - - return smsg ; -} - -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - rrc_sensing_meas_ind(). -\return message formate -*/ -msg_t * msg_rrc_sensing_meas_ind( - Instance_t inst , //!< Instance ID - L2_ID L2_id , //!< Layer 2 ID (MAC) of sensing node - unsigned int NB_meas , //!< Layer 2 ID (MAC) of sensing node - SENSING_MEAS_T *Sensing_meas , //!< Sensing Information - Transaction_t Trans_id //!< Transaction ID -) -{ - - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - unsigned int size = sizeof( rrc_sensing_meas_ind_t ) + (NB_meas-1) * sizeof(SENSING_MEAS_T) ; - // Note : (NB_meas-1) car la première est incorporé dans rrc_sensing_meas_ind_t - rrc_sensing_meas_ind_t *p = RRM_CALLOC2(rrc_sensing_meas_ind_t,size ) ; - - if ( p != NULL ) { - init_rrc_msg_head(&(msg->head),inst, RRC_SENSING_MEAS_IND, size ,Trans_id); - - - memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ; - - if ( NB_meas > 0 ) { - memcpy( p->Sensing_meas , Sensing_meas, NB_meas * sizeof(SENSING_MEAS_T) ) ; - } - - p->NB_meas = NB_meas ; - } - - msg->data = (char *) p ; - } - - return msg ; - -} - -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - rrc_rb_meas_ind(). -\return message formate -*/ -msg_t * msg_rrc_rb_meas_ind( - Instance_t inst , //!< Instance ID - RB_ID Rb_id , //!< Radio Bearer ID - L2_ID L2_id , //!< Layer 2 (MAC) IDs for link - MEAS_MODE Meas_mode , //!< Measurement mode (periodic or event-driven) - MAC_RLC_MEAS_T *Mac_rlc_meas , //!< MAC/RLC measurements - Transaction_t Trans_id //!< Transaction ID -) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - rrc_rb_meas_ind_t *p = RRM_CALLOC(rrc_rb_meas_ind_t , 1 ) ; - - if ( p != NULL ) { - init_rrc_msg_head(&(msg->head),inst, RRC_RB_MEAS_IND, sizeof( rrc_rb_meas_ind_t ) ,Trans_id); - - - memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ; - memcpy( &(p->Mac_rlc_meas), Mac_rlc_meas, sizeof(L2_ID) ) ; - - p->Rb_id = Rb_id ; - p->Meas_mode = Meas_mode ; - } - - msg->data = (char *) p ; - } - - return msg ; - -} - - -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - rrc_update_sens(). -\return message formate -*/ - -msg_t *msg_rrc_update_sens( - Instance_t inst, - //double info_time , //!< Date of the message - L2_ID L2_id, - unsigned int NB_info, - Sens_ch_t *Sens_meas, - Transaction_t Trans_id -) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - unsigned int size = sizeof( rrc_update_sens_t );// + (NB_info-1) * sizeof(Sens_ch_t) ;//mod_lor_10_04_23 - - rrc_update_sens_t *p = RRM_CALLOC2(rrc_update_sens_t , size ) ; - - if ( p != NULL ) { - //fprintf(stdout,"msg_rrc_update_sens() time : %d\n", NB_info); //dbg - init_rrc_msg_head(&(msg->head),inst, RRC_UPDATE_SENS, size ,Trans_id); - //fprintf(stdout,"msg_rrc_update_sens() time : %f\n", info_time); //dbg - - memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ; - - p->NB_info = NB_info ; - - if ( NB_info > 0 ) { - memcpy( p->Sens_meas , Sens_meas, NB_info * sizeof(Sens_ch_t) ) ; - } - - - } - - msg->data = (char *) p ; - } - - return msg ; - -} - -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - rrc_init_scan_req(). -\return message formate -*/ - -msg_t *msg_rrc_init_scan_req( - Instance_t inst , //!< instance ID - L2_ID L2_id , - unsigned int Start_fr, - unsigned int Stop_fr, - unsigned int Meas_band, - unsigned int Meas_tpf, - unsigned int Nb_channels, - unsigned int Overlap, - unsigned int Sampl_freq, - Transaction_t Trans_id //!< Transaction ID - -) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - rrc_init_scan_req_t *p = RRM_CALLOC(rrc_init_scan_req_t , 1 ) ; - - if ( p != NULL ) { - init_rrc_msg_head(&(msg->head),inst,RRC_INIT_SCAN_REQ, sizeof( rrc_init_scan_req_t ) ,Trans_id); - - memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ; - //mod_lor_10_03_12++ - p->Start_fr = Start_fr; - p->Stop_fr = Stop_fr; - p->Meas_band = Meas_band; - p->Meas_tpf = Meas_tpf; - p->Nb_channels = Nb_channels; - p->Overlap = Overlap; - p->Sampl_freq = Sampl_freq; - //mod_lor_10_03_12-- - - } - - msg->data = (char *) p ; - } - - return msg ; -} - - -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - rrc_end_scan_conf(). -\return message formate -*/ - -msg_t *msg_rrc_end_scan_conf( - Instance_t inst , //!< instance ID - L2_ID L2_id , - Transaction_t Trans_id //!< Transaction ID - -) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - rrc_end_scan_conf_t *p = RRM_CALLOC(rrc_end_scan_conf_t , 1 ) ; - - if ( p != NULL ) { - init_rrc_msg_head(&(msg->head),inst,RRC_END_SCAN_CONF, sizeof( rrc_end_scan_conf_t ) ,Trans_id); - - memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ; - - } - - msg->data = (char *) p ; - } - - return msg ; -} - -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - rrc_end_scan_req(). -\return message formate -*/ -msg_t *msg_rrc_end_scan_req( - Instance_t inst, - L2_ID L2_id , - Transaction_t Trans_id -) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - //fprintf(stdout,"msg_rrc_end_scan_req\n"); //dbg - if ( msg != NULL ) { - rrc_end_scan_req_t *p = RRM_CALLOC(rrc_end_scan_req_t , 1 ) ; - - if ( p != NULL ) { - init_rrc_msg_head(&(msg->head),inst,RRC_END_SCAN_REQ, sizeof( rrc_end_scan_req_t ) ,Trans_id); - memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ; - } - - msg->data = (char *) p ; - } - - return msg ; -} - - -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - rrc_init_mon_req(). -\return message formate -*/ - -msg_t *msg_rrc_init_mon_req( - Instance_t inst , //!< instance ID - L2_ID L2_id , - unsigned int *ch_to_scan , - unsigned int NB_chan , - unsigned int interval , - Transaction_t Trans_id //!< Transaction ID - -) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - unsigned int size = sizeof( rrc_init_mon_req_t ) + (NB_chan-1) * sizeof(unsigned int) ; - - rrc_init_mon_req_t *p = RRM_CALLOC2(rrc_init_mon_req_t , size ) ; - - if ( p != NULL ) { - //for (int i=0; ihead),inst,RRC_INIT_MON_REQ, size ,Trans_id); - - memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ; - p->NB_chan = NB_chan; - p->interval = interval; - - if ( NB_chan != 0 ) - memcpy( p->ch_to_scan, ch_to_scan, NB_chan*sizeof(unsigned int) ); - - // for (int i=0; ich_to_scan);//dbg - //for (int i=0; ich_to_scan[i]);//dbg - - - } - - msg->data = (char *) p ; - } - - return msg ; -} diff --git a/openair3/MESH/RRM/rrc_rrm_msg.h b/openair3/MESH/RRM/rrc_rrm_msg.h deleted file mode 100644 index ad46fc4819..0000000000 --- a/openair3/MESH/RRM/rrc_rrm_msg.h +++ /dev/null @@ -1,508 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/*! -******************************************************************************* - -\file rrc_msg.h - -\brief Fichier d'entete contenant les declarations des types, des defines , - et des fonctions relatives aux messages RRC-RRM ou RRC-RRCI. - - Les fonctions servent à créer le buffer de message, remplir - l'entete et copier les parametres de fonction. Chaque fonction - retourne le message qui pourra être envoye sur le socket entre le - CMM et le RRM ou RRCI. - -\author BURLOT Pascal - -\date 17/07/08 - -\par Historique: - L.IACOBELLI 2009-10-19 - + sensing messages - -******************************************************************************* -*/ -#ifndef __RRC_RRM_MSG_H -#define __RRC_RRM_MSG_H - -#include "L3_rrc_defs.h" -#include "COMMON/mac_rrc_primitives.h" - -#ifdef OPENAIR2_IN -#include "rrm_sock.h" -#else -#include "RRC/MESH/rrc_rrm_interface.h" -#endif -//#include "../../../openair2/RRC/MESH/rrc_rrm_interface.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/*! -******************************************************************************* -\brief Enumeration des messages entre RRM/RRCI et le RRC -*/ -typedef enum { - RRM_RB_ESTABLISH_REQ = 0 , ///< Message RRM->RRC : requete d'etablissement d'un RB - RRC_RB_ESTABLISH_RESP , ///< Message RRC->RRM : reponse d'etablissement d'un RB - RRC_RB_ESTABLISH_CFM , ///< Message RRC->RRM : confirmation d'etablissement d'un RB - RRM_RB_MODIFY_REQ , ///< Message RRM->RRC : requete de modification d'un RB - RRC_RB_MODIFY_RESP , ///< Message RRC->RRM : reponse de modification d'un RB - RRC_RB_MODIFY_CFM , ///< Message RRC->RRM : confirmation de modification d'un RB - RRM_RB_RELEASE_REQ , ///< Message RRM->RRC : requete de liberation d'un RB - RRC_RB_RELEASE_RESP , ///< Message RRC->RRM : reponse de liberation d'un RB - RRC_MR_ATTACH_IND , ///< Message RRC->RRM : indication d'attachement d'un MR - RRM_SENSING_MEAS_REQ , ///< Message RRM->RRC : requete de configuration de mesure sensing - RRC_SENSING_MEAS_RESP , ///< 10Message RRC->RRM : reponse de configuration de mesure sensing - RRC_CX_ESTABLISH_IND , ///< Message RRC->RRM : indication de connexion etablie - RRC_PHY_SYNCH_TO_MR_IND , ///< Message RRC->RRM : indication de synchronisation physique a un MR - RRC_PHY_SYNCH_TO_CH_IND , ///< Message RRC->RRM : indication de synchronisation physique a un CH - RRCI_CX_ESTABLISH_RESP , ///< Message RRCI->RRC : reponse de connexion etablie - RRC_SENSING_MEAS_IND , ///< Message RRC->RRM : indication de nouvel mesure de sensing - RRM_SENSING_MEAS_RESP , ///< Message RRM->RRC : reponse a l'indication de nouvel mesure de sensing - RRC_RB_MEAS_IND , ///< Message RRC->RRM : indication de nouvel mesure sur un RB - RRM_RB_MEAS_RESP , ///< Message RRM->RRC : reponse a l'indication de nouvel mesure sur un RB - RRM_INIT_CH_REQ , ///< Message RRM->RRC : init d'un CH - RRCI_INIT_MR_REQ , ///< 20Message RRM->RRC : init d'un MR - RRM_INIT_MON_REQ , ///< Message RRM->RRC : initiation of a scanning monitoring - RRM_INIT_SCAN_REQ , ///< Message RRM->RRC : initiation of a scanning process - RRC_INIT_SCAN_REQ , ///< Message RRC->RRM : initiation of a scanning process - //UPDATE_SENS_RESULTS_3 , ///< Message IP : update to send to CH/FC //mod_lor_10_01_25 - RRM_END_SCAN_REQ , ///< Message RRM->RRC : end of a scanning process - RRC_END_SCAN_REQ , ///< Message RRC->RRM : end of a scanning process - RRC_END_SCAN_CONF , ///< Message RRC->RRM : end of a scanning process ack - RRC_INIT_MON_REQ , ///< Message RRM->RRC : initiation of a scanning monitoring - //OPEN_FREQ_QUERY_4 , ///< Message IP : BTS to ask free frequencies to FC - //UPDATE_OPEN_FREQ_7 , ///< 30Message IP : list of frequencies usable by the secondary network - //UPDATE_SN_OCC_FREQ_5 , ///< Message IP : BTS sends used freq. to FC - RRM_UP_FREQ_ASS , ///< Message RRM->RRC : BTS assigns channels to SUs (scen1) - RRM_END_SCAN_CONF , ///< Message RRM->RRC : end of a scanning process - RRC_UP_FREQ_ASS , ///< Message RRC->RRM ://mod_lor_10_06_04 - RRM_UP_FREQ_ASS_SEC , ///< Message RRM->RRC : CH assigns channels to SUs (scen2) //add_lor_10_11_05 - RRC_UP_FREQ_ASS_SEC , ///< Message RRC->RRM : frequencies assigned by CH (scen2) //add_lor_10_11_05 - /*RRC_ASK_FOR_FREQ , ///< Message RRC->RRM : in FC/CH to report a frequency query - RRM_OPEN_FREQ , ///< Message RRM->RRC : FC communicates open frequencies - RRM_UPDATE_SN_FREQ , ///< Message RRM->RRC : BTS sends used freq. to FC - RRC_UPDATE_SN_FREQ , ///< Message RRC->RRM : FC receives used freq. from BTS - RRM_CLUST_SCAN_REQ , ///< Message RRM->RRC : CH1 contacts CH2 to collaborate for the sensing process - RRC_CLUST_SCAN_REQ , ///< Message RRC->RRM : CH2 receive request to collaborate for the sensing process from CH1 - RRM_CLUST_SCAN_CONF , ///< Message RRM->RRC : CH2 confirmrs the beginning of a collaboration process - RRM_CLUST_MON_REQ , ///< Message RRM->RRC : CH1 contacts CH2 to collaborate for the monitoring process - RRC_CLUST_MON_REQ , ///< Message RRC->RRM : CH2 receive request to collaborate for the monitoring process from CH1 - RRM_CLUST_MON_CONF , ///< Message RRM->RRC : CH2 confirmrs the beginning of a monitoring process - RRM_END_SCAN_CONF , ///< Message RRM->RRC : CH2 confirmrs the end of the collaborative sensing process at CH1 - RRM_INIT_CONN_REQ , ///< Message RRM->RRC : SU 1 requests a connection to SU 2 - RRC_INIT_CONN_CONF , ///< Message RRM->RRC : Confirm from SU2 about the requested connection - RRM_FREQ_ALL_PROP , ///< Message RRM->RRC : SU1 sends a proposition of teh frequencies to use - RRC_FREQ_ALL_PROP_CONF , ///< Message RRC->RRM : SU1 receives a confirm on the usable channels - RRM_REP_FREQ_ALL , ///< Message RRM->RRC : SU1 reports to CH the possible channels - RRC_REP_FREQ_ACK , ///< Message RRC->RRM : CH informs all SUs about a channel allocated to 2 SUs - RRC_INIT_CONN_REQ , ///< Message RRC->RRM : Request from SU1 to establish a connection - RRM_CONN_SET , ///< Message RRC->RRM : Response to SU1 and connection settings communicated to rcc - RRC_FREQ_ALL_PROP , ///< Message RRC->RRM : SU1 proposition of frequencies to use - RRM_FREQ_ALL_PROP_CONF , ///< Message RRC->RRM : SU2 choise of frequencies to use - RRC_REP_FREQ_ALL , ///< Message RRM->RRC : SU1 reports to CH the possible channels - RRM_REP_FREQ_ACK , ///< Message RRC->RRM : CH informs all SUs about a channel allocated to 2 SUs - */NB_MSG_RRC_RRM ///< Nombre de message RRM-RRC - -} -MSG_RRC_RRM_T ; - -/*! -******************************************************************************* -\brief Definition des parametres de la fonction rrm_init_ch_req() dans - une structure permettant le passage des parametres via un socket -*/ - -typedef struct { - LCHAN_DESC Lchan_desc_srb0 ; //!< Logical Channel Descriptor Array - LCHAN_DESC Lchan_desc_srb1 ; //!< Logical Channel Descriptor Array - L2_ID L2_id ; //!< Layer 2 (MAC) IDs for link -} rrm_init_ch_req_t ; - - -/*! -******************************************************************************* -\brief Definition des parametres de la fonction rrm_init_mr_req() dans - une structure permettant le passage des parametres via un socket -*/ -typedef struct { - LCHAN_DESC Lchan_desc_srb0 ; //!< Logical Channel Descriptor Array - LCHAN_DESC Lchan_desc_srb1 ; //!< Logical Channel Descriptor Array - unsigned char CH_index ; //!< Layer 2 (MAC) IDs for CH -} rrci_init_mr_req_t ; - - - -/*! -******************************************************************************* -\brief Definition des parametres de la fonction rrm_rb_establish_req() dans - une structure permettant le passage des parametres via un socket -*/ -typedef struct { - L2_ID L2_id[2] ; //!< Layer 2 (MAC) IDs for link - LCHAN_DESC Lchan_desc ; //!< Logical Channel Descriptor Array - MAC_RLC_MEAS_DESC Mac_rlc_meas_desc ; //!< MAC/RLC Measurement descriptors for RB - L3_INFO_T L3_info_t ; //!< Optional L3 Information - unsigned char L3_info[MAX_L3_INFO] ; //!< Type of L3 Information -} rrm_rb_establish_req_t ; - -/*! -******************************************************************************* -\brief Definition des parametres de la fonction rrc_rb_establish_cfm() dans - une structure permettant le passage des parametres via un socket -*/ -typedef struct { - RB_ID Rb_id ; //!< Radio Bearer ID used by RRC - RB_TYPE RB_type ; //!< Radio Bearer Type -} rrc_rb_establish_cfm_t ; - -/*! -******************************************************************************* -\brief Definition des parametres de la fonction rrm_rb_modify_req() dans - une structure permettant le passage des parametres via un socket -*/ -typedef struct { - LCHAN_DESC Lchan_desc ; //!< Logical Channel Descriptor Array - MAC_RLC_MEAS_DESC Mac_meas_desc ; //!< MAC/RLC Measurement descriptors for RB - RB_ID Rb_id ; //!< Radio Bearer ID -} rrm_rb_modify_req_t ; - -/*! -******************************************************************************* -\brief Definition des parametres des fonctions rrc_rb_modify_cfm() et - rrm_rb_release_req() dans une structure permettant le passage des - parametres via un socket -*/ -typedef struct { - RB_ID Rb_id ; //!< Radio Bearer ID -} rrc_rb_modify_cfm_t , -rrm_rb_release_req_t ; - -/*! -******************************************************************************* -\brief Definition des parametres de la fonction rrc_MR_attach_ind() dans - une structure permettant le passage des parametres via un socket -*/ -typedef struct { - L2_ID L2_id ; //!< Layer 2 (MAC) ID -} rrc_MR_attach_ind_t ; - -/*! -******************************************************************************* -\brief Definition des parametres de la fonction rrm_sensing_meas_req() dans - une structure permettant le passage des parametres via un socket -*/ -typedef struct { - L2_ID L2_id ; //!< Layer 2 (MAC) ID - SENSING_MEAS_DESC Sensing_meas_desc ; //!< Sensing Measurement Descriptor -} rrm_sensing_meas_req_t ; - -/*! -******************************************************************************* -\brief Definition des parametres de la fonction rrc_cx_establish_ind() dans - une structure permettant le passage des parametres via un socket -*/ -typedef struct { - L2_ID L2_id ; //!< Layer 2 (MAC) ID - L3_INFO_T L3_info_t ; //!< Type of L3 Information - unsigned char L3_info[MAX_L3_INFO] ; //!< Optional L3 Information - RB_ID DTCH_B_id ; //!< RBID of broadcast IP service (MR only) - RB_ID DTCH_id ; //!< RBID of default IP service (MR only) -} rrc_cx_establish_ind_t ; - -/*! -******************************************************************************* -\brief Definition des parametres de la fonction rrc_phy_synch_to_CH_ind() dans - une structure permettant le passage des parametres via un socket -*/ -typedef struct { - unsigned int Ch_index ; //!< Clusterhead index - L2_ID L2_id ; //!< L2_ID du MR -} rrc_phy_synch_to_CH_ind_t ; - -/*! -******************************************************************************* -\brief Definition des parametres de la fonction rrc_phy_synch_to_MR_ind() dans - une structure permettant le passage des parametres via un socket -*/ -typedef struct { - L2_ID L2_id ; //!< L2_ID du CH -} rrc_phy_synch_to_MR_ind_t ; - - -/*! -******************************************************************************* -\brief Definition des parametres de la fonction rrci_cx_establish_resp() dans - une structure permettant le passage des parametres via un socket -*/ -typedef struct { - L2_ID L2_id ; - unsigned char L3_info[MAX_L3_INFO] ; //!< Optional L3 Information - L3_INFO_T L3_info_t ; //!< Type of L3 Information -} rrci_cx_establish_resp_t ; - -/*! -******************************************************************************* -\brief Definition des parametres de la fonction rrc_sensing_meas_ind_t() dans - une structure permettant le passage des parametres via un socket -*/ -typedef struct { - L2_ID L2_id ; //!< Layer 2 ID (MAC) of sensing node - unsigned int NB_meas ; //!< Layer 2 ID (MAC) of sensing node - SENSING_MEAS_T Sensing_meas[NB_SENS_MAX]; //!< first Sensing Information -} rrc_sensing_meas_ind_t ; - -/*! -******************************************************************************* -\brief Definition des parametres de la fonction rrc_rb_meas_ind() dans - une structure permettant le passage des parametres via un socket -*/ -typedef struct { - RB_ID Rb_id ; //!< Radio Bearer ID - L2_ID L2_id ; //!< Layer 2 (MAC) IDs for link - MEAS_MODE Meas_mode ; //!< Measurement mode (periodic or event-driven) - MAC_RLC_MEAS_T Mac_rlc_meas ; //!< MAC/RLC measurements -} rrc_rb_meas_ind_t; - - - -/*! -******************************************************************************* -\brief Definition des parametres de les fonctions - rrm_update_sens()dans une structure permettant le passage - des parametres via un socket -*/ -/*typedef struct { - L2_ID L2_id ; //!< Layer 2 ID (MAC) of sensing node - unsigned int NB_info ; //!< number of sensed channels - Sens_ch_t Sens_meas[NB_SENS_MAX] ; //!< sensing information -} rrm_update_sens_t ; */ - -/*! -******************************************************************************* -\brief Definition des parametres des fonctions rrm_init_mon_req(), - rrc_init_mon_req(), rrm_clust_mon_req(), rrc_clust_mon_req() dans - une structure permettant le passage des parametres via un socket -*/ -typedef struct { - L2_ID L2_id ; //!< Layer 2 (MAC) ID of destination - unsigned int NB_chan ; //!< Number of channels to scan - unsigned int interval ; //!< Time between two sensing sessions - unsigned int ch_to_scan[NB_SENS_MAX]; //!< Vector of channels to scan -} rrm_init_mon_req_t, -rrc_init_mon_req_t/*, - rrm_clust_mon_req_t, - rrc_clust_mon_req_t*/; - -/*! -******************************************************************************* -\brief Definition des parametres de la fonction rrm_init_scan_req() dans - une structure permettant le passage des parametres via un socket -*/ -//mod_lor_10_03_12++ -typedef struct { - unsigned int Start_fr; //!< Lowest frequency considered (MHz) - unsigned int Stop_fr; //!< Highest frequency considered (MHz) - unsigned int Meas_band; //!< Measurement bandwidth (KHz) - unsigned int Meas_tpf; //!< Measurement time per sub-band - unsigned int Nb_channels; //!< Number of sub-bands - unsigned int Overlap; //!< Overlap factor (%) - unsigned int Sampl_freq; //!< Sampling frequency (Ms/s) -} rrm_init_scan_req_t; - -/*! -******************************************************************************* -\brief Definition des parametres de la fonction rrc_init_scan_req() dans - une structure permettant le passage des parametres via un socket -*/ -typedef struct { - L2_ID L2_id ; //!< Layer 2 (MAC) ID of Fusion Centre - unsigned int Start_fr; //!< Lowest frequency considered (MHz) - unsigned int Stop_fr; //!< Highest frequency considered (MHz) - unsigned int Meas_band; //!< Measurement bandwidth (KHz) - unsigned int Meas_tpf; //!< Measurement time per sub-band - unsigned int Nb_channels; //!< Number of sub-bands - unsigned int Overlap; //!< Overlap factor (%) - unsigned int Sampl_freq; //!< Sampling frequency (Ms/s) -} rrc_init_scan_req_t; -//mod_lor_10_03_12-- - -/*! -******************************************************************************* -\brief Definition des parametres de la fonction rrm_end_scan_req() dans - une structure permettant le passage des parametres via un socket -*/ -typedef struct { - L2_ID L2_id ; //!< Layer 2 (MAC) ID of destination sensor/FC -} rrm_end_scan_req_t, -rrc_end_scan_req_t, -rrc_end_scan_conf_t; - -/*! -******************************************************************************* -\brief Definition des parametres de la fonction rrm_up_freq_ass() dans - une structure permettant le passage des parametres via un socket -*/ -typedef struct { - L2_ID L2_id ; //!< Layer 2 (MAC) ID of SU - unsigned int NB_chan ; //!< Number of channels - CHANNEL_T ass_channels[NB_SENS_MAX]; //!< description of assigned channelS -} rrm_up_freq_ass_t ; - -/*! //add_lor_10_11_05 -******************************************************************************* -\brief Definition des parametres de la fonction rrm_up_freq_ass() dans - une structure permettant le passage des parametres via un socket -*/ -typedef struct { - L2_ID L2_id [NB_SENS_MAX] ; //!< Layer 2 (MAC) ID of SU source - L2_ID L2_id_dest [NB_SENS_MAX] ; //!< Layer 2 (MAC) ID of SU source - unsigned int NB_all ; //!< Number of allocated channels - CHANNEL_T ass_channels[NB_SENS_MAX]; //!< description of assigned channelS -} rrm_up_freq_ass_sec_t ; - -///< TYPEDEF VIA IP -//mod_lor_10_04_27++ -/*! -******************************************************************************* -\brief Definition des parametres de les fonctions - rrm_update_sens()dans une structure permettant le passage - des parametres via un socket -*/ -/*typedef struct { - L2_ID L2_id ; //!< Layer 2 ID (MAC) of sensing node - unsigned int NB_info ; //!< Number of sensed channels - Sens_ch_t Sens_meas[NB_SENS_MAX] ; //!< Sensing information - double info_time ; //!< Data of the information -} rrm_update_sens_t ; */ - - -/*! -******************************************************************************* -\brief Definition des parametres de les fonctions rrm_ask_for_freq() et rrc_ask_for_freq()dans - une structure permettant le passage des parametres via un socket -*/ -/*typedef struct { - L2_ID L2_id ; //!< Layer 2 (MAC) ID of Fusion Centre - QOS_CLASS_T QoS ; //!< QoS required; if 0 all QoS at disposition -} open_freq_query_t;*/ - -/*! -******************************************************************************* -\brief Definition des parametres de les fonctions - rrc_open_freq() et rrm_open_freq() dans une structure permettant le passage - des parametres via un socket -*/ -/*typedef struct { - double date; - L2_ID L2_id ; //!< Layer 2 ID (MAC) of FC/CH - unsigned int NB_chan ; //!< number of free channels - CHANNEL_T fr_channels[NB_SENS_MAX]; //!< description of free channelS -} update_open_freq_t;*/ - -/*! -******************************************************************************* -\brief Definition des parametres des fonctions rrm_update_SN_freq() et - rrm_update_SN_freq()dans - une structure permettant le passage des parametres via un socket -*/ -/*typedef struct { - L2_ID L2_id ; //!< Layer 2 (MAC) ID of FC/BTS - unsigned int NB_chan ; //!< Number of channels - unsigned int occ_channels[NB_SENS_MAX]; //!< Vector of channels -} update_SN_occ_freq_t;*/ -//mod_lor_10_04_27-- - -#ifdef TRACE -extern const char *Str_msg_rrc_rrm[NB_MSG_RRC_RRM] ; -#endif - -/* Rappel : les paramètres sont identiques aux fonctions - * (sans le prefixe msg_ ) du fichier: L3_rrc_interface.h - */ - - -msg_t *msg_rrm_rb_establish_req( Instance_t inst, - const LCHAN_DESC *Lchan_desc, const MAC_RLC_MEAS_DESC *Mac_rlc_meas_desc, - L2_ID *L2_id, Transaction_t Trans_id, unsigned char *L3_info, L3_INFO_T L3_info_t ); - - -msg_t *msg_rrm_rb_modify_req( Instance_t inst, - const LCHAN_DESC *Lchan_desc, const MAC_RLC_MEAS_DESC *Mac_meas_desc, - RB_ID Rb_id, Transaction_t Trans_id ); - -msg_t *msg_rrm_rb_release_req( Instance_t inst, RB_ID Rb_id, Transaction_t Trans_id ); - -msg_t *msg_rrm_sensing_meas_req( Instance_t inst, - L2_ID L2_id, SENSING_MEAS_DESC Sensing_meas_desc, Transaction_t Trans_id ) ; - -msg_t *msg_rrci_cx_establish_resp( Instance_t inst, - Transaction_t Trans_id,L2_ID L2_id, - unsigned char *L3_info, L3_INFO_T L3_info_t ); - -msg_t *msg_rrm_sensing_meas_resp( Instance_t inst, Transaction_t Trans_id ); - - -msg_t *msg_rrm_rb_meas_resp( Instance_t inst, Transaction_t Trans_id ); - -msg_t *msg_rrm_init_ch_req( Instance_t inst, Transaction_t Trans_id, - const LCHAN_DESC *Lchan_desc_srb0, const LCHAN_DESC *Lchan_desc_srb1, - L2_ID L2_id ) ; - -msg_t *msg_rrci_init_mr_req( Instance_t inst, - Transaction_t Trans_id, const LCHAN_DESC *Lchan_desc_srb0, - const LCHAN_DESC *Lchan_desc_srb1, unsigned char CH_index); - -msg_t *msg_rrm_init_mon_req(Instance_t inst, L2_ID L2_id, unsigned int NB_chan, - unsigned int interval, unsigned int *ch_to_scan, Transaction_t Trans_id ); -msg_t *msg_rrm_init_scan_req(Instance_t inst, unsigned int Start_fr, unsigned int Stop_fr,unsigned int Meas_band, - unsigned int Meas_tpf, unsigned int Nb_channels,unsigned int Overlap, unsigned int Sampl_freq, Transaction_t Trans_id ); //mod_lor_10_03_12 -msg_t *msg_rrm_end_scan_req( Instance_t inst, L2_ID L2_id, Transaction_t Trans_id ); -msg_t *msg_rrm_up_freq_ass( Instance_t inst, L2_ID L2_id, unsigned int NB_chan, CHANNEL_T *ass_channels); -msg_t *msg_rrm_end_scan_conf( Instance_t inst, Transaction_t Trans_id); -msg_t *msg_rrm_up_freq_ass_sec( Instance_t inst, L2_ID *L2_id, L2_ID *L2_id_dest,unsigned int NB_all, CHANNEL_T *ass_channels);//add_lor_10_11_05 - - -/*//mod_lor_10_04_27++ -///MESSAGES VIA IP -msg_t *msg_update_sens_results_3( Instance_t inst, L2_ID L2_id, unsigned int NB_chan, Sens_ch_t *Sens_meas, Transaction_t Trans_id ); -msg_t *msg_open_freq_query_4( Instance_t inst, L2_ID L2_id, QOS_CLASS_T QoS, Transaction_t Trans_id ); -msg_t *msg_update_open_freq_7( Instance_t inst, L2_ID L2_id, unsigned int NB_free_ch, CHANNEL_T *fr_channels, Transaction_t Trans_id); -msg_t *msg_update_SN_occ_freq_5( Instance_t inst, L2_ID L2_id, unsigned int NB_chan, unsigned int *occ_channels, Transaction_t Trans_id); -//mod_lor_10_04_27--*/ - -#ifdef __cplusplus -} -#endif - -#endif /* RRC_MSG_H */ diff --git a/openair3/MESH/RRM/rrm.c b/openair3/MESH/RRM/rrm.c deleted file mode 100644 index a16e68cf61..0000000000 --- a/openair3/MESH/RRM/rrm.c +++ /dev/null @@ -1,2245 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/*! -******************************************************************************* - -\file rrm.c - -\brief RRM (Radio Ressource Manager ) - - Cette application a pour objet - - de gérer la ressource radio du cluster - - de commander le RRC pour l'ouverture de RB - - de recevoir des commandes du CMM - - de gérer le voisinage - -\author BURLOT Pascal - -\date 10/07/08 - - -\par Historique: - P.BURLOT 2009-01-20 - + separation de la file de message CMM/RRM a envoyer en 2 files - distinctes ( file_send_cmm_msg, file_send_rrc_msg) - + l'envoi de message via la fifo: - - envoi du header - - puis des donnees s'il y en a - + reception des donnees de la fifo: - - copie du message dans la file d'attente des messages - - traitement du cas du message n'ayant pas de data (ex: response ) - L.IACOBELLI 2009-10-19 - + sensing database - + channels database - + new cases - -******************************************************************************* -*/ -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "debug.h" - -#include "L3_rrc_defs.h" -#include "L3_rrc_interface.h" -#include "cmm_rrm_interface.h" -#include "rrm_sock.h" -#include "rrc_rrm_msg.h" -#include "ip_msg.h" //mod_lor_10_04_27 -#include "sensing_rrm_msg.h" -#include "cmm_msg.h" -#include "pusu_msg.h" -#include "msg_mngt.h" -#include "neighbor_db.h" -#include "rb_db.h" -#include "sens_db.h" -#include "channels_db.h" -#include "transact.h" -#include "rrm_constant.h" -#include "rrm_util.h" -#include "rrm.h" - -#include "forms.h" //mod_eure_lor -#include "sensing_form.h" //mod_eure_lor -#include "SN_freq_form.h" //mod_lor_10_06_01 -#include "sens_scen_2_form.h" //mod_lor_10_11_04 -#include "all_freq_to_users_form.h" //mod_lor_10_11_04 -#include "sens_CH1_scen_2.h" //mod_lor_10_11_04 -#include "sens_sensor.h" //mod_lor_11_02_18 - - -/* -** ---------------------------------------------------------------------------- -** DEFINE LOCAL -** ---------------------------------------------------------------------------- -*/ -//mod_lor_10_05_18++ -/*! -******************************************************************************* -\brief Definition of IP @ in main entities. i.e. they have to correspond - to the ones in node_info vector in emul_interface.c -*/ -static unsigned char FC_L3id [4]= {0x0A,0x00,0x01,0x01}; -static unsigned char BTS_L3id [4]= {0x0A,0x00,0x02,0x02}; -static unsigned char CH_COLL_L3id [4]= {0x0A,0x00,0x02,0x02}; -FD_sensing_form *form; -FD_Secondary_Network_frequencies *SN_form; //mod_lor_10_06_01 -FD_sens_scen_2 *Sens_form_CH2; //mod_lor_10_11_04 -FD_all_freq_to_users *Chann_form; //mod_lor_10_11_04 -FD_sens_CH1_scen_2 *Sens_form_CH1; //mod_lor_10_11_04 -FD_sens_sensor *Sens_sensor_form; //mod_lor_11_02_18 -static int SN_waiting = 0; //mod_lor_10_06_02 -//mod_lor_10_05_18-- -/* -** ---------------------------------------------------------------------------- -** DECLARATION DE NOUVEAU TYPE -** ---------------------------------------------------------------------------- -*/ - -/*! -******************************************************************************* -\brief Structure de data passe en parametre au threads -*/ -struct data_thread { - char *name ; ///< Nom du thread - char *sock_path_local ; ///< fichier du "rrm->..." pour le socket Unix - char *sock_path_dest ; ///< fichier du "...->rrm " pour le socket Unix - sock_rrm_t s ; ///< Descripteur du socket -} ; - -//mod_lor_10_01_25++ -struct data_thread_int { - char *name ; ///< Nom du thread - unsigned char *sock_path_local ; ///< local IP address for internet socket - int local_port ; ///< local IP port for internet socket - unsigned char *sock_path_dest ; ///< dest IP address for internet socket - int dest_port ; ///< dest IP port for internet socket - sock_rrm_int_t s ; ///< Descripteur du socket - int instance ; ///spec_SN1,(float)S[0].Start_f,(float)S[NB_info-1].Final_f); - fl_set_xyplot_ybounds(form->spec_SN1,-115,-70); - - fl_set_xyplot_data(form->spec_SN1,f,spec_dBm,tot_sub_bands,"","",""); - } else if (sensor == 2) { - fl_set_xyplot_xbounds(form->spec_SN2,(float)S[0].Start_f,(float)S[NB_info-1].Final_f); - fl_set_xyplot_ybounds(form->spec_SN2,-115,-70); - - fl_set_xyplot_data(form->spec_SN2,f,spec_dBm,tot_sub_bands,"","",""); - } else if(sensor == 3) { - fl_set_xyplot_xbounds(form->spec_SN3,(float)S[0].Start_f,(float)S[NB_info-1].Final_f); - fl_set_xyplot_ybounds(form->spec_SN3,-115,-70); - - fl_set_xyplot_data(form->spec_SN3,f,spec_dBm,tot_sub_bands,"","",""); - } else - printf("Error! Sensor %d not considered",sensor); - - fl_check_forms(); -}//mod_eure_lor-- - -//mod_lor_10_06_01++ -/*! -******************************************************************************* -\brief function to plot the selected channels - -\return NULL -*/ - -void plot_SN_channels(CHANNELS_DB_T *channels_db, unsigned int NB_info, unsigned int *selected, /*FD_Secondary_Network_frequencies *SN_form,*/ unsigned int rrm_id) -{ - - float f[SB_NEEDED_FOR_SN*NB_info],spec_dBm[SB_NEEDED_FOR_SN*NB_info]; - CHANNELS_DB_T *pCurrent; - //float f[100],spec_dBm[100]; - unsigned int tot_sub_bands = SB_NEEDED_FOR_SN*NB_info; - unsigned int SB_BW; - float Start_fr, Final_fr; - int i, j, k=0; - - //printf("nb_info %d tot sub: %d \n",NB_info, tot_sub_bands);//dbg - // Compute frequencies and store in f - for (i=0; ichannel.Final_f-pCurrent->channel.Start_f)/SB_NEEDED_FOR_SN; - - for (j=0; j< SB_NEEDED_FOR_SN; j++) { - f[k]=pCurrent->channel.Start_f+(SB_BW*j)+(SB_BW/2); - // Transfer power measurements to spec_dBm (float) - spec_dBm[k] = 1; - //printf ("for k = %d f: %f; spec_dBm %f\n",k,f[k], spec_dBm[k]);//dbg - //printf("S[i].Start_f %d S[i].mu0[j] %d freq: %f spec_dBm %f \n",S[i].Start_f, S[i].mu0[j], f[k], spec_dBm[k]); //dbg - k++; - } - } - - Start_fr = st_fr; - Final_fr = end_fr; - //printf ("start: %f; end %f\n",f[0], f[k-1]);//dbg - - if (rrm_id == BTS_ID) { - fl_set_xyplot_xbounds(SN_form->Selected_frequencies,Start_fr,Final_fr); - fl_set_xyplot_ybounds(SN_form->Selected_frequencies,0,2); - - fl_set_xyplot_data(SN_form->Selected_frequencies,f,spec_dBm,tot_sub_bands,"","",""); - } else if (rrm_id == FC_ID) { - fl_set_xyplot_xbounds(form->Secondary_Network_frequencies,Start_fr,Final_fr); - fl_set_xyplot_ybounds(form->Secondary_Network_frequencies,0,2); - - fl_set_xyplot_data(form->Secondary_Network_frequencies,f,spec_dBm,tot_sub_bands,"","",""); - } - - fl_check_forms(); -} -//mod_lor_10_06_01-- - -//add_lor_10_11_04++ -/*! -******************************************************************************* -\brief function to plot the spectrum sensing results in cluster 1 - -\return NULL -*/ -void plot_spectra_CH1(Sens_ch_t *S, unsigned int NB_info, /*FD_sens_CH1_scen_2 *Sens_form_CH1,*/ int sensor) -{ - - float f[MAX_NUM_SB*NB_info],spec_dBm[MAX_NUM_SB*NB_info]; - //float f[100],spec_dBm[100]; - unsigned int tot_sub_bands = MAX_NUM_SB*NB_info; - unsigned int SB_BW; - int i, j, k=0; - - //printf("nb_info %d tot sub: %d \n",NB_info, tot_sub_bands);//dbg - // Compute frequencies and store in f - if (sensor!=-1) { - for (i=0; iUser_1_sens,(float)S[0].Start_f,(float)S[NB_info-1].Final_f); - fl_set_xyplot_ybounds(Sens_form_CH1->User_1_sens,-115,-70); - - fl_set_xyplot_data(Sens_form_CH1->User_1_sens,f,spec_dBm,tot_sub_bands,"","",""); - - } else if (sensor == 2) { - fl_set_xyplot_xbounds(Sens_form_CH1->User_2_sens,(float)S[0].Start_f,(float)S[NB_info-1].Final_f); - fl_set_xyplot_ybounds(Sens_form_CH1->User_2_sens,-115,-70); - - fl_set_xyplot_data(Sens_form_CH1->User_2_sens,f,spec_dBm,tot_sub_bands,"","",""); - } else if(sensor == 3) { - fl_set_xyplot_xbounds(Sens_form_CH1->User_3_sens,(float)S[0].Start_f,(float)S[NB_info-1].Final_f); - fl_set_xyplot_ybounds(Sens_form_CH1->User_3_sens,-115,-70); - - fl_set_xyplot_data(Sens_form_CH1->User_3_sens,f,spec_dBm,tot_sub_bands,"","",""); - } else if(sensor == 4) { - fl_set_xyplot_xbounds(Sens_form_CH1->User_4_sens,(float)S[0].Start_f,(float)S[NB_info-1].Final_f); - fl_set_xyplot_ybounds(Sens_form_CH1->User_4_sens,-115,-70); - - fl_set_xyplot_data(Sens_form_CH1->User_4_sens,f,spec_dBm,tot_sub_bands,"","",""); - } else if(sensor == -1) { - fl_set_xyplot_xbounds(Sens_form_CH1->Cluster_2_sensing,(float)S[0].Start_f,(float)S[NB_info-1].Final_f); - fl_set_xyplot_ybounds(Sens_form_CH1->Cluster_2_sensing,0,2); - - fl_set_xyplot_data(Sens_form_CH1->Cluster_2_sensing,f,spec_dBm,tot_sub_bands,"","",""); - } else - printf("Error! Sensor %d not considered",sensor); - - fl_check_forms(); -} - -/*! -******************************************************************************* -\brief function to plot the spectrum sensing results of collaborative cluster 2 - -\return NULL -*/ -void plot_spectra_CH2(Sens_ch_t *S, unsigned int NB_info, /*FD_sensing_form *form,*/ unsigned int sensor) -{ - - float f[MAX_NUM_SB*NB_info],spec_dBm[MAX_NUM_SB*NB_info]; - //float f[100],spec_dBm[100]; - unsigned int tot_sub_bands = MAX_NUM_SB*NB_info; - unsigned int SB_BW; - int i, j, k=0; - - for (i=0; iUser_1,(float)S[0].Start_f,(float)S[NB_info-1].Final_f); - fl_set_xyplot_ybounds(Sens_form_CH2->User_1,-115,-70); - - fl_set_xyplot_data(Sens_form_CH2->User_1,f,spec_dBm,tot_sub_bands,"","",""); - } else if (sensor == 2) { - fl_set_xyplot_xbounds(Sens_form_CH2->User_2,(float)S[0].Start_f,(float)S[NB_info-1].Final_f); - fl_set_xyplot_ybounds(Sens_form_CH2->User_2,-115,-70); - - fl_set_xyplot_data(Sens_form_CH2->User_2,f,spec_dBm,tot_sub_bands,"","",""); - } else if(sensor == 3) { - fl_set_xyplot_xbounds(Sens_form_CH2->User_3,(float)S[0].Start_f,(float)S[NB_info-1].Final_f); - fl_set_xyplot_ybounds(Sens_form_CH2->User_3,-115,-70); - - fl_set_xyplot_data(Sens_form_CH2->User_3,f,spec_dBm,tot_sub_bands,"","",""); - } else if(sensor == 4) { - fl_set_xyplot_xbounds(Sens_form_CH2->User_4,(float)S[0].Start_f,(float)S[NB_info-1].Final_f); - fl_set_xyplot_ybounds(Sens_form_CH2->User_4,-115,-70); - - fl_set_xyplot_data(Sens_form_CH2->User_4,f,spec_dBm,tot_sub_bands,"","",""); - } else - printf("Error! Sensor %d not considered",sensor); - - fl_check_forms(); -} - -/*! -******************************************************************************* -\brief function to plot the attributed channel - -\return NULL -*/ - -void plot_all_chann_scen_2(unsigned int *tx, unsigned int *chann_start, unsigned int *chann_end, unsigned int NB_info, unsigned int rrm_id) -{ - - float Start_fr, Final_fr; - - float f[SB_NEEDED_FOR_SN*NB_info], spec_dBm[SB_NEEDED_FOR_SN*NB_info]; - Start_fr = st_fr; - Final_fr = end_fr; - - unsigned int tot_sub_bands = SB_NEEDED_FOR_SN*NB_info; - unsigned int SB_BW ; - - int i, j, k=0; - - // Compute frequencies and store in f - for (i=0; iUser_1_channels,Start_fr,Final_fr); - fl_set_xyplot_ybounds(Chann_form->User_1_channels,0,3); - fl_set_xyplot_data(Chann_form->User_1_channels,f,spec_dBm,tot_sub_bands,"","",""); - - } else if (rrm_id == 2) { - fl_set_xyplot_xbounds(Chann_form->User_2_channels,Start_fr,Final_fr); - fl_set_xyplot_ybounds(Chann_form->User_2_channels,0,3); - fl_set_xyplot_data(Chann_form->User_2_channels,f,spec_dBm,tot_sub_bands,"","",""); - - } else if (rrm_id == 3) { - fl_set_xyplot_xbounds(Chann_form->User_3_channels,Start_fr,Final_fr); - fl_set_xyplot_ybounds(Chann_form->User_3_channels,0,3); - fl_set_xyplot_data(Chann_form->User_3_channels,f,spec_dBm,tot_sub_bands,"","",""); - - } else if (rrm_id == 4) { - fl_set_xyplot_xbounds(Chann_form->User_4_channels,Start_fr,Final_fr); - fl_set_xyplot_ybounds(Chann_form->User_4_channels,0,3); - fl_set_xyplot_data(Chann_form->User_4_channels,f,spec_dBm,tot_sub_bands,"","",""); - - } else - printf("Error! User %d not considered",rrm_id); - - fl_check_forms(); -} -//add_lor_10_11_04-- - - -/*! -******************************************************************************* -\brief thread de traitement des ttl des transactions (rrc ou cmm). - -\return NULL -*/ -static void * thread_processing_ttl ( - void * p_data /**< parametre du pthread */ -) -{ - int ii ; - fprintf(stderr,"TTL :starting ... \n"); - fflush(stdout); - - while ( flag_not_exit) { - for ( ii = 0 ; iicmm.exclu ) ) ; - dec_all_ttl_transact( rrm->cmm.transaction ) ; - // Trop simpliste et pas fonctionnel , il faut faire une gestion des erreurs de transaction - //if (rrm->cmm.transaction!=NULL) - // fprintf(stderr,"delete on cmm of %d\n", ii); //dbg - del_all_obseleted_transact( &(rrm->cmm.transaction)); - pthread_mutex_unlock( &( rrm->cmm.exclu ) ) ; - - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; - dec_all_ttl_transact( rrm->rrc.transaction ) ; - // idem :commentaire ci-dessus - //if (rrm->rrc.transaction!=NULL) - // fprintf(stderr,"delete on rrc of %d\n", ii); //dbg - del_all_obseleted_transact( &(rrm->rrc.transaction)); - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - - pthread_mutex_lock( &( rrm->pusu.exclu ) ) ; - dec_all_ttl_transact( rrm->pusu.transaction ) ; - // idem :commentaire ci-dessus - del_all_obseleted_transact( &(rrm->pusu.transaction)); - pthread_mutex_unlock( &( rrm->pusu.exclu ) ) ; - - pthread_mutex_lock( &( rrm->sensing.exclu ) ) ; - dec_all_ttl_transact( rrm->sensing.transaction ) ; - // idem :commentaire ci-dessus - del_all_obseleted_transact( &(rrm->sensing.transaction)); - pthread_mutex_unlock( &( rrm->sensing.exclu ) ) ; - - //mod_lor_10_01_25++ - pthread_mutex_lock( &( rrm->ip.exclu ) ) ; - dec_all_ttl_transact( rrm->ip.transaction ) ; - // idem :commentaire ci-dessus - del_all_obseleted_transact( &(rrm->ip.transaction)); - pthread_mutex_unlock( &( rrm->ip.exclu ) ) ; - //mod_lor_10_01_25--*/ - - } - - cnt_timer++; - usleep( 2000*1000 ) ;//mod_lor_10_03_01: incrementing timeout - } - - fprintf(stderr,"... stopped TTL\n"); - fflush(stdout); - return NULL; - -} - -/*! -******************************************************************************* -\brief thread de traitement des messages sortants sur les sockets (rrc ou cmm). - -\return NULL -*/ -static void * thread_send_msg_cmm ( - void * p_data /**< parametre du pthread */ -) -{ - int ii ; - int no_msg ; - fprintf(stderr,"Thread Send Message: starting ... \n"); - fflush(stderr); - file_msg_t *pItem ; - - while ( flag_not_exit) { - no_msg = 0 ; - - for ( ii = 0 ; iifile_send_cmm_msg) ) ; - - - if ( pItem == NULL ) - no_msg++; - else { - int r = send_msg( pItem->s, pItem->msg ); - WARNING(r!=0); - } - - RRM_FREE( pItem ) ; - } - - if ( no_msg==nb_inst ) // Pas de message - usleep(1000); - } - - fprintf(stderr,"... stopped Thread Send Message\n"); - fflush(stderr); - return NULL; -} - -/*! -******************************************************************************* -\brief thread de traitement des messages sortants sur les sockets (rrc ou cmm). - -\return NULL -*/ -static void * thread_send_msg_rrc ( - void * p_data /**< parametre du pthread */ -) -{ - int ii ; - - int no_msg ; - fprintf(stderr,"Thread Send Message To RRC: starting ... \n"); - fflush(stderr); - file_msg_t *pItem ; - - while ( flag_not_exit) { - no_msg = 0 ; - - for ( ii = 0 ; iifile_send_rrc_msg) ) ; - - - if ( pItem == NULL ) - no_msg++; - else { - -#ifdef RRC_KERNEL_MODE - // envoi du header - status = write (Rrm_fifos.rrm_2_rrc_fifo,(char*) pItem->msg, sizeof(msg_head_t) ); - - if ( pItem->msg->head.size >0) - status = write (Rrm_fifos.rrm_2_rrc_fifo,(pItem->msg)->data, pItem->msg->head.size); - - //printf( "status write: %d \n",status); - //printf("send msg to rrc [%d] id msg: %d \n", (pItem->msg)->head.inst, (pItem->msg)->head.msg_type ); -#else - int r = send_msg( pItem->s, pItem->msg ); - WARNING(r!=0); -#endif - } - - RRM_FREE( pItem ) ; - } - - if ( no_msg==nb_inst ) // Pas de message - usleep(1000); - } - - fprintf(stderr,"... stopped Thread Send Message\n"); - fflush(stderr); - return NULL; -} - -//mod_lor_10_01_25++ -/*! -******************************************************************************* -\brief thread de traitement des messages sortants sur les sockets (rrc ou cmm). - -\return NULL -*/ -static void * thread_send_msg_ip ( - void * p_data /**< parametre du pthread */ -) -{ - int ii ; - int no_msg ; - fprintf(stderr,"Thread Send Message IP: starting ... \n"); - fflush(stderr); - file_msg_t *pItem ; - - while ( flag_not_exit) { - no_msg = 0 ; - - for ( ii = 0 ; iifile_send_ip_msg) ) ; - - - if ( pItem == NULL ) - no_msg++; - else { - // fprintf(stderr,"Thread Send Message inst %d socket %d msg_type = %d dest %X\n", ii, rrm->ip.s->s,pItem->msg->head.msg_type, rrm->ip.s->in_dest_addr.sin_addr.s_addr); //dbg - //fprintf(stderr,"dest in msg%X\n\n\n\n", pItem->s_int->in_dest_addr.sin_addr.s_addr); //dbg - - - // if (pItem->msg->head.msg_type == 26) - // msg_fct( "IP -> UPDATE_SENSING_RESULTS_3 inst: %d sockid %d\n", ii, rrm->ip.s->s);//dbg - //printf("T4b:ok user %d msg %d\n", rrm->id,pItem->msg->head.msg_type);//dbg - int r = send_msg_int( rrm->ip.s, pItem->msg ); - //printf("T5b:ok r: %d\n",r);//dbg - - WARNING(r!=0); - } - - RRM_FREE( pItem ) ; - } - - if ( no_msg==nb_inst ) // Pas de message - usleep(1000); - } - - fprintf(stderr,"... stopped Thread Send Message\n"); - fflush(stderr); - return NULL; -} - -/*! -******************************************************************************* -\brief thread de traitement des messages sortants sur les sockets (rrc ou cmm). - -\return NULL -*/ -static void * thread_send_msg_sensing ( - void * p_data /**< parametre du pthread */ -) -{ - int ii ; - - int no_msg ; - fprintf(stderr,"Thread Send Message To Sensing Unit: starting ... \n"); - fflush(stderr); - file_msg_t *pItem ; - - while ( flag_not_exit) { - no_msg = 0 ; - - for ( ii = 0 ; iifile_send_sensing_msg) ) ; - - - if ( pItem == NULL ) - no_msg++; - else { - int r = send_msg( pItem->s, pItem->msg ); - WARNING(r!=0); - - } - - RRM_FREE( pItem ) ; - } - - if ( no_msg==nb_inst ) // Pas de message - usleep(1000); - } - - fprintf(stderr,"... stopped Thread Send Message\n"); - fflush(stderr); - return NULL; -} - -//mod_lor_10_01_25--*/ - - - -/*! -******************************************************************************* -\brief thread de traitement des messages entrant sur une interface (rrc, cmm ou sensing). - -\return NULL -*/ - -static void * thread_recv_msg ( - void * p_data /**< parametre du pthread */ -) -{ - msg_t *msg ; - struct data_thread *data = (struct data_thread *) p_data; - int sock ; - - fprintf(stderr,"%s interfaces :starting ... %s %s\n",data->name , data->sock_path_local, data->sock_path_dest); - fflush(stderr); - - /* ouverture des liens de communications */ - sock = open_socket( &data->s, data->sock_path_local, data->sock_path_dest ,0 ); - - if ( sock != -1 ) { - fprintf(stderr," %s -> socket = %d\n",data->name , sock ); - fflush(stderr); - - while (flag_not_exit) { - msg = (msg_t *) recv_msg(&data->s) ; - - if (msg == NULL ) { - fprintf(stderr,"Server closed connection\n"); - flag_not_exit = 0; - } else { - int inst = msg->head.inst ; - rrm_t *rrm = &rrm_inst[inst]; - - put_msg( &(rrm->file_recv_msg), 0, &data->s, msg) ;//mod_lor_10_01_25 - } - } - - close_socket(&data->s) ; - } - - fprintf(stderr,"... stopped %s interfaces\n",data->name); - return NULL; -} - -//mod_lor_10_01_25++ -/*! -******************************************************************************* -\brief thread de traitement des messages entrant via ip. - -\return NULL -*/ - -static void * thread_recv_msg_int ( - void * p_data /**< parametre du pthread */ -) -{ - msg_t *msg ; - struct data_thread_int *data = (struct data_thread_int *) p_data; - rrm_t *rrm = &rrm_inst[data->instance]; - int sock ; - - fprintf(stderr,"%s interfaces :starting on inst. %d ... ",data->name, data->instance ); - fprintf(stderr,"\n"); - - fflush(stderr); - - /* ouverture des liens de communications */ - sock = open_socket_int( &data->s, data->sock_path_local, data->local_port, data->sock_path_dest, data->dest_port,0 ); - data->s.s = sock; - memcpy(rrm->ip.s, &(data->s), sizeof(sock_rrm_int_t)); - //fprintf(stderr,"IP dest %X \n", rrm->ip.s->in_dest_addr.sin_addr.s_addr);//dbg - - if ( sock != -1 ) { - fprintf(stderr," %s -> socket = %d\n",data->name , sock ); - fflush(stderr); - - while (flag_not_exit) { - - msg = (msg_t *) recv_msg_int(rrm->ip.s) ; - - if (msg == NULL ) { - fprintf(stderr,"Server closed connection\n"); - flag_not_exit = 0; - } else { - //fprintf(stdout,"Ip dest in FC when received msg %X\n",rrm_inst[0].ip.s->in_dest_addr.sin_addr.s_addr); //dbg - //printf(stderr,"msg received from %X \n", rrm->ip.s->in_dest_addr.sin_addr.s_addr);//dbg - put_msg( &(rrm->file_recv_msg), 1, &data->s, msg) ; - //fprintf(stdout,"Ip dest in FC after put_msg %X\n",rrm_inst[0].ip.s->in_dest_addr.sin_addr.s_addr); //dbg - - } - } - - close_socket_int(&data->s) ; - } - - fprintf(stderr,"... stopped %s interfaces\n",data->name); - return NULL; -} -//mod_lor_10_01_25-- - -/*******************************************************************************/ -#ifdef RRC_KERNEL_MODE -char Header_buf[sizeof(msg_head_t)]; -char Data[2400]; -unsigned short Header_read_idx=0, - Data_read_idx=0, - Data_to_read=0, - Header_size=sizeof(msg_head_t), - READ_OK=1; - -/*! -******************************************************************************* -\brief thread de traitement des messages entrant sur l'interface fifo du RRC - en mode KERNEL - -\return NULL -*/ -static void * thread_recv_msg_fifo (void * p_data ) -{ - msg_t *msg_cpy ; - rrm_t *rrm ; - msg_head_t *Header ; - int taille ; - int inst ; - int bytes_read; - - msg_fifo("[RRM]: RX MSG_FIFOS %d handler starting....\n",RRC2RRM_FIFO); - - while (flag_not_exit) { - if(Header_read_idx < Header_size) { - bytes_read = read(Rrm_fifos.rrc_2_rrm_fifo,&Data[Header_read_idx],Header_size-Header_read_idx); - - if(bytes_read <0) - continue; - - Header_read_idx+=bytes_read; - msg_fifo("[RRM]: RX MSG ON FIFOS %d: Header size %d, bytes_read %d\n",RRC2RRM_FIFO,Header_read_idx,bytes_read); - - if(Header_read_idx == Header_size) { - Header=(msg_head_t*)Data; - Data_to_read=Header->size; - Data_read_idx=Header_read_idx; - msg_fifo("[RRM]: RX MSG ON FIFOS %d: Header read completed, Data size %d\n",RRC2RRM_FIFO,Data_to_read); - Header = (msg_head_t *) Data; - } else - continue; - } - - if (Data_to_read > 0 ) { - bytes_read = read (Rrm_fifos.rrc_2_rrm_fifo,&Data[Data_read_idx],Data_to_read); - - if(bytes_read <0) - continue; - - Data_to_read-=bytes_read; - Data_read_idx+=bytes_read; - msg_fifo("[RRM]: RX MSG ON FIFOS %d: data size %d\n",RRC2RRM_FIFO,Data_read_idx-Header_read_idx); - - if(Data_to_read > 0 ) - continue; - - Header_read_idx= 0 ; - Data_read_idx = 0 ; - Data_to_read = 0 ; - taille = Header->size + sizeof(msg_head_t) ; - msg_cpy = RRM_MALLOC( msg_t, taille ) ; - inst = Header->inst ; - rrm = &rrm_inst[inst]; - - memcpy( msg_cpy, Data , taille ) ; - msg_fifo("[RRM]: RX MSG ON FIFOS %d: data read completed, Proccess on inst .... %d\n",RRC2RRM_FIFO,inst); - put_msg( &(rrm->file_recv_msg), 0, rrm->rrc.s, msg_cpy) ; //mod_lor_10_01_25 - msg_fifo("[RRM]: RX MSG ON FIFOS %d: data read completed, Proccess on inst done %d\n",RRC2RRM_FIFO,inst); - } else { - /* Seulement le header */ - Header_read_idx= 0 ; - Data_read_idx = 0 ; - Data_to_read = 0 ; - taille = sizeof(msg_head_t) ; - msg_cpy = RRM_MALLOC( msg_t, taille ) ; - inst = Header->inst ; - rrm = &rrm_inst[inst]; - - memcpy( msg_cpy, Data , taille ) ; - put_msg( &(rrm->file_recv_msg), 0, rrm->rrc.s, msg_cpy) ;//mod_lor_10_01_25 - } - } - - return NULL; -} -#endif -/*! -******************************************************************************* -\brief traitement des messages entrant sur l'interface CMM - -\return Auncune valeur -*/ -static void processing_msg_cmm( - rrm_t *rrm , ///< Donnee relative a une instance du RRM - msg_head_t *header , ///< Entete du message - char *msg , ///< Message recu - int len_msg ///< Longueur du message -) -{ -#ifdef TRACE - - if ( header->msg_type < NB_MSG_CMM_RRM ) - fprintf(cmm2rrm_fd,"%lf CMM->RRM %d %-30s %d %d\n",get_currentclock(),header->inst,Str_msg_cmm_rrm[header->msg_type], header->msg_type,header->Trans_id); - else - fprintf(cmm2rrm_fd,"%lf CMM->RRM %-30s %d %d\n",get_currentclock(),"inconnu", header->msg_type,header->Trans_id); - - fflush(cmm2rrm_fd); -#endif - - switch ( header->msg_type ) { - case CMM_CX_SETUP_REQ: { - cmm_cx_setup_req_t *p = (cmm_cx_setup_req_t *) msg ; - msg_fct( "[CMM]>[RRM]:%d:CMM_CX_SETUP_REQ\n",header->inst); - - if ( cmm_cx_setup_req(header->inst,p->Src,p->Dst,p->QoS_class,header->Trans_id ) ) { - /* RB_ID = 0xFFFF => RB error */ - put_msg( &(rrm->file_send_cmm_msg), 0, - rrm->cmm.s, msg_rrm_cx_setup_cnf(header->inst,0xFFFF , header->Trans_id )) ;//mod_lor_10_01_25 - } - } - break ; - - case CMM_CX_MODIFY_REQ: { - cmm_cx_modify_req_t *p = (cmm_cx_modify_req_t *) msg ; - msg_fct( "[CMM]>[RRM]:%d:CMM_CX_MODIFY_REQ\n",header->inst); - cmm_cx_modify_req(header->inst,p->Rb_id,p->QoS_class,header->Trans_id ) ; - } - break ; - - case CMM_CX_RELEASE_REQ : { - cmm_cx_release_req_t *p = (cmm_cx_release_req_t *) msg ; - msg_fct( "[CMM]>[RRM]:%d:CMM_CX_RELEASE_REQ\n",header->inst); - cmm_cx_release_req(header->inst,p->Rb_id,header->Trans_id ) ; - } - break ; - - case CMM_CX_RELEASE_ALL_REQ : { - //cmm_cx_release_all_req_t *p = (cmm_cx_release_all_req_t *) msg ; - msg_fct( "[CMM]>[RRM]:%d:CMM_CX_RELEASE_ALL_REQ\n",header->inst); - } - break ; - - case CMM_ATTACH_CNF : { ///< The thread that allows - cmm_attach_cnf_t *p = (cmm_attach_cnf_t *) msg ; - msg_fct( "[CMM]>[RRM]:%d:CMM_ATTACH_CNF\n",header->inst); - - //mod_lor_10_01_25++ -#ifndef RRC_EMUL - - if (rrm->ip.s->s == -1) { - //mod_lor_10_05_06++ - unsigned char tmp [4]; - /*for (int i=0; i<10;i++ ) - if (memcmp( &(node_info[i].L2_id), &(p->L2_id), sizeof(L2_ID) )){ - fprintf(stderr,"Inst. to connect with %d\n",i); - break; - }//memcpy()*/ - - //mod_lor_10_05_18++: destination addresses depends on - //scenario and on role, they are declared at beginning of file - if (SCEN_2_CENTR && rrm->id >= FIRST_SECOND_CLUSTER_USER_ID) { //mod_lor_11_01_06 - tmp[0]=CH_COLL_L3id[0]; - tmp[1]=CH_COLL_L3id[1]; - tmp[2]=CH_COLL_L3id[2]; - tmp[3]=CH_COLL_L3id[3]; - } else if (rrm->id == 5) { - tmp[0]=BTS_L3id[0]; - tmp[1]=BTS_L3id[1]; - tmp[2]=BTS_L3id[2]; - tmp[3]=BTS_L3id[3]; - } else { - tmp[0]=FC_L3id[0]; - tmp[1]=FC_L3id[1]; - tmp[2]=FC_L3id[2]; - tmp[3]=FC_L3id[3]; - }//mod_lor_10_05_18-- - - //unsigned char tmp [4]={0x0A,0x00,0x01,0x01}; - /*fprintf(stderr,"IP_addr :");//dbg //mod_lor_10_05_06 - for (int i=0;i<4;i++)//dbg - fprintf(stderr," %X",tmp[i]);//dbg - fprintf(stderr,"\n");//dbg*/ - - //mod_lor_10_05_06-- - fprintf(stderr,"IP interface starting inst. %d\n",rrm->id); - - if (rrm->id != 5) { - int sock = open_socket_int(rrm->ip.s, p->L3_info, 0, tmp, 0, header->inst); - - if ( sock != -1 ) { - fprintf(stderr," Ip -> socket = %d\n", rrm->ip.s->s ); - fflush(stderr); - } else - fprintf(stderr," Error in IP socket opening \n"); - } - } else - fprintf(stderr," Socket IP for inst %d already opened %d \n",rrm->id,rrm->ip.s->s); - -#endif //mod_lor_10_01_25--*/ - - cmm_attach_cnf( header->inst, p->L2_id, p->L3_info_t, p->L3_info, header->Trans_id ) ; - } - break ; - - case CMM_INIT_MR_REQ : { - msg_fct( "[CMM]>[RRM]:%d:CMM_INIT_MR_REQ ????\n",header->inst); - } - break ; - - case CMM_INIT_CH_REQ : { - cmm_init_ch_req_t *p = (cmm_init_ch_req_t *) msg ; - //mod_lor_10_03_01++ - - struct data_thread_int DataIp; - - DataIp.name = "IP" ; ///< Nom du thread - DataIp.sock_path_local=p->L3_info;///< local IP address for internet socket - DataIp.local_port = 7000 ; ///< local IP port for internet socket - - //mod_lor_10_03_01++: setting for topology with FC and BTS on instances 0 and 1 - //mod_lor_10_05_18++ - if (rrm->role == FUSIONCENTER) { - if (SCEN_1) - DataIp.sock_path_dest = BTS_L3id ; ///< dest IP address for internet socket - else if (SCEN_2_CENTR) - DataIp.sock_path_dest = CH_COLL_L3id ; ///< dest IP address for internet socket - } else if (rrm->role == BTS ||rrm->role == CH_COLL) { //mod_lor_10_04_27 - DataIp.sock_path_dest = FC_L3id ; ///< dest IP address for internet socket - } else - fprintf (stderr, "wrong node role %d \n", rrm->role); - - //mod_lor_10_05_18-- - //mod_lor_10_03_01-- - DataIp.dest_port = 0 ; ///< dest IP port for internet socket - DataIp.s.s = -1 ; - DataIp.instance = rrm->id; - //fprintf(stderr,"L3_local ");//dbg - //print_L3_id( IPv4_ADDR, rrm->L3_info ); - //fprintf(stderr,"\n");//dbg - - int ret = pthread_create ( &pthread_recv_int_msg_hnd, NULL, thread_recv_msg_int , &DataIp ); - - if (ret) { - fprintf (stderr, "%s", strerror (ret)); - exit(-1) ; - } - - sleep(5); - //mod_lor_10_03_01-- - cmm_init_ch_req(header->inst,p->L3_info_t,&(p->L3_info[0])); - msg_fct( "[CMM]>[RRM]:%d:CMM_INIT_CH_REQ\n",header->inst); - - } - break ; - - case CMM_INIT_SENSING : { - cmm_init_sensing_t *p = (cmm_init_sensing_t *) msg ; - msg_fct( "[CMM]>[RRM]:%d:CMM_INIT_SENSING\n",header->inst); - rrm->sensing.sens_active=1;//mod_lor_10_05_07 - //st_fr = p->Start_fr; //mod_lor_10_06_01 - //end_fr = p->Stop_fr; //mod_lor_10_06_01 - cmm_init_sensing(header->inst,p->Start_fr ,p->Stop_fr,p->Meas_band,p->Meas_tpf, - p->Nb_channels, p->Overlap,p->Sampl_freq); - - } - break ; - - case CMM_INIT_COLL_SENSING : { //add_lor_10_11_08 - cmm_init_coll_sensing_t *p = (cmm_init_coll_sensing_t *) msg ; - msg_fct( "[CMM]>[RRM]:%d:CMM_INIT_COLL_SENSING\n",header->inst); - rrm->sensing.sens_active=1; - cmm_init_coll_sensing(header->inst,p->Start_fr ,p->Stop_fr,p->Meas_band,p->Meas_tpf, - p->Nb_channels, p->Overlap,p->Sampl_freq); - - } - break ; - - case CMM_STOP_SENSING : { - msg_fct( "[CMM]>[RRM]:%d:CMM_STOP_SENSING\n",rrm->id); - rrm->sensing.sens_active=0;//mod_lor_10_05_07 - //print_sens_db(rrm->rrc.pSensEntry);//dbg - cmm_stop_sensing(header->inst); - } - break ; - - case CMM_ASK_FREQ : { - msg_fct( "[CMM]>[RRM]:%d:CMM_ASK_FREQ\n",header->inst); - cmm_ask_freq(header->inst); - } - break ; - - case CMM_NEED_TO_TX : { //add_lor_10_10_28 - cmm_need_to_tx_t *p = (cmm_need_to_tx_t *) msg ; - msg_fct( "[CMM]>[RRM]:%d:CMM_NEED_TO_TX\n",header->inst); - cmm_need_to_tx(header->inst, p->dest,p->QoS_class); - } - break ; - - case CMM_USER_DISC : { //add_lor_10_11_08 - msg_fct( "[CMM]>[RRM]:%d:CMM_USER_DISC\n",header->inst); - cmm_user_disc(header->inst); - } - break ; - - case CMM_LINK_DISC : { //add_lor_10_11_09 - cmm_link_disk_t *p = (cmm_link_disk_t *) msg ; - msg_fct( "[CMM]>[RRM]:%d:CMM_LINK_DISC with user %d\n",header->inst, p->dest); - cmm_link_disc(header->inst, p->dest); - } - break ; - - default : - fprintf(stderr,"CMM:\n") ; - printHex(msg,len_msg,1) ; - } -} -/*! -******************************************************************************* -\brief traitement des messages entrant sur l'interface RRC - -\return Aucune valeur -*/ -static void processing_msg_rrc( - rrm_t *rrm , ///< Donnee relative a une instance du RRM - msg_head_t *header , ///< Entete du message - char *msg , ///< Message recu - int len_msg ///< Longueur du message -) -{ -#ifdef TRACE - - if ( header->msg_type < NB_MSG_RRC_RRM ) - fprintf(rrc2rrm_fd,"%lf RRC->RRM %d %-30s %d %d\n",get_currentclock(),header->inst,Str_msg_rrc_rrm[header->msg_type],header->msg_type,header->Trans_id); - else - fprintf(rrc2rrm_fd,"%lf RRC->RRM %-30s %d %d\n",get_currentclock(),"inconnu",header->msg_type,header->Trans_id); - - fflush(rrc2rrm_fd); -#endif - - switch ( header->msg_type ) { - case RRC_RB_ESTABLISH_RESP: { - msg_fct( "[RRC]>[RRM]:%d:RRC_RB_ESTABLISH_RESP %d \n",header->inst, header->Trans_id ); - rrc_rb_establish_resp(header->inst,header->Trans_id) ; - } - break ; - - case RRC_RB_ESTABLISH_CFM: { - rrc_rb_establish_cfm_t *p = (rrc_rb_establish_cfm_t *) msg ; - msg_fct( "[RRC]>[RRM]:%d:RRC_RB_ESTABLISH_CFM (%d) %d \n",header->inst,p->Rb_id, header->Trans_id); - rrc_rb_establish_cfm(header->inst,p->Rb_id,p->RB_type,header->Trans_id) ; - } - break ; - - case RRC_RB_MODIFY_RESP: { - msg_fct( "[RRC]>[RRM]:%d:RRC_RB_MODIFY_RESP %d \n",header->inst, header->Trans_id); - rrc_rb_modify_resp(header->inst,header->Trans_id) ; - } - break ; - - case RRC_RB_MODIFY_CFM: { - rrc_rb_modify_cfm_t *p = (rrc_rb_modify_cfm_t *) msg ; - msg_fct( "[RRC]>[RRM]:%d:RRC_RB_MODIFY_CFM (%d) %d \n",header->inst,p->Rb_id, header->Trans_id); - rrc_rb_modify_cfm(header->inst,p->Rb_id,header->Trans_id) ; - } - break ; - - case RRC_RB_RELEASE_RESP: { - msg_fct( "[RRC]>[RRM]:%d:RRC_RB_RELEASE_RESP %d \n",header->inst, header->Trans_id); - rrc_rb_release_resp(header->inst,header->Trans_id) ; - } - break ; - - case RRC_MR_ATTACH_IND : { - rrc_MR_attach_ind_t *p = (rrc_MR_attach_ind_t *) msg ; - msg_fct( "[RRC]>[RRM]:%d:RRC_MR_ATTACH_IND (Node %02d) %d \n",header->inst, p->L2_id.L2_id[0], header->Trans_id); - rrc_MR_attach_ind(header->inst,p->L2_id) ; - } - break ; - - case RRC_SENSING_MEAS_RESP: { - msg_fct( "[RRC]>[RRM]:%d:RRC_SENSING_MEAS_RESP %d \n",header->inst, header->Trans_id); - rrc_sensing_meas_resp(header->inst,header->Trans_id) ; - } - break ; - - case RRC_CX_ESTABLISH_IND: { - rrc_cx_establish_ind_t *p = (rrc_cx_establish_ind_t *) msg ; - msg_fct( "[RRC]>[RRM]:%d:RRC_CX_ESTABLISH_IND (Node %02d) %d \n",header->inst, p->L2_id.L2_id[0], header->Trans_id); - - rrc_cx_establish_ind(header->inst,p->L2_id,header->Trans_id, - p->L3_info,p->L3_info_t, - p->DTCH_B_id,p->DTCH_id) ; - - //mod_lor_10_01_25++ - if (rrm->state == MESHROUTER) { - memcpy(rrm->L3_info_corr,p->L3_info, IPv4_ADDR); - - } - - //mod_lor_10_01_25--*/ - } - break ; - - case RRC_PHY_SYNCH_TO_MR_IND : { - rrc_phy_synch_to_MR_ind_t *p = (rrc_phy_synch_to_MR_ind_t *) msg ; - msg_fct( "[RRC]>[RRM]:%d:RRC_PHY_SYNCH_TO_MR_IND.... (Node %02d) %d \n",header->inst, p->L2_id.L2_id[0], header->Trans_id); - rrc_phy_synch_to_MR_ind(header->inst,p->L2_id) ; - //msg_fct( "[RRC]>[RRM]:%d:RRC_PHY_SYNCH_TO_MR_IND Done\n",header->inst); - } - break ; - - case RRC_PHY_SYNCH_TO_CH_IND : { - rrc_phy_synch_to_CH_ind_t *p = (rrc_phy_synch_to_CH_ind_t *) msg ; - msg_fct( "[RRC]>[RRM]:%d:RRC_PHY_SYNCH_TO_CH_IND.... %d (Node %02d) %d \n",header->inst, p->Ch_index, p->L2_id.L2_id[0], header->Trans_id); - rrc_phy_synch_to_CH_ind(header->inst,p->Ch_index,p->L2_id ) ; - //msg_fct( "[RRC]>[RRM]:%d:RRC_PHY_SYNCH_TO_CH_IND Done\n",header->inst); - - } - break ; - - case RRC_SENSING_MEAS_IND : { - rrc_sensing_meas_ind_t *p = (rrc_sensing_meas_ind_t *) msg ; - msg_fct( "[RRC]>[RRM]:%d:RRC_SENSING_MEAS_IND (Node %02d) %d \n",header->inst, p->L2_id.L2_id[0], header->Trans_id); - rrc_sensing_meas_ind( header->inst,p->L2_id, p->NB_meas, p->Sensing_meas, header->Trans_id ); - } - break ; - - case RRC_RB_MEAS_IND : { - rrc_rb_meas_ind_t *p = (rrc_rb_meas_ind_t *) msg ; - msg_fct( "[RRC]>[RRM]:%d:RRC_RB_MEAS_IND (Noede %02d) %d \n",header->inst, p->L2_id.L2_id[0], header->Trans_id); - rrc_rb_meas_ind( header->inst, p->Rb_id, p->L2_id, p->Meas_mode, p->Mac_rlc_meas, header->Trans_id ); - } - break ; - - - case RRC_INIT_SCAN_REQ : { - rrc_init_scan_req_t *p = (rrc_init_scan_req_t *) msg ; - // fprintf(stdout,"sens_database before:\n");//dbg - // print_sens_db( rrm->rrc.pSensEntry );//dbg - msg_fct( "[RRC]>[RRM]:%d:RRC_INIT_SCAN_REQ %d \n",header->inst, header->Trans_id); - rrm->sensing.sens_active=1;//mod_lor_10_04_21 - - rrc_init_scan_req( header->inst, p->L2_id, p->Start_fr ,p->Stop_fr,p->Meas_band,p->Meas_tpf, - p->Nb_channels, p->Overlap,p->Sampl_freq, header->Trans_id ); - - // fprintf(stdout,"sens_database:\n");//dbg - // print_sens_db( rrm->rrc.pSensEntry );//dbg - - } - break ; - - case RRC_END_SCAN_CONF : { - rrc_end_scan_conf_t *p = (rrc_end_scan_conf_t *) msg ; - msg_fct( "[RRC]>[RRM]:%d:RRC_END_SCAN_CONF %d (Node ",header->inst, header->Trans_id); - - for ( int i=0; i<8; i++) - msg_fct("%02X", p->L2_id.L2_id[i]); - - msg_fct( ")\n"); - rrc_end_scan_conf( header->inst, p->L2_id, header->Trans_id ); - } - break ; - - case RRC_END_SCAN_REQ : { - rrc_end_scan_req_t *p = (rrc_end_scan_req_t *) msg ; - msg_fct( "[RRC]>[RRM]:%d:RRC_END_SCAN_REQ %d \n",header->inst, header->Trans_id); - rrm->sensing.sens_active=0;//mod_lor_10_04_21 - rrc_end_scan_req( header->inst, p->L2_id, header->Trans_id ); - } - break ; - - case RRC_INIT_MON_REQ : { - rrc_init_mon_req_t *p = (rrc_init_mon_req_t *) msg ; - msg_fct( "[RRC]>[RRM]:%d:RRC_INIT_MON_REQ %d (Node ",header->inst, header->Trans_id); - - for ( int i=0; i<8; i++) - msg_fct("%02X", p->L2_id.L2_id[i]); - - msg_fct( ")\n"); - rrc_init_mon_req( header->inst, p->L2_id, p->ch_to_scan, p->NB_chan, p->interval, header->Trans_id ); - } - break ; - - //mod_lor_10_06_04++ - case RRC_UP_FREQ_ASS : { - //rrm_up_freq_ass_t *p = (rrm_up_freq_ass_t *) msg ; - //int i; - msg_fct( "[RRC]>[RRM]:%d:RRC_UP_FREQ_ASS \n",header->inst); - - } - break; - - //mod_lor_10_06_04-- - //mod_lor_10_11_05++ - case RRC_UP_FREQ_ASS_SEC : { - rrm_up_freq_ass_sec_t *p = (rrm_up_freq_ass_sec_t *) msg ; - int i; - unsigned int chann_start[NB_SENS_MAX]; - unsigned int chann_end[NB_SENS_MAX]; - unsigned int tx[NB_SENS_MAX]; - unsigned int tot_ch = 0; - msg_fct( "[RRC]>[RRM]:%d:RRC_UP_FREQ_ASS_SEC ch %d\n",header->inst,p->NB_all); - - for (i=0; iNB_all; i++) { - if (memcmp( &(p->L2_id[i]), &(rrm->L2_id), sizeof(L2_ID) )==0) { - printf("USER:%d:Transmission on channel %d from %d to %d\n\n",header->inst,p->ass_channels[i].Ch_id, p->ass_channels[i].Start_f, p->ass_channels[i].Final_f); - chann_start[tot_ch] = p->ass_channels[i].Start_f; - chann_end[tot_ch] = p->ass_channels[i].Final_f; - tx[tot_ch] = 1; - tot_ch++; - } - - if (memcmp( &(p->L2_id_dest[i]), &(rrm->L2_id), sizeof(L2_ID) )==0) { - printf("USER:%d:Ready to receive on channel %d from %d to %d\n\n",header->inst,p->ass_channels[i].Ch_id, p->ass_channels[i].Start_f, p->ass_channels[i].Final_f); - chann_start[tot_ch] = p->ass_channels[i].Start_f; - chann_end[tot_ch] = p->ass_channels[i].Final_f; - tx[tot_ch] = 0; - tot_ch++; - } - } - - plot_all_chann_scen_2(tx, chann_start, chann_end, tot_ch, header->inst-FIRST_SENSOR_ID+1); - - - } - break; - //mod_lor_10_11_05-- - - default : - fprintf(stderr,"RRC:\n") ; - printHex(msg,len_msg,1) ; - } - -} - -static void processing_msg_sensing( - rrm_t *rrm , ///< Donnee relative a une instance du RRM - msg_head_t *header , ///< Entete du message - char *msg , ///< Message recu - int len_msg ///< Longueur du message -) -{ - -#ifdef TRACE - - if ( header->msg_type < NB_MSG_SENSING_RRM ) - fprintf(sensing2rrm_fd,"%lf SENSING->RRM %d %-30s %d %d\n",get_currentclock(),header->inst,Str_msg_sensing_rrm[header->msg_type],header->msg_type,header->Trans_id); - else - fprintf(sensing2rrm_fd,"%lf SENSING->RRM %-30s %d %d\n",get_currentclock(),"inconnu",header->msg_type,header->Trans_id); - - fflush(sensing2rrm_fd); -#endif - - switch ( (MSG_SENSING_RRM_T)header->msg_type ) { - - case SNS_UPDATE_SENS : { - rrc_update_sens_t *p = (rrc_update_sens_t *) msg ; - - if (rrm->sensing.sens_active) {//mod_lor_10_05_07 - msg_fct( "[SENSING]>[RRM]:%d:SNS_UPDATE_SENS \n",header->inst); - - if (SCEN_1) - plot_spectra(p->Sens_meas, p->NB_info, header->inst-FIRST_SENSOR_ID+1); - //mod_lor_10_11_04++ - else if (SCEN_2_CENTR && !COLL_CLUST) - plot_spectra_CH1(p->Sens_meas, p->NB_info, header->inst-FIRST_SENSOR_ID+1); - else if (SCEN_2_CENTR && COLL_CLUST) - plot_spectra_CH2(p->Sens_meas, p->NB_info, header->inst-FIRST_SENSOR_ID+1); - - //mod_lor_10_11_04-- - - rrc_update_sens( header->inst, rrm->L2_id, p->NB_info, p->Sens_meas, p->info_time ); //fix info_time & understand trans_id - }//mod_lor_10_05_07 - } - break ; - - //mod_lor_10_04_14++ - case SNS_END_SCAN_CONF : { - - msg_fct( "[SENSING]>[RRM]:%d:SNS_END_SCAN_CONF\n",header->inst); - - sns_end_scan_conf( header->inst ); - } - break ; - - default : - fprintf(stderr,"SENSING:%d:\n",header->msg_type) ; - printHex(msg,len_msg,1) ; - }//mod_lor_10_04_14-- -} - - -/*! -******************************************************************************* -\brief traitement des messages entrant sur l'interface PUSU - -\return Aucune valeur -*/ -static void processing_msg_pusu( - rrm_t *rrm , ///< Donnee relative a une instance du RRM - msg_head_t *header , ///< Entete du message - char *msg , ///< Message recu - int len_msg ///< Longueur du message -) -{ - transact_t *pTransact ; - - pthread_mutex_lock( &( rrm->pusu.exclu ) ) ; - pTransact = get_item_transact(rrm->pusu.transaction,header->Trans_id ) ; - - if ( pTransact == NULL ) { - fprintf(stderr,"[RRM] %d PUSU Response (%d): unknown transaction\n",header->msg_type,header->Trans_id); - } else { - del_item_transact( &(rrm->pusu.transaction),header->Trans_id ) ; - } - - pthread_mutex_unlock( &( rrm->pusu.exclu ) ) ; - -#ifdef TRACE - - if ( header->msg_type < NB_MSG_RRM_PUSU ) - fprintf(pusu2rrm_fd,"%lf PUSU->RRM %d %-30s %d %d\n",get_currentclock(),header->inst,Str_msg_pusu_rrm[header->msg_type],header->msg_type,header->Trans_id); - else - fprintf(pusu2rrm_fd,"%lf PUSU->RRM %-30s %d %d\n",get_currentclock(),"inconnu",header->msg_type,header->Trans_id); - - fflush(pusu2rrm_fd); -#endif - - switch ( header->msg_type ) { - case PUSU_PUBLISH_RESP: { - msg_fct( "[PUSU]>[RRM]:%d:PUSU_PUBLISH_RESP\n",header->inst ); - } - break ; - - case PUSU_UNPUBLISH_RESP: { - msg_fct( "[PUSU]>[RRM]:%d:PUSU_UNPUBLISH_RESP\n",header->inst ); - } - break ; - - case PUSU_LINK_INFO_RESP: { - msg_fct( "[PUSU]>[RRM]:%d:PUSU_LINK_INFO_RESP\n",header->inst ); - } - break ; - - case PUSU_SENSING_INFO_RESP: { - msg_fct( "[PUSU]>[RRM]:%d:PUSU_SENSING_INFO_RESP\n",header->inst ); - } - break ; - - case PUSU_CH_LOAD_RESP: { - msg_fct( "[PUSU]>[RRM]:%d:PUSU_CH_LOAD_RESP\n",header->inst ); - } - break ; - - default : - fprintf(stderr,"PUSU:%d:\n",header->msg_type) ; - printHex(msg,len_msg,1) ; - } - -} - -//mod_lor_10_01_25++ -/*! -******************************************************************************* -\brief traitement des messages entrant via IP - -\return Auncune valeur -*/ -static void processing_msg_ip( - rrm_t *rrm , ///< Donnee relative a une instance du RRM - msg_head_t *header , ///< Entete du message - char *msg , ///< Message recu - int len_msg ///< Longueur du message -) -{ -#ifdef TRACE - - //mod_lor_10_04_27++ - /*if ( header->msg_type < NB_MSG_RRC_RRM ) - fprintf(ip2rrm_fd,"%lf IP->RRM %d %-30s %d %d\n",get_currentclock(),header->inst,Str_msg_rrc_rrm[header->msg_type], header->msg_type,header->Trans_id); - else - fprintf(ip2rrm_fd,"%lf CMM->RRM %-30s %d %d\n",get_currentclock(),"inconnu", header->msg_type,header->Trans_id); - fflush(ip2rrm_fd);*/ - if ( header->msg_type < NB_MSG_IP )//mod_lor_10_04_27 - fprintf(ip2rrm_fd,"%lf IP->RRM %d %-30s %d %d\n",get_currentclock(),header->inst,Str_msg_ip[header->msg_type], header->msg_type,header->Trans_id); - else - fprintf(ip2rrm_fd,"%lf IP->RRM %-30s %d %d\n",get_currentclock(),"inconnu", header->msg_type,header->Trans_id); - - fflush(ip2rrm_fd); - //mod_lor_10_04_27-- -#endif - - switch ( header->msg_type ) { - case UPDATE_SENS_RESULTS_3 : { - //fprintf(stderr,"1node entry @%p \n", rrm->rrc.pSensEntry);//dbg - rrm_update_sens_t *p = (rrm_update_sens_t *) msg ; - - //fprintf(stdout,"Ip dest in FC before update%X\n",rrm_inst[0].ip.s->in_dest_addr.sin_addr.s_addr); //dbg - if (rrm->sensing.sens_active) { //mod_lor_10_05_07 - msg_fct( "[IP]>[RRM]:%d:UPDATE_SENS_RESULTS_3 from %d \n",rrm->id, header->inst); - - if (SCEN_1) { - if(update_sens_results( rrm->id, p->L2_id, p->NB_info, p->Sens_meas, p->info_time)||SN_waiting == 1) //mod_lor_10_06_02 - if ((open_freq_query(rrm->id, rrm->L2_id, 0, 1)>0) && SN_waiting) //mod_lor_10_06_02 - SN_waiting=0; //mod_lor_10_06_02 - } else if (SCEN_2_CENTR) { //add_lor_10_11_03 - update_sens_results( rrm->id, p->L2_id, p->NB_info, p->Sens_meas, p->info_time); - } - - } //mod_lor_10_05_07 - - //fprintf(stdout,"Ip dest in FC after update%X\n",rrm_inst[0].ip.s->in_dest_addr.sin_addr.s_addr); //dbg - //fprintf(stderr,"2node entry @%p \n", rrm->rrc.pSensEntry);//dbg - - } - break ; - - //mod_lor_10_05_07++ - case UP_CLUST_SENS_RESULTS : { - update_coll_sens_t *p = (update_coll_sens_t *) msg ; - - if (rrm->sensing.sens_active) { - msg_fct( "[IP]>[RRM]:%d:UP_CLUST_SENS_RESULTS from %d \n",rrm->id, header->inst); - - if (SCEN_2_CENTR && !COLL_CLUST) - plot_spectra_CH1(p->Sens_meas, p->NB_info, -1); - else - printf("Error!!! this message should be received by Cluster 1\n"); - - up_coll_sens_results( rrm->id, p->L2_id, p->NB_info, p->Sens_meas, p->info_time); - } - } - break ; - - //mod_lor_10_05_07-- - case OPEN_FREQ_QUERY_4 : { - open_freq_query_t *p = (open_freq_query_t *) msg ; - msg_fct( "[IP]>[RRM]:%d:OPEN_FREQ_QUERY_4 from %d\n",rrm->id, header->inst); - open_freq_query( rrm->id, p->L2_id, p->QoS, header->Trans_id ); - - } - break ; - - case ASK_FREQ_TO_CH_3 : { //add_lor_10_11_03 - ask_freq_to_CH_t *p = (ask_freq_to_CH_t *) msg ; - msg_fct( "[IP]>[RRM]:%d:ASK_FREQ_TO_CH_3 from %d\n",rrm->id, header->inst); - - if (ask_freq_to_CH( rrm->id, &(p->L2_id), &(p->L2_id_dest), 1, header->Trans_id )!=0) { - printf ("Not available channels... Waiting for a channel...\n"); - pthread_mutex_lock( &( rrm->ip.exclu ) ) ; - memcpy(rrm->ip.L2_id_wait_users[rrm->ip.users_waiting_update][0].L2_id,p->L2_id.L2_id, sizeof(L2_ID)); - memcpy(rrm->ip.L2_id_wait_users[rrm->ip.users_waiting_update][1].L2_id,p->L2_id_dest.L2_id, sizeof(L2_ID)); - rrm->ip.users_waiting_update++; - printf ("N4 tot waiting: %d\n",rrm->ip.users_waiting_update);//db - pthread_mutex_unlock( &( rrm->ip.exclu ) ) ; - } - } - break ; - - case UPDATE_OPEN_FREQ_7 : { - update_open_freq_t *p = (update_open_freq_t *) msg ; - unsigned int occ_channels[p->NB_chan]; //mod_lor_10_05_18: occ_channels passed as parameter to update open freq. - msg_fct( "[IP]>[RRM]:%d:UPDATE_OPEN_FREQ_7 from %d\n",rrm->id, header->inst); - unsigned int NB_occ = update_open_freq( rrm->id, p->L2_id, p->NB_chan, occ_channels, p->channels, header->Trans_id ); - - if (SCEN_1) - plot_SN_channels(rrm->rrc.pChannelsEntry,NB_occ,occ_channels,rrm->id);//mod_lor_10_06_01 - } - break ; - - case UPDATE_SN_OCC_FREQ_5 : { - sleep (2); //mod_lor_10_06_02 - update_SN_occ_freq_t *p = (update_SN_occ_freq_t *) msg ; - - if (p->NB_chan[RRM]:%d:UPDATE_SN_OCC_FREQ_5 from %d \n",rrm->id, header->inst); - - if (SCEN_1) - plot_SN_channels(rrm->rrc.pChannelsEntry, p->NB_chan, p->occ_channels, rrm->id);//mod_lor_10_06_01 - - if(update_SN_occ_freq( rrm->id, p->L2_id, p->NB_chan, p->occ_channels, header->Trans_id )) //mod_lor_10_05_18 - open_freq_query( rrm->id, p->L2_id, 0, header->Trans_id ); //mod_lor_10_05_18 - - } - break ; - - //mod_lor_10_05_05++ - case INIT_COLL_SENS_REQ : { - init_coll_sens_req_t *p = (init_coll_sens_req_t *) msg ; - msg_fct( "[IP]>[RRM]:%d:INIT_COLL_SENS_REQ from %d\n",rrm->id, header->inst); - rrm->sensing.sens_active=1;//mod_lor_10_05_07 - memcpy( rrm->L2_id_FC.L2_id, p->L2_id.L2_id, sizeof(L2_ID) ); - cmm_init_sensing(rrm->id,p->Start_fr ,p->Stop_fr,p->Meas_band,p->Meas_tpf, - p->Nb_channels, p->Overlap,p->Sampl_freq); - - } - break ; - - //mod_lor_10_05_05-- - //mod_lor_10_05_06++ - case STOP_COLL_SENS : { - //init_coll_sens_req_t *p = (init_coll_sens_req_t *) msg ; - msg_fct( "[IP]>[RRM]:%d:STOP_COLL_SENS from %d\n",rrm->id, header->inst); - //memcpy( rrm->L2_id_FC.L2_id, p->L2_id.L2_id, sizeof(L2_ID) ); - rrm->sensing.sens_active=0;//mod_lor_10_05_07 - cmm_stop_sensing(rrm->id); - - } - break ; - - //mod_lor_10_05_06-- - //mod_lor_10_05_12++ - case STOP_COLL_SENS_CONF : { - stop_coll_sens_conf_t *p = (stop_coll_sens_conf_t *) msg ; - msg_fct( "[IP]>[RRM]:%d:STOP_COLL_SENS_CONF from %d\n",rrm->id, header->inst); - rrc_end_scan_conf( header->inst, p->L2_id, header->Trans_id ); //AAA:to_check - - } - break ; - - //mod_lor_10_05_12-- - case USER_DISCONNECT_9 : { //add_lor_10_11_09 - user_disconnect_t *p = (user_disconnect_t *) msg ; - msg_fct( "[IP]>[RRM]:%d:USER_DISCONNECT from %d\n",rrm->id, header->inst); - disconnect_user( rrm->id, p->L2_id ); - - } - break ; - - case CLOSE_LINK : { //add_lor_10_11_09 - close_link_t *p = (close_link_t *) msg ; - msg_fct( "[IP]>[RRM]:%d:CLOSE_LINK from %d\n",rrm->id, header->inst); - close_active_link( rrm->id, p->L2_id, p->L2_id_dest ); - - } - break ; - - default : - fprintf(stderr,"IP:\n") ; - printHex(msg,len_msg,1) ; - } -} -//mod_lor_10_01_25-- - - - -/*! -******************************************************************************* -\brief thread de traitement des messages sortants sur les sockets - (rrc ou cmm). -\return none -*/ -static void rrm_scheduler ( ) -{ - int ii ; - int no_msg ; - fprintf(stderr,"RRM Scheduler: starting ... \n"); - fflush(stderr); - file_msg_t *pItem ; - //mod_lor_10_04_22++ - unsigned int priority = 0; ///< to guarantee priority to one rrm (fusion center) during sensing period - unsigned int pr_ii = 0; ///< id of the rrm with priority - rrm_t *rrm ; - - //mod_lor_10_04_22-- - while ( flag_not_exit) { - no_msg = 0 ; - - for ( ii = 0 ; ii 0 && rrm->sensing.sens_active) - priority = 1; - } - - //mod_lor_10_04_22-- - // rrm = &rrm_inst[ii] ; - pItem=NULL; - - pItem = get_msg( &(rrm->file_recv_msg)) ; - - if ( pItem == NULL ) - no_msg++; - else { - msg_head_t *header = (msg_head_t *) pItem->msg; - char *msg = NULL ; - - if ( header != NULL ) { - if ( header->size > 0 ) { - msg = (char *) (header +1) ; - } - - //mod_lor_10_01_25 - if (pItem->s_type==0) { - if ( pItem->s->s == rrm->cmm.s->s ) - processing_msg_cmm( rrm , header , msg , header->size ) ; - else if ( pItem->s->s == rrm->rrc.s->s ) { - processing_msg_rrc( rrm , header , msg , header->size ) ; - } else if ( pItem->s->s == rrm->sensing.s->s) { - processing_msg_sensing( rrm , header , msg , header->size ) ; - //fprintf(stderr,"RRM Scheduler: sensing message ... \n"); //dbg - } else - processing_msg_pusu( rrm , header , msg , header->size ) ; - } else { - //fprintf(stderr,"RRM Scheduler: ip message ... \n"); //dbg - processing_msg_ip( rrm , header , msg , header->size ) ; - - } - - RRM_FREE( pItem->msg) ; - } - - RRM_FREE( pItem ) ; - } - } - - if ( no_msg == nb_inst ) - usleep(1000); - - - - } - - fprintf(stderr,"... stopped RRM Scheduler\n"); - fflush(stderr); -} -/*! -******************************************************************************* -\brief This function reads the configuration node file -*/ -static void get_config_file(char *filename ) -{ - FILE *fd = fopen( filename , "r" ); - char buf_line[128] ; - int adresse[LENGTH_L2_ID] ; - int ii = 0 ; - - - if ( fd == NULL ) - return ; - - while ( 1 ) { - fgets( buf_line, 127, fd ) ; - - if (feof(fd)) - break ; - - if ( buf_line[0] == '#' ) - continue ; - - if ( buf_line[0] == ' ' ) - continue ; - - if ( buf_line[0] == '\t' ) - continue ; - - if ( buf_line[0] == '\n' ) - continue ; - - sscanf( buf_line, "%x %x %x %x %x %x %x %x", - &adresse[0],&adresse[1],&adresse[2],&adresse[3], - &adresse[4],&adresse[5],&adresse[6],&adresse[7]); - - rrm_inst[ii].id = ii ; - rrm_inst[ii].L2_id.L2_id[0] = adresse[0] & 0xFF ; - rrm_inst[ii].L2_id.L2_id[1] = adresse[1] & 0xFF; - rrm_inst[ii].L2_id.L2_id[2] = adresse[2] & 0xFF; - rrm_inst[ii].L2_id.L2_id[3] = adresse[3] & 0xFF; - rrm_inst[ii].L2_id.L2_id[4] = adresse[4] & 0xFF; - rrm_inst[ii].L2_id.L2_id[5] = adresse[5] & 0xFF; - rrm_inst[ii].L2_id.L2_id[6] = adresse[6] & 0xFF; - rrm_inst[ii].L2_id.L2_id[7] = adresse[7] & 0xFF; - - print_L2_id( &rrm_inst[ii].L2_id ) ; - fprintf(stderr," (%d) %d \n", ii, buf_line[0] ); - - ii++ ; - - adresse[0]=adresse[1]=adresse[2]=adresse[3]=adresse[4]=adresse[5]=adresse[6]=adresse[7]=0; - buf_line[0] = 0; - } - - nb_inst = ii ; - - fclose(fd) ; -} -/*! -******************************************************************************* -\brief This function displays the help message (syntax) -*/ -static void help() -{ - fprintf(stderr,"syntax: rrm -i \n" ); - fprintf(stderr," rrm -f \n" ); -} - -/*! -******************************************************************************* -\brief programme principale du RRM -*/ -int main( int argc , char **argv ) -{ - - int ii; - int c = 0; - int ret = 0; - int flag_cfg = 0 ; - struct data_thread DataRrc; - struct data_thread DataCmm; - struct data_thread DataPusu; - struct data_thread DataSensing; - - sock_rrm_int_t DataIpS[MAX_RRM]; //mod_lor_10_01_25 - pthread_attr_t attr ; - - - - /* Vérification des arguments */ - while ((c = getopt(argc,argv,"i:f:h")) != -1) - switch (c) { - case 'i': - nb_inst=atoi(optarg); - break; - - case 'f': - get_config_file(optarg); - flag_cfg = 1 ; - break; - - case 'h': - help(); - exit(0); - break; - - default: - help(); - exit(0); - } - - if (nb_inst <= 0 ) { - fprintf(stderr,"[RRM] Provide a node id\n"); - exit(-1); - } - - if (nb_inst >= MAX_RRM) { - fprintf(stderr,"[RRM] the instance number (%d) is upper than MAX_RRM (%d)\n", nb_inst, MAX_RRM); - exit(-1); - } - -#ifdef RRC_KERNEL_MODE - msg("RRM INIT :open fifos\n"); - - while (( Rrm_fifos.rrc_2_rrm_fifo= open ("/dev/rtf14", O_RDONLY )) < 0) { - printf("[RRM][INIT] open fifo /dev/rtf14 returned %d\n", Rrm_fifos.rrc_2_rrm_fifo); - usleep(100); - } - - printf ("[RRM][INIT] open fifo /dev/rtf14 returned %d\n", Rrm_fifos.rrc_2_rrm_fifo); - - while (( Rrm_fifos.rrm_2_rrc_fifo= open ("/dev/rtf15", O_WRONLY |O_NONBLOCK | O_NDELAY)) < 0) { - //| O_BLOCK - printf("[RRM][INIT] open fifo /dev/rtf15 returned %d\n", Rrm_fifos.rrm_2_rrc_fifo); - usleep(100); - } - - printf("[RRM][INIT] open fifo /dev/rtf15 returned %d\n", Rrm_fifos.rrm_2_rrc_fifo); -#endif /* RRC_KERNEL_MODE */ - - /* ***** MUTEX ***** */ - // initialise les attributs des threads - pthread_attr_init( &attr ) ; - pthread_attr_setschedpolicy( &attr, SCHED_RR ) ; - - DataRrc.name = "RRC" ; - DataRrc.sock_path_local = RRM_RRC_SOCK_PATH ; - DataRrc.sock_path_dest = RRC_RRM_SOCK_PATH ; - DataRrc.s.s = -1 ; - - DataCmm.name = "CMM" ; - DataCmm.sock_path_local = RRM_CMM_SOCK_PATH ; - DataCmm.sock_path_dest = CMM_RRM_SOCK_PATH ; - DataCmm.s.s = -1 ; - - DataPusu.name = "PUSU" ; - DataPusu.sock_path_local= RRM_PUSU_SOCK_PATH ; - DataPusu.sock_path_dest = PUSU_RRM_SOCK_PATH ; - DataPusu.s.s = -1 ; - - DataSensing.name = "SENSING" ; - DataSensing.sock_path_local= RRM_SENSING_SOCK_PATH ; - DataSensing.sock_path_dest = SENSING_RRM_SOCK_PATH ; - DataSensing.s.s = -1 ; - -#ifdef TRACE - cmm2rrm_fd = fopen( "VCD/cmm2rrm.txt" , "w") ; - PNULL(cmm2rrm_fd) ; - - rrc2rrm_fd = fopen( "VCD/rrc2rrm.txt", "w") ; - PNULL(rrc2rrm_fd) ; - - pusu2rrm_fd = fopen( "VCD/pusu2rrm.txt", "w") ; - PNULL(pusu2rrm_fd) ; - - ip2rrm_fd = fopen( "VCD/ip2rrm.txt", "w") ; - PNULL(ip2rrm_fd) ; - - sensing2rrm_fd = fopen( "VCD/sensing2rrm.txt", "w") ; - PNULL(sensing2rrm_fd) ; - -#endif - output_2 = fopen( "VCD/output_2.txt", "w") ; //mod_lor_10_04_20 - PNULL(output_2) ; //mod_lor_10_04_20 - - for ( ii = 0 ; ii < nb_inst ; ii++ ) { - DataIpS[ii].s = -1 ; //mod_lor_10_01_25 - - if ( !flag_cfg ) { - rrm_inst[ii].id = ii ; - rrm_inst[ii].L2_id.L2_id[0] = ii; - rrm_inst[ii].L2_id.L2_id[1] = 0x00; - rrm_inst[ii].L2_id.L2_id[2] = 0x00; - rrm_inst[ii].L2_id.L2_id[3] = 0xDE; - rrm_inst[ii].L2_id.L2_id[4] = 0xAD; - rrm_inst[ii].L2_id.L2_id[5] = 0xBE; - rrm_inst[ii].L2_id.L2_id[6] = 0xAF; - rrm_inst[ii].L2_id.L2_id[7] = 0x00; - } - - pthread_mutex_init( &( rrm_inst[ii].rrc.exclu ), NULL ) ; - pthread_mutex_init( &( rrm_inst[ii].cmm.exclu ), NULL ) ; - pthread_mutex_init( &( rrm_inst[ii].pusu.exclu ), NULL ) ; - pthread_mutex_init( &( rrm_inst[ii].sensing.exclu ), NULL ) ; - pthread_mutex_init( &( rrm_inst[ii].ip.exclu ), NULL ) ; //mod_lor_10_01_25 - - init_file_msg( &(rrm_inst[ii].file_recv_msg), 1 ) ; - init_file_msg( &(rrm_inst[ii].file_send_cmm_msg), 2 ) ; - init_file_msg( &(rrm_inst[ii].file_send_rrc_msg), 3 ) ; - init_file_msg( &(rrm_inst[ii].file_send_ip_msg), 4 ) ; //mod_lor_10_01_25 - init_file_msg( &(rrm_inst[ii].file_send_sensing_msg), 5 ) ; - - - rrm_inst[ii].state = ISOLATEDNODE ; - rrm_inst[ii].role = NOROLE ; - rrm_inst[ii].cmm.trans_cnt = 1024; - rrm_inst[ii].rrc.trans_cnt = 2048; - rrm_inst[ii].pusu.trans_cnt = 3072; - rrm_inst[ii].ip.trans_cnt = 4096; //mod_lor_10_01_25 - rrm_inst[ii].sensing.trans_cnt = 5120; //mod_lor_10_01_25 - - rrm_inst[ii].rrc.s = &DataRrc.s; - rrm_inst[ii].cmm.s = &DataCmm.s; - rrm_inst[ii].pusu.s = &DataPusu.s; - rrm_inst[ii].sensing.s = &DataSensing.s; - rrm_inst[ii].ip.s = &DataIpS[ii]; //mod_lor_10_01_25 - - rrm_inst[ii].rrc.transaction = NULL ; - rrm_inst[ii].cmm.transaction = NULL ; - rrm_inst[ii].pusu.transaction = NULL ; - rrm_inst[ii].sensing.transaction= NULL ; - - rrm_inst[ii].sensing.sens_active= 0; //mod_lor_10_04_21 - rrm_inst[ii].ip.users_waiting_update=0; //add_lor_10_11_08 - rrm_inst[ii].rrc.pNeighborEntry = NULL ; - rrm_inst[ii].rrc.pRbEntry = NULL ; - rrm_inst[ii].rrc.pSensEntry = NULL ; - rrm_inst[ii].rrc.pChannelsEntry = NULL ; - - } - - - - //open_socket( &DataRrc.s, DataRrc.sock_path_local, DataRrc.sock_path_dest ,0 ); - - /* Creation du thread de reception des messages RRC*/ - fprintf(stderr,"Creation du thread RRC : %d\n", nb_inst); -#ifdef RRC_KERNEL_MODE - ret = pthread_create ( &pthread_recv_rrc_msg_hnd, NULL, thread_recv_msg_fifo , &DataRrc ); - - if (ret) { - fprintf (stderr, "%s", strerror (ret)); - exit(-1) ; - } - -#else - ret = pthread_create ( &pthread_recv_rrc_msg_hnd, NULL, thread_recv_msg , &DataRrc ); - - if (ret) { - fprintf (stderr, "%s", strerror (ret)); - exit(-1) ; - } - -#endif - /* Creation du thread de reception des messages CMM */ - ret = pthread_create (&pthread_recv_cmm_msg_hnd , NULL, thread_recv_msg, &DataCmm ); - - if (ret) { - fprintf (stderr, "%s", strerror (ret)); - exit(-1) ; - } - - /* Creation du thread CMM d'envoi des messages */ - ret = pthread_create (&pthread_send_cmm_msg_hnd, NULL, thread_send_msg_cmm, NULL ); - - if (ret) { - fprintf (stderr, "%s", strerror (ret)); - exit(-1) ; - } - - /* Creation du thread de reception des messages PUSU */ - ret = pthread_create (&pthread_recv_pusu_msg_hnd , NULL, thread_recv_msg, &DataPusu ); - - if (ret) { - fprintf (stderr, "%s", strerror (ret)); - exit(-1) ; - } - - /* Creation du thread de reception des messages SENSING */ - ret = pthread_create (&pthread_recv_sensing_msg_hnd , NULL, thread_recv_msg, &DataSensing ); - - if (ret) { - fprintf (stderr, "%s", strerror (ret)); - exit(-1) ; - } - - /* Creation du thread SENSING d'envoi des messages */ - ret = pthread_create (&pthread_send_sensing_msg_hnd, NULL, thread_send_msg_sensing, NULL ); - - if (ret) { - fprintf (stderr, "%s", strerror (ret)); - exit(-1) ; - } - - /* Creation du thread RRC d'envoi des messages */ - ret = pthread_create (&pthread_send_rrc_msg_hnd, NULL, thread_send_msg_rrc, NULL ); - - if (ret) { - fprintf (stderr, "%s", strerror (ret)); - exit(-1) ; - } - - //mod_lor_10_01_25++ - - /* Creation du thread IP d'envoi des messages */ - ret = pthread_create (&pthread_send_ip_msg_hnd, NULL, thread_send_msg_ip, NULL ); - - if (ret) { - fprintf (stderr, "%s", strerror (ret)); - exit(-1) ; - } - - //mod_lor_10_01_25--*/ - - /* Creation du thread TTL */ - ret = pthread_create (&pthread_ttl_hnd , NULL, thread_processing_ttl, NULL); - - if (ret) { - fprintf (stderr, "%s", strerror (ret)); - exit(-1) ; - } - - //mod_eure_lor++ - if (FC_ID>=0 && SCEN_1) { //mod_lor_10_11_04 - fl_initialize(&argc, argv, "SWN Spectral Measurements", 0, 0); - form = create_form_sensing_form(); - fl_show_form(form->sensing_form,FL_PLACE_HOTSPOT,FL_FULLBORDER,"Spectral Measurements"); - fl_check_forms(); - } - - //mod_eure_lor-- - - //mod_lor_10_06_01++ - if (BTS_ID>=0 && SCEN_1) { //mod_lor_10_11_04 - //fl_initialize(&argc, argv, "Secondary Network Frequencies", 0, 0); - SN_form = create_form_Secondary_Network_frequencies(); - fl_show_form(SN_form->Secondary_Network_frequencies,FL_PLACE_HOTSPOT,FL_FULLBORDER,"Secondary Network Frequencies"); - fl_check_forms(); - } - - //mod_lor_10_06_01-- - //mod_lor_10_11_04++ - if (SCEN_2_CENTR && COLL_CLUST) { - fl_initialize(&argc, argv, "Cluster 2", 0, 0); - Sens_form_CH2 = create_form_sens_scen_2(); - fl_show_form(Sens_form_CH2->sens_scen_2,FL_PLACE_HOTSPOT,FL_FULLBORDER,"Cluster 2: Sensing"); - fl_check_forms(); - } - - if (SCEN_2_CENTR && !COLL_CLUST) { - fl_initialize(&argc, argv, "Cluster 1", 0, 0); - Sens_form_CH1 = create_form_sens_CH1_scen_2(); - fl_show_form(Sens_form_CH1->sens_CH1_scen_2,FL_PLACE_HOTSPOT,FL_FULLBORDER,"Cluster 1: Sensing"); - fl_check_forms(); - - Chann_form = create_form_all_freq_to_users(); - fl_show_form(Chann_form->all_freq_to_users,FL_PLACE_HOTSPOT,FL_FULLBORDER,"Cluster 1: Used channels"); - fl_check_forms(); - } - - //mod_lor_10_11_04-- - - /* main loop */ - rrm_scheduler( ) ; - - /* Attente de la fin des threads. */ - pthread_join (pthread_recv_cmm_msg_hnd, NULL); - pthread_join (pthread_recv_rrc_msg_hnd, NULL); - pthread_join (pthread_recv_pusu_msg_hnd, NULL); - pthread_join (pthread_recv_sensing_msg_hnd, NULL); - pthread_join (pthread_send_cmm_msg_hnd, NULL); - pthread_join (pthread_send_rrc_msg_hnd, NULL); - pthread_join (pthread_send_sensing_msg_hnd, NULL); - pthread_join (pthread_send_ip_msg_hnd, NULL); - pthread_join (pthread_ttl_hnd, NULL); - - -#ifdef TRACE - fclose(cmm2rrm_fd ) ; - fclose(rrc2rrm_fd ) ; - fclose(pusu2rrm_fd ) ; - fclose(sensing2rrm_fd ) ; - -#endif - fclose(output_2 ) ; //mod_lor_10_04_20 - - return 0 ; -} - diff --git a/openair3/MESH/RRM/rrm.cfg b/openair3/MESH/RRM/rrm.cfg deleted file mode 100644 index 255f3b195a..0000000000 --- a/openair3/MESH/RRM/rrm.cfg +++ /dev/null @@ -1,2 +0,0 @@ -# L2_ID des noeuds -0xAA 0x55 0x77 0x33 0xCC 0xFF 0xDD 0xBB diff --git a/openair3/MESH/RRM/rrm.h b/openair3/MESH/RRM/rrm.h deleted file mode 100644 index 56e84ded8a..0000000000 --- a/openair3/MESH/RRM/rrm.h +++ /dev/null @@ -1,171 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/*! -******************************************************************************* - -\file rrm.h - -\brief Fichier d'entete contenant les declarations des types, des defines , -et des fonctions relatives aux fonctions du RRM (Radio Resource Management ). - -\author BURLOT Pascal - -\date 15/07/08 - - -\par Historique: -P.BURLOT 2009-01-20 -+ separation de la file de message CMM/RRM a envoyer en 2 files -distinctes ( file_send_cmm_msg, file_send_rrc_msg) -L.IACOBELLI 2009-10-19 -+ sensing database -+ Fusion centre and BTS role - -******************************************************************************* -*/ - -#ifndef RRM_H -#define RRM_H - -#ifdef __cplusplus -extern "C" { -#endif - -/*! -******************************************************************************* -\brief Nombre max. d'instance de RRM (Emulation) -*/ -#define MAX_RRM 10 - - -/*! -******************************************************************************* -\brief Structure definissant une instance RRM -*/ - - -typedef struct { - int id ; ///< identification de l'instance RRM - enum { - ISOLATEDNODE=0 , ///< Node is in a isolated State - CLUSTERHEAD_INIT0, ///< Node is in a Cluster Head initialization State - CLUSTERHEAD_INIT1, ///< Node is in a Cluster Head initialization State - CLUSTERHEAD , ///< Node is in a Cluster Head State - MESHROUTER , ///< Node is in a Mesh Router State - } state ; ///< etat de l'instance - enum { - NOROLE=0 , ///< Node has not a specific role - FUSIONCENTER , ///< Node acts as Fusion Center - BTS , ///< Node acts as BTS - CH_COLL ///< Node acts as Cluster Head collaborating with the CH at the address L2_id_FC - } role ; ///< role of the node - - L2_ID L2_id ; ///< identification de niveau L2 - L2_ID L2_id_FC ; ///< Fusion Centre or Cluster Head address. In CH1 of sendora scenario 2 centralized it is the address of the other CH - L3_INFO_T L3_info_t ; ///< type de l'identification de niveau L3 - - unsigned char L3_info[MAX_L3_INFO]; ///< identification de niveau L3 - //mod_lor_10_01_25 - unsigned char L3_info_corr[MAX_L3_INFO]; ///< identification de niveau L3 du correspondant: FC si le noeud est un senseur ou la BS, BS si le noeud est le FC, CH1 for CH2, CH2 for CH1 - - file_head_t file_send_cmm_msg ; ///< File des messages en emission - file_head_t file_send_rrc_msg ; ///< File des messages en emission - file_head_t file_send_sensing_msg ; ///< File des messages en emission - file_head_t file_send_ip_msg ; ///< File des messages en emission //mod_lor_10_01_25 - file_head_t file_recv_msg ; ///< File des messages en reception - - struct { - sock_rrm_t *s ; ///< Socket associé a l'interface CMM - unsigned int trans_cnt ; ///< Compteur de transaction avec l'interface CMM - transact_t *transaction ; ///< liste des transactions non terminees - pthread_mutex_t exclu ; ///< mutex pour le partage de structure - - - } cmm ; ///< info relatif a l'interface CMM - - struct { -#ifdef TRACE - FILE *fd ; ///< Fichier pour trace de debug : action RRM->RRC -#endif - sock_rrm_t *s ; ///< Socket associé a l'interface RRC - unsigned int trans_cnt ; ///< Compteur de transaction avec l'interface RRC - transact_t *transaction ; ///< liste des transactions non terminees - pthread_mutex_t exclu ; ///< mutex pour le partage de structure - - neighbor_desc_t *pNeighborEntry ; ///< Descripteur sur le voisinage - RB_desc_t *pRbEntry ; ///< Descripteur sur les RB (radio bearer) ouverts - Sens_node_t *pSensEntry ; ///< Desrcipteur sur les info du sensing - CHANNELS_DB_T *pChannelsEntry ; ///< Desrcipteur sur les info des canaux - } rrc ; ///< info relatif a l'interface rrc - - struct { - sock_rrm_t *s ; ///< Socket associé a l'interface PUSU - unsigned int trans_cnt ; ///< Compteur de transaction avec l'interface PUSU - transact_t *transaction ; ///< liste des transactions non terminees - pthread_mutex_t exclu ; ///< mutex pour le partage de structure - } pusu ; ///< info relatif a l'interface pusu - - struct { - sock_rrm_t *s ; ///< Socket associé a l'interface SENSING - unsigned int trans_cnt ; ///< Compteur de transaction avec l'interface SENSING - transact_t *transaction ; ///< liste des transactions non terminees - unsigned int sens_active ; ///< flag to determine if node is performing sensing //mod_lor_10_04_21 - pthread_mutex_t exclu ; ///< mutex pour le partage de structure - } sensing ; ///< info relatif a l'interface SENSING - - //mod_lor_10_04_20++ - struct { - sock_rrm_t *s ; ///< Socket associé a l'interface SENSING - pthread_mutex_t exclu ; ///< mutex pour le partage de structure - } graph ; - //mod_lor_10_04_20-- - - //mod_lor_10_01_25++ - struct { - sock_rrm_int_t *s ; ///< Socket associé a l'IP - unsigned int trans_cnt ; ///< Compteur de transaction avec l'interface IP - transact_t *transaction ; ///< liste des transactions non terminees - unsigned int waiting_SN_update ; ///< flag to know if an update is expected from SN about frequencies in use //mod_lor_10_05_18 - unsigned int users_waiting_update ; ///< flag to know if there are users that wait for channels //add_lor_10_11_08 - L2_ID L2_id_wait_users[NB_SENS_MAX][2] ; ///< vector of users waiting for channels //add_lor_10_11_08 - pthread_mutex_t exclu ; ///< mutex pour le partage de structure - } ip ; ///< info relatif a l'interface IP - //mod_lor_10_01_25-- - -} rrm_t ; - -extern rrm_t rrm_inst[MAX_RRM] ; -extern int nb_inst ; - -#ifdef __cplusplus -} -#endif - -#endif /* RRM_H */ diff --git a/openair3/MESH/RRM/rrm.sh b/openair3/MESH/RRM/rrm.sh deleted file mode 100644 index 7f5133216b..0000000000 --- a/openair3/MESH/RRM/rrm.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -killall emul_int -killall rrm - -xterm -T CMM -hold -e ./emul_int & -sleep 2 -./rrm -i 6 #2> log.txt -#sleep 1 -#./emul_int - diff --git a/openair3/MESH/RRM/rrm_2_rrc_msg.c b/openair3/MESH/RRM/rrm_2_rrc_msg.c deleted file mode 100644 index 245c73f58f..0000000000 --- a/openair3/MESH/RRM/rrm_2_rrc_msg.c +++ /dev/null @@ -1,838 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/*! -******************************************************************************* - -\file rrm_2_rrc_msg.c - -\brief Fonctions permettant le formattage des donnees pour l'envoi d'un - message sur le socket entre le RRC et le RRM - -\author BURLOT Pascal - -\date 16/07/08 - - -\par Historique: - P.BURLOT 2009-01-20 - + L2_id: ajout de memcpy() dans msg_rrci_cx_establish_resp() - - L. IACOBELLI 2010-01-05 - + new messages for sensing - + messages sent via ip - -******************************************************************************* -*/ -#include -#include -#include -#include -#include -#include - -#include -#include - -#include "L3_rrc_defs.h" -#include "rrm_sock.h" -#include "L3_rrc_interface.h" -#include "rrc_rrm_msg.h" -#include "rrm_util.h" - -#ifdef TRACE -//! Macro creant la chaine a partir du nom de la variable -#define STRINGIZER(x) #x -//! Tableau pour le mode trace faisant la translation entre le numero et le nom du message -const char *Str_msg_rrc_rrm[NB_MSG_RRC_RRM] = { - STRINGIZER(RRM_RB_ESTABLISH_REQ ), - STRINGIZER(RRC_RB_ESTABLISH_RESP ), - STRINGIZER(RRC_RB_ESTABLISH_CFM ), - STRINGIZER(RRM_RB_MODIFY_REQ ), - STRINGIZER(RRC_RB_MODIFY_RESP ), - STRINGIZER(RRC_RB_MODIFY_CFM ), - STRINGIZER(RRM_RB_RELEASE_REQ ), - STRINGIZER(RRC_RB_RELEASE_RESP ), - STRINGIZER(RRC_MR_ATTACH_IND ), - STRINGIZER(RRM_SENSING_MEAS_REQ ), - STRINGIZER(RRC_SENSING_MEAS_RESP ), - STRINGIZER(RRC_CX_ESTABLISH_IND ), - STRINGIZER(RRC_PHY_SYNCH_TO_MR_IND ), - STRINGIZER(RRC_PHY_SYNCH_TO_CH_IND ), - STRINGIZER(RRCI_CX_ESTABLISH_RESP ), - STRINGIZER(RRC_SENSING_MEAS_IND ), - STRINGIZER(RRM_SENSING_MEAS_RESP ), - STRINGIZER(RRC_RB_MEAS_IND ), - STRINGIZER(RRM_RB_MEAS_RESP ), - STRINGIZER(RRM_INIT_CH_REQ ), - STRINGIZER(RRM_INIT_MR_REQ ), - STRINGIZER(RRM_INIT_MON_REQ ), - STRINGIZER(RRM_INIT_SCAN_REQ ), - STRINGIZER(RRC_INIT_SCAN_REQ ), - STRINGIZER(UPDATE_SENS_RESULTS_3 ), //mod_lor_10_01_25 - STRINGIZER(RRM_END_SCAN_REQ ), - STRINGIZER(RRC_END_SCAN_REQ ), - STRINGIZER(RRC_END_SCAN_CONF ), - STRINGIZER(RRC_INIT_MON_REQ ), - STRINGIZER(OPEN_FREQ_QUERY_4 ), - STRINGIZER(UPDATE_OPEN_FREQ_7 ), - STRINGIZER(UPDATE_SN_OCC_FREQ_5 ), - STRINGIZER(RRM_UP_FREQ_ASS ), - STRINGIZER(RRM_END_SCAN_CONF ), - STRINGIZER(RRC_UP_FREQ_ASS ),//add_lor_10_11_05 - STRINGIZER(RRM_UP_FREQ_ASS_SEC ),//add_lor_10_11_05 - STRINGIZER(RRC_UP_FREQ_ASS_SEC )/*,//add_lor_10_11_05 - STRINGIZER(RRM_OPEN_FREQ ), - STRINGIZER(RRM_UPDATE_SN_FREQ ), - STRINGIZER(RRC_UPDATE_SN_FREQ ), - STRINGIZER(RRM_CLUST_SCAN_REQ ), - STRINGIZER(RRC_CLUST_SCAN_REQ ), - STRINGIZER(RRM_CLUST_SCAN_CONF ), - STRINGIZER(RRM_CLUST_MON_REQ ), - STRINGIZER(RRC_CLUST_MON_REQ ), - STRINGIZER(RRM_CLUST_MON_CONF ), - STRINGIZER(RRM_END_SCAN_CONF ), - STRINGIZER(RRM_INIT_CONN_REQ ), - STRINGIZER(RRC_INIT_CONN_CONF ), - STRINGIZER(RRM_FREQ_ALL_PROP ), - STRINGIZER(RRC_FREQ_ALL_PROP_CONF ), - STRINGIZER(RRM_REP_FREQ_ALL ), - STRINGIZER(RRC_REP_FREQ_ACK ), - STRINGIZER(RRC_INIT_CONN_REQ ), - STRINGIZER(RRM_CONN_SET ), - STRINGIZER(RRC_FREQ_ALL_PROP ), - STRINGIZER(RRM_FREQ_ALL_PROP_CONF ), - STRINGIZER(RRC_REP_FREQ_ALL ), - STRINGIZER(RRM_REP_FREQ_ACK ) */ - -} ; -#endif - -/*! -******************************************************************************* -\brief This function initialize the message header -\return any return value -*/ -static void init_rrc_msg_head( - msg_head_t *msg_head , //!< message header to initialize - Instance_t inst , //!< instance ID - MSG_RRC_RRM_T msg_type , //!< type of message to initialize - unsigned int size , //!< size of message - Transaction_t Trans_id //!< transaction id associated to this message -) -{ - if ( msg_head != NULL ) { - msg_head->start = START_MSG ; - msg_head->msg_type = 0xFF & msg_type ; - msg_head->inst = inst ; - msg_head->Trans_id = Trans_id ; - msg_head->size = size; - } -} - -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - rrm_rb_establish_req(). -\return message formate -*/ -msg_t *msg_rrm_rb_establish_req( - Instance_t inst , //!< instance ID - const LCHAN_DESC *Lchan_desc , //!< Logical Channel Descriptor Array - const MAC_RLC_MEAS_DESC *Mac_rlc_meas_desc , //!< MAC/RLC Measurement descriptors for RB - L2_ID *L2_id , //!< Layer 2 (MAC) IDs for link - Transaction_t Trans_id , //!< Transaction ID - unsigned char *L3_info , //!< Optional L3 Information - L3_INFO_T L3_info_t //!< Type of L3 Information -) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - rrm_rb_establish_req_t *p = RRM_CALLOC(rrm_rb_establish_req_t ,1 ) ; - - if ( p != NULL ) { - init_rrc_msg_head(&(msg->head),inst,RRM_RB_ESTABLISH_REQ, sizeof( rrm_rb_establish_req_t) ,Trans_id); - - memcpy(&(p->Lchan_desc), Lchan_desc, sizeof(LCHAN_DESC) ); - memcpy(&(p->Mac_rlc_meas_desc), Mac_rlc_meas_desc, sizeof(MAC_RLC_MEAS_DESC) ); - memcpy(&(p->L2_id[0]), L2_id, 2*sizeof(L2_ID) ); // SRC+DST - p->L3_info_t = L3_info_t ; - - if ( L3_info_t != NONE_L3 ) - memcpy( p->L3_info, L3_info, L3_info_t ); - } - - msg->data = (char *) p ; - } - - return msg ; -} - -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - rrm_rb_modify_req(). -\return message formate -*/ -msg_t *msg_rrm_rb_modify_req( - Instance_t inst , //!< instance ID - const LCHAN_DESC *Lchan_desc , //!< Logical Channel Descriptor Array - const MAC_RLC_MEAS_DESC *Mac_meas_desc , //!< MAC/RLC Measurement descriptors for RB - RB_ID Rb_id , //!< Radio Bearer ID - Transaction_t Trans_id //!< Transaction ID -) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - rrm_rb_modify_req_t *p = RRM_CALLOC(rrm_rb_modify_req_t , 1) ; - - if ( p != NULL ) { - init_rrc_msg_head(&(msg->head),inst,RRM_RB_MODIFY_REQ, sizeof( rrm_rb_modify_req_t) ,Trans_id); - - memcpy(&(p->Lchan_desc), Lchan_desc, sizeof(LCHAN_DESC) ); - memcpy(&(p->Mac_meas_desc), Mac_meas_desc, sizeof(MAC_RLC_MEAS_DESC) ); - - p->Rb_id = Rb_id ; - } - - msg->data = (char *) p ; - } - - return msg ; -} - -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - rrm_rb_release_req(). -\return message formate -*/ -msg_t *msg_rrm_rb_release_req( - Instance_t inst , //!< instance ID - RB_ID Rb_id , //!< Radio Bearer ID - Transaction_t Trans_id //!< Transaction ID -) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - rrm_rb_release_req_t *p = RRM_CALLOC(rrm_rb_release_req_t , 1 ) ; - - if ( p != NULL ) { - init_rrc_msg_head(&(msg->head),inst,RRM_RB_RELEASE_REQ, sizeof( rrm_rb_release_req_t) ,Trans_id); - - p->Rb_id = Rb_id ; - } - - msg->data = (char *) p ; - } - - return msg ; -} - -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - rrm_sensing_meas_req(). -\return message formate -*/ -msg_t *msg_rrm_sensing_meas_req( - Instance_t inst , //!< instance ID - L2_ID L2_id , //!< Layer 2 (MAC) ID - SENSING_MEAS_DESC Sensing_meas_desc , //!< Sensing Measurement Descriptor - Transaction_t Trans_id //!< Transaction ID -) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - rrm_sensing_meas_req_t *p = RRM_CALLOC(rrm_sensing_meas_req_t , 1 ) ; - - if ( p != NULL ) { - init_rrc_msg_head(&(msg->head),inst,RRM_SENSING_MEAS_REQ, sizeof( rrm_sensing_meas_req_t) ,Trans_id); - - memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ; - memcpy(&(p->Sensing_meas_desc), &Sensing_meas_desc, sizeof(SENSING_MEAS_DESC)) ; - } - - msg->data = (char *) p ; - } - - return msg ; - -} - -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - rrci_cx_establish_resp(). -\return message formate -*/ -msg_t * msg_rrci_cx_establish_resp( - Instance_t inst , //!< instance ID - Transaction_t Trans_id , //!< Transaction ID - L2_ID L2_id , //!< Layer 2 (MAC) ID - unsigned char *L3_info , //!< Optional L3 Information - L3_INFO_T L3_info_t //!< Type of L3 Information -) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - rrci_cx_establish_resp_t *p = RRM_CALLOC(rrci_cx_establish_resp_t , 1 ) ; - - if ( p != NULL ) { - init_rrc_msg_head(&(msg->head),inst,RRCI_CX_ESTABLISH_RESP, sizeof( rrci_cx_establish_resp_t ) ,Trans_id); - - memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ; - p->L3_info_t = L3_info_t ; - - if ( L3_info_t != NONE_L3 ) - memcpy( p->L3_info, L3_info, L3_info_t ); - } - - msg->data = (char *) p ; - } - - return msg ; -} -/*! -******************************************************************************* -\brief La fonction formate en un message generique de reponse pour les - fonctions : - - msg_rrm_sensing_meas_resp(), msg_rrm_rb_meas_resp(). -\return message formate -*/ -static msg_t *msg_rrm_generic_resp( - Instance_t inst , //!< instance ID - MSG_RRC_RRM_T msg_type , //!< type of message - Transaction_t Trans_id //!< Transaction ID -) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - init_rrc_msg_head(&(msg->head),inst,msg_type, 0, Trans_id); - msg->data = NULL ; - } - - return msg ; -} - -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - rrm_sensing_meas_resp(). -\return message formate -*/ -msg_t * msg_rrm_sensing_meas_resp( - Instance_t inst , //!< instance ID - Transaction_t Trans_id //!< Transaction ID -) -{ - return msg_rrm_generic_resp( inst,RRM_SENSING_MEAS_RESP, Trans_id) ; -} - -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - rrm_rb_meas_resp(). -\return message formate -*/ -msg_t * msg_rrm_rb_meas_resp( - Instance_t inst , //!< instance ID - Transaction_t Trans_id //!< Transaction ID -) -{ - return msg_rrm_generic_resp( inst,RRM_RB_MEAS_RESP, Trans_id) ; -} - -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - rrm_init_ch_req(). -\return message formate -*/ -msg_t *msg_rrm_init_ch_req( - Instance_t inst , //!< instance ID - Transaction_t Trans_id , //!< Transaction ID - const LCHAN_DESC *Lchan_desc_srb0 , //!< Logical Channel Descriptor - SRB0 - const LCHAN_DESC *Lchan_desc_srb1 , //!< Logical Channel Descriptor - SRB1 - L2_ID L2_id -) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - rrm_init_ch_req_t *p = RRM_CALLOC(rrm_init_ch_req_t , 1 ) ; - - if ( p != NULL ) { - init_rrc_msg_head(&(msg->head),inst,RRM_INIT_CH_REQ, sizeof( rrm_init_ch_req_t ) ,Trans_id); - - memcpy(&(p->Lchan_desc_srb0), Lchan_desc_srb0, sizeof(LCHAN_DESC) ); - memcpy(&(p->Lchan_desc_srb1), Lchan_desc_srb1, sizeof(LCHAN_DESC) ); - memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ; - } - - msg->data = (char *) p ; - } - - return msg ; - -} - -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - rrm_init_mr_req(). -\return message formate -*/ - -msg_t *msg_rrci_init_mr_req( - Instance_t inst , //!< instance ID - Transaction_t Trans_id , //!< Transaction ID - const LCHAN_DESC *Lchan_desc_srb0 , //!< Logical Channel Descriptor - SRB0 - const LCHAN_DESC *Lchan_desc_srb1 , //!< Logical Channel Descriptor - SRB1 - unsigned char CH_index //!< index to identify the CH -) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - rrci_init_mr_req_t *p = RRM_CALLOC(rrci_init_mr_req_t , 1 ) ; - - if ( p != NULL ) { - init_rrc_msg_head(&(msg->head),inst,RRCI_INIT_MR_REQ, sizeof( rrci_init_mr_req_t ) ,Trans_id); - - memcpy(&(p->Lchan_desc_srb0), Lchan_desc_srb0, sizeof(LCHAN_DESC) ); - memcpy(&(p->Lchan_desc_srb1), Lchan_desc_srb1, sizeof(LCHAN_DESC) ); - p->CH_index = CH_index ; - } - - msg->data = (char *) p ; - } - - return msg ; -} - -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - rrm_init_mon_req(). -\return message formate -*/ - -msg_t *msg_rrm_init_mon_req( - Instance_t inst , //!< instance ID - L2_ID L2_id , - unsigned int NB_chan , - unsigned int interval , - unsigned int *ch_to_scan , - Transaction_t Trans_id //!< Transaction ID - -) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - unsigned int size = sizeof( rrm_init_mon_req_t ) + (NB_chan-1) * sizeof(unsigned int) ; - - rrm_init_mon_req_t *p = RRM_CALLOC2(rrm_init_mon_req_t , size ) ; - - if ( p != NULL ) { - - //for (int i=0; ihead),inst,RRM_INIT_MON_REQ, size ,Trans_id); - - memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ; - p->NB_chan = NB_chan; - p->interval = interval; - - if ( NB_chan != 0 ) - memcpy( p->ch_to_scan, ch_to_scan, NB_chan*sizeof(unsigned int) ); - - - } - - msg->data = (char *) p ; - } - - return msg ; -} - -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - rrm_init_scan_req(). -\return message formate -*/ - -msg_t *msg_rrm_init_scan_req( - Instance_t inst , //!< instance ID - unsigned int Start_fr, - unsigned int Stop_fr, - unsigned int Meas_band, - unsigned int Meas_tpf, - unsigned int Nb_channels, - unsigned int Overlap, - unsigned int Sampl_freq, - Transaction_t Trans_id //!< Transaction ID - -) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - rrm_init_scan_req_t *p = RRM_CALLOC(rrm_init_scan_req_t , 1 ) ; - - if ( p != NULL ) { - init_rrc_msg_head(&(msg->head),inst,RRM_INIT_SCAN_REQ, sizeof( rrm_init_scan_req_t ) ,Trans_id); - - //mod_lor_10_03_12++ - p->Start_fr = Start_fr; - p->Stop_fr = Stop_fr; - p->Meas_band = Meas_band; - p->Meas_tpf = Meas_tpf; - p->Nb_channels = Nb_channels; - p->Overlap = Overlap; - p->Sampl_freq = Sampl_freq; - //mod_lor_10_03_12-- - - } - - msg->data = (char *) p ; - } - - return msg ; -} - -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - rrm_end_scan_req(). -\return message formate -*/ - -msg_t *msg_rrm_end_scan_req( - Instance_t inst, - L2_ID L2_id , - Transaction_t Trans_id -) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - rrm_end_scan_req_t *p = RRM_CALLOC(rrm_end_scan_req_t , 1 ) ; - - if ( p != NULL ) { - init_rrc_msg_head(&(msg->head),inst,RRM_END_SCAN_REQ, sizeof( rrm_end_scan_req_t ) ,Trans_id); - memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ; - } - - msg->data = (char *) p ; - } - - return msg ; -} - -/*!//add_lor_10_11_05 -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - rrm_up_freq_ass_sec(). -\return message formate -*/ - -msg_t *msg_rrm_up_freq_ass_sec( - Instance_t inst , //!< instance ID - L2_ID *L2_id , //!< Layer 2 (MAC) ID vector of SUs starting tx - L2_ID *L2_id_dest , //!< Layer 2 (MAC) ID vector of SUs receiving tx - unsigned int NB_all , //!< Number of allocated links - CHANNEL_T *ass_channels //!< Vector of allocated links -) - -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - int i; - - if ( msg != NULL ) { - unsigned int size = sizeof( rrm_up_freq_ass_sec_t ); - //printf ("size rrm_up_freq_ass_t %d\n", size);//dbg - rrm_up_freq_ass_sec_t *p = RRM_CALLOC2( rrm_up_freq_ass_sec_t , size ) ; - - - if ( p != NULL ) { - - - init_rrc_msg_head(&(msg->head),inst,RRM_UP_FREQ_ASS_SEC, size,0); - p->NB_all = NB_all; - - for (i=0; iL2_id[i].L2_id, L2_id[i].L2_id, sizeof(L2_ID) ) ; - memcpy( p->L2_id_dest[i].L2_id, L2_id_dest[i].L2_id, sizeof(L2_ID) ) ; - } - - memcpy( p->ass_channels, ass_channels, NB_all*sizeof(CHANNEL_T) ); - - } - - msg->data = (char *) p ; - - } - - return msg ; -} - - -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - rrm_up_freq_ass(). -\return message formate -*/ - -msg_t *msg_rrm_up_freq_ass( - Instance_t inst , //!< instance ID - L2_ID L2_id , //!< Layer 2 (MAC) ID of SU - unsigned int NB_chan , - CHANNEL_T *ass_channels -) - -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - unsigned int size = sizeof( rrm_up_freq_ass_t );// + (NB_chan-1) * sizeof(CHANNEL_T) ;//mod_lor_10_04_23 - rrm_up_freq_ass_t *p = RRM_CALLOC2( rrm_up_freq_ass_t , size ) ; - - - if ( p != NULL ) { - - - init_rrc_msg_head(&(msg->head),inst,RRM_UP_FREQ_ASS, size,0); - p->NB_chan = NB_chan; - memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ; - memcpy( p->ass_channels, ass_channels, NB_chan*sizeof(CHANNEL_T) ); - - } - - msg->data = (char *) p ; - - } - - return msg ; -} - - -///! MESSAGES SENT VIA IP -//mod_lor_10_04_27++ -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - update_sens_results_3(). -\return message formate -*/ -/*msg_t *msg_update_sens_results_3( - Instance_t inst, - L2_ID L2_id, //!< FC L2_id - unsigned int NB_info, - Sens_ch_t *Sens_meas, - Transaction_t Trans_id - ) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) - { - unsigned int size = sizeof( rrm_update_sens_t );// + (NB_info-1) * sizeof(Sens_ch_t) ; //mod_lor_10_04_23 - - rrm_update_sens_t *p = RRM_CALLOC2(rrm_update_sens_t , size ) ; - - if ( p != NULL ) - { - //fprintf(stderr,"rrmUSR 1 \n");//dbg - init_rrc_msg_head(&(msg->head),inst, UPDATE_SENS_RESULTS_3, size ,Trans_id); - - memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ; - - p->NB_info = NB_info ; - p->info_time = 0 ; - - if ( NB_info > 0 ) - { - memcpy( p->Sens_meas , Sens_meas, NB_info * sizeof(Sens_ch_t) ) ; - } - //fprintf(stdout,"msg_rrm_update_sens()2 : NB_chan %d\n", p->NB_info);//dbg - //fprintf(stdout,"NB_chan %d\n", p->NB_info); - // for (int i=0; iSens_meas; ch!=NULL; ch=ch->next) - //fprintf(stdout,"channel in msg arr: %d\n", ch->Ch_id); //dbg - - } - //fprintf(stderr,"rrmUSR end \n");//dbg - msg->data = (char *) p ; - } - - return msg ; - -}*/ - -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - open_freq_query_4(). -\return message formate -*//* -msg_t *msg_open_freq_query_4( - Instance_t inst, - L2_ID L2_id , - QOS_CLASS_T QoS , - Transaction_t Trans_id - ) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) - { - open_freq_query_t *p = RRM_CALLOC(open_freq_query_t , 1 ) ; - - if ( p != NULL ) - { - init_rrc_msg_head(&(msg->head),inst,OPEN_FREQ_QUERY_4, sizeof( open_freq_query_t ) ,Trans_id); - memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ; - p->QoS = QoS; - } - msg->data = (char *) p ; - } - return msg ; -}*/ - -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - rrm_open_freq(). -\return message formate -*//* -msg_t *msg_update_open_freq_7( - Instance_t inst, - L2_ID L2_id , - unsigned int NB_free_ch, - CHANNEL_T *fr_channels, - Transaction_t Trans_id - ) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) - { - unsigned int size = sizeof( update_open_freq_t );// + (NB_free_ch-1) * sizeof(CHANNEL_T) ;//mod_lor_10_04_23 - - update_open_freq_t *p = RRM_CALLOC2(update_open_freq_t , size ) ; - - if ( p != NULL ) - { - init_rrc_msg_head(&(msg->head),inst,UPDATE_OPEN_FREQ_7, size ,Trans_id); - memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ; - p->NB_chan = NB_free_ch ; - - if ( NB_free_ch > 0 ) - { - memcpy( p->fr_channels , fr_channels, NB_free_ch * sizeof(CHANNEL_T) ) ; - } - } - msg->data = (char *) p ; - } - return msg ; -}*/ - -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - rrm_update_SN_freq(). -\return message formate -*/ -/* -msg_t *msg_update_SN_occ_freq_5( - Instance_t inst , //!< instance ID - L2_ID L2_id , //!< Layer 2 (MAC) ID of FC - unsigned int NB_chan , - unsigned int *occ_channels , - Transaction_t Trans_id //!< Transaction ID - ) - -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - //fprintf(stdout,"rrc_end_scan_ord() cp1\n"); //dbg - - if ( msg != NULL ) - { - unsigned int size = sizeof( update_SN_occ_freq_t );// + (NB_chan-1) * sizeof(unsigned int) ;//mod_lor_10_04_23 - update_SN_occ_freq_t *p = RRM_CALLOC2(update_SN_occ_freq_t , size ) ; - - if ( p != NULL ) - { - - - init_rrc_msg_head(&(msg->head),inst,UPDATE_SN_OCC_FREQ_5, size,Trans_id); - - memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ; - - - p->NB_chan = NB_chan; - if ( NB_chan != 0 ){ - - memcpy( p->occ_channels, occ_channels, NB_chan*sizeof(unsigned int) ); - - } - - - } - msg->data = (char *) p ; - - } - return msg ; -} -//mod_lor_10_04_27--*/ - -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - sns_end_scan_conf(). It sends confirmation of sensing interruprion to - the RRC that will informe the fusion center about it -\return message formate -*/ -msg_t * msg_rrm_end_scan_conf( - Instance_t inst , //!< instance ID - Transaction_t Trans_id //!< Transaction ID -) -{ - return msg_rrm_generic_resp( inst,RRM_END_SCAN_CONF, Trans_id) ; -} diff --git a/openair3/MESH/RRM/rrm_2_sensing_msg.c b/openair3/MESH/RRM/rrm_2_sensing_msg.c deleted file mode 100644 index 5cd1d33133..0000000000 --- a/openair3/MESH/RRM/rrm_2_sensing_msg.c +++ /dev/null @@ -1,206 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/*! -******************************************************************************* - -\file rrm_2_rrc_msg.c - -\brief Fonctions permettant le formattage des donnees pour l'envoi d'un - message sur le socket entre le RRC et le RRM - -\author BURLOT Pascal - -\date 16/07/08 - - -\par Historique: - P.BURLOT 2009-01-20 - + L2_id: ajout de memcpy() dans msg_rrci_cx_establish_resp() - - L. IACOBELLI 2010-01-05 - + new messages for sensing - + messages sent via ip - -******************************************************************************* -*/ -#include -#include -#include -#include -#include -#include - -#include -#include - -#include "L3_rrc_defs.h" -//#include "rrm_sock.h" -//#include "L3_rrc_interface.h" -#include "sensing_rrm_msg.h" -#include "rrm_util.h" - -#ifdef TRACE -//! Macro creant la chaine a partir du nom de la variable -#define STRINGIZER(x) #x -//! Tableau pour le mode trace faisant la translation entre le numero et le nom du message -const char *Str_msg_sns_rrm[NB_MSG_SNS_RRM] = { - STRINGIZER(SNS_UPDATE_SENS ), - STRINGIZER(RRM_SCAN_ORD ), - STRINGIZER(RRM_END_SCAN_ORD ), - STRINGIZER(SNS_END_SCAN_CONF ) -} ; -#endif - -/*! -******************************************************************************* -\brief This function initialize the message header -\return any return value -*/ -static void init_sensing_msg_head( - msg_head_t *msg_head , //!< message header to initialize - Instance_t inst , //!< instance ID - MSG_SENSING_RRM_T msg_type , //!< type of message to initialize - unsigned int size , //!< size of message - Transaction_t Trans_id //!< transaction id associated to this message -) -{ - if ( msg_head != NULL ) { - msg_head->start = START_MSG ; - msg_head->msg_type = 0xFF & msg_type ; - msg_head->inst = inst ; - msg_head->Trans_id = Trans_id ; - msg_head->size = size; - } -} - -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - rrm_scan_ord(). -\return message formate -*/ - -msg_t *msg_rrm_scan_ord( - Instance_t inst , ///< instance ID - unsigned int NB_chan , ///< Number of channels to sens - unsigned int Meas_tpf , ///< time on each carrier //mod_lor_10_02_19 - unsigned int Overlap , ///< overlap factor (percentage) //mod_lor_10_02_19 - unsigned int Sampl_nb , ///< number of samples per sub-band //mod_lor_10_04_01 - Sens_ch_t *ch_to_scan , ///< Vector of channels to scan //mod_lor_10_02_19 - Transaction_t Trans_id ///< Transaction ID - -) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - unsigned int size; - /*if ( NB_chan != 0 ){ - size = sizeof( rrm_scan_ord_t ) + (NB_chan-1) * sizeof(unsigned int) ; - - }else*/ - size = sizeof( rrm_scan_ord_t ); - rrm_scan_ord_t *p = RRM_CALLOC2(rrm_scan_ord_t , size ) ; - - - if ( p != NULL ) { - init_sensing_msg_head(&(msg->head),inst,RRM_SCAN_ORD, size ,Trans_id); - - p->Meas_tpf = Meas_tpf; //mod_lor_10_02_19 - p->Overlap = Overlap; //mod_lor_10_02_19 - p->Sampl_nb = Sampl_nb; //mod_lor_10_02_19 - p->NB_chan = NB_chan; - - - if ( NB_chan != 0 ) { - - memcpy( p->ch_to_scan, ch_to_scan, NB_chan*sizeof(Sens_ch_t) ); - - } - - for (int i=0; ich_to_scan[i].Start_f,p->ch_to_scan[i].Final_f,Sampl_nb); - - } - - msg->data = (char *) p ; - } - - return msg ; -} - - - -/*! -******************************************************************************* -\brief La fonction formate en un message les parametres de la fonction - rrm_end_scan_ord(). -\return message formate -*/ - -msg_t *msg_rrm_end_scan_ord( - Instance_t inst , //!< instance ID - unsigned int NB_chan , - unsigned int *channels , - Transaction_t Trans_id //!< Transaction ID -) - -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - //fprintf(stdout,"rrc_end_scan_ord() cp1\n"); //dbg - - if ( msg != NULL ) { - unsigned int size = sizeof( rrm_end_scan_ord_t ); //+ (NB_chan-1) * sizeof(unsigned int) ; - rrm_end_scan_ord_t *p = RRM_CALLOC2(rrm_end_scan_ord_t , size ) ; - - if ( p != NULL ) { - - - init_sensing_msg_head(&(msg->head),inst,RRM_END_SCAN_ORD, size,Trans_id); - - - p->NB_chan = NB_chan; - - if ( NB_chan != 0 ) { - - memcpy( p->channels, channels, NB_chan*sizeof(unsigned int) ); - - } - - - } - - msg->data = (char *) p ; - - } - - return msg ; -} - diff --git a/openair3/MESH/RRM/rrm_5nodes.sh b/openair3/MESH/RRM/rrm_5nodes.sh deleted file mode 100755 index 8fefb06439..0000000000 --- a/openair3/MESH/RRM/rrm_5nodes.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -killall emul_int -killall rrm - -xterm -T CMM -hold -e ./emul_int & -sleep 2 -./rrm -i 5 #2> log.txt -#sleep 1 -#./emul_int - diff --git a/openair3/MESH/RRM/rrm_SENS.sh b/openair3/MESH/RRM/rrm_SENS.sh deleted file mode 100644 index e9041b120e..0000000000 --- a/openair3/MESH/RRM/rrm_SENS.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -killall emul_int -killall graph -killall rrm - -xterm -T COMMAND_CONSOLE -bg '#000000' -fg '#00ff00' -hold -e ./emul_int & - -sleep 2 - -#xterm -T RRM1 -hold -e -./rrm -i 1 #2> log.txt - -#sleep 1 -#./emul_int & - - diff --git a/openair3/MESH/RRM/rrm_SS2_CH1.sh b/openair3/MESH/RRM/rrm_SS2_CH1.sh deleted file mode 100644 index 29da1e5968..0000000000 --- a/openair3/MESH/RRM/rrm_SS2_CH1.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -killall emul_int -killall graph -killall rrm - -xterm -T COMMAND_CONSOLE -bg '#000000' -fg '#00ff00' -hold -e ./emul_int & -sleep 2 -./rrm -i 4 #2> log.txt -#sleep 1 -#./emul_int - diff --git a/openair3/MESH/RRM/rrm_SS2_global.sh b/openair3/MESH/RRM/rrm_SS2_global.sh deleted file mode 100644 index df316762ff..0000000000 --- a/openair3/MESH/RRM/rrm_SS2_global.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -killall emul_int -killall graph -killall rrm - -xterm -T COMMAND_CONSOLE -bg '#000000' -fg '#00ff00' -hold -e ./emul_int & - -sleep 2 - -#xterm -T RRM1 -hold -e -./rrm -i 7 #2> log.txt - -#sleep 1 -#./emul_int & - - diff --git a/openair3/MESH/RRM/rrm_constant.c b/openair3/MESH/RRM/rrm_constant.c deleted file mode 100644 index c0d6fbedf8..0000000000 --- a/openair3/MESH/RRM/rrm_constant.c +++ /dev/null @@ -1,226 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/*! -******************************************************************************* - -\file rrm_constant.c - -\brief Il contient les declarations des constantes et tables relative aux - fonctions du RRM (Radio Resource Management ). - -\author BURLOT Pascal - -\date 17/07/08 - - -\par Historique: - $Author$ $Date$ $Revision$ - $Id$ - $Log$ - -******************************************************************************* -*/ - -#include "L3_rrc_defs.h" - -#include "rrm_constant.h" - -#ifdef OPENAIR2 -#include "platform_constants.h" -#else - -//Always synchronize with value in openair2/LAYER2/MAC/defs.h -#define BCCH_PAYLOAD_SIZE_MAX 20 -#define CCCH_PAYLOAD_SIZE_MAX 28 - -#endif - -/*! \todo a definir les valeurs par defaut */ - -//! \brief descripteur de canal logique en fonction de la QoS -const LCHAN_DESC Lchan_desc[MAX_QOS_CLASS] = { - // Transport Max Guaranteed Max Delay Target LCHAN_t - // Block Transport Bit Bit Class BLER - // size Blocks Rate Rate - { BCCH_PAYLOAD_SIZE_MAX, 15, 64, 128, 1, 0, LCHAN_BCCH }, // SRB0 - { CCCH_PAYLOAD_SIZE_MAX, 15, 64, 128, 1, 0, LCHAN_CCCH }, // SRB1 - { 30, 20, 64, 128, 1, 0, LCHAN_DCCH }, // SRB2 - { 52, 20, 64, 128, 1, 0, LCHAN_DTCH_B }, // DTCH_B - { 52, 20, 64, 128, 1, 0, LCHAN_DTCH }, - { 52, 20, 64, 128, 1, 0, LCHAN_DTCH }, - { 52, 20, 64, 128, 1, 0, LCHAN_DTCH }, - { 52, 20, 64, 128, 1, 0, LCHAN_DTCH }, - { 52, 20, 64, 128, 1, 0, LCHAN_DTCH }, - { 52, 20, 64, 128, 1, 0, LCHAN_DTCH }, -}; - -//! \brief descripteur de la confiuration des mesures en fonction de la QoS -const MAC_RLC_MEAS_DESC Mac_rlc_meas_desc[MAX_QOS_CLASS] = { - /* 0 : QOS_CLASS = SRB0 */ - { - .Meas_trigger={ - .Rssi=0,.Sinr={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, - .Harq_delay=0,.Bler=0,.Spec_eff=0, .Qdepth = 0 - } , - .Mac_avg={ - .Rssi_forgetting_factor=0,.Sinr_forgetting_factor=0, - .Harq_delay_forgetting_factor=0,.Bler_forgetting_factor=0, - .Spec_eff_forgetting_factor=0 - } , - .bo_forgetting_factor=0, .sdu_loss_trigger=0, .Rep_amount=0, .Rep_interval=0 - }, - /* 1 : QOS_CLASS = SRB1 */ - { - .Meas_trigger={ - .Rssi=0,.Sinr={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, - .Harq_delay=0,.Bler=0,.Spec_eff=0, .Qdepth = 0 - } , - .Mac_avg={ - .Rssi_forgetting_factor=0,.Sinr_forgetting_factor=0, - .Harq_delay_forgetting_factor=0,.Bler_forgetting_factor=0, - .Spec_eff_forgetting_factor=0 - } , - .bo_forgetting_factor=0, .sdu_loss_trigger=0, .Rep_amount=0, .Rep_interval=0 - }, - /* 2 : QOS_CLASS = SRB2 */ - { - .Meas_trigger={ - .Rssi=0,.Sinr={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, - .Harq_delay=0,.Bler=0,.Spec_eff=0, .Qdepth = 0 - } , - .Mac_avg={ - .Rssi_forgetting_factor=0,.Sinr_forgetting_factor=0, - .Harq_delay_forgetting_factor=0,.Bler_forgetting_factor=0, - .Spec_eff_forgetting_factor=0 - } , - .bo_forgetting_factor=0, .sdu_loss_trigger=0, .Rep_amount=0, .Rep_interval=0 - }, - /* 3 : QOS_CLASS = DTCH_B */ - { - .Meas_trigger={ - .Rssi=0,.Sinr={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, - .Harq_delay=0,.Bler=0,.Spec_eff=0, .Qdepth = 0 - } , - .Mac_avg={ - .Rssi_forgetting_factor=0,.Sinr_forgetting_factor=0, - .Harq_delay_forgetting_factor=0,.Bler_forgetting_factor=0, - .Spec_eff_forgetting_factor=0 - } , - .bo_forgetting_factor=0, .sdu_loss_trigger=0, .Rep_amount=0, .Rep_interval=0 - }, - /* 4 : QOS_CLASS */ - { - .Meas_trigger={ - .Rssi=0,.Sinr={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, - .Harq_delay=0,.Bler=0,.Spec_eff=0, .Qdepth = 0 - } , - .Mac_avg={ - .Rssi_forgetting_factor=0,.Sinr_forgetting_factor=0, - .Harq_delay_forgetting_factor=0,.Bler_forgetting_factor=0, - .Spec_eff_forgetting_factor=0 - } , - .bo_forgetting_factor=0, .sdu_loss_trigger=0, .Rep_amount=0, .Rep_interval=0 - }, - /* 5 : QOS_CLASS = CSCH */ - { - .Meas_trigger={ - .Rssi=0,.Sinr={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, - .Harq_delay=0,.Bler=0,.Spec_eff=0, .Qdepth = 0 - } , - .Mac_avg={ - .Rssi_forgetting_factor=0,.Sinr_forgetting_factor=0, - .Harq_delay_forgetting_factor=0,.Bler_forgetting_factor=0, - .Spec_eff_forgetting_factor=0 - } , - .bo_forgetting_factor=0, .sdu_loss_trigger=0, .Rep_amount=0, .Rep_interval=0 - }, - /* 6 : QOS_CLASS = CPCH */ - { - .Meas_trigger={ - .Rssi=0,.Sinr={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, - .Harq_delay=0,.Bler=0,.Spec_eff=0, .Qdepth = 0 - } , - .Mac_avg={ - .Rssi_forgetting_factor=0,.Sinr_forgetting_factor=0, - .Harq_delay_forgetting_factor=0,.Bler_forgetting_factor=0, - .Spec_eff_forgetting_factor=0 - } , - .bo_forgetting_factor=0, .sdu_loss_trigger=0, .Rep_amount=0, .Rep_interval=0 - }, - /* 7 : QOS_CLASS */ - { - .Meas_trigger={ - .Rssi=0,.Sinr={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, - .Harq_delay=0,.Bler=0,.Spec_eff=0, .Qdepth = 0 - } , - .Mac_avg={ - .Rssi_forgetting_factor=0,.Sinr_forgetting_factor=0, - .Harq_delay_forgetting_factor=0,.Bler_forgetting_factor=0, - .Spec_eff_forgetting_factor=0 - } , - .bo_forgetting_factor=0, .sdu_loss_trigger=0, .Rep_amount=0, .Rep_interval=0 - }, - /* 8 : QOS_CLASS */ - { - .Meas_trigger={ - .Rssi=0,.Sinr={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, - .Harq_delay=0,.Bler=0,.Spec_eff=0, .Qdepth = 0 - } , - .Mac_avg={ - .Rssi_forgetting_factor=0,.Sinr_forgetting_factor=0, - .Harq_delay_forgetting_factor=0,.Bler_forgetting_factor=0, - .Spec_eff_forgetting_factor=0 - } , - .bo_forgetting_factor=0, .sdu_loss_trigger=0, .Rep_amount=0, .Rep_interval=0 - }, - /* 9 : QOS_CLASS */ - { - .Meas_trigger={ - .Rssi=0,.Sinr={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, - .Harq_delay=0,.Bler=0,.Spec_eff=0, .Qdepth = 0 - } , - .Mac_avg={ - .Rssi_forgetting_factor=0,.Sinr_forgetting_factor=0, - .Harq_delay_forgetting_factor=0,.Bler_forgetting_factor=0, - .Spec_eff_forgetting_factor=0 - } , - .bo_forgetting_factor=0, .sdu_loss_trigger=0, .Rep_amount=0, .Rep_interval=0 - } -}; - -//! \brief descripteur de la configuration des mesures de voisinage -const SENSING_MEAS_DESC Sensing_meas_desc = { - // RSSI_Threshold RSSI_F_Factor Rep_interval - 0, 0, 0 -}; - - - - diff --git a/openair3/MESH/RRM/rrm_constant.h b/openair3/MESH/RRM/rrm_constant.h deleted file mode 100644 index 7abbf5bb31..0000000000 --- a/openair3/MESH/RRM/rrm_constant.h +++ /dev/null @@ -1,92 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/*! -******************************************************************************* - -\file rrm_constant.h - -\brief Fichier d'entete contenant les declarations des types, des defines , - et des fonctions relatives aux constantes du RRM - (Radio Resource Management ). - -\author BURLOT Pascal - -\date 15/07/08 - - -\par Historique: - $Author$ $Date$ $Revision$ - $Id$ - $Log$ - -******************************************************************************* -*/ - -#ifndef RRM_CONSTANT_H -#define RRM_CONSTANT_H - -#ifdef __cplusplus -extern "C" { -#endif - -//! Index QoS pour le radio Bearer SRB0 -#define QOS_SRB0 0 -//! Index QoS pour le radio Bearer SRB1 -#define QOS_SRB1 1 -//! Index QoS pour le radio Bearer SRB2 -#define QOS_SRB2 2 -//! Index QoS pour le radio Bearer DTCH_B -#define QOS_DTCH_B 3 -//! Index QoS pour le radio Bearer DTCH_D -#define QOS_DTCH_D 4 -//! Index QoS pour le radio Bearer DTCH_USER1 -#define QOS_DTCH_USER1 5 -//! Index QoS pour le radio Bearer DTCH_USER2 -#define QOS_DTCH_USER2 6 -//! Index QoS pour le radio Bearer DTCH_USER3 -#define QOS_DTCH_USER3 7 -//! Index QoS pour le radio Bearer DTCH_USER4 -#define QOS_DTCH_USER4 8 -//! Index QoS pour le radio Bearer DTCH_USER5 -#define QOS_DTCH_USER5 9 -//! Nombre d'index de QoS -#define MAX_QOS_CLASS 10 - - -extern const LCHAN_DESC Lchan_desc[MAX_QOS_CLASS] ; -extern const MAC_RLC_MEAS_DESC Mac_rlc_meas_desc[MAX_QOS_CLASS] ; -extern const SENSING_MEAS_DESC Sensing_meas_desc ; - - -#ifdef __cplusplus -} -#endif - -#endif /* RRM_CONSTANT_H */ diff --git a/openair3/MESH/RRM/rrm_graph.c b/openair3/MESH/RRM/rrm_graph.c deleted file mode 100644 index db05b7a602..0000000000 --- a/openair3/MESH/RRM/rrm_graph.c +++ /dev/null @@ -1,2833 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/*! -******************************************************************************* - -\file rrm_graph.c - -\brief RRM (Radio Ressource Manager ) - - Cette application a pour objet - - de gérer la ressource radio du cluster - - de commander le RRC pour l'ouverture de RB - - de recevoir des commandes du CMM - - de gérer le voisinage - -\author IACOBELLI Lorenzo - -\date 20/04/2010 - - -\par Historique: - - -******************************************************************************* -*/ -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "debug.h" - -#include "L3_rrc_defs.h" -#include "L3_rrc_interface.h" -#include "cmm_rrm_interface.h" -#include "rrm_sock.h" -#include "rrc_rrm_msg.h" -#include "ip_msg.h" //mod_lor_10_04_27 -#include "sensing_rrm_msg.h" -#include "cmm_msg.h" -#include "pusu_msg.h" -#include "msg_mngt.h" -#include "neighbor_db.h" -#include "rb_db.h" -#include "sens_db.h" -#include "channels_db.h" -#include "transact.h" -#include "rrm_constant.h" -#include "rrm_util.h" -#include "rrm.h" - -#include "forms.h" //mod_eure_lor -#include "sensing_form.h"//mod_eure_lor -#include "SN_freq_form.h" //mod_lor_10_06_01 -#include "sens_scen_2_form.h" //mod_lor_10_11_04 -#include "all_freq_to_users_form.h" //mod_lor_10_11_04 -#include "sens_CH1_scen_2.h" //mod_lor_10_11_04 -#include "sens_sensor.h" //mod_lor_11_02_18 - - -/* -** ---------------------------------------------------------------------------- -** DEFINE LOCAL -** ---------------------------------------------------------------------------- -*/ -//mod_lor_10_05_18++ -/*! -******************************************************************************* -\brief Definition of IP @ in main entities. i.e. they have to correspond - to the ones in node_info vector in emul_interface.c -*/ -static unsigned char FC_L3id [4]= {0xC0,0xA8,0x0C,0x14}; -static unsigned char BTS_L3id [4]= {0x0A,0x00,0x02,0x02}; -static unsigned char CH_COLL_L3id [4]= {0x0A,0x00,0x02,0x02}; -FD_sensing_form *form; -FD_Secondary_Network_frequencies *SN_form; //mod_lor_10_06_01 -FD_sens_scen_2 *Sens_form_CH2; //mod_lor_10_11_04 -FD_all_freq_to_users *Chann_form; //mod_lor_10_11_04 -FD_sens_CH1_scen_2 *Sens_form_CH1; //mod_lor_10_11_04 -FD_sens_sensor *Sens_sensor_form; //mod_lor_11_02_18 -static int SN_waiting = 0; //mod_lor_10_06_02 -//mod_lor_10_05_18-- -/* -** ---------------------------------------------------------------------------- -** DECLARATION DE NOUVEAU TYPE -** ---------------------------------------------------------------------------- -*/ - -/*! -******************************************************************************* -\brief Structure de data passe en parametre au threads -*/ -struct data_thread { - char *name ; ///< Nom du thread - char *sock_path_local ; ///< fichier du "rrm->..." pour le socket Unix - char *sock_path_dest ; ///< fichier du "...->rrm " pour le socket Unix - sock_rrm_t s ; ///< Descripteur du socket -} ; - -//mod_lor_10_01_25++ -struct data_thread_int { - char *name ; ///< Nom du thread - unsigned char *sock_path_local ; ///< local IP address for internet socket - int local_port ; ///< local IP port for internet socket - unsigned char *sock_path_dest ; ///< dest IP address for internet socket - int dest_port ; ///< dest IP port for internet socket - sock_rrm_int_t s ; ///< Descripteur du socket - int instance ; ///spec_SN1,(float)0.0,(float)1.1); - fl_set_xyplot_ybounds(form->spec_SN1,(float)0,(float)20); - fl_set_xyplot_data(form->spec_SN1,f,spec_dBm,100,"","","");*/ - //printf("In plot graph of sensor: %d\n", sensor);//dbg - if (sensor == 1) { - fl_set_xyplot_xbounds(form->spec_SN1,Start_fr,Final_fr);//(float)S[0].Start_f,(float)S[NB_info-1].Final_f); - fl_set_xyplot_ybounds(form->spec_SN1,0,50); - - fl_set_xyplot_data(form->spec_SN1,f,spec_dBm,tot_sub_bands,"","",""); - } else if (sensor == 2) { - fl_set_xyplot_xbounds(form->spec_SN2,Start_fr,Final_fr);//(float)S[0].Start_f,(float)S[NB_info-1].Final_f); - fl_set_xyplot_ybounds(form->spec_SN2,0,50); - - fl_set_xyplot_data(form->spec_SN2,f,spec_dBm,tot_sub_bands,"","",""); - } else if(sensor == 3) { - fl_set_xyplot_xbounds(form->spec_SN3,Start_fr,Final_fr);//(float)S[0].Start_f,(float)S[NB_info-1].Final_f); - fl_set_xyplot_ybounds(form->spec_SN3,-115,-70); - - fl_set_xyplot_data(form->spec_SN3,f,spec_dBm,tot_sub_bands,"","",""); - } else - printf("Error! Sensor %d not considered",sensor); - - fl_check_forms(); -} -//mod_eure_lor-- -//mod_lor_10_06_01++ -/*! -******************************************************************************* -\brief function to plot the selected channels - -\return NULL -*/ - -void plot_SN_channels(CHANNELS_DB_T *channels_db, unsigned int NB_info, unsigned int *selected, /*FD_Secondary_Network_frequencies *SN_form,*/ unsigned int rrm_id) -{ - - float f[SB_NEEDED_FOR_SN*NB_info],spec_dBm[SB_NEEDED_FOR_SN*NB_info]; - CHANNELS_DB_T *pCurrent; - //float f[100],spec_dBm[100]; - unsigned int tot_sub_bands = SB_NEEDED_FOR_SN*NB_info; - unsigned int SB_BW; - float Start_fr, Final_fr; - int i, j, k=0; - printf("nb_info %d tot sub: %d \n",NB_info, tot_sub_bands);//dbg - - // Compute frequencies and store in f - for (i=0; ichannel.Final_f-pCurrent->channel.Start_f)/SB_NEEDED_FOR_SN; - - for (j=0; j< SB_NEEDED_FOR_SN; j++) { - f[k]=pCurrent->channel.Start_f+(SB_BW*j)+(SB_BW/2); - // Transfer power measurements to spec_dBm (float) - spec_dBm[k] = 1; - //printf ("for k = %d f: %f; spec_dBm %f\n",k,f[k], spec_dBm[k]);//dbg - //printf("S[i].Start_f %d S[i].mu0[j] %d freq: %f spec_dBm %f \n",S[i].Start_f, S[i].mu0[j], f[k], spec_dBm[k]); //dbg - k++; - } - } - - Start_fr = st_fr; - Final_fr = end_fr; - printf ("start: %f; end %f\n",f[0], f[k-1]);//dbg - - if (rrm_id == BTS_ID) { - fl_set_xyplot_xbounds(SN_form->Selected_frequencies,Start_fr,Final_fr); - fl_set_xyplot_ybounds(SN_form->Selected_frequencies,0,2); - - fl_set_xyplot_data(SN_form->Selected_frequencies,f,spec_dBm,tot_sub_bands,"","",""); - } else if (rrm_id == FC_ID) { - fl_set_xyplot_xbounds(form->Secondary_Network_frequencies,Start_fr,Final_fr); - fl_set_xyplot_ybounds(form->Secondary_Network_frequencies,0,2); - - fl_set_xyplot_data(form->Secondary_Network_frequencies,f,spec_dBm,tot_sub_bands,"","",""); - } - - fl_check_forms(); -} -//mod_lor_10_06_01-- -//add_lor_10_11_04++ -/*! -******************************************************************************* -\brief function to plot the spectrum sensing results in cluster 1 - -\return NULL -*/ -void plot_spectra_CH1(Sens_ch_t *S, unsigned int NB_info, /*FD_sens_CH1_scen_2 *Sens_form_CH1,*/ int sensor) -{ - - float f[MAX_NUM_SB*NB_info],spec_dBm[MAX_NUM_SB*NB_info]; - //float f[100],spec_dBm[100]; - float Start_fr, Final_fr;//add_lor_11_01_10 - Start_fr = st_fr; //add_lor_11_01_10 - Final_fr = end_fr;//add_lor_11_01_10 - unsigned int tot_sub_bands = MAX_NUM_SB*NB_info; - unsigned int SB_BW; - int i, j, k=0; - - //printf("nb_info %d tot sub: %d \n",NB_info, tot_sub_bands);//dbg - // Compute frequencies and store in f - if (sensor!=-1) { - for (i=0; iUser_1_sens,Start_fr,Final_fr);//(float)S[0].Start_f,(float)S[NB_info-1].Final_f); - fl_set_xyplot_ybounds(Sens_form_CH1->User_1_sens,0,50); - - fl_set_xyplot_data(Sens_form_CH1->User_1_sens,f,spec_dBm,tot_sub_bands,"","",""); - - } else if (sensor == 2) { - fl_set_xyplot_xbounds(Sens_form_CH1->User_2_sens,Start_fr,Final_fr);//(float)S[0].Start_f,(float)S[NB_info-1].Final_f); - fl_set_xyplot_ybounds(Sens_form_CH1->User_2_sens,0,50); - - fl_set_xyplot_data(Sens_form_CH1->User_2_sens,f,spec_dBm,tot_sub_bands,"","",""); - } else if(sensor == 3) { - fl_set_xyplot_xbounds(Sens_form_CH1->User_3_sens,Start_fr,Final_fr);//(float)S[0].Start_f,(float)S[NB_info-1].Final_f); - fl_set_xyplot_ybounds(Sens_form_CH1->User_3_sens,0,50); - - fl_set_xyplot_data(Sens_form_CH1->User_3_sens,f,spec_dBm,tot_sub_bands,"","",""); - } else if(sensor == 4) { - fl_set_xyplot_xbounds(Sens_form_CH1->User_4_sens,Start_fr,Final_fr);//(float)S[0].Start_f,(float)S[NB_info-1].Final_f); - fl_set_xyplot_ybounds(Sens_form_CH1->User_4_sens,-110,-80); - - fl_set_xyplot_data(Sens_form_CH1->User_4_sens,f,spec_dBm,tot_sub_bands,"","",""); - } else if(sensor == -1) { - fl_set_xyplot_xbounds(Sens_form_CH1->Cluster_2_sensing,Start_fr,Final_fr);//(float)S[0].Start_f,(float)S[NB_info-1].Final_f); - fl_set_xyplot_ybounds(Sens_form_CH1->Cluster_2_sensing,0,2); - - fl_set_xyplot_data(Sens_form_CH1->Cluster_2_sensing,f,spec_dBm,tot_sub_bands,"","",""); - } else - printf("Error! User %d not considered 1",sensor); //mod_lor_10_12_07 - - fl_check_forms(); - -} - -/*! -******************************************************************************* -\brief function to plot the spectrum sensing results of collaborative cluster 2 - -\return NULL -*/ -void plot_spectra_CH2(Sens_ch_t *S, unsigned int NB_info, /*FD_sensing_form *form,*/ unsigned int sensor) -{ - - float f[MAX_NUM_SB*NB_info],spec_dBm[MAX_NUM_SB*NB_info]; - //float f[100],spec_dBm[100]; - float Start_fr, Final_fr;//add_lor_11_01_10 - Start_fr = st_fr; //add_lor_11_01_10 - Final_fr = end_fr;//add_lor_11_01_10 - unsigned int tot_sub_bands = MAX_NUM_SB*NB_info; - unsigned int SB_BW; - int i, j, k=0; - - for (i=0; iUser_1,Start_fr,Final_fr);//(float)S[0].Start_f,(float)S[NB_info-1].Final_f); - fl_set_xyplot_ybounds(Sens_form_CH2->User_1,0,50); - - fl_set_xyplot_data(Sens_form_CH2->User_1,f,spec_dBm,tot_sub_bands,"","",""); - } else if (sensor == 2) { - fl_set_xyplot_xbounds(Sens_form_CH2->User_2,Start_fr,Final_fr);//(float)S[0].Start_f,(float)S[NB_info-1].Final_f); - fl_set_xyplot_ybounds(Sens_form_CH2->User_2,0,50); - - fl_set_xyplot_data(Sens_form_CH2->User_2,f,spec_dBm,tot_sub_bands,"","",""); - } else if(sensor == 3) { - fl_set_xyplot_xbounds(Sens_form_CH2->User_3,Start_fr,Final_fr);//(float)S[0].Start_f,(float)S[NB_info-1].Final_f); - fl_set_xyplot_ybounds(Sens_form_CH2->User_3,-110,-80); - - fl_set_xyplot_data(Sens_form_CH2->User_3,f,spec_dBm,tot_sub_bands,"","",""); - } else if(sensor == 4) { - fl_set_xyplot_xbounds(Sens_form_CH2->User_4,Start_fr,Final_fr);//(float)S[0].Start_f,(float)S[NB_info-1].Final_f); - fl_set_xyplot_ybounds(Sens_form_CH2->User_4,-110,-80); - - fl_set_xyplot_data(Sens_form_CH2->User_4,f,spec_dBm,tot_sub_bands,"","",""); - } else - printf("Error! User %d not considered 2",sensor); //mod_lor_10_12_07 - - fl_check_forms(); -} - -//mod_lor_11_02_18++ -/*! -******************************************************************************* -\brief function to plot the spectrum sensing results of collaborative cluster 2 - -\return NULL -*/ -void plot_spectra_sensor(Sens_ch_t *S, unsigned int NB_info) -{ - - float f[NUM_SB*NB_info],spec_dBm[NUM_SB*NB_info]; - //float f[100],spec_dBm[100]; - float Start_fr, Final_fr;//add_lor_11_01_10 - Start_fr = st_fr; //add_lor_11_01_10 - Final_fr = end_fr;//add_lor_11_01_10 - unsigned int tot_sub_bands = NUM_SB*NB_info; - unsigned int SB_BW; - int i, j, k=0; - - if (NB_info>0) { - Start_fr = S[0].Start_f; //add_lor_11_01_10 - Final_fr = S[NB_info-1].Final_f;//add_lor_11_01_10 - } - - for (i=0; ilocal_sensing_results,Start_fr,Final_fr);//(float)S[0].Start_f,(float)S[NB_info-1].Final_f); - fl_set_xyplot_ybounds(Sens_sensor_form->local_sensing_results,-115,0); - - fl_set_xyplot_data(Sens_sensor_form->local_sensing_results,f,spec_dBm,tot_sub_bands,"","",""); - - fl_check_forms(); -} -//mod_lor_11_02_18-- -/*! -******************************************************************************* -\brief function to plot the attributed channel - -\return NULL -*/ - -void plot_all_chann_scen_2(unsigned int *tx, unsigned int *chann_start, unsigned int *chann_end, unsigned int NB_info, unsigned int rrm_id) -{ - - float Start_fr, Final_fr; - - float f[SB_NEEDED_FOR_SN*NB_info], spec_dBm[SB_NEEDED_FOR_SN*NB_info]; - Start_fr = st_fr; - Final_fr = end_fr; - - unsigned int tot_sub_bands = SB_NEEDED_FOR_SN*NB_info; - unsigned int SB_BW ; - - int i, j, k=0; - - printf ("rrm_id: %d; num_info %d\n",rrm_id, NB_info);//dbg - - // Compute frequencies and store in f - for (i=0; iUser_1_channels,Start_fr,Final_fr); - fl_set_xyplot_ybounds(Chann_form->User_1_channels,0,3); - fl_set_xyplot_data(Chann_form->User_1_channels,f,spec_dBm,tot_sub_bands,"","",""); - - } else if (rrm_id == 2) { - fl_set_xyplot_xbounds(Chann_form->User_2_channels,Start_fr,Final_fr); - fl_set_xyplot_ybounds(Chann_form->User_2_channels,0,3); - fl_set_xyplot_data(Chann_form->User_2_channels,f,spec_dBm,tot_sub_bands,"","",""); - - } else if (rrm_id == 3) { - fl_set_xyplot_xbounds(Chann_form->User_3_channels,Start_fr,Final_fr); - fl_set_xyplot_ybounds(Chann_form->User_3_channels,0,3); - fl_set_xyplot_data(Chann_form->User_3_channels,f,spec_dBm,tot_sub_bands,"","",""); - - }/*else if (rrm_id == 4){ - - fl_set_xyplot_xbounds(Chann_form->User_4_channels,Start_fr,Final_fr); - fl_set_xyplot_ybounds(Chann_form->User_4_channels,0,3); - fl_set_xyplot_data(Chann_form->User_4_channels,f,spec_dBm,tot_sub_bands,"","",""); - - }*/else - printf("Error! User %d not considered 3",rrm_id); - - fl_check_forms(); -} -//add_lor_10_11_04-- -//mod_lor_10_04_20++ -static msg_t *msg_graph_resp( - Instance_t inst , //!< instance ID - int msg_type //!< type of message -) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - msg->head.start = START_MSG ; - msg->head.msg_type = 0xFF & msg_type ; - msg->head.inst = inst ; - msg->head.Trans_id = 0 ; - msg->head.size = 0; - msg->data = NULL ; - } - - return msg ; -} - -//mod_lor_10_04_20-- -//mod_lor_10_04_21++ -typedef struct { - unsigned int NB_chan ; //!< Number of channels - unsigned int NB_val ; //!< Number of values - unsigned int channels[3*NB_SENS_MAX]; //!< Vector of channels //mod_lor_10_07_01: 3*NB_SENS_MAX instead of NB_SENS_MAX - unsigned int val[3*NB_SENS_MAX] ; //!< Vector of values //mod_lor_10_07_01: 3*NB_SENS_MAX instead of NB_SENS_MAX -} gen_sens_info_t ; -//mod_lor_10_11_09++ - - -static msg_t *msg_generic_sens_resp( - Instance_t inst , //!< instance ID - int msg_type, //!< type of message - unsigned int NB_chan,//!< Number of channels - unsigned int NB_val , //!< Number of values - unsigned int *channels, //!< Vector of channels - unsigned int *val , //!< Vector of values - Transaction_t trans -) -{ - msg_t *msg = RRM_CALLOC(msg_t , 1 ) ; - - if ( msg != NULL ) { - unsigned int size = sizeof( gen_sens_info_t ); - gen_sens_info_t *p = RRM_CALLOC(gen_sens_info_t ,1 ) ; - - if ( p != NULL ) { - msg->head.start = START_MSG ; - msg->head.msg_type = 0xFF & msg_type ; - msg->head.inst = inst ; - msg->head.Trans_id = trans ; - msg->head.size = size; - - p->NB_chan = NB_chan; - - if ( NB_chan != 0 ) - memcpy( p->channels, channels, NB_chan*sizeof(unsigned int) ); - - p->NB_val = NB_val; - - if ( NB_chan != 0 ) - memcpy( p->val, val, NB_val*sizeof(unsigned int) ); - - } - - msg->data = (char *) p ; - - - } - - return msg ; - - -} - -//mod_lor_10_04_21-- - -/*! -******************************************************************************* -\brief thread de traitement des ttl des transactions (rrc ou cmm). - -\return NULL -*/ -static void * thread_processing_ttl ( - void * p_data /**< parametre du pthread */ -) -{ - int ii ; - fprintf(stderr,"TTL :starting ... \n"); - fflush(stdout); - - while ( flag_not_exit) { - for ( ii = 0 ; iicmm.exclu ) ) ; - dec_all_ttl_transact( rrm->cmm.transaction ) ; - // Trop simpliste et pas fonctionnel , il faut faire une gestion des erreurs de transaction - //if (rrm->cmm.transaction!=NULL) - // fprintf(stderr,"delete on cmm of %d\n", ii); //dbg - del_all_obseleted_transact( &(rrm->cmm.transaction)); - pthread_mutex_unlock( &( rrm->cmm.exclu ) ) ; - - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; - dec_all_ttl_transact( rrm->rrc.transaction ) ; - // idem :commentaire ci-dessus - //if (rrm->rrc.transaction!=NULL) - // fprintf(stderr,"delete on rrc of %d\n", ii); //dbg - del_all_obseleted_transact( &(rrm->rrc.transaction)); - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - - pthread_mutex_lock( &( rrm->pusu.exclu ) ) ; - dec_all_ttl_transact( rrm->pusu.transaction ) ; - // idem :commentaire ci-dessus - del_all_obseleted_transact( &(rrm->pusu.transaction)); - pthread_mutex_unlock( &( rrm->pusu.exclu ) ) ; - - pthread_mutex_lock( &( rrm->sensing.exclu ) ) ; - dec_all_ttl_transact( rrm->sensing.transaction ) ; - // idem :commentaire ci-dessus - del_all_obseleted_transact( &(rrm->sensing.transaction)); - pthread_mutex_unlock( &( rrm->sensing.exclu ) ) ; - - //mod_lor_10_01_25++ - pthread_mutex_lock( &( rrm->ip.exclu ) ) ; - dec_all_ttl_transact( rrm->ip.transaction ) ; - // idem :commentaire ci-dessus - del_all_obseleted_transact( &(rrm->ip.transaction)); - pthread_mutex_unlock( &( rrm->ip.exclu ) ) ; - //mod_lor_10_01_25--*/ - - } - - cnt_timer++; - usleep( 2000*1000 ) ;//mod_lor_10_03_01: incrementing timeout - } - - fprintf(stderr,"... stopped TTL\n"); - fflush(stdout); - return NULL; - -} - -/*! -******************************************************************************* -\brief thread de traitement des messages sortants sur les sockets (rrc ou cmm). - -\return NULL -*/ -static void * thread_send_msg_cmm ( - void * p_data /**< parametre du pthread */ -) -{ - int ii ; - int no_msg ; - fprintf(stderr,"Thread Send Message: starting ... \n"); - fflush(stderr); - file_msg_t *pItem ; - - while ( flag_not_exit) { - no_msg = 0 ; - - for ( ii = 0 ; iifile_send_cmm_msg) ) ; - - - if ( pItem == NULL ) - no_msg++; - else { - int r = send_msg( pItem->s, pItem->msg ); - WARNING(r!=0); - } - - RRM_FREE( pItem ) ; - } - - if ( no_msg==nb_inst ) // Pas de message - usleep(1000); - } - - fprintf(stderr,"... stopped Thread Send Message\n"); - fflush(stderr); - return NULL; -} - -/*! -******************************************************************************* -\brief thread de traitement des messages sortants sur les sockets (rrc ou cmm). - -\return NULL -*/ -static void * thread_send_msg_rrc ( - void * p_data /**< parametre du pthread */ -) -{ - int ii ; - - int no_msg ; - fprintf(stderr,"Thread Send Message To RRC: starting ... \n"); - fflush(stderr); - file_msg_t *pItem ; - - while ( flag_not_exit) { - no_msg = 0 ; - - for ( ii = 0 ; iifile_send_rrc_msg) ) ; - - - if ( pItem == NULL ) - no_msg++; - else { - -#ifdef RRC_KERNEL_MODE - // envoi du header - status = write (Rrm_fifos.rrm_2_rrc_fifo,(char*) pItem->msg, sizeof(msg_head_t) ); - - if ( pItem->msg->head.size >0) - status = write (Rrm_fifos.rrm_2_rrc_fifo,(pItem->msg)->data, pItem->msg->head.size); - - //printf( "status write: %d \n",status); - //printf("send msg to rrc [%d] id msg: %d \n", (pItem->msg)->head.inst, (pItem->msg)->head.msg_type ); -#else - int r = send_msg( pItem->s, pItem->msg ); - WARNING(r!=0); -#endif - } - - RRM_FREE( pItem ) ; - } - - if ( no_msg==nb_inst ) // Pas de message - usleep(1000); - } - - fprintf(stderr,"... stopped Thread Send Message\n"); - fflush(stderr); - return NULL; -} - -//mod_lor_10_01_25++ -/*! -******************************************************************************* -\brief thread de traitement des messages sortants sur les sockets (rrc ou cmm). - -\return NULL -*/ -static void * thread_send_msg_ip ( - void * p_data /**< parametre du pthread */ -) -{ - int ii ; - int no_msg ; - fprintf(stderr,"Thread Send Message IP: starting ... \n"); - fflush(stderr); - file_msg_t *pItem ; - - while ( flag_not_exit) { - no_msg = 0 ; - - for ( ii = 0 ; iifile_send_ip_msg) ) ; - - - if ( pItem == NULL ) - no_msg++; - else { - //fprintf(stderr,"Thread Send Message inst %d socket %d\n", ii, rrm->ip.s->s); //dbg - // if (pItem->msg->head.msg_type == 26) - // msg_fct( "IP -> UPDATE_SENSING_RESULTS_3 inst: %d sockid %d\n", ii, rrm->ip.s->s);//dbg - //msg_fct( "before send_msg_int msg: %d socket %d\n", pItem->msg->head.msg_type, rrm->ip.s->s);//dbg - int r = send_msg_int( rrm->ip.s, pItem->msg ); - //msg_fct( "after send_msg_int \n");//dbg - - WARNING(r!=0); - } - - RRM_FREE( pItem ) ; - } - - if ( no_msg==nb_inst ) // Pas de message - usleep(1000); - } - - fprintf(stderr,"... stopped Thread Send Message\n"); - fflush(stderr); - return NULL; -} - -/*! -******************************************************************************* -\brief thread de traitement des messages sortants sur les sockets (rrc ou cmm). - -\return NULL -*/ -static void * thread_send_msg_sensing ( - void * p_data /**< parametre du pthread */ -) -{ - int ii ; - - int no_msg ; - fprintf(stderr,"Thread Send Message To Sensing Unit: starting ... \n"); - fflush(stderr); - file_msg_t *pItem ; - - while ( flag_not_exit) { - no_msg = 0 ; - - for ( ii = 0 ; iifile_send_sensing_msg) ) ; - - - if ( pItem == NULL ) - no_msg++; - else { - - int r = send_msg( pItem->s, pItem->msg ); - WARNING(r!=0); - - } - - RRM_FREE( pItem ) ; - } - - if ( no_msg==nb_inst ) // Pas de message - usleep(1000); - } - - fprintf(stderr,"... stopped Thread Send Message\n"); - fflush(stderr); - return NULL; -} - -//mod_lor_10_01_25--*/ - - - -/*! -******************************************************************************* -\brief thread de traitement des messages entrant sur une interface (rrc, cmm ou sensing). - -\return NULL -*/ - -static void * thread_recv_msg ( - void * p_data /**< parametre du pthread */ -) -{ - msg_t *msg ; - struct data_thread *data = (struct data_thread *) p_data; - int sock ; - - fprintf(stderr,"%s interfaces :starting ... %s %s\n",data->name , data->sock_path_local, data->sock_path_dest); - fflush(stderr); - - /* ouverture des liens de communications */ - sock = open_socket( &data->s, data->sock_path_local, data->sock_path_dest ,0 ); - - if ( sock != -1 ) { - fprintf(stderr," %s -> socket = %d\n",data->name , sock ); - fflush(stderr); - - while (flag_not_exit) { - msg = (msg_t *) recv_msg(&data->s) ; - - if (msg == NULL ) { - fprintf(stderr,"Server closed connection\n"); - flag_not_exit = 0; - } else { - int inst = msg->head.inst ; - rrm_t *rrm = &rrm_inst[inst]; - - put_msg( &(rrm->file_recv_msg), 0, &data->s, msg) ;//mod_lor_10_01_25 - } - } - - close_socket(&data->s) ; - } - - fprintf(stderr,"... stopped %s interfaces\n",data->name); - return NULL; -} - -//mod_lor_10_01_25++ -/*! -******************************************************************************* -\brief thread de traitement des messages entrant via ip. - -\return NULL -*/ - -static void * thread_recv_msg_int ( - void * p_data /**< parametre du pthread */ -) -{ - msg_t *msg ; - struct data_thread_int *data = (struct data_thread_int *) p_data; - rrm_t *rrm = &rrm_inst[data->instance]; - int sock ; - - fprintf(stderr,"%s interfaces :starting on inst. %d ... ",data->name, data->instance ); - fprintf(stderr,"\n");//dbg - - fflush(stderr); - - /* ouverture des liens de communications */ - sock = open_socket_int( &data->s, data->sock_path_local, data->local_port, data->sock_path_dest, data->dest_port,0 ); - data->s.s = sock; - memcpy(rrm->ip.s, &(data->s), sizeof(sock_rrm_int_t)); - - if ( sock != -1 ) { - fprintf(stderr," %s -> socket = %d\n",data->name , sock ); - fflush(stderr); - - while (flag_not_exit) { - - msg = (msg_t *) recv_msg_int(rrm->ip.s) ; - - if (msg == NULL ) { - fprintf(stderr,"Server closed connection\n"); - flag_not_exit = 0; - } else { - //fprintf(stderr,"msg received from %X \n", rrm->ip.s->in_dest_addr.sin_addr.s_addr); - put_msg( &(rrm->file_recv_msg), 1, &data->s, msg) ; - - } - } - - close_socket_int(&data->s) ; - } - - fprintf(stderr,"... stopped %s interfaces\n",data->name); - return NULL; -} -//mod_lor_10_01_25-- - -/*******************************************************************************/ -#ifdef RRC_KERNEL_MODE -char Header_buf[sizeof(msg_head_t)]; -char Data[2400]; -unsigned short Header_read_idx=0, - Data_read_idx=0, - Data_to_read=0, - Header_size=sizeof(msg_head_t), - READ_OK=1; - -/*! -******************************************************************************* -\brief thread de traitement des messages entrant sur l'interface fifo du RRC - en mode KERNEL - -\return NULL -*/ -static void * thread_recv_msg_fifo (void * p_data ) -{ - msg_t *msg_cpy ; - rrm_t *rrm ; - msg_head_t *Header ; - int taille ; - int inst ; - int bytes_read; - - msg_fifo("[RRM]: RX MSG_FIFOS %d handler starting....\n",RRC2RRM_FIFO); - - while (flag_not_exit) { - if(Header_read_idx < Header_size) { - bytes_read = read(Rrm_fifos.rrc_2_rrm_fifo,&Data[Header_read_idx],Header_size-Header_read_idx); - - if(bytes_read <0) - continue; - - Header_read_idx+=bytes_read; - msg_fifo("[RRM]: RX MSG ON FIFOS %d: Header size %d, bytes_read %d\n",RRC2RRM_FIFO,Header_read_idx,bytes_read); - - if(Header_read_idx == Header_size) { - Header=(msg_head_t*)Data; - Data_to_read=Header->size; - Data_read_idx=Header_read_idx; - msg_fifo("[RRM]: RX MSG ON FIFOS %d: Header read completed, Data size %d\n",RRC2RRM_FIFO,Data_to_read); - Header = (msg_head_t *) Data; - } else - continue; - } - - if (Data_to_read > 0 ) { - bytes_read = read (Rrm_fifos.rrc_2_rrm_fifo,&Data[Data_read_idx],Data_to_read); - - if(bytes_read <0) - continue; - - Data_to_read-=bytes_read; - Data_read_idx+=bytes_read; - msg_fifo("[RRM]: RX MSG ON FIFOS %d: data size %d\n",RRC2RRM_FIFO,Data_read_idx-Header_read_idx); - - if(Data_to_read > 0 ) - continue; - - Header_read_idx= 0 ; - Data_read_idx = 0 ; - Data_to_read = 0 ; - taille = Header->size + sizeof(msg_head_t) ; - msg_cpy = RRM_MALLOC( msg_t, taille ) ; - inst = Header->inst ; - rrm = &rrm_inst[inst]; - - memcpy( msg_cpy, Data , taille ) ; - msg_fifo("[RRM]: RX MSG ON FIFOS %d: data read completed, Proccess on inst .... %d\n",RRC2RRM_FIFO,inst); - put_msg( &(rrm->file_recv_msg), 0, rrm->rrc.s, msg_cpy) ; //mod_lor_10_01_25 - msg_fifo("[RRM]: RX MSG ON FIFOS %d: data read completed, Proccess on inst done %d\n",RRC2RRM_FIFO,inst); - } else { - /* Seulement le header */ - Header_read_idx= 0 ; - Data_read_idx = 0 ; - Data_to_read = 0 ; - taille = sizeof(msg_head_t) ; - msg_cpy = RRM_MALLOC( msg_t, taille ) ; - inst = Header->inst ; - rrm = &rrm_inst[inst]; - - memcpy( msg_cpy, Data , taille ) ; - put_msg( &(rrm->file_recv_msg), 0, rrm->rrc.s, msg_cpy) ;//mod_lor_10_01_25 - } - } - - return NULL; -} -#endif -/*! -******************************************************************************* -\brief traitement des messages entrant sur l'interface CMM - -\return Auncune valeur -*/ -static void processing_msg_cmm( - rrm_t *rrm , ///< Donnee relative a une instance du RRM - msg_head_t *header , ///< Entete du message - char *msg , ///< Message recu - int len_msg ///< Longueur du message -) -{ -#ifdef TRACE - - if ( header->msg_type < NB_MSG_CMM_RRM ) - fprintf(cmm2rrm_fd,"%lf CMM->RRM %d %-30s %d %d\n",get_currentclock(),header->inst,Str_msg_cmm_rrm[header->msg_type], header->msg_type,header->Trans_id); - else - fprintf(cmm2rrm_fd,"%lf CMM->RRM %-30s %d %d\n",get_currentclock(),"inconnu", header->msg_type,header->Trans_id); - - fflush(cmm2rrm_fd); -#endif - - switch ( header->msg_type ) { - case CMM_CX_SETUP_REQ: { - cmm_cx_setup_req_t *p = (cmm_cx_setup_req_t *) msg ; - msg_fct( "[CMM]>[RRM]:%d:CMM_CX_SETUP_REQ\n",header->inst); - - if ( cmm_cx_setup_req(header->inst,p->Src,p->Dst,p->QoS_class,header->Trans_id ) ) { - /* RB_ID = 0xFFFF => RB error */ - put_msg( &(rrm->file_send_cmm_msg), 0, - rrm->cmm.s, msg_rrm_cx_setup_cnf(header->inst,0xFFFF , header->Trans_id )) ;//mod_lor_10_01_25 - } - - //mod_lor_10_04_20++ - int msg_type = header->msg_type + NB_MSG_SNS_RRM +NB_MSG_RRC_RRM; - int r = send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) ); - WARNING(r!=0); - //mod_lor_10_04_20-- - } - break ; - - case CMM_CX_MODIFY_REQ: { - cmm_cx_modify_req_t *p = (cmm_cx_modify_req_t *) msg ; - msg_fct( "[CMM]>[RRM]:%d:CMM_CX_MODIFY_REQ\n",header->inst); - cmm_cx_modify_req(header->inst,p->Rb_id,p->QoS_class,header->Trans_id ) ; - //mod_lor_10_04_20++ - int msg_type = header->msg_type + NB_MSG_SNS_RRM +NB_MSG_RRC_RRM; - int r = send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) ); - WARNING(r!=0); - //mod_lor_10_04_20-- - - } - break ; - - case CMM_CX_RELEASE_REQ : { - cmm_cx_release_req_t *p = (cmm_cx_release_req_t *) msg ; - msg_fct( "[CMM]>[RRM]:%d:CMM_CX_RELEASE_REQ\n",header->inst); - cmm_cx_release_req(header->inst,p->Rb_id,header->Trans_id ) ; - //mod_lor_10_04_20++ - int msg_type = header->msg_type + NB_MSG_SNS_RRM +NB_MSG_RRC_RRM; - int r = send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) ); - WARNING(r!=0); - //mod_lor_10_04_20-- - - } - break ; - - case CMM_CX_RELEASE_ALL_REQ : { - //cmm_cx_release_all_req_t *p = (cmm_cx_release_all_req_t *) msg ; - msg_fct( "[CMM]>[RRM]:%d:CMM_CX_RELEASE_ALL_REQ\n",header->inst); - //mod_lor_10_04_20++ - int msg_type = header->msg_type + NB_MSG_SNS_RRM +NB_MSG_RRC_RRM; - int r = send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) ); - WARNING(r!=0); - //mod_lor_10_04_20-- - - } - break ; - - case CMM_ATTACH_CNF : { ///< The thread that allows - cmm_attach_cnf_t *p = (cmm_attach_cnf_t *) msg ; - msg_fct( "[CMM]>[RRM]:%d:CMM_ATTACH_CNF\n",header->inst); - //mod_lor_10_04_20++ - int msg_type = header->msg_type + NB_MSG_SNS_RRM +NB_MSG_RRC_RRM; - int r = send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) ); - WARNING(r!=0); - //mod_lor_10_04_20-- - - - - //mod_lor_10_01_25++ -#ifndef RRC_EMUL - - if (rrm->ip.s->s == -1) { - //mod_lor_10_05_06++ - unsigned char tmp [4]; - - /*for (int i=0; i<10;i++ ) - if (memcmp( &(node_info[i].L2_id), &(p->L2_id), sizeof(L2_ID) )){ - fprintf(stderr,"Inst. to connect with %d\n",i); - break; - }//memcpy()*/ - //mod_lor_10_05_18++: destination addresses depends on - //scenario and on role, they are declared at beginning of file - if (SCEN_2_CENTR && rrm->id >= FIRST_SECOND_CLUSTER_USER_ID) { //mod_lor_11_01_06 - tmp[0]=CH_COLL_L3id[0]; - tmp[1]=CH_COLL_L3id[1]; - tmp[2]=CH_COLL_L3id[2]; - tmp[3]=CH_COLL_L3id[3]; - } else { - tmp[0]=FC_L3id[0]; - tmp[1]=FC_L3id[1]; - tmp[2]=FC_L3id[2]; - tmp[3]=FC_L3id[3]; - }//mod_lor_10_05_18-- - - //unsigned char tmp [4]={0x0A,0x00,0x01,0x01}; - /*fprintf(stderr,"IP_addr :");//dbg //mod_lor_10_05_06 - for (int i=0;i<4;i++)//dbg - fprintf(stderr," %X",tmp[i]);//dbg - fprintf(stderr,"\n");//dbg*/ - - //mod_lor_10_05_06-- - fprintf(stderr,"IP interface starting inst. %d\n",rrm->id); - //dbg++ (add_lor_11_01_06) - fprintf(stderr,"Source: "); - - for ( int i=0; i<4; i++) - fprintf(stderr,"%02X:", p->L3_info[i]); - - fprintf(stderr,"\nDest: "); - - for (int i=0; i<4; i++) - fprintf(stderr,"%02X:", tmp[i]); - - fprintf(stderr,"\n"); - //dbg-- - int sock = open_socket_int(rrm->ip.s, p->L3_info, 0, tmp, 0, header->inst); - - if ( sock != -1 ) { - fprintf(stderr," Ip -> socket = %d\n", rrm->ip.s->s ); - fflush(stderr); - } else { - fprintf(stderr," Error in IP socket opening \n"); - - } - } else - fprintf(stderr," Socket IP for inst %d already opened %d \n",rrm->id,rrm->ip.s->s); - -#endif //mod_lor_10_01_25--*/ - - cmm_attach_cnf( header->inst, p->L2_id, p->L3_info_t, p->L3_info, header->Trans_id ) ; - - } - break ; - - case CMM_INIT_MR_REQ : { - msg_fct( "[CMM]>[RRM]:%d:CMM_INIT_MR_REQ ????\n",header->inst); - //mod_lor_10_04_20++ - int msg_type = header->msg_type + NB_MSG_SNS_RRM +NB_MSG_RRC_RRM; - int r = send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) ); - WARNING(r!=0); - //mod_lor_10_04_20-- - - } - break ; - - case CMM_INIT_CH_REQ : { - cmm_init_ch_req_t *p = (cmm_init_ch_req_t *) msg ; - //mod_lor_10_04_20++ - int msg_type = header->msg_type + NB_MSG_SNS_RRM +NB_MSG_RRC_RRM; - int r = send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) ); - WARNING(r!=0); - //mod_lor_10_04_20-- - - //mod_lor_10_03_01++ - - struct data_thread_int DataIp; - - DataIp.name = "IP" ; ///< Nom du thread - DataIp.sock_path_local=p->L3_info;///< local IP address for internet socket - DataIp.local_port = 7000 ; ///< local IP port for internet socket - - //mod_lor_10_03_02++: setting for topology with FC and BTS on instances 0 and 1 - //mod_lor_10_05_18++ - if (rrm->role == FUSIONCENTER) { - if (SCEN_1) - DataIp.sock_path_dest = BTS_L3id ; ///< dest IP address for internet socket - else if (SCEN_2_CENTR) - DataIp.sock_path_dest = CH_COLL_L3id ; ///< dest IP address for internet socket - } else if (rrm->role == BTS ||rrm->role == CH_COLL) { //mod_lor_10_04_27 - DataIp.sock_path_dest = FC_L3id ; ///< dest IP address for internet socket - } else - fprintf (stderr, "wrong node role %d \n", rrm->role); - - //mod_lor_10_05_18-- - //mod_lor_10_03_02-- - DataIp.dest_port = 0 ; ///< dest IP port for internet socket - DataIp.s.s = -1 ; - DataIp.instance = rrm->id; - //fprintf(stderr,"L3_local ");//dbg - //print_L3_id( IPv4_ADDR, rrm->L3_info ); - //fprintf(stderr,"\n");//dbg - - int ret = pthread_create ( &pthread_recv_int_msg_hnd, NULL, thread_recv_msg_int , &DataIp ); - - if (ret) { - fprintf (stderr, "%s", strerror (ret)); - exit(-1) ; - } - - sleep(5); - //mod_lor_10_03_01-- - cmm_init_ch_req(header->inst,p->L3_info_t,&(p->L3_info[0])); - msg_fct( "[CMM]>[RRM]:%d:CMM_INIT_CH_REQ\n",header->inst); - - } - break ; - - case CMM_INIT_SENSING : { - cmm_init_sensing_t *p = (cmm_init_sensing_t *) msg ; - msg_fct( "[CMM]>[RRM]:%d:CMM_INIT_SENSING\n",header->inst); - rrm->sensing.sens_active=1;//mod_lor_10_05_07 - //mod_lor_10_04_20++ - int msg_type = header->msg_type + NB_MSG_SNS_RRM +NB_MSG_RRC_RRM; - int r = send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) ); - WARNING(r!=0); - //mod_lor_10_04_20-- - //st_fr = p->Start_fr; //mod_lor_10_06_01 - //end_fr = p->Stop_fr; //mod_lor_10_06_01 - - cmm_init_sensing(header->inst,p->Start_fr ,p->Stop_fr,p->Meas_band,p->Meas_tpf, - p->Nb_channels, p->Overlap,p->Sampl_freq); - fprintf(output_2,"PROVA\n"); //mod_lor_10_04_20 - - - } - break ; - - case CMM_STOP_SENSING : { - msg_fct( "[CMM]>[RRM]:%d:CMM_STOP_SENSING\n",rrm->id); - rrm->sensing.sens_active=0;//mod_lor_10_05_07 - //mod_lor_10_04_20++ - int msg_type = header->msg_type + NB_MSG_SNS_RRM +NB_MSG_RRC_RRM; - int r = send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) ); - WARNING(r!=0); - //mod_lor_10_04_20-- - //print_sens_db(rrm->rrc.pSensEntry);//dbg - cmm_stop_sensing(header->inst); - } - break ; - - case CMM_ASK_FREQ : { - msg_fct( "[CMM]>[RRM]:%d:CMM_ASK_FREQ\n",header->inst); - //mod_lor_10_04_20++ - int msg_type = header->msg_type + NB_MSG_SNS_RRM +NB_MSG_RRC_RRM; - int r = send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) ); - WARNING(r!=0); - //mod_lor_10_04_20-- - cmm_ask_freq(header->inst); - } - break ; - - case CMM_INIT_COLL_SENSING : { //add_lor_10_11_08 - cmm_init_coll_sensing_t *p = (cmm_init_coll_sensing_t *) msg ; - msg_fct( "[CMM]>[RRM]:%d:CMM_INIT_COLL_SENSING\n",header->inst); - rrm->sensing.sens_active=1; - cmm_init_coll_sensing(header->inst,p->Start_fr ,p->Stop_fr,p->Meas_band,p->Meas_tpf, - p->Nb_channels, p->Overlap,p->Sampl_freq); - - } - break ; - - case CMM_NEED_TO_TX : { //add_lor_10_10_28 - cmm_need_to_tx_t *p = (cmm_need_to_tx_t *) msg ; - msg_fct( "[CMM]>[RRM]:%d:CMM_NEED_TO_TX\n",header->inst); - cmm_need_to_tx(header->inst, p->dest,p->QoS_class); - } - break ; - - case CMM_USER_DISC : { //add_lor_10_11_08 - msg_fct( "[CMM]>[RRM]:%d:CMM_USER_DISC\n",header->inst); - cmm_user_disc(header->inst); - } - break ; - - case CMM_LINK_DISC : { //add_lor_10_11_09 - cmm_link_disk_t *p = (cmm_link_disk_t *) msg ; - msg_fct( "[CMM]>[RRM]:%d:CMM_LINK_DISC with user %d\n",header->inst, p->dest); - cmm_link_disc(header->inst, p->dest); - } - break ; - - default : - fprintf(stderr,"CMM:\n") ; - printHex(msg,len_msg,1) ; - } -} -/*! -******************************************************************************* -\brief traitement des messages entrant sur l'interface RRC - -\return Aucune valeur -*/ -static void processing_msg_rrc( - rrm_t *rrm , ///< Donnee relative a une instance du RRM - msg_head_t *header , ///< Entete du message - char *msg , ///< Message recu - int len_msg ///< Longueur du message -) -{ -#ifdef TRACE - - if ( header->msg_type < NB_MSG_RRC_RRM ) - fprintf(rrc2rrm_fd,"%lf RRC->RRM %d %-30s %d %d\n",get_currentclock(),header->inst,Str_msg_rrc_rrm[header->msg_type],header->msg_type,header->Trans_id); - else - fprintf(rrc2rrm_fd,"%lf RRC->RRM %-30s %d %d\n",get_currentclock(),"inconnu",header->msg_type,header->Trans_id); - - fflush(rrc2rrm_fd); -#endif - - switch ( header->msg_type ) { - case RRC_RB_ESTABLISH_RESP: { - msg_fct( "[RRC]>[RRM]:%d:RRC_RB_ESTABLISH_RESP %d \n",header->inst, header->Trans_id ); - //mod_lor_10_04_20++ - int msg_type = header->msg_type + NB_MSG_SNS_RRM ; - int r = send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) ); - WARNING(r!=0); - //mod_lor_10_04_20-- - rrc_rb_establish_resp(header->inst,header->Trans_id) ; - } - break ; - - case RRC_RB_ESTABLISH_CFM: { - rrc_rb_establish_cfm_t *p = (rrc_rb_establish_cfm_t *) msg ; - msg_fct( "[RRC]>[RRM]:%d:RRC_RB_ESTABLISH_CFM (%d) %d \n",header->inst,p->Rb_id, header->Trans_id); - //mod_lor_10_04_20++ - int msg_type = header->msg_type + NB_MSG_SNS_RRM ; - int r = send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) ); - WARNING(r!=0); - //mod_lor_10_04_20-- - rrc_rb_establish_cfm(header->inst,p->Rb_id,p->RB_type,header->Trans_id) ; - } - break ; - - case RRC_RB_MODIFY_RESP: { - msg_fct( "[RRC]>[RRM]:%d:RRC_RB_MODIFY_RESP %d \n",header->inst, header->Trans_id); - rrc_rb_modify_resp(header->inst,header->Trans_id) ; - } - break ; - - case RRC_RB_MODIFY_CFM: { - rrc_rb_modify_cfm_t *p = (rrc_rb_modify_cfm_t *) msg ; - msg_fct( "[RRC]>[RRM]:%d:RRC_RB_MODIFY_CFM (%d) %d \n",header->inst,p->Rb_id, header->Trans_id); - //mod_lor_10_04_20++ - int msg_type = header->msg_type + NB_MSG_SNS_RRM ; - int r = send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) ); - WARNING(r!=0); - //mod_lor_10_04_20-- - rrc_rb_modify_cfm(header->inst,p->Rb_id,header->Trans_id) ; - } - break ; - - case RRC_RB_RELEASE_RESP: { - msg_fct( "[RRC]>[RRM]:%d:RRC_RB_RELEASE_RESP %d \n",header->inst, header->Trans_id); - //mod_lor_10_04_20++ - int msg_type = header->msg_type + NB_MSG_SNS_RRM ; - int r = send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) ); - WARNING(r!=0); - //mod_lor_10_04_20-- - rrc_rb_release_resp(header->inst,header->Trans_id) ; - } - break ; - - case RRC_MR_ATTACH_IND : { - rrc_MR_attach_ind_t *p = (rrc_MR_attach_ind_t *) msg ; - msg_fct( "[RRC]>[RRM]:%d:RRC_MR_ATTACH_IND (Node %02d) %d \n",header->inst, p->L2_id.L2_id[0], header->Trans_id); - //mod_lor_10_04_20++ - int msg_type = header->msg_type + NB_MSG_SNS_RRM ; - int r = send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) ); - WARNING(r!=0); - //mod_lor_10_04_20-- - rrc_MR_attach_ind(header->inst,p->L2_id) ; - } - break ; - - case RRC_SENSING_MEAS_RESP: { - msg_fct( "[RRC]>[RRM]:%d:RRC_SENSING_MEAS_RESP %d \n",header->inst, header->Trans_id); - //mod_lor_10_04_20++ - int msg_type = header->msg_type + NB_MSG_SNS_RRM ; - int r = send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) ); - WARNING(r!=0); - //mod_lor_10_04_20-- - rrc_sensing_meas_resp(header->inst,header->Trans_id) ; - } - break ; - - case RRC_CX_ESTABLISH_IND: { - rrc_cx_establish_ind_t *p = (rrc_cx_establish_ind_t *) msg ; - msg_fct( "[RRC]>[RRM]:%d:RRC_CX_ESTABLISH_IND (Node %02d) %d \n",header->inst, p->L2_id.L2_id[0], header->Trans_id); - //mod_lor_10_04_20++ - int msg_type = header->msg_type + NB_MSG_SNS_RRM ; - int r = send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) ); - WARNING(r!=0); - //mod_lor_10_04_20-- - - rrc_cx_establish_ind(header->inst,p->L2_id,header->Trans_id, - p->L3_info,p->L3_info_t, - p->DTCH_B_id,p->DTCH_id) ; - - //mod_lor_10_01_25++ - if (rrm->state == MESHROUTER) - memcpy(rrm->L3_info_corr,p->L3_info, IPv4_ADDR); - - //mod_lor_10_01_25--*/ - } - break ; - - case RRC_PHY_SYNCH_TO_MR_IND : { - rrc_phy_synch_to_MR_ind_t *p = (rrc_phy_synch_to_MR_ind_t *) msg ; - msg_fct( "[RRC]>[RRM]:%d:RRC_PHY_SYNCH_TO_MR_IND.... (Node %02d) %d \n",header->inst, p->L2_id.L2_id[0], header->Trans_id); - //mod_lor_10_04_20++ - int msg_type = header->msg_type + NB_MSG_SNS_RRM ; - int r = send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) ); - WARNING(r!=0); - //mod_lor_10_04_20-- - rrc_phy_synch_to_MR_ind(header->inst,p->L2_id) ; - //msg_fct( "[RRC]>[RRM]:%d:RRC_PHY_SYNCH_TO_MR_IND Done\n",header->inst); - } - break ; - - case RRC_PHY_SYNCH_TO_CH_IND : { - rrc_phy_synch_to_CH_ind_t *p = (rrc_phy_synch_to_CH_ind_t *) msg ; - msg_fct( "[RRC]>[RRM]:%d:RRC_PHY_SYNCH_TO_CH_IND.... %d (Node %02d) %d \n",header->inst, p->Ch_index, p->L2_id.L2_id[0], header->Trans_id); - //mod_lor_10_04_20++ - int msg_type = header->msg_type + NB_MSG_SNS_RRM ; - int r = send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) ); - WARNING(r!=0); - - //mod_lor_10_04_20-- - //add_lor_11_01_07++ - if (SCEN_2_CENTR) - sleep(header->inst); - - //add_lor_11_01_07-- - rrc_phy_synch_to_CH_ind(header->inst,p->Ch_index,p->L2_id ) ; - //msg_fct( "[RRC]>[RRM]:%d:RRC_PHY_SYNCH_TO_CH_IND Done\n",header->inst); - - } - break ; - - case RRC_SENSING_MEAS_IND : { - rrc_sensing_meas_ind_t *p = (rrc_sensing_meas_ind_t *) msg ; - msg_fct( "[RRC]>[RRM]:%d:RRC_SENSING_MEAS_IND (Node %02d) %d \n",header->inst, p->L2_id.L2_id[0], header->Trans_id); - //mod_lor_10_04_20++ - int msg_type = header->msg_type + NB_MSG_SNS_RRM ; - int r = send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) ); - WARNING(r!=0); - //mod_lor_10_04_20-- - rrc_sensing_meas_ind( header->inst,p->L2_id, p->NB_meas, p->Sensing_meas, header->Trans_id ); - } - break ; - - case RRC_RB_MEAS_IND : { - rrc_rb_meas_ind_t *p = (rrc_rb_meas_ind_t *) msg ; - msg_fct( "[RRC]>[RRM]:%d:RRC_RB_MEAS_IND (Noede %02d) %d \n",header->inst, p->L2_id.L2_id[0], header->Trans_id); - //mod_lor_10_04_20++ - int msg_type = header->msg_type + NB_MSG_SNS_RRM ; - int r = send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) ); - WARNING(r!=0); - //mod_lor_10_04_20-- - rrc_rb_meas_ind( header->inst, p->Rb_id, p->L2_id, p->Meas_mode, p->Mac_rlc_meas, header->Trans_id ); - } - break ; - - - case RRC_INIT_SCAN_REQ : { - rrc_init_scan_req_t *p = (rrc_init_scan_req_t *) msg ; - // fprintf(stdout,"sens_database before:\n");//dbg - // print_sens_db( rrm->rrc.pSensEntry );//dbg - msg_fct( "[RRC]>[RRM]:%d:RRC_INIT_SCAN_REQ %d \n",header->inst, header->Trans_id); - rrm->sensing.sens_active=1;//mod_lor_10_04_21 - //mod_lor_10_04_20++ - int msg_type = header->msg_type + NB_MSG_SNS_RRM ; - int r = send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) ); - WARNING(r!=0); - //mod_lor_10_04_20-- - fprintf(stdout,"start:%d stop:%d band:%d nb:%d\n",p->Start_fr ,p->Stop_fr,p->Meas_band,p->Nb_channels);//dbg - rrc_init_scan_req( header->inst, p->L2_id, p->Start_fr ,p->Stop_fr,p->Meas_band,p->Meas_tpf, - p->Nb_channels, p->Overlap,p->Sampl_freq, header->Trans_id ); - - // print_sens_db( rrm->rrc.pSensEntry );//dbg - - } - break ; - - case RRC_END_SCAN_CONF : { - rrc_end_scan_conf_t *p = (rrc_end_scan_conf_t *) msg ; - msg_fct( "[RRC]>[RRM]:%d:RRC_END_SCAN_CONF %d (Node ",header->inst, header->Trans_id); - int inst_sens; - - for ( int i=0; i<8; i++) - msg_fct("%02X", p->L2_id.L2_id[i]); - - msg_fct( ")\n"); - - //mod_lor_10_04_20++ - //mod_lor_10_04_22++ - for ( inst_sens=0; inst_sensL2_id),sizeof(L2_ID))==0) - break; - } - - //mod_lor_10_04_22-- - int msg_type = header->msg_type + NB_MSG_SNS_RRM ; - int r = send_msg( rrm->graph.s, msg_graph_resp(inst_sens,msg_type) ); - WARNING(r!=0); - //mod_lor_10_04_20-- - rrc_end_scan_conf( header->inst, p->L2_id, header->Trans_id ); - } - break ; - - case RRC_END_SCAN_REQ : { - rrc_end_scan_req_t *p = (rrc_end_scan_req_t *) msg ; - msg_fct( "[RRC]>[RRM]:%d:RRC_END_SCAN_REQ %d \n",header->inst, header->Trans_id); - rrm->sensing.sens_active=0;//mod_lor_10_04_21 - //mod_lor_10_04_20++ - int msg_type = header->msg_type + NB_MSG_SNS_RRM ; - int r = send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) ); - WARNING(r!=0); - //mod_lor_10_04_20-- - rrc_end_scan_req( header->inst, p->L2_id, header->Trans_id ); - } - break ; - - case RRC_INIT_MON_REQ : { - rrc_init_mon_req_t *p = (rrc_init_mon_req_t *) msg ; - msg_fct( "[RRC]>[RRM]:%d:RRC_INIT_MON_REQ %d (Node ",header->inst, header->Trans_id); - - for ( int i=0; i<8; i++) - msg_fct("%02X", p->L2_id.L2_id[i]); - - msg_fct( ")\n"); - //mod_lor_10_04_20++ - int msg_type = header->msg_type + NB_MSG_SNS_RRM ; - int r = send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) ); - WARNING(r!=0); - //mod_lor_10_04_20-- - rrc_init_mon_req( header->inst, p->L2_id, p->ch_to_scan, p->NB_chan, p->interval, header->Trans_id ); - } - break ; - - //mod_lor_10_06_04++ - case RRC_UP_FREQ_ASS : { - rrm_up_freq_ass_t *p = (rrm_up_freq_ass_t *) msg ; - msg_fct( "[RRC]>[RRM]:%d:RRC_UP_FREQ_ASS \n",header->inst); - int msg_type = header->msg_type + NB_MSG_SNS_RRM ; - unsigned int channels[2*p->NB_chan]; //!< Vector of channels - unsigned int free[2*p->NB_chan] ; //!< Vector of values - - if (p->NB_chan!=0) { - channels[0]=p->ass_channels[0].Start_f; //!ass_channels[0].Final_f; //!graph.s,msg_generic_sens_resp(header->inst,msg_type,2*p->NB_chan,2*p->NB_chan,channels,free, 0) ); - WARNING(r!=0); - - } - break; - - //mod_lor_10_06_04-- - //mod_lor_10_11_05++ - case RRC_UP_FREQ_ASS_SEC : { - rrm_up_freq_ass_sec_t *p = (rrm_up_freq_ass_sec_t *) msg ; - int i; - int msg_type = header->msg_type + NB_MSG_SNS_RRM ; - - unsigned int chann_start[NB_SENS_MAX]; - unsigned int chann_end[NB_SENS_MAX]; - unsigned int tx[NB_SENS_MAX]; - unsigned int tot_ch = 0; - - unsigned int channels[2*NB_SENS_MAX]; //!< Vector of channels - - msg_fct( "[RRC]>[RRM]:%d:RRC_UP_FREQ_ASS_SEC ch %d\n",header->inst,p->NB_all); - - for (i=0; iNB_all; i++) { - if (memcmp( &(p->L2_id[i]), &(rrm->L2_id), sizeof(L2_ID) )==0) { - printf("USER:%d:Transmission on channel %d from %d to %d\n\n",header->inst,p->ass_channels[i].Ch_id, p->ass_channels[i].Start_f, p->ass_channels[i].Final_f); - chann_start[tot_ch] = p->ass_channels[i].Start_f; - chann_end[tot_ch] = p->ass_channels[i].Final_f; - channels[tot_ch*2] = chann_start[tot_ch]; - channels[(tot_ch*2)+1] = chann_end[tot_ch]; - tx[tot_ch] = 1; - tot_ch++; - } - - if (memcmp( &(p->L2_id_dest[i]), &(rrm->L2_id), sizeof(L2_ID) )==0) { - printf("USER:%d:Ready to receive on channel %d from %d to %d\n\n",header->inst,p->ass_channels[i].Ch_id, p->ass_channels[i].Start_f, p->ass_channels[i].Final_f); - chann_start[tot_ch] = p->ass_channels[i].Start_f; - chann_end[tot_ch] = p->ass_channels[i].Final_f; - channels[tot_ch*2] = chann_start[tot_ch]; - channels[(tot_ch*2)+1] = chann_end[tot_ch]; - tx[tot_ch] = 0; - tot_ch++; - } - } - - plot_all_chann_scen_2(tx, chann_start, chann_end, tot_ch, header->inst-FIRST_SENSOR_ID+1); - - - int r = send_msg( rrm->graph.s,msg_generic_sens_resp(header->inst,msg_type,tot_ch*2,tot_ch,channels,tx, 0) ); - WARNING(r!=0); - - } - break; - //mod_lor_10_11_05-- - - default : - fprintf(stderr,"RRC:\n") ; - printHex(msg,len_msg,1) ; - } - -} - -static void processing_msg_sensing( - rrm_t *rrm , ///< Donnee relative a une instance du RRM - msg_head_t *header , ///< Entete du message - char *msg , ///< Message recu - int len_msg ///< Longueur du message -) -{ - -#ifdef TRACE - - if ( header->msg_type < NB_MSG_SENSING_RRM ) - fprintf(sensing2rrm_fd,"%lf SENSING->RRM %d %-30s %d %d\n",get_currentclock(),header->inst,Str_msg_sensing_rrm[header->msg_type],header->msg_type,header->Trans_id); - else - fprintf(sensing2rrm_fd,"%lf SENSING->RRM %-30s %d %d\n",get_currentclock(),"inconnu",header->msg_type,header->Trans_id); - - fflush(sensing2rrm_fd); -#endif - - switch ( (MSG_SENSING_RRM_T)header->msg_type ) { - - case SNS_UPDATE_SENS : { - rrc_update_sens_t *p = (rrc_update_sens_t *) msg ; - - if(rrm->sensing.sens_active == 0)//mod_lor_10_04_23 - break; - - msg_fct( "[SENSING]>[RRM]:%d:SNS_UPDATE_SENS trans %d\n",header->inst, header->Trans_id); - - //mod_lor_10_11_04++ - if (SCEN_1 && FC_ID>=0) //mod_lor_18_02_18: sensor case - plot_spectra(p->Sens_meas, p->NB_info, form, header->inst-FIRST_SENSOR_ID+1); - else if (SCEN_1) //mod_lor_18_02_18: sensor case - plot_spectra_sensor(p->Sens_meas, p->NB_info); - else if (SCEN_2_CENTR && header->instSens_meas, p->NB_info, header->inst-FIRST_SENSOR_ID+1); - else if (SCEN_2_CENTR && header->inst>=FIRST_SECOND_CLUSTER_USER_ID) //mod_lor_11_01_07 - plot_spectra_CH2(p->Sens_meas, p->NB_info, header->inst-FIRST_SECOND_CLUSTER_USER_ID+1); - - //mod_lor_10_11_04-- - - rrc_update_sens( header->inst, rrm->L2_id, p->NB_info, p->Sens_meas, p->info_time ); - //mod_lor_10_04_20++ - int msg_type = header->msg_type ; - //mod_lor_10_04_21++ mod_lor_10_06_02++ - unsigned int channels[2]; //!< Vector of channels - unsigned int free[2] ; //!< Vector of values - unsigned int Trans = rrm->ip.trans_cnt; - - channels[0]=p->Sens_meas[0].Start_f; //!Sens_meas[p->NB_info-1].Final_f; //!graph.s,msg_generic_sens_resp(header->inst,msg_type,2,1,channels,free, Trans) ); - WARNING(r!=0); - //mod_lor_10_04_21-- mod_lor_10_06_02-- - //mod_lor_10_04_20-- - - } - break ; - - //mod_lor_10_04_14++ - case SNS_END_SCAN_CONF : { - - msg_fct( "[SENSING]>[RRM]:%d:SNS_END_SCAN_CONF\n",header->inst); - //mod_lor_10_04_20++ - int msg_type = header->msg_type ; - int r = send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) ); - WARNING(r!=0); - - //mod_lor_10_04_20-- - //add_lor_11_01_10++ - if (SCEN_1 && FC_ID>=0) //mod_lor_18_02_18: sensor case - plot_spectra(NULL, 0, form, header->inst-FIRST_SENSOR_ID+1); - else if (SCEN_1) //mod_lor_18_02_18: sensor case - plot_spectra_sensor(NULL, 0); - else if (SCEN_2_CENTR && header->instinst-FIRST_SENSOR_ID+1); - else if (SCEN_2_CENTR && header->inst>=FIRST_SECOND_CLUSTER_USER_ID) //mod_lor_11_01_07 - plot_spectra_CH2(NULL, 0, header->inst-FIRST_SECOND_CLUSTER_USER_ID+1); - - //add_lor_11_01_10--*/ - sns_end_scan_conf( header->inst ); - } - break ; - - default : - fprintf(stderr,"SENSING:%d:\n",header->msg_type) ; - printHex(msg,len_msg,1) ; - }//mod_lor_10_04_14-- -} - - -/*! -******************************************************************************* -\brief traitement des messages entrant sur l'interface PUSU - -\return Aucune valeur -*/ -static void processing_msg_pusu( - rrm_t *rrm , ///< Donnee relative a une instance du RRM - msg_head_t *header , ///< Entete du message - char *msg , ///< Message recu - int len_msg ///< Longueur du message -) -{ - transact_t *pTransact ; - - pthread_mutex_lock( &( rrm->pusu.exclu ) ) ; - pTransact = get_item_transact(rrm->pusu.transaction,header->Trans_id ) ; - - if ( pTransact == NULL ) { - fprintf(stderr,"[RRM] %d PUSU Response (%d): unknown transaction\n",header->msg_type,header->Trans_id); - } else { - del_item_transact( &(rrm->pusu.transaction),header->Trans_id ) ; - } - - pthread_mutex_unlock( &( rrm->pusu.exclu ) ) ; - -#ifdef TRACE - - if ( header->msg_type < NB_MSG_RRM_PUSU ) - fprintf(pusu2rrm_fd,"%lf PUSU->RRM %d %-30s %d %d\n",get_currentclock(),header->inst,Str_msg_pusu_rrm[header->msg_type],header->msg_type,header->Trans_id); - else - fprintf(pusu2rrm_fd,"%lf PUSU->RRM %-30s %d %d\n",get_currentclock(),"inconnu",header->msg_type,header->Trans_id); - - fflush(pusu2rrm_fd); -#endif - - switch ( header->msg_type ) { - case PUSU_PUBLISH_RESP: { - msg_fct( "[PUSU]>[RRM]:%d:PUSU_PUBLISH_RESP\n",header->inst ); - } - break ; - - case PUSU_UNPUBLISH_RESP: { - msg_fct( "[PUSU]>[RRM]:%d:PUSU_UNPUBLISH_RESP\n",header->inst ); - } - break ; - - case PUSU_LINK_INFO_RESP: { - msg_fct( "[PUSU]>[RRM]:%d:PUSU_LINK_INFO_RESP\n",header->inst ); - } - break ; - - case PUSU_SENSING_INFO_RESP: { - msg_fct( "[PUSU]>[RRM]:%d:PUSU_SENSING_INFO_RESP\n",header->inst ); - } - break ; - - case PUSU_CH_LOAD_RESP: { - msg_fct( "[PUSU]>[RRM]:%d:PUSU_CH_LOAD_RESP\n",header->inst ); - } - break ; - - default : - fprintf(stderr,"PUSU:%d:\n",header->msg_type) ; - printHex(msg,len_msg,1) ; - } - -} - -//mod_lor_10_01_25++ -/*! -******************************************************************************* -\brief traitement des messages entrant via IP - -\return Auncune valeur -*/ -static void processing_msg_ip( - rrm_t *rrm , ///< Donnee relative a une instance du RRM - msg_head_t *header , ///< Entete du message - char *msg , ///< Message recu - int len_msg ///< Longueur du message -) -{ -#ifdef TRACE - - //mod_lor_10_04_27++ - /*if ( header->msg_type < NB_MSG_RRC_RRM ) - fprintf(ip2rrm_fd,"%lf IP->RRM %d %-30s %d %d\n",get_currentclock(),header->inst,Str_msg_rrc_rrm[header->msg_type], header->msg_type,header->Trans_id); - else - fprintf(ip2rrm_fd,"%lf CMM->RRM %-30s %d %d\n",get_currentclock(),"inconnu", header->msg_type,header->Trans_id); - fflush(ip2rrm_fd);*/ - if ( header->msg_type < NB_MSG_IP )//mod_lor_10_04_27 - fprintf(ip2rrm_fd,"%lf IP->RRM %d %-30s %d %d\n",get_currentclock(),header->inst,Str_msg_ip[header->msg_type], header->msg_type,header->Trans_id); - else - fprintf(ip2rrm_fd,"%lf IP->RRM %-30s %d %d\n",get_currentclock(),"inconnu", header->msg_type,header->Trans_id); - - fflush(ip2rrm_fd); - //mod_lor_10_04_27-- -#endif - - switch ( header->msg_type ) { - case UPDATE_SENS_RESULTS_3 : { - //fprintf(stderr,"1node entry @%p \n", rrm->rrc.pSensEntry);//dbg - if(rrm->sensing.sens_active == 0)//mod_lor_10_05_07 - break; - - rrm_update_sens_t *p = (rrm_update_sens_t *) msg ; - msg_fct( "[IP]>[RRM]:%d:UPDATE_SENS_RESULTS_3 from %d trans %d\n",rrm->id, header->inst, header->Trans_id); - //mod_lor_10_04_20++ - int msg_type = header->msg_type + NB_MSG_SNS_RRM + NB_MSG_RRC_RRM + NB_MSG_CMM_RRM ; //mod_lor_10_04_27 - //mod_lor_10_04_20-- - - //mod_lor_18_02_18++: plot spectra in FC when senosors on different PCs - if (SCEN_1 && FC_ID>=0 && nb_inst==1) - plot_spectra(p->Sens_meas, p->NB_info, form, header->inst-FIRST_SENSOR_ID+1); - - //mod_lor_18_02_18-- - - unsigned int channels[2]; //!< Vector of channels - unsigned int free[2] ; //!< Vector of values - unsigned int Trans = rrm->ip.trans_cnt; - - channels[0]=p->Sens_meas[0].Start_f; //!Sens_meas[p->NB_info-1].Final_f; //!id, p->L2_id, p->NB_info, p->Sens_meas, p->info_time)||SN_waiting == 1) {//mod_lor_10_06_02 - - if ((open_freq_query(rrm->id, rrm->L2_id, 0, SN_waiting)>0) && SN_waiting) { //mod_lor_10_06_02 - SN_waiting=0; //mod_lor_10_06_02 - - free[1]=1; //To transmit to the graphic interface if an update have to be sent to SN - } else if(SN_waiting) - free[1]=3; - else - free[1]=1; - } else - free[1]=0; - } else if (SCEN_2_CENTR) { //add_lor_10_11_03 - update_sens_results( rrm->id, p->L2_id, p->NB_info, p->Sens_meas, p->info_time); - } - - //mod_lor_10_04_21++ - - - /* - unsigned int channels[NB_SENS_MAX]; //!< Vector of channels - unsigned int free[NB_SENS_MAX] ; //!< Vector of values - int i; - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; - CHANNELS_DB_T *channel=rrm->rrc.pChannelsEntry; - for (i=0;channel!=NULL && ichannel.Ch_id; - if (!(rrm->ip.waiting_SN_update) && !(channel->is_free) && channel->is_ass) //mod_lor_10_05_18 - free[i] = 3; - else - free[i]=channel->is_free; - channel=channel->next; - // printf(" ->channel %d is %d\n",channels[i],free[i]);//dbg - } - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;*/ - int r = send_msg( rrm->graph.s, msg_generic_sens_resp(header->inst,msg_type,2,1,channels,free, header->Trans_id)); - WARNING(r!=0); - - //mod_lor_10_04_21-- - - } - break ; - - //mod_lor_10_05_07++ - case UP_CLUST_SENS_RESULTS : { - if(rrm->sensing.sens_active == 0)//mod_lor_10_05_07 - break; - - update_coll_sens_t *p = (update_coll_sens_t *) msg ; - msg_fct( "[IP]>[RRM]:%d:UP_CLUST_SENS_RESULTS from %d \n",rrm->id, header->inst); - - if (SCEN_2_CENTR && !COLL_CLUST) - plot_spectra_CH1(p->Sens_meas, p->NB_info, -1); - - up_coll_sens_results( rrm->id, p->L2_id, p->NB_info, p->Sens_meas, p->info_time); - //mod_lor_10_04_21++ - int msg_type = header->msg_type + NB_MSG_SNS_RRM + NB_MSG_RRC_RRM + NB_MSG_CMM_RRM ; //mod_lor_10_04_27 - unsigned int channels[2]; //!< Vector of channels - unsigned int free[2] ; //!< Vector of values - unsigned int Trans = rrm->ip.trans_cnt; - - channels[0]=p->Sens_meas[0].Start_f; //!Sens_meas[p->NB_info-1].Final_f; //!graph.s,msg_generic_sens_resp(header->inst,msg_type,2,1,channels,free, Trans) ); - WARNING(r!=0); - - //mod_lor_10_04_21--*/ - - } - break ; - - //mod_lor_10_05_07-- - case OPEN_FREQ_QUERY_4 : { - open_freq_query_t *p = (open_freq_query_t *) msg ; - msg_fct( "[IP]>[RRM]:%d:OPEN_FREQ_QUERY_4 from %d\n",rrm->id, header->inst); - //mod_lor_10_04_20++ - int msg_type = header->msg_type + NB_MSG_SNS_RRM + NB_MSG_RRC_RRM + NB_MSG_CMM_RRM ; //mod_lor_10_04_27 - int r = send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) ); - WARNING(r!=0); - //mod_lor_10_04_20-- - open_freq_query( rrm->id, p->L2_id, p->QoS, header->Trans_id ); - - } - break ; - - case ASK_FREQ_TO_CH_3 : { //add_lor_10_11_03 - ask_freq_to_CH_t *p = (ask_freq_to_CH_t *) msg ; - msg_fct( "[IP]>[RRM]:%d:ASK_FREQ_TO_CH_3 from %d\n",rrm->id, header->inst); - ///graphic interphace - int msg_type = header->msg_type + NB_MSG_SNS_RRM + NB_MSG_RRC_RRM + NB_MSG_CMM_RRM ; - unsigned int stop=0,dest_id,i; - - for (i=0; iL2_id_dest))==0) { - stop=1; - dest_id = i; - } - } - - printf("dest id %d\n",dest_id); - int r = send_msg( rrm->graph.s, msg_generic_sens_resp(header->inst,msg_type,1,0,&dest_id,NULL, header->Trans_id)); - WARNING(r!=0); - printf ("N5a tot waiting: %d\n",rrm->ip.users_waiting_update);//dbg - - if (ask_freq_to_CH( rrm->id, &(p->L2_id), &(p->L2_id_dest), 1, header->Trans_id )!=0) { - int r = send_msg( rrm->graph.s, msg_generic_sens_resp(header->inst,msg_type,0,1,NULL,&dest_id, header->Trans_id)); - WARNING(r!=0); - printf ("Not available channels... Waiting for a channel...\n"); - pthread_mutex_lock( &( rrm->ip.exclu ) ) ; - printf ("N5b tot waiting: %d\n",rrm->ip.users_waiting_update);//dbg - memcpy(rrm->ip.L2_id_wait_users[rrm->ip.users_waiting_update][0].L2_id,p->L2_id.L2_id, sizeof(L2_ID)); - memcpy(rrm->ip.L2_id_wait_users[rrm->ip.users_waiting_update][1].L2_id,p->L2_id_dest.L2_id, sizeof(L2_ID)); - - rrm->ip.users_waiting_update++; - printf ("N5c tot waiting: %d\n",rrm->ip.users_waiting_update);//dbg - pthread_mutex_unlock( &( rrm->ip.exclu ) ) ; - } - } - break ; - - case UPDATE_OPEN_FREQ_7 : { - update_open_freq_t *p = (update_open_freq_t *) msg ; - msg_fct( "[IP]>[RRM]:%d:UPDATE_OPEN_FREQ_7 from %d\n",rrm->id, header->inst); - //mod_lor_10_04_20++ - int msg_type = header->msg_type + NB_MSG_SNS_RRM + NB_MSG_RRC_RRM + NB_MSG_CMM_RRM ; //mod_lor_10_04_27 - //mod_lor_10_05_18++: occ_channels passed as parameter to update open freq. - //channels vector incremented by one to have place to save the lenght of the vector - unsigned int channels[3*p->NB_chan+1]; //!< Vector of channels - unsigned int occ_channels[NB_SENS_MAX] ; //!< Vector of values - unsigned int occ_ch_NB; //!< Number of occupied channels - int i, j=0; - - //mod_lor_10_06_02++ - for (i=0; iNB_chan; i++) { - channels[i*3]=p->channels[i].channel.Ch_id; - channels[(i*3)+1]=p->channels[i].channel.Start_f; - channels[(i*3)+2]=p->channels[i].channel.Final_f; - } - - msg_fct( "free channels:\n");//dbg - - for (int i=0; i<3*p->NB_chan; i++)//dbg - msg_fct( " %d ", channels[i]);//dbg - - msg_fct( "\n");//dbg - occ_ch_NB = update_open_freq( rrm->id, p->L2_id, p->NB_chan, occ_channels, p->channels, header->Trans_id ); //mod_lor_10_05_18 - //mod_lor_10_05_18-- - printf("%d %d\n",p->NB_chan,occ_ch_NB);//dbg - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - int r = send_msg( rrm->graph.s,msg_generic_sens_resp(header->inst,msg_type,(3*p->NB_chan),occ_ch_NB,channels,occ_channels, header->Trans_id)); //mod_lor_10_05_17 - WARNING(r!=0); - //mod_lor_10_04_20-- - plot_SN_channels(rrm->rrc.pChannelsEntry,occ_ch_NB,occ_channels,rrm->id);//mod_lor_10_06_01 - - } - break ; - - case UPDATE_SN_OCC_FREQ_5 : { - sleep (2); //mod_lor_10_06_02 - update_SN_occ_freq_t *p = (update_SN_occ_freq_t *) msg ; - - msg_fct( "[IP]>[RRM]:%d:UPDATE_SN_OCC_FREQ_5 from %d\n",rrm->id, header->inst); - - if (p->NB_chanmsg_type + NB_MSG_SNS_RRM + NB_MSG_RRC_RRM + NB_MSG_CMM_RRM ; //mod_lor_10_04_27 - //int r = send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) ); - plot_SN_channels(rrm->rrc.pChannelsEntry, p->NB_chan, p->occ_channels, rrm->id);//mod_lor_10_06_01 - //mod_lor_10_04_20-- - //mod_lor_10_05_18++ - unsigned int alarm[2]; - //mod_lor_10_06_02++ - unsigned int used_channels[2*p->NB_chan+1]; - CHANNELS_DB_T *curr_chan; - - for (int i=0; iNB_chan; i++) { - curr_chan = get_chann_db_info( rrm->rrc.pChannelsEntry ,p->occ_channels[i] ); - used_channels[2*i]=curr_chan->channel.Start_f; - used_channels[(2*i)+1]=curr_chan->channel.Final_f; - - } - - msg_fct( "Channels used by SN:\n");//dbg - - for (int i=0; i<2*p->NB_chan; i++)//dbg - msg_fct( " %d ", used_channels[i]);//dbg - - msg_fct( "\n");//dbg - - if (update_SN_occ_freq( rrm->id, p->L2_id, p->NB_chan, p->occ_channels, header->Trans_id )) { - alarm[0]=1; - int r = send_msg( rrm->graph.s,msg_generic_sens_resp(header->inst,msg_type,(2*p->NB_chan),2,used_channels,alarm, header->Trans_id)); //mod_lor_10_05_17 - WARNING(r!=0); - open_freq_query( rrm->id, p->L2_id, 0, header->Trans_id );//mod_lor_10_05_17 - } else { - alarm[0]=0; - int r = send_msg( rrm->graph.s,msg_generic_sens_resp(header->inst,msg_type,(2*p->NB_chan),2,used_channels,alarm, header->Trans_id)); //mod_lor_10_05_17 - WARNING(r!=0); - }//mod_lor_10_05_18--//mod_lor_10_06_02-- - } - break ; - - //mod_lor_10_05_05++ - case INIT_COLL_SENS_REQ : { - init_coll_sens_req_t *p = (init_coll_sens_req_t *) msg ; - msg_fct( "[IP]>[RRM]:%d:INIT_COLL_SENS_REQ from %d\n",rrm->id, header->inst); - rrm->sensing.sens_active=1;//mod_lor_10_05_07 - //mod_lor_10_05_10++ - int msg_type = header->msg_type + NB_MSG_SNS_RRM + NB_MSG_RRC_RRM + NB_MSG_CMM_RRM ; //mod_lor_10_04_27 - int r = send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) ); - WARNING(r!=0); - //mod_lor_10_05_10-- - memcpy( rrm->L2_id_FC.L2_id, p->L2_id.L2_id, sizeof(L2_ID) ); - cmm_init_sensing(rrm->id,p->Start_fr ,p->Stop_fr,p->Meas_band,p->Meas_tpf, - p->Nb_channels, p->Overlap,p->Sampl_freq); - - } - break ; - - //mod_lor_10_05_05-- - //mod_lor_10_05_06++ - case STOP_COLL_SENS : { - //init_coll_sens_req_t *p = (init_coll_sens_req_t *) msg ; - msg_fct( "[IP]>[RRM]:%d:STOP_COLL_SENS from %d\n",rrm->id, header->inst); - //mod_lor_10_05_10++ - int msg_type = header->msg_type + NB_MSG_SNS_RRM + NB_MSG_RRC_RRM + NB_MSG_CMM_RRM ; //mod_lor_10_04_27 - int r = send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) ); - WARNING(r!=0); - //mod_lor_10_05_10-- - //memcpy( rrm->L2_id_FC.L2_id, p->L2_id.L2_id, sizeof(L2_ID) ); - rrm->sensing.sens_active=0;//mod_lor_10_05_07 - cmm_stop_sensing(rrm->id); - - } - break ; - - //mod_lor_10_05_06-- - //mod_lor_10_05_12++ - case STOP_COLL_SENS_CONF : { - stop_coll_sens_conf_t *p = (stop_coll_sens_conf_t *) msg ; - msg_fct( "[IP]>[RRM]:%d:STOP_COLL_SENS_CONF from %d\n",rrm->id, header->inst); - //mod_lor_10_05_10++ - int msg_type = header->msg_type + NB_MSG_SNS_RRM + NB_MSG_RRC_RRM + NB_MSG_CMM_RRM ; //mod_lor_10_04_27 - int r = send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) ); - WARNING(r!=0); - //mod_lor_10_05_10-- - //memcpy( rrm->L2_id_FC.L2_id, p->L2_id.L2_id, sizeof(L2_ID) ); - rrc_end_scan_conf( rrm->id, p->L2_id, header->Trans_id ); - - if (SCEN_2_CENTR ) //add_lor_11_01_10 - plot_spectra_CH1(NULL, 0, -1);//add_lor_11_01_10 - - } - break ; - - case USER_DISCONNECT_9 : { //add_lor_10_11_09 - user_disconnect_t *p = (user_disconnect_t *) msg ; - msg_fct( "[IP]>[RRM]:%d:USER_DISCONNECT from %d\n",rrm->id, header->inst); - int msg_type = header->msg_type + NB_MSG_SNS_RRM + NB_MSG_RRC_RRM + NB_MSG_CMM_RRM ; //mod_lor_10_04_27 - int r = send_msg( rrm->graph.s, msg_graph_resp(header->inst,msg_type) ); - WARNING(r!=0); - disconnect_user( rrm->id, p->L2_id ); - - } - break ; - - case CLOSE_LINK : { //add_lor_10_11_09 - close_link_t *p = (close_link_t *) msg ; - int msg_type = header->msg_type + NB_MSG_SNS_RRM + NB_MSG_RRC_RRM + NB_MSG_CMM_RRM ; //mod_lor_10_04_27 - msg_fct( "[IP]>[RRM]:%d:CLOSE_LINK from %d\n",rrm->id, header->inst); - unsigned int stop1=0, stop2=0,dest_id,source_id,i; - - for (i=0; iL2_id))==0) { - stop1=1; - source_id = i; - } - - if(L2_ID_cmp(&(rrm_inst[i].L2_id), &(p->L2_id_dest))==0) { - stop2=1; - dest_id = i; - } - } - - printf ("source %d dest %d st1 %d st2 %d\n",source_id, dest_id, stop1, stop2); //dbg - - int r = send_msg( rrm->graph.s, msg_generic_sens_resp(header->inst,msg_type,1,1,&source_id,&dest_id, header->Trans_id)); - WARNING(r!=0); - close_active_link( rrm->id, p->L2_id, p->L2_id_dest ); - - } - break ; - break ; - //mod_lor_10_05_12-- - - default : - fprintf(stderr,"IP:\n") ; - printHex(msg,len_msg,1) ; - } -} -//mod_lor_10_01_25-- - -/*! -******************************************************************************* -\brief thread de traitement des messages sortants sur les sockets - (rrc ou cmm). -\return none -*/ -static void rrm_scheduler ( ) -{ - int ii ; - int no_msg ; - fprintf(stderr,"RRM Scheduler: starting ... \n"); - fflush(stderr); - file_msg_t *pItem ; - //mod_lor_10_04_22++ - unsigned int priority = 0; ///< to guarantee priority to one rrm (fusion center) during sensing period - unsigned int pr_ii = 0; ///< id of the rrm with priority - rrm_t *rrm ; - - //mod_lor_10_04_22-- - while ( flag_not_exit) { - no_msg = 0 ; - - for ( ii = 0 ; ii 0 && rrm->sensing.sens_active) - priority = 1; - } - - //mod_lor_10_04_22-- - pItem=NULL; - - pItem = get_msg( &(rrm->file_recv_msg)) ; - - if ( pItem == NULL ) - no_msg++; - else { - msg_head_t *header = (msg_head_t *) pItem->msg; - char *msg = NULL ; - - if ( header != NULL ) { - if ( header->size > 0 ) { - msg = (char *) (header +1) ; - } - - //mod_lor_10_01_25 - if (pItem->s_type==0) { - if ( pItem->s->s == rrm->cmm.s->s ) - processing_msg_cmm( rrm , header , msg , header->size ) ; - else if ( pItem->s->s == rrm->rrc.s->s ) { - processing_msg_rrc( rrm , header , msg , header->size ) ; - } else if ( pItem->s->s == rrm->sensing.s->s) { - processing_msg_sensing( rrm , header , msg , header->size ) ; - //fprintf(stderr,"RRM Scheduler: sensing message ... \n"); //dbg - } else - processing_msg_pusu( rrm , header , msg , header->size ) ; - } else { - //fprintf(stderr,"RRM Scheduler: ip message ... \n"); //dbg - processing_msg_ip( rrm , header , msg , header->size ) ; - - } - - RRM_FREE( pItem->msg) ; - } - - RRM_FREE( pItem ) ; - } - } - - if ( no_msg == nb_inst ) - usleep(1000); - } - - fprintf(stderr,"... stopped RRM Scheduler\n"); - fflush(stderr); -} -/*! -******************************************************************************* -\brief This function reads the configuration node file -*/ -static void get_config_file(char *filename ) -{ - FILE *fd = fopen( filename , "r" ); - char buf_line[128] ; - int adresse[LENGTH_L2_ID] ; - int ii = 0 ; - - - if ( fd == NULL ) - return ; - - while ( 1 ) { - fgets( buf_line, 127, fd ) ; - - if (feof(fd)) - break ; - - if ( buf_line[0] == '#' ) - continue ; - - if ( buf_line[0] == ' ' ) - continue ; - - if ( buf_line[0] == '\t' ) - continue ; - - if ( buf_line[0] == '\n' ) - continue ; - - sscanf( buf_line, "%x %x %x %x %x %x %x %x", - &adresse[0],&adresse[1],&adresse[2],&adresse[3], - &adresse[4],&adresse[5],&adresse[6],&adresse[7]); - - rrm_inst[ii].id = ii ; - rrm_inst[ii].L2_id.L2_id[0] = adresse[0] & 0xFF ; - rrm_inst[ii].L2_id.L2_id[1] = adresse[1] & 0xFF; - rrm_inst[ii].L2_id.L2_id[2] = adresse[2] & 0xFF; - rrm_inst[ii].L2_id.L2_id[3] = adresse[3] & 0xFF; - rrm_inst[ii].L2_id.L2_id[4] = adresse[4] & 0xFF; - rrm_inst[ii].L2_id.L2_id[5] = adresse[5] & 0xFF; - rrm_inst[ii].L2_id.L2_id[6] = adresse[6] & 0xFF; - rrm_inst[ii].L2_id.L2_id[7] = adresse[7] & 0xFF; - - print_L2_id( &rrm_inst[ii].L2_id ) ; - fprintf(stderr," (%d) %d \n", ii, buf_line[0] ); - - ii++ ; - - adresse[0]=adresse[1]=adresse[2]=adresse[3]=adresse[4]=adresse[5]=adresse[6]=adresse[7]=0; - buf_line[0] = 0; - } - - nb_inst = ii ; - - fclose(fd) ; -} -/*! -******************************************************************************* -\brief This function displays the help message (syntax) -*/ -static void help() -{ - fprintf(stderr,"syntax: rrm -i \n" ); - fprintf(stderr," rrm -f \n" ); -} - -/*! -******************************************************************************* -\brief programme principale du RRM -*/ -int main( int argc , char **argv ) -{ - fprintf(stderr,"\n\nVersion of RRM with graphic interface\n\n\n\n" );//mod_lor_10_04_20 - - int ii; - int c = 0; - int ret = 0; - int flag_cfg = 0 ; - struct data_thread DataRrc; - struct data_thread DataCmm; - struct data_thread DataPusu; - struct data_thread DataSensing; - struct data_thread DataGraph; - sock_rrm_t s_gr[MAX_RRM] ; - - sock_rrm_int_t DataIpS[MAX_RRM]; //mod_lor_10_01_25 - pthread_attr_t attr ; - - /* Vérification des arguments */ - while ((c = getopt(argc,argv,"i:f:h")) != -1) - switch (c) { - case 'i': - nb_inst=atoi(optarg); - break; - - case 'f': - get_config_file(optarg); - flag_cfg = 1 ; - break; - - case 'h': - help(); - exit(0); - break; - - default: - help(); - exit(0); - } - - if (nb_inst <= 0 ) { - fprintf(stderr,"[RRM] Provide a node id\n"); - exit(-1); - } - - if (nb_inst >= MAX_RRM) { - fprintf(stderr,"[RRM] the instance number (%d) is upper than MAX_RRM (%d)\n", nb_inst, MAX_RRM); - exit(-1); - } - -#ifdef RRC_KERNEL_MODE - msg("RRM INIT :open fifos\n"); - - while (( Rrm_fifos.rrc_2_rrm_fifo= open ("/dev/rtf14", O_RDONLY )) < 0) { - printf("[RRM][INIT] open fifo /dev/rtf14 returned %d\n", Rrm_fifos.rrc_2_rrm_fifo); - usleep(100); - } - - printf ("[RRM][INIT] open fifo /dev/rtf14 returned %d\n", Rrm_fifos.rrc_2_rrm_fifo); - - while (( Rrm_fifos.rrm_2_rrc_fifo= open ("/dev/rtf15", O_WRONLY |O_NONBLOCK | O_NDELAY)) < 0) { - //| O_BLOCK - printf("[RRM][INIT] open fifo /dev/rtf15 returned %d\n", Rrm_fifos.rrm_2_rrc_fifo); - usleep(100); - } - - printf("[RRM][INIT] open fifo /dev/rtf15 returned %d\n", Rrm_fifos.rrm_2_rrc_fifo); -#endif /* RRC_KERNEL_MODE */ - - /* ***** MUTEX ***** */ - // initialise les attributs des threads - pthread_attr_init( &attr ) ; - pthread_attr_setschedpolicy( &attr, SCHED_RR ) ; - - DataRrc.name = "RRC" ; - DataRrc.sock_path_local = RRM_RRC_SOCK_PATH ; - DataRrc.sock_path_dest = RRC_RRM_SOCK_PATH ; - DataRrc.s.s = -1 ; - - DataCmm.name = "CMM" ; - DataCmm.sock_path_local = RRM_CMM_SOCK_PATH ; - DataCmm.sock_path_dest = CMM_RRM_SOCK_PATH ; - DataCmm.s.s = -1 ; - - DataPusu.name = "PUSU" ; - DataPusu.sock_path_local= RRM_PUSU_SOCK_PATH ; - DataPusu.sock_path_dest = PUSU_RRM_SOCK_PATH ; - DataPusu.s.s = -1 ; - - DataSensing.name = "SENSING" ; - DataSensing.sock_path_local= RRM_SENSING_SOCK_PATH ; - DataSensing.sock_path_dest = SENSING_RRM_SOCK_PATH ; - DataSensing.s.s = -1 ; - - //mod_lor_10_04_20++ - DataGraph.name = "Graph" ; - DataGraph.sock_path_local= "/tmp/rrm_socket" ; - DataGraph.sock_path_dest = "/tmp/rrm_socket" ; - DataGraph.s.s = -1 ; - //mod_lor_10_04_20-- - -#ifdef TRACE - cmm2rrm_fd = fopen( "VCD/cmm2rrm.txt" , "w") ; - PNULL(cmm2rrm_fd) ; - - rrc2rrm_fd = fopen( "VCD/rrc2rrm.txt", "w") ; - PNULL(rrc2rrm_fd) ; - - pusu2rrm_fd = fopen( "VCD/pusu2rrm.txt", "w") ; - PNULL(pusu2rrm_fd) ; - - ip2rrm_fd = fopen( "VCD/ip2rrm.txt", "w") ; - PNULL(ip2rrm_fd) ; - - sensing2rrm_fd = fopen( "VCD/sensing2rrm.txt", "w") ; - PNULL(sensing2rrm_fd) ; - -#endif - output_2 = fopen( "VCD/output_2.txt", "w") ; //mod_lor_10_04_20 - PNULL(output_2) ; //mod_lor_10_04_20 - - for ( ii = 0 ; ii < nb_inst ; ii++ ) { - DataIpS[ii].s = -1 ; //mod_lor_10_01_25 - - if ( !flag_cfg ) { - rrm_inst[ii].id = ii ; - rrm_inst[ii].L2_id.L2_id[0] = ii; - rrm_inst[ii].L2_id.L2_id[1] = 0x00; - rrm_inst[ii].L2_id.L2_id[2] = 0x00; - rrm_inst[ii].L2_id.L2_id[3] = 0xDE; - rrm_inst[ii].L2_id.L2_id[4] = 0xAD; - rrm_inst[ii].L2_id.L2_id[5] = 0xBE; - rrm_inst[ii].L2_id.L2_id[6] = 0xAF; - rrm_inst[ii].L2_id.L2_id[7] = 0x00; - } - - pthread_mutex_init( &( rrm_inst[ii].rrc.exclu ), NULL ) ; - pthread_mutex_init( &( rrm_inst[ii].cmm.exclu ), NULL ) ; - pthread_mutex_init( &( rrm_inst[ii].pusu.exclu ), NULL ) ; - pthread_mutex_init( &( rrm_inst[ii].sensing.exclu ), NULL ) ; - pthread_mutex_init( &( rrm_inst[ii].ip.exclu ), NULL ) ; //mod_lor_10_01_25 - - init_file_msg( &(rrm_inst[ii].file_recv_msg), 1 ) ; - init_file_msg( &(rrm_inst[ii].file_send_cmm_msg), 2 ) ; - init_file_msg( &(rrm_inst[ii].file_send_rrc_msg), 3 ) ; - init_file_msg( &(rrm_inst[ii].file_send_ip_msg), 4 ) ; //mod_lor_10_01_25 - init_file_msg( &(rrm_inst[ii].file_send_sensing_msg), 5 ) ; - - - rrm_inst[ii].state = ISOLATEDNODE ; - rrm_inst[ii].role = NOROLE ; - rrm_inst[ii].cmm.trans_cnt = 1024; - rrm_inst[ii].rrc.trans_cnt = 2048; - rrm_inst[ii].pusu.trans_cnt = 3072; - rrm_inst[ii].ip.trans_cnt = 4096; //mod_lor_10_01_25 - rrm_inst[ii].sensing.trans_cnt = 5120; //mod_lor_10_01_25 - - - - rrm_inst[ii].rrc.s = &DataRrc.s; - rrm_inst[ii].cmm.s = &DataCmm.s; - rrm_inst[ii].pusu.s = &DataPusu.s; - rrm_inst[ii].sensing.s = &DataSensing.s; - rrm_inst[ii].ip.s = &DataIpS[ii]; //mod_lor_10_01_25 - rrm_inst[ii].graph.s = &s_gr[ii]; //mod_lor_10_04_20 - - //mod_lor_10_04_20++ - int sock = open_socket( rrm_inst[ii].graph.s ,"/tmp/rrm_socket", "/tmp/rrm_socket", ii ) ; - - if ( sock != -1 ) { - fprintf(stderr," RRM %d graphic interface -> socket = %d\n",ii , sock ); - fflush(stderr); - } - - //mod_lor_10_04_20-- - - - - rrm_inst[ii].rrc.transaction = NULL ; - rrm_inst[ii].cmm.transaction = NULL ; - rrm_inst[ii].pusu.transaction = NULL ; - rrm_inst[ii].sensing.transaction= NULL ; - - rrm_inst[ii].sensing.sens_active= 0 ; //mod_lor_10_04_21 - rrm_inst[ii].ip.users_waiting_update=0; //add_lor_10_11_08 - rrm_inst[ii].rrc.pNeighborEntry = NULL ; - rrm_inst[ii].rrc.pRbEntry = NULL ; - rrm_inst[ii].rrc.pSensEntry = NULL ; - rrm_inst[ii].rrc.pChannelsEntry = NULL ; - - } - - - //open_socket( &DataRrc.s, DataRrc.sock_path_local, DataRrc.sock_path_dest ,0 ); - - /* Creation du thread de reception des messages RRC*/ - fprintf(stderr,"Creation du thread RRC : %d\n", nb_inst); -#ifdef RRC_KERNEL_MODE - ret = pthread_create ( &pthread_recv_rrc_msg_hnd, NULL, thread_recv_msg_fifo , &DataRrc ); - - if (ret) { - fprintf (stderr, "%s", strerror (ret)); - exit(-1) ; - } - -#else - ret = pthread_create ( &pthread_recv_rrc_msg_hnd, NULL, thread_recv_msg , &DataRrc ); - - if (ret) { - fprintf (stderr, "%s", strerror (ret)); - exit(-1) ; - } - -#endif - /* Creation du thread de reception des messages CMM */ - ret = pthread_create (&pthread_recv_cmm_msg_hnd , NULL, thread_recv_msg, &DataCmm ); - - if (ret) { - fprintf (stderr, "%s", strerror (ret)); - exit(-1) ; - } - - /* Creation du thread CMM d'envoi des messages */ - ret = pthread_create (&pthread_send_cmm_msg_hnd, NULL, thread_send_msg_cmm, NULL ); - - if (ret) { - fprintf (stderr, "%s", strerror (ret)); - exit(-1) ; - } - - /* Creation du thread de reception des messages PUSU */ - ret = pthread_create (&pthread_recv_pusu_msg_hnd , NULL, thread_recv_msg, &DataPusu ); - - if (ret) { - fprintf (stderr, "%s", strerror (ret)); - exit(-1) ; - } - - /* Creation du thread de reception des messages SENSING */ - ret = pthread_create (&pthread_recv_sensing_msg_hnd , NULL, thread_recv_msg, &DataSensing ); - - if (ret) { - fprintf (stderr, "%s", strerror (ret)); - exit(-1) ; - } - - /* Creation du thread SENSING d'envoi des messages */ - ret = pthread_create (&pthread_send_sensing_msg_hnd, NULL, thread_send_msg_sensing, NULL ); - - if (ret) { - fprintf (stderr, "%s", strerror (ret)); - exit(-1) ; - } - - /* Creation du thread RRC d'envoi des messages */ - ret = pthread_create (&pthread_send_rrc_msg_hnd, NULL, thread_send_msg_rrc, NULL ); - - if (ret) { - fprintf (stderr, "%s", strerror (ret)); - exit(-1) ; - } - - //mod_lor_10_01_25++ - /* Creation du thread IP d'envoi des messages */ - ret = pthread_create (&pthread_send_ip_msg_hnd, NULL, thread_send_msg_ip, NULL ); - - if (ret) { - fprintf (stderr, "%s", strerror (ret)); - exit(-1) ; - } - - //mod_lor_10_01_25--*/ - /* Creation du thread TTL */ - ret = pthread_create (&pthread_ttl_hnd , NULL, thread_processing_ttl, NULL); - - if (ret) { - fprintf (stderr, "%s", strerror (ret)); - exit(-1) ; - } - - //mod_eure_lor++ - if (SCEN_1) { //mod_lor_11_02_15++ : reorganization - if (FC_ID>=0 && BTS_ID>=0) - fl_initialize(&argc, argv, "Fusion Center & Secondary Network", 0, 0); - else if(FC_ID>=0) - fl_initialize(&argc, argv, "Fusion Center Spectral Measurements", 0, 0); - else if(BTS_ID>=0) - fl_initialize(&argc, argv, "Secondary Network Frequencies", 0, 0); - - if (FC_ID>=0 ) { - form = create_form_sensing_form(); - fl_show_form(form->sensing_form,FL_PLACE_HOTSPOT,FL_FULLBORDER,"Spectral Measurements"); - fl_check_forms(); - } - - //mod_lor_11_02_18++ - if (FC_ID<0 && BTS_ID<0) { - fl_initialize(&argc, argv, "Sensor", 0, 0); - Sens_sensor_form = create_form_sens_sensor(); - fl_show_form( Sens_sensor_form->sens_sensor,FL_PLACE_HOTSPOT,FL_FULLBORDER,"Sensor"); - fl_check_forms(); - } - - //mod_lor_11_02_18-- - - //mod_eure_lor-- - //mod_lor_10_06_01++ - if (BTS_ID>=0) { - SN_form = create_form_Secondary_Network_frequencies(); - fl_show_form(SN_form->Secondary_Network_frequencies,FL_PLACE_HOTSPOT,FL_FULLBORDER,"Secondary Network Frequencies"); - fl_check_forms(); - } - - //mod_lor_10_06_01-- - } - - //mod_lor_10_11_04++ - if (SCEN_2_CENTR) { - if (COLL_CLUST>=0 && FC_ID>=0) { - fl_initialize(&argc, argv, "Two Clusters", 0, 0); - Sens_form_CH2 = create_form_sens_scen_2(); - fl_show_form(Sens_form_CH2->sens_scen_2,FL_PLACE_HOTSPOT,FL_FULLBORDER,"Cluster 2: Sensing"); - fl_check_forms(); - - Sens_form_CH1 = create_form_sens_CH1_scen_2(); - fl_show_form(Sens_form_CH1->sens_CH1_scen_2,FL_PLACE_HOTSPOT,FL_FULLBORDER,"Cluster 1: Sensing"); //Cluster 1: mod_lor_10_12_07 - fl_check_forms(); - - Chann_form = create_form_all_freq_to_users(); - fl_show_form(Chann_form->all_freq_to_users,FL_PLACE_HOTSPOT,FL_FULLBORDER,"Cluster 1: Used channels"); - fl_check_forms(); - } else if (COLL_CLUST>=0) { //mod_lor_11_02_14 : splitting in two clusters - fl_initialize(&argc, argv, "Cluster 2", 0, 0); - Sens_form_CH2 = create_form_sens_scen_2(); - fl_show_form(Sens_form_CH2->sens_scen_2,FL_PLACE_HOTSPOT,FL_FULLBORDER,"Cluster 2: Sensing"); - fl_check_forms(); - } //mod_lor_11_02_14 - else { - fl_initialize(&argc, argv, "Cluster 1", 0, 0); - Sens_form_CH1 = create_form_sens_CH1_scen_2(); - fl_show_form(Sens_form_CH1->sens_CH1_scen_2,FL_PLACE_HOTSPOT,FL_FULLBORDER,"Cluster 1: Sensing"); //Cluster 1: mod_lor_10_12_07 - fl_check_forms(); - - Chann_form = create_form_all_freq_to_users(); - fl_show_form(Chann_form->all_freq_to_users,FL_PLACE_HOTSPOT,FL_FULLBORDER,"Cluster 1: Used channels"); - fl_check_forms(); - } - }//mod_lor_11_02_15-- - - //mod_lor_10_11_04-- - - /* main loop */ - rrm_scheduler( ) ; - - /* Attente de la fin des threads. */ - pthread_join (pthread_recv_cmm_msg_hnd, NULL); - pthread_join (pthread_recv_rrc_msg_hnd, NULL); - pthread_join (pthread_recv_pusu_msg_hnd, NULL); - pthread_join (pthread_recv_sensing_msg_hnd, NULL); - pthread_join (pthread_send_cmm_msg_hnd, NULL); - pthread_join (pthread_send_rrc_msg_hnd, NULL); - pthread_join (pthread_send_sensing_msg_hnd, NULL); - pthread_join (pthread_send_ip_msg_hnd, NULL); - pthread_join (pthread_ttl_hnd, NULL); - - -#ifdef TRACE - fclose(cmm2rrm_fd ) ; - fclose(rrc2rrm_fd ) ; - fclose(pusu2rrm_fd ) ; - fclose(sensing2rrm_fd ) ; - -#endif - fclose(output_2 ) ; //mod_lor_10_04_20 - - return 0 ; -} - diff --git a/openair3/MESH/RRM/rrm_sock.c b/openair3/MESH/RRM/rrm_sock.c deleted file mode 100644 index aa57766b7e..0000000000 --- a/openair3/MESH/RRM/rrm_sock.c +++ /dev/null @@ -1,436 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/*! -******************************************************************************* - -\file rrm_sock.c - -\brief RRM (Radio Ressource Manager ) Socket - - Ceux sont les fonctions relatives à la communication avec les - autres entites: - - RRC , - - CMM , - - PUSU - -\author BURLOT Pascal - -\date 10/07/08 - - -\par Historique: - $Author$ $Date$ $Revision$ - $Id$ - $Log$ - -******************************************************************************* -*/ -#include -#include -#include -#include -#include - - -#include "debug.h" -#include "L3_rrc_defs.h" -#include "rrm_util.h" -#include "rrm_sock.h" - -//! \brief Taille maximale de la charge utile -#define SIZE_MAX_PAYLOAD 16384 //mod_lor_10_05_24 - - - - -#include -#include //mod_lor_10_01_25 -#include //mod_lor_10_01_25 -#include - - - -/*! -******************************************************************************* -\brief This function opens a unix socket for the rrm communication - ( no-connected mode / UDP DATAGRAM ) -\return The return value is a socket handle -*/ -int open_socket( - sock_rrm_t *s , ///< socket descriptor - char *path_local, ///< local socket path if unix socket - char *path_dest , ///< host Socket path if unix socket - int rrm_inst ///< instance of the rrm entity -) -{ - /* Unix socket */ - int socket_fd ; - int len ; - - if ((socket_fd = socket(AF_UNIX, SOCK_DGRAM, 0)) == -1) { - perror("unix socket"); - return -1 ; - } - - memset(&(s->un_local_addr), 0, sizeof(struct sockaddr_un)); - s->un_local_addr.sun_family = AF_UNIX; - sprintf(s->un_local_addr.sun_path,"%s%d", path_local, rrm_inst ); - unlink(s->un_local_addr.sun_path); - - len = strlen((s->un_local_addr).sun_path) + sizeof((s->un_local_addr).sun_family); - - if (bind(socket_fd, (struct sockaddr *)&(s->un_local_addr), len) == -1) { - perror("bind"); - return -1 ; - } - - memset(&(s->un_dest_addr), 0, sizeof(struct sockaddr_un)); - s->un_dest_addr.sun_family = AF_UNIX; - sprintf(s->un_dest_addr.sun_path,"%s%d", path_dest, rrm_inst ); - - s->s = socket_fd ; - return socket_fd ; -} - -/*! -******************************************************************************* -\brief This function closes a RRM socket -\return none -*/ -void close_socket( - sock_rrm_t *sock ///< the socket handle -) -{ - shutdown(sock->s, SHUT_RDWR); - close(sock->s); -} - -/*! -******************************************************************************* -\brief This function send a buffer message to the unix socket -\return if OK then "0" is returned else "-1" -*/ -int send_msg( - sock_rrm_t *s ,///< socket descriptor - msg_t *msg ///< the message to send -) -{ - /* Unix socket */ - int ret = 0 ; - char *buf = NULL; - struct msghdr msghd ; - struct iovec iov; - int taille = sizeof(msg_head_t) ; - - if ( msg == NULL ) - return -1 ; - - if ( msg->data != NULL ) - taille += msg->head.size ; - - buf = RRM_MALLOC(char, taille); - - if (buf ==NULL) - ret = -1 ; - else { - memcpy( buf , &(msg->head) , sizeof(msg_head_t) ) ; - memcpy( buf+sizeof(msg_head_t), msg->data, msg->head.size ) ; - - iov.iov_base = (void *)buf; - iov.iov_len = taille ; - - msghd.msg_name = (void *)&(s->un_dest_addr); - msghd.msg_namelen = sizeof(s->un_dest_addr); - msghd.msg_iov = &iov; - msghd.msg_iovlen = 1; - msghd.msg_control = NULL ; - msghd.msg_controllen = 0 ; - - if ( sendmsg(s->s, &msghd, 0) < 0 ) { - ret = -1; - perror("sendmsg:unix socket unix"); - } - } - - RRM_FREE(buf) ; - RRM_FREE(msg->data) ; - RRM_FREE(msg) ; - - return ret ; -} - -/*! -******************************************************************************* -\brief This function read a buffer from a unix socket -\return the function returns a message pointer. If the pointeur is NULL, a error - is happened. -*/ -char *recv_msg( - sock_rrm_t *s ///< socket descriptor -) -{ - /* Unix socket */ - char *buf = NULL; - char *msg = NULL; - struct msghdr msghd ; - struct iovec iov; - int size_msg ; - msg_head_t *head ; - int ret ; - - int taille = SIZE_MAX_PAYLOAD ; - - buf = RRM_CALLOC( char,taille); - - if ( buf == NULL ) { - fprintf(stderr,"error recvmsg_un: 0x%02x\n", msghd.msg_flags) ; - return NULL ; - } - - iov.iov_base = (void *)buf; - iov.iov_len = taille ; - msghd.msg_name = (void *)&(s->un_dest_addr); - msghd.msg_namelen = sizeof(s->un_dest_addr); - msghd.msg_iov = &iov; - msghd.msg_iovlen = 1; - msghd.msg_control = NULL ; - msghd.msg_controllen= 0 ; - - ret = recvmsg(s->s, &msghd , 0 ) ; - - if ( ret <= 0 ) { - perror("PB recvmsg_un"); - RRM_FREE(buf); - return NULL ; - } - - if (msghd.msg_flags != 0 ) { - fprintf(stderr,"error recvmsg_un: 0x%02x\n", msghd.msg_flags) ; - RRM_FREE(buf); - return NULL ; - } - - head = (msg_head_t *) buf ; - size_msg = sizeof(msg_head_t) + head->size ; - - msg = RRM_CALLOC(char , size_msg ) ; - - if ( msg != NULL ) - memcpy( msg , buf , size_msg ) ; - - RRM_FREE( buf ) ; - - return msg ; -} - -//mod_lor_10_01_25++ -/*! -******************************************************************************* -\brief This function opens a internet socket for the rrm communication - ( no-connected mode / UDP DATAGRAM ) -> considered address: IPv4 -\return The return value is a socket handle -*/ -int open_socket_int( - sock_rrm_int_t *s, ///< socket descriptor - unsigned char *path_local , ///< local socket path if internet socket - int local_port, ///< local socket port if internet socket - unsigned char *path_dest , ///< dest socket path if internet socket - int dest_port, ///< dest socket port if internet socket - int rrm_inst ///< instance of the rrm entity -) -{ - /* Internet socket */ - int socket_fd ; - int len ; - unsigned long int tmp; - unsigned char local_test [4]; - - if (path_local == NULL) - fprintf(stderr,"path_local = NULL\n ");//dbg - - - if ((socket_fd = socket(AF_INET, SOCK_DGRAM, 0)) == -1) { - perror("internet socket"); - return -1 ; - } - - - //!Setting local address - memset(&(s->in_local_addr), 0, sizeof(struct sockaddr_in)); - s->in_local_addr.sin_family = AF_INET; - s->in_local_addr.sin_port = htons(local_port); - memcpy(&tmp,path_local,4); - //fprintf(stderr,"\nOpen sock: path_local %X \n", tmp);//dbg - s->in_local_addr.sin_addr.s_addr = tmp; - - - len = sizeof(s->in_local_addr); - - if (bind(socket_fd, (struct sockaddr *)&(s->in_local_addr), len) == -1) { - perror("bind internet"); - return -1 ; - } - - //!Setting destination address - memset(&(s->in_dest_addr), 0, sizeof(struct sockaddr_in)); - s->in_dest_addr.sin_family = AF_INET; - s->in_dest_addr.sin_port = htons(7000); - memcpy(&tmp,path_dest,4); - //fprintf(stderr,"Open sock: path_dest %X \n", tmp);//dbg - s->in_dest_addr.sin_addr.s_addr = tmp; - - s->s = socket_fd ; - //fprintf(stderr,"IP address %X \n", s->in_local_addr.sin_addr.s_addr);//dbg - // fprintf(stderr,"IP dest %X \n", s->in_dest_addr.sin_addr.s_addr);//dbg - return socket_fd ; -} - - - -/*! -******************************************************************************* -\brief This function read a buffer from a internet socket -\return the function returns a message pointer. If the pointeur is NULL, a error - is happened. -*/ -char *recv_msg_int( - sock_rrm_int_t *s ///< socket descriptor -) -{ - /* Internet socket */ - char *buf = NULL; - char *msg = NULL; - int size_msg ; - msg_head_t *head ; - int ret ; - //struct sockaddr_in newS; - //socklen_t len_addr = sizeof(struct sockaddr_in); - - int taille = SIZE_MAX_PAYLOAD ; - //fprintf(stderr,"RF dentro recv_from \n ");//dbg - - buf = RRM_CALLOC( char,taille); - - if ( buf == NULL ) { - return NULL ; - } - - //fprintf(stderr,"RF s: %d\n ", s->s);//dbg - - - //ret = recvfrom(s->s, buf, taille, 0,(struct sockaddr *)&(newS), &len_addr) ; - ret = recvfrom(s->s, buf, taille, 0,NULL, 0) ; //mod_lor_10_04_23 - - //fprintf(stderr,"RF dopo recv s = %d\n ",s->s);//dbg - if ( ret <= 0 ) { - //fprintf(stderr,"RF ret %d\n ",ret );//dbg - perror("PB recvfrom_in"); - RRM_FREE(buf); - return NULL ; - } - - - head = (msg_head_t *) buf ; - size_msg = sizeof(msg_head_t) + head->size ; - - msg = RRM_CALLOC(char , size_msg ) ; - - if ( msg != NULL ) - memcpy( msg , buf , size_msg ) ; - - RRM_FREE( buf ) ; - //fprintf(stderr,"dim_msg %d\n ",sizeof(msg) );//dbg - //fprintf(stderr,"RF s at the end: %d\n ", s->s);//dbg - return msg ; -} - - -/*! -******************************************************************************* -\brief This function send a buffer message to the internet socket -\return if OK then "0" is returned else "-1" -*/ -int send_msg_int( - sock_rrm_int_t *s ,///< socket descriptor - msg_t *msg ///< the message to send - -) -{ - /* Internet socket */ - int ret = 0 ; - char *buf = NULL; - int taille = sizeof(msg_head_t) ; - //fprintf(stderr,"Send IP msg socket -> %d\n ",s->s );//dbg - - if ( msg == NULL ) - return -1 ; - - if ( msg->data != NULL ) - taille += msg->head.size ; - - buf = RRM_MALLOC(char, taille); - - if (buf ==NULL) - ret = -1 ; - - else { - memcpy( buf , &(msg->head) , sizeof(msg_head_t) ) ; - memcpy( buf+sizeof(msg_head_t), msg->data, msg->head.size ) ; - - //fprintf(stderr,"Sendto IP msg on socket %d msg_type %d\n ",s->s, msg->head.msg_type );//dbg - //fprintf(stderr,"to %X \n\n\n\n\n", s->in_dest_addr.sin_addr.s_addr);//dbg - if ( sendto(s->s, buf, taille, 0, (struct sockaddr *)&(s->in_dest_addr), sizeof(struct sockaddr_in)) < 0 ) { - ret = -1; - perror("sendmsg:socket ip"); - } - } - - //fprintf(stderr,"Before free ret %d\n ", ret);//dbg - RRM_FREE(buf) ; - RRM_FREE(msg->data) ; - RRM_FREE(msg) ; - //fprintf(stderr,"After free ret %d\n ", ret);//dbg - return ret ; -} - -/*! -******************************************************************************* -\brief This function closes a RRM socket -\return none -*/ -void close_socket_int( - sock_rrm_int_t *sock ///< the socket handle -) -{ - shutdown(sock->s, SHUT_RDWR); - close(sock->s); -} - -//mod_lor_10_01_25-- diff --git a/openair3/MESH/RRM/rrm_sock.h b/openair3/MESH/RRM/rrm_sock.h deleted file mode 100644 index 1982740362..0000000000 --- a/openair3/MESH/RRM/rrm_sock.h +++ /dev/null @@ -1,184 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/*! -******************************************************************************* - -\file rrm_sock.h - -\brief Fichier d'entete contenant les declarations des types, des defines , - et des fonctions relatives aux fonctions de communication RRM - (Radio Resource Management ) avec les autres entites RRC/CMM/PUSU. - -\author BURLOT Pascal - -\date 15/07/08 - - -\par Historique: - $Author$ $Date$ $Revision$ - $Id$ - $Log$ - -******************************************************************************* -*/ - -#ifndef RRM_SOCK_H -#define RRM_SOCK_H - - - - - -#include -#include -#include //mod_lor_10_01_25 -#include //mod_lor_10_01_25 - - -#ifdef __cplusplus -extern "C" { -#endif - -//AAA: if rrc_emul add a 0 at the end of file name -#ifdef RRC_EMUL -//! \brief Socket path associated to RRM-CMM interface -#define RRM_CMM_SOCK_PATH "/tmp/rrm_cmm_socket0" -//! \brief Socket path associated to CMM-RRM interface -#define CMM_RRM_SOCK_PATH "/tmp/cmm_rrm_socket0" - -//! \brief Socket path associated to RRM-RRC interface -#define RRM_RRC_SOCK_PATH "/tmp/rrm_rrc_socket0" -//! \brief Socket path associated to RRC-RRM interface -#define RRC_RRM_SOCK_PATH "/tmp/rrc_rrm_socket0" - -//! \brief Socket path associated to RRM-PUSU interface -#define RRM_PUSU_SOCK_PATH "/tmp/rrm_pusu_socket0" -//! \brief Socket path associated to PUSU-RRM interface -#define PUSU_RRM_SOCK_PATH "/tmp/pusu_rrm_socket0" - -//! \brief Socket path associated to RRM-SENSING interface -#define RRM_SENSING_SOCK_PATH "/tmp/rrm_sensing_socket0" -//! \brief Socket path associated to SENSING-RRM interface -#define SENSING_RRM_SOCK_PATH "/tmp/sensing_rrm_socket0" - -#else -//! \brief Socket path associated to RRM-CMM interface -#define RRM_CMM_SOCK_PATH "/tmp/rrm_cmm_socket" -//! \brief Socket path associated to CMM-RRM interface -#define CMM_RRM_SOCK_PATH "/tmp/cmm_rrm_socket" - -//! \brief Socket path associated to RRM-RRC interface -#define RRM_RRC_SOCK_PATH "/tmp/rrm_rrc_socket" -//! \brief Socket path associated to RRC-RRM interface -#define RRC_RRM_SOCK_PATH "/tmp/rrc_rrm_socket" - -//! \brief Socket path associated to RRM-PUSU interface -#define RRM_PUSU_SOCK_PATH "/tmp/rrm_pusu_socket" -//! \brief Socket path associated to PUSU-RRM interface -#define PUSU_RRM_SOCK_PATH "/tmp/pusu_rrm_socket" - -//! \brief Socket path associated to RRM-SENSING interface -#define RRM_SENSING_SOCK_PATH "/tmp/rrm_sensing_socket" -//! \brief Socket path associated to SENSING-RRM interface -#define SENSING_RRM_SOCK_PATH "/tmp/sensing_rrm_socket" -#endif /*RRC_EMUL*/ - - - -//! \brief Identification of the RRM/CMM/RRC message begin -#define START_MSG 0xA533 -//! \brief Identification of the PUSU message begin -#define START_MSG_PUSU 0xCC - - - -/*! -******************************************************************************* -\brief Entete des messages de RRM/CMM/RRC -*/ -typedef struct { - unsigned short start ; ///< Identification du debut de message - Instance_t inst ; ///< Identification de l'instance RRM - unsigned char msg_type ; ///< Identification du type message - unsigned int size ; ///< Taille du message - Transaction_t Trans_id ; ///< Identification de la transaction -} msg_head_t ; - -/*! -******************************************************************************* -\brief Definition de la structure d'un message a envoyer sur un socket: - - RRM->RRC - - RRC->RRM - - RRCI->RRC - - RRC->RRCI - - CMM->RRM - - RRM->CMM -*/ -typedef struct { - msg_head_t head ; ///< entete du message - char *data ; ///< message -} msg_t ; - - -/*! -******************************************************************************* -\brief Definition de la structure definissant le socket pour envoyer les messages -*/ -typedef struct { - int s ; ///< identification du socket - struct sockaddr_un un_local_addr ; ///< Adresse local si unix socket - struct sockaddr_un un_dest_addr ; ///< Adresse destinataire si unix socket -} sock_rrm_t ; - -//mod_lor_10_01_25++ -typedef struct { - int s ; ///< identification du socket - struct sockaddr_in in_local_addr ; ///< Adresse local si internet socket - struct sockaddr_in in_dest_addr ; ///< Adresse destinataire si internet socket -} sock_rrm_int_t ; -//mod_lor_10_01_25-- - - -int open_socket( sock_rrm_t *s ,char *path_local, char *path_dest , int rrm_inst ) ; -void close_socket(sock_rrm_t *sock ) ; -int send_msg(sock_rrm_t *s ,msg_t *msg ) ; -char *recv_msg( sock_rrm_t *s ) ; - -int open_socket_int( sock_rrm_int_t *s , unsigned char *path_local, int local_port, unsigned char *path_dest , int dest_port, int rrm_inst ) ; //mod_lor_10_01_25 -int send_msg_int(sock_rrm_int_t *s ,msg_t *msg ) ; //mod_lor_10_01_25 -char *recv_msg_int( sock_rrm_int_t *s ) ; //mod_lor_10_01_25 -void close_socket_int(sock_rrm_int_t *sock ) ; //mod_lor_10_01_25 - -#ifdef __cplusplus -} -#endif - - -#endif /* RRM_SOCK_H */ diff --git a/openair3/MESH/RRM/rrm_test.sh b/openair3/MESH/RRM/rrm_test.sh deleted file mode 100644 index 9d31d866a5..0000000000 --- a/openair3/MESH/RRM/rrm_test.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -killall emul_int -killall graph -killall rrm - -xterm -T COMMAND_CONSOLE -bg '#000000' -fg '#00ff00' -hold -e ./emul_int & - -sleep 2 - -#xterm -T RRM1 -hold -e -./rrm -i 6 #2> log.txt - -#sleep 1 -#./emul_int & - - diff --git a/openair3/MESH/RRM/rrm_util.c b/openair3/MESH/RRM/rrm_util.c deleted file mode 100644 index f96656c6fe..0000000000 --- a/openair3/MESH/RRM/rrm_util.c +++ /dev/null @@ -1,179 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/*! -******************************************************************************* - -\file rrm_util.c - -\brief Quelques fonctions utiles - -\author BURLOT Pascal - -\date 17/07/08 - - -\par Historique: - $Author$ $Date$ $Revision$ - $Id$ - $Log$ - -******************************************************************************* -*/ -#include -#include -#include -#include -#include -#include -#include - -//#include "extern_definition.h" -#include "L3_rrc_defs.h" -#include "rrm_util.h" - -/*! -******************************************************************************* -\brief Affichage de l'adresse MAC -*/ - -void print_L2_id( - L2_ID *id ///< Pointeur sur l'adresse MAC -) -{ - int i ; - - for ( i=0; i<8; i++) - fprintf(stderr,"%02X:", id->L2_id[i]); -} - -/*! -******************************************************************************* -\brief Affichage de l'adresse IP -*/ - -void print_L3_id( - L3_INFO_T type , ///< type de l'info de niveau 3 - unsigned char *L3_info ///< Pointeur sur l'identification de niveau 3 -) -{ - int i , n =0 ; - - if ( type==IPv4_ADDR) - n=4; - - if (type==IPv6_ADDR) - n=16; - - for ( i=0; i'Z') c=' ' ; - - fprintf(stderr,"(%c)", c ); - } - - if ( i%16 == 15 ) - fprintf(stderr,":\n"); - else - fprintf(stderr,":"); - - msg++ ; - } - - fprintf(stderr,"\n"); - fflush( stderr) ; -} - -/*! -******************************************************************************* -\brief Lecture du registe de cycle du processeur - -\return retourne le cycle courant du processeur -*/ - -__inline__ unsigned long long int rdtsc() -{ - unsigned long long int x; - __asm__ volatile (".byte 0x0f, 0x31" : "=A" (x)); - return x; -} - -/*! -******************************************************************************* -\brief La fonction retourne l'horloge courante - -\return current clock -*/ -double get_currentclock( ) -{ - /* - struct timespec tp; - clock_gettime(CLOCK_REALTIME, &tp ); - return ( ((double) tp.tv_sec ) + ( (double) tp.tv_nsec)*1.0E-9 ) ; - */ -#ifdef LINUX - - struct timeval tv; - struct timezone tz; - - gettimeofday(&tv, &tz); - - return ( ((double) tv.tv_sec ) + ( (double) tv.tv_usec)*1e-6) ; -#else - unsigned long long int x; - __asm__ volatile (".byte 0x0f, 0x31" : "=A" (x)); - - return ( (double) x * 0.36e-9 ) ; - -#endif -} diff --git a/openair3/MESH/RRM/rrm_util.h b/openair3/MESH/RRM/rrm_util.h deleted file mode 100644 index da357aaf53..0000000000 --- a/openair3/MESH/RRM/rrm_util.h +++ /dev/null @@ -1,109 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/*! -******************************************************************************* - -\file rrm_util.h - -\brief Fichier d'entete contenant les declarations des types, des defines , - et des fonctions relatives a des routines utilitaires du RRM . - -\author BURLOT Pascal - -\date 17/07/08 - - -\par Historique: - P.BURLOT 2009-01-20 - + ajout de la macro msg_fifo() pour debug - + ajout de la macro MSG_L2ID() pour l'affichage du L2_ID (debug) - + ajout de la macro RRM_CALLOC2() (utilise par la fonction msg_rrc_sensing_meas_ind()) - + ajout d'un #ifdef USE_CALLOC si on veut utiliser calloc() ou malloc(). - -******************************************************************************* -*/ - -#ifndef RRM_UTIL_H -#define RRM_UTIL_H - -#ifdef __cplusplus -extern "C" { -#endif - -#if 1 -//! Macro permettant l'affichage pour le debug -#define msg( ... ) printf(__VA_ARGS__) -//! Macro permettant l'affichage pour le debug -#define msg_fct( ... ) printf(__VA_ARGS__) -#else -//! Macro inactive -#define msg( ... ) -//! Macro inactive -#define msg_fct( ... ) -#endif - -#if 0 -//! Macro permettant l'affichage pour le debug -#define msg_fifo( ... ) printf(__VA_ARGS__) -#else -//! Macro inactive -#define msg_fifo( ... ) -#endif - -#define MSG_L2ID(p) msg("[INFO] L2ID=%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:\n",\ - (p).L2_id[0],(p).L2_id[1], (p).L2_id[2],(p).L2_id[3],\ - (p).L2_id[4],(p).L2_id[5], (p).L2_id[6],(p).L2_id[7] ); - -#define RRM_FREE(p) if ( (p) != NULL) { free(p) ; p=NULL ; } if ( (p) != NULL) { fprintf( stderr, "(%d) [%s]\n",__LINE__, __FILE__); fflush(stderr) ; } -#define RRM_MALLOC(t,n) (t *) malloc( sizeof(t) * n ) - -#ifdef USE_CALLOC -// calloc version : la memoire est intialisee a zero -#define RRM_CALLOC(t,n) (t *) calloc( n , sizeof(t)) -#define RRM_CALLOC2(t,s) (t *) calloc( 1 , s ) -#else -// malloc version : la memoire n'est pas intialisee a zero -#define RRM_CALLOC(t,n) (t *) malloc( sizeof(t) * n ) -#define RRM_CALLOC2(t,s) (t *) malloc( s ) -#endif /* USE_CALLOC */ - -#define RRM_MALLOC_STR(n) RRM_MALLOC(char,n+1) - -void print_L2_id( L2_ID *id ); -void print_L3_id(L3_INFO_T type,unsigned char *L3_info); -void printHex( char *msg, int len , int opt); -double get_currentclock( ) ; - - -#ifdef __cplusplus -} -#endif - -#endif /* RRM_UTIL_H */ diff --git a/openair3/MESH/RRM/sens_CH1_scen_2.c b/openair3/MESH/RRM/sens_CH1_scen_2.c deleted file mode 100644 index d7826a9806..0000000000 --- a/openair3/MESH/RRM/sens_CH1_scen_2.c +++ /dev/null @@ -1,83 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/* Form definition file generated with fdesign. */ - -#include "forms.h" -#include -#include "sens_CH1_scen_2.h" - -FD_sens_CH1_scen_2 *create_form_sens_CH1_scen_2(void) -{ - FL_OBJECT *obj; - FD_sens_CH1_scen_2 *fdui = (FD_sens_CH1_scen_2 *) fl_calloc(1, sizeof(*fdui)); - - //mod_lor_10_12_07++ - fdui->sens_CH1_scen_2 = fl_bgn_form(FL_NO_BOX, 460, 560); - obj = fl_add_box(FL_UP_BOX,0,0,460,560,""); - fdui->User_1_sens = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,20,10,420,100,"User_1_sens"); - fl_set_object_color(obj,FL_BLACK,FL_BLUE); - fl_set_object_lsize(obj,FL_NORMAL_SIZE); - fdui->User_2_sens = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,20,140,420,100,"User_2_sens"); - fl_set_object_color(obj,FL_BLACK,FL_BLUE); - fl_set_object_lsize(obj,FL_NORMAL_SIZE); - fdui->User_3_sens = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,20,280,420,100,"User_3_sens"); - fl_set_object_color(obj,FL_BLACK,FL_BLUE); - fl_set_object_lsize(obj,FL_NORMAL_SIZE); - fdui->Cluster_2_sensing = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,20,420,420,100,"Cluster_2_received_information"); - fl_set_object_color(obj,FL_BLACK,FL_YELLOW); - fl_set_object_lsize(obj,FL_NORMAL_SIZE); - //mod_lor_10_12_07--: messo in nota - - /* fdui->sens_CH1_scen_2 = fl_bgn_form(FL_NO_BOX, 650, 740); - obj = fl_add_box(FL_UP_BOX,0,0,650,740,""); - fdui->User_1_sens = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,40,10,560,110,"User_1_sens"); - fl_set_object_color(obj,FL_BLACK,FL_BLUE); - fl_set_object_lsize(obj,FL_NORMAL_SIZE); - fdui->User_2_sens = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,40,150,560,110,"User_2_sens"); - fl_set_object_color(obj,FL_BLACK,FL_BLUE); - fl_set_object_lsize(obj,FL_NORMAL_SIZE); - fdui->User_3_sens = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,40,290,560,110,"User_3_sens"); - fl_set_object_color(obj,FL_BLACK,FL_BLUE); - fl_set_object_lsize(obj,FL_NORMAL_SIZE); - fdui->User_4_sens = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,40,430,560,110,"User_4_sens"); - fl_set_object_color(obj,FL_BLACK,FL_BLUE); - fl_set_object_lsize(obj,FL_NORMAL_SIZE); - fdui->Cluster_2_sensing = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,40,570,560,130,"Cluster_2_global_sensing"); - fl_set_object_color(obj,FL_BLACK,FL_YELLOW); - fl_set_object_lsize(obj,FL_NORMAL_SIZE); - */ - fl_end_form(); - - fdui->sens_CH1_scen_2->fdui = fdui; - - return fdui; -} -/*---------------------------------------*/ - diff --git a/openair3/MESH/RRM/sens_CH1_scen_2.fd b/openair3/MESH/RRM/sens_CH1_scen_2.fd deleted file mode 100644 index f2b927f738..0000000000 --- a/openair3/MESH/RRM/sens_CH1_scen_2.fd +++ /dev/null @@ -1,124 +0,0 @@ -Magic: 13000 - -Internal Form Definition File - (do not change) - -Number of forms: 1 -Unit of measure: FL_COORD_PIXEL - -=============== FORM =============== -Name: sens_CH1_scen_2 -Width: 650 -Height: 740 -Number of Objects: 6 - --------------------- -class: FL_BOX -type: UP_BOX -box: 0 0 650 740 -boxtype: FL_UP_BOX -colors: FL_COL1 FL_COL1 -alignment: FL_ALIGN_CENTER -style: FL_NORMAL_STYLE -size: FL_DEFAULT_SIZE -lcol: FL_BLACK -label: -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: -callback: -argument: - --------------------- -class: FL_XYPLOT -type: IMPULSE_XYPLOT -box: 40 10 560 110 -boxtype: FL_FLAT_BOX -colors: FL_BLACK FL_BLUE -alignment: FL_ALIGN_BOTTOM -style: FL_NORMAL_STYLE -size: FL_NORMAL_SIZE -lcol: FL_BLACK -label: User_1_sens -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: User_1_sens -callback: -argument: - --------------------- -class: FL_XYPLOT -type: IMPULSE_XYPLOT -box: 40 150 560 110 -boxtype: FL_FLAT_BOX -colors: FL_BLACK FL_BLUE -alignment: FL_ALIGN_BOTTOM -style: FL_NORMAL_STYLE -size: FL_NORMAL_SIZE -lcol: FL_BLACK -label: User_2_sens -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: User_2_sens -callback: -argument: - --------------------- -class: FL_XYPLOT -type: IMPULSE_XYPLOT -box: 40 290 560 110 -boxtype: FL_FLAT_BOX -colors: FL_BLACK FL_BLUE -alignment: FL_ALIGN_BOTTOM -style: FL_NORMAL_STYLE -size: FL_NORMAL_SIZE -lcol: FL_BLACK -label: User_3_sens -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: User_3_sens -callback: -argument: - --------------------- -class: FL_XYPLOT -type: IMPULSE_XYPLOT -box: 40 430 560 110 -boxtype: FL_FLAT_BOX -colors: FL_BLACK FL_BLUE -alignment: FL_ALIGN_BOTTOM -style: FL_NORMAL_STYLE -size: FL_NORMAL_SIZE -lcol: FL_BLACK -label: User_4_sens -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: User_4_sens -callback: -argument: - --------------------- -class: FL_XYPLOT -type: IMPULSE_XYPLOT -box: 40 570 560 130 -boxtype: FL_FLAT_BOX -colors: FL_BLACK FL_YELLOW -alignment: FL_ALIGN_BOTTOM -style: FL_NORMAL_STYLE -size: FL_NORMAL_SIZE -lcol: FL_BLACK -label: Cluster_2_sensing -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: Cluster_2_sensing -callback: -argument: - -============================== -create_the_forms diff --git a/openair3/MESH/RRM/sens_CH1_scen_2.h b/openair3/MESH/RRM/sens_CH1_scen_2.h deleted file mode 100644 index b8137fb630..0000000000 --- a/openair3/MESH/RRM/sens_CH1_scen_2.h +++ /dev/null @@ -1,53 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/** Header file generated with fdesign on Fri Nov 5 17:11:31 2010.**/ - -#ifndef FD_sens_CH1_scen_2_h_ -#define FD_sens_CH1_scen_2_h_ - -/** Callbacks, globals and object handlers **/ - - -/**** Forms and Objects ****/ -typedef struct { - FL_FORM *sens_CH1_scen_2; - void *vdata; - char *cdata; - long ldata; - FL_OBJECT *User_1_sens; - FL_OBJECT *User_2_sens; - FL_OBJECT *User_3_sens; - FL_OBJECT *User_4_sens; - FL_OBJECT *Cluster_2_sensing; -} FD_sens_CH1_scen_2; - -extern FD_sens_CH1_scen_2 * create_form_sens_CH1_scen_2(void); - -#endif /* FD_sens_CH1_scen_2_h_ */ diff --git a/openair3/MESH/RRM/sens_db.c b/openair3/MESH/RRM/sens_db.c deleted file mode 100755 index efae7e93ed..0000000000 --- a/openair3/MESH/RRM/sens_db.c +++ /dev/null @@ -1,569 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/*! -******************************************************************************* - -\file sens_db.c - -\brief Fonctions permettant la gestion de la base de donnée sur les infor- - mations du sensing - -\author IACOBELLI Lorenzo - -\date 16/10/09 - - -\par Historique: - $Author$ $Date$ $Revision$ - $Id$ - $Log$ - -******************************************************************************* -*/ -#include -#include -#include -#include -#include - -#include -#include - -#include - -#include "debug.h" -#include "L3_rrc_defs.h" -#include "rrm_util.h" -#include "sens_db.h" -#include "channels_db.h" - - -//! Selection locale du mode de debug -#define DBG_SENS_DB 0 - -#if DBG_SENS_DB==0 -//! Macro inactive -#define PRINT_SENS_DB(...) -#else -//! Macro affichant la liste des radio bearers -#define PRINT_SENS_DB(...) print_sens_db( __VA_ARGS__ ) -#endif - -/*! -******************************************************************************* -\brief La fonction affiche a l'ecran la liste (pour du debug) - -\return aucune valeur retournee -*/ -void print_sens_db( - Sens_node_t *pEntry ///< pointeur sur le debut de liste -) -{ - //unsigned int i; //dbg - Sens_node_t *pCurrentItem = pEntry; - Sens_ch_t *pCurrentChannel; - int i,k; - - fprintf(stderr,"node entry @%p \n", pEntry);//dbg - - //fprintf(stderr,"sens list=[\n"); - while ( pCurrentItem != NULL) { - //fprintf(stderr,"curr item @%p \n", pCurrentItem);//dbg - //fprintf(stderr," @%p(.info_time=%f, ", - // pCurrentItem, pCurrentItem->info_time); - - //fprintf(stderr,", @SRC= \n"); - fprintf(stderr,"\nnode : "); - - for ( i=0; i<8; i++) - fprintf(stderr,"%02X", pCurrentItem->L2_id.L2_id[i]); - - // fprintf(stderr,"\ntpc :%d ",pCurrentItem->tpc); - // fprintf(stderr,"overlap :%d ",pCurrentItem->overlap); - // fprintf(stderr,"sampl_freq :%d \n",pCurrentItem->sampl_freq); - pCurrentChannel=pCurrentItem->info_hd; - - while ( pCurrentChannel != NULL) { - fprintf(stderr,"\n @%p(\n.channel_id=%d, \n.start_fr=%d , \n.end_fr= %d:\n ", - pCurrentChannel, pCurrentChannel->Ch_id, pCurrentChannel->Start_f,pCurrentChannel->Final_f); //mod_lor_10_03_17: intxflot - - for (k=0; kis_free[k]); - printf ("k= %d, mu0=%d; mu1=%d; I0 = %d; is_free = %d\n",k,pCurrentChannel->mu0[k],pCurrentChannel->mu1[k],pCurrentChannel->I0[k], pCurrentChannel->is_free[k]); - - printf("\n\n"); - pCurrentChannel = pCurrentChannel->next ; - - } - - - - - - /* - fprintf(stderr,",\n .Lchan_desc=%p(",&(pCurrentItem->Lchan_desc)); - fprintf(stderr,".transport_block_size=%d,",pCurrentItem->Lchan_desc.transport_block_size); - fprintf(stderr,".max_transport_blocks=%d,",pCurrentItem->Lchan_desc.max_transport_blocks); - fprintf(stderr,".Guaranteed_bit_rate=%ld,",pCurrentItem->Lchan_desc.Guaranteed_bit_rate); - fprintf(stderr,".Max_bit_rate=%ld,",pCurrentItem->Lchan_desc.Max_bit_rate); - fprintf(stderr,".Delay_class=%d,",pCurrentItem->Lchan_desc.Delay_class); - fprintf(stderr,".Target_bler=%d,",pCurrentItem->Lchan_desc.Target_bler); - fprintf(stderr,".LCHAN_t=%d),",pCurrentItem->Lchan_desc.LCHAN_t); - - fprintf(stderr,",\n .Mac_rlc_meas_desc=%p(",&(pCurrentItem->Mac_rlc_meas_desc)); - fprintf(stderr,".Meas_trigger=%p(",&(pCurrentItem->Mac_rlc_meas_desc.Meas_trigger)); - fprintf(stderr,".Rssi=%d, ",pCurrentItem->Mac_rlc_meas_desc.Meas_trigger.Rssi); - fprintf(stderr,".Sinr=%d, ",pCurrentItem->Mac_rlc_meas_desc.Meas_trigger.Sinr); - fprintf(stderr,".Harq_delay=%u, ",pCurrentItem->Mac_rlc_meas_desc.Meas_trigger.Harq_delay); - fprintf(stderr,".Bler=%u,",pCurrentItem->Mac_rlc_meas_desc.Meas_trigger.Bler); - fprintf(stderr,".Spec_eff=%u), ",pCurrentItem->Mac_rlc_meas_desc.Meas_trigger.Spec_eff); - fprintf(stderr,".Mac_avg=%p(",&(pCurrentItem->Mac_rlc_meas_desc.Mac_avg)); - fprintf(stderr,".Rssi_forgetting_factor=%u, ",pCurrentItem->Mac_rlc_meas_desc.Mac_avg.Rssi_forgetting_factor); - fprintf(stderr,".Sinr_forgetting_factor=%u, ",pCurrentItem->Mac_rlc_meas_desc.Mac_avg.Sinr_forgetting_factor); - fprintf(stderr,".Harq_delay_forgetting_factor=%u, ",pCurrentItem->Mac_rlc_meas_desc.Mac_avg.Harq_delay_forgetting_factor); - fprintf(stderr,".Bler_forgetting_factor=%u, ",pCurrentItem->Mac_rlc_meas_desc.Mac_avg.Bler_forgetting_factor); - fprintf(stderr,".Spec_eff_forgetting_factor=%u),\n",pCurrentItem->Mac_rlc_meas_desc.Mac_avg.Spec_eff_forgetting_factor); - fprintf(stderr," .bo_forgetting_factor=%u,",pCurrentItem->Mac_rlc_meas_desc.bo_forgetting_factor); - fprintf(stderr,".sdu_loss_trigger=%u,",pCurrentItem->Mac_rlc_meas_desc.sdu_loss_trigger); - fprintf(stderr,".Rep_amount=%u,",pCurrentItem->Mac_rlc_meas_desc.Rep_amount); - fprintf(stderr,".Rep_interval=%d,",pCurrentItem->Mac_rlc_meas_desc.Rep_interval); - */ - - fprintf(stderr,"\n"); - - pCurrentItem = pCurrentItem->next ; - } - - fprintf(stderr," ]\n"); -} - - - - - -/*! -******************************************************************************* -\brief Comparaison de deux ID de niveau 2 - -\return si 0 alors les IDs sont identiques -*/ -static int L2_ID_cmp( - L2_ID *L2_id1, ///< ID de niveau 2 - L2_ID *L2_id2 ///< ID de niveau 2 -) -{ - return memcmp( L2_id1, L2_id2, sizeof(L2_ID) ) ; -} - - -/*! -******************************************************************************* -\brief La fonction ajoute un noeud dans la liste des noeuds. - -\return retourne la valeur du nouvel element -*/ - -Sens_node_t *add_node( - Sens_node_t **node_entry , ///< pointeur sur l'entree de la liste de noeuds - L2_ID *L2_id , ///< node ID - unsigned int NB_info , ///< Number of channel info - Sens_ch_t *ch_info_hd , ///< information received from the node - double info_time -) -{ - - //fprintf(stderr,"\n NB_info=%d \n", NB_info); //dbg - Sens_node_t *pOldEntry = *node_entry; - Sens_node_t *pNewItem = RRM_CALLOC( Sens_node_t , 1 ) ; - - PNULL(pNewItem) ; - - if ( pNewItem == NULL ) - return NULL ; - - - - memcpy( pNewItem->L2_id.L2_id , L2_id->L2_id, sizeof(L2_ID) ) ; - pNewItem->info_time = info_time ; - pNewItem->Nb_chan = NB_info; - pNewItem->info_hd = NULL; - - //fprintf(stderr,"starting ch pointer @%p \n", pNewItem->info_hd);//dbg - for ( int i=0; iinfo_hd), ch_info_hd[i].Start_f, - ch_info_hd[i].Final_f, ch_info_hd[i].Ch_id, ch_info_hd[i].I0,ch_info_hd[i].mu0,ch_info_hd[i].mu1, - /*ch_info_hd[i].meas,*/ ch_info_hd[i].is_free) == NULL ) - fprintf(stderr, "ERROR: info %d problem\n", i) ; - - //fprintf(stderr,"returned pointer @%p Channel id %d\n", pNewItem->info_hd, ch_info_hd[i].Ch_id);//dbg - } - - *node_entry = pNewItem ; - pNewItem->next = pOldEntry; - /*fprintf(stderr,"add_node\n\n");//dbg - fprintf(stderr,"node entry @%p \n", (*node_entry)->info_hd);//dbg - fprintf(stderr,"node entry @%p \n", pNewItem->info_hd);//dbg - fprintf(stderr,"passed par @%p \n", *node_entry);//dbg*/ - PRINT_SENS_DB( *node_entry ); - return pNewItem ; -} - -/*! -******************************************************************************* -\brief La fonction ajoute un channel aux info relatives à un noeud. - -\return retourne la valeur du nouvel element -*/ - -Sens_ch_t *add_chann( - Sens_ch_t **ch_entry , ///< pointeur sur l'entree de la liste de channels - unsigned int Start_f , ///< frequence initial du canal //mod_lor_10_03_17: intxflot - unsigned int Final_f , ///< frequence final du canal //mod_lor_10_03_17: intxflot - unsigned int Ch_id , ///< Channel ID //mod_lor_10_03_17: intxflot - //mod_eure_lor++ - char *I0 , - char *mu0, - char *mu1, - - //float meas , ///< Sensing results - unsigned int *is_free ///< Evaluation about the availability of the channel //mod_lor_10_05_28 ->char instead of int - //mod_eure_lor-- -) -{ - Sens_ch_t *pOldEntry = *ch_entry; - Sens_ch_t *pNewItem = RRM_CALLOC( Sens_ch_t , 1 ) ; - int i; - - /*fprintf(stderr,"\nadd_channel: %d\n", Ch_id);//dbg - fprintf(stderr,"old header @%p \n", pOldEntry);//dbg - fprintf(stderr,"new pointer @%p \n", pNewItem);//dbg*/ - - PNULL(pNewItem) ; - - if ( pNewItem == NULL ) - return NULL ; - - pNewItem->Start_f = Start_f ; - pNewItem->Final_f = Final_f ; - pNewItem->Ch_id = Ch_id; - //printf("sens_db add 1: %d ", pNewItem->Ch_id);//dbg - //mod_eure_lor++ - memcpy(pNewItem->I0 ,I0, MAX_NUM_SB); - memcpy(pNewItem->mu0,mu0, MAX_NUM_SB); - memcpy(pNewItem->mu1,mu1, MAX_NUM_SB); - memcpy(pNewItem->is_free, is_free,MAX_NUM_SB*sizeof(unsigned int));//mod_lor_10_05_28 ->char instead of int - //for (i=0; iis_free[i]); - - //mod_eure_lor-- - //pNewItem->meas = meas; - //pNewItem->is_free = is_free; - //printf("sens_db add 2: %d\n", pNewItem->Ch_id);//dbg - *ch_entry = pNewItem ; - pNewItem->next = pOldEntry; - //fprintf(stderr,"new pointer @%p \n", *ch_entry);//dbg - //fprintf(stderr,"new pointer @%p \n", *ch_entry->next);//dbg - //fprintf(stderr,"new pointer @%p \n", pNewItem->next);//dbg - - - return pNewItem ; -} - - -/*! -******************************************************************************* -\brief La fonction detruit entierement les info sur les canaux memorizées à l'adresse indiqué - -\return aucune valeur. -*/ -void del_channels_info( - Sens_ch_t **ch_info_entry ///< pointeur sur l'entree des informations sur les canaux -) -{ - Sens_ch_t *pCurrentItem = *ch_info_entry; - Sens_ch_t *pNextItem ; - - if ( (pCurrentItem == NULL) || (ch_info_entry==NULL)) - return ; - - while ( pCurrentItem != NULL ) { - pNextItem = pCurrentItem->next ; - RRM_FREE( pCurrentItem ) ; - pCurrentItem = pNextItem ; - } - - *ch_info_entry = NULL ; -} - -/*! -******************************************************************************* -\brief La fonction retire l'element identifie par le node_id de la liste des noeuds - -\return aucune valeur. -*/ -void del_node( - Sens_node_t **node_entry , ///< pointeur sur l'entree de la liste de noeuds - L2_ID *L2_id ///< node ID -) -{ - Sens_node_t *pCurrentItem = *node_entry; - Sens_node_t *pNextItem ; - Sens_node_t **ppPrevItem = node_entry ; - - if ( (pCurrentItem == NULL) || (node_entry==NULL)) - return ; - - while ( pCurrentItem != NULL ) { - pNextItem = pCurrentItem->next ; - - if ( L2_ID_cmp( &(pCurrentItem->L2_id),L2_id) == 0 ) { - *ppPrevItem = pNextItem; - del_channels_info (&pCurrentItem->info_hd); - RRM_FREE( pCurrentItem ) ; - fprintf( stderr,"Noeud "); - - for ( int i=0; i<8; i++) - msg_fct("%02X", L2_id->L2_id[i]); - - msg_fct( " deleted from database\n"); - - return ; - } - - ppPrevItem = &(pCurrentItem->next) ; - pCurrentItem = pNextItem ; - } - - if ( pCurrentItem == NULL ) - fprintf(stderr, "ERROR: node_id unknown\n") ; - - //PRINT_SENS_DB( *node_entry ); -} - -/*! -******************************************************************************* -\brief La fonction detruit entierement la liste des noeuds - -\return aucune valeur. -*/ -void del_all_nodes( - Sens_node_t **node_entry ///< pointeur sur l'entree de la liste de noeuds -) -{ - Sens_node_t *pCurrentItem = *node_entry; - Sens_node_t *pNextItem ; - - if ( (pCurrentItem == NULL) || (node_entry==NULL)) - return ; - - while ( pCurrentItem != NULL ) { - pNextItem = pCurrentItem->next ; - del_channels_info (&pCurrentItem->info_hd); - RRM_FREE( pCurrentItem ) ; - pCurrentItem = pNextItem ; - } - - *node_entry = NULL ; -} - -/*! -******************************************************************************* -\brief La fonction recherche le descripteur de noeud identifie par le noeud_id - dans la liste des noeuds - -\return pointeur sur le descripteur de noeud trouve sinon NULL . -*/ -Sens_node_t *get_node_info( - Sens_node_t *node_entry , ///< pointeur sur l'entree de la liste des noeuds - L2_ID *L2_id ///< Id du descripteur du noeud recherche -) -{ - Sens_node_t *pCurrentItem = node_entry; - - while ( pCurrentItem != NULL) { - if ( L2_ID_cmp( &(pCurrentItem->L2_id),L2_id) == 0 ) - break ; - - pCurrentItem = pCurrentItem->next ; - } - - return pCurrentItem ; -} - -/*! -******************************************************************************* -\brief La fonction recherche le descripteur de noeud identifie par le noeud_id - dans la liste des noeuds - -\return pointeur sur le descripteur de noeud trouve sinon NULL . -*/ -Sens_ch_t *get_chann_info( - Sens_ch_t *ch_entry , ///< pointeur sur l'entree de la liste des canaux - unsigned int Ch_id ///< Id of the desired channel //mod_lor_10_03_17: intxflot -) -{ - Sens_ch_t *pCurrentItem = ch_entry; - - while ( pCurrentItem != NULL) { - if ( pCurrentItem->Ch_id == Ch_id) - break ; - - pCurrentItem = pCurrentItem->next ; - } - - return pCurrentItem ; -} - -/*! -******************************************************************************* -\brief La fonction rafraichit les information du sensing du noeud. Si c'est - la premiere fois qui le node envoye les info, il rajoute le node dans - la liste . - -\return pointer to the node -*/ -Sens_node_t *update_node_info( - Sens_node_t **node_entry, ///< pointeur sur un element de la liste des RB - L2_ID *L2_id, ///< id du noeud à refrechir - unsigned int NB_info, ///< Number of channel info - Sens_ch_t *ch_info_hd, ///< vector with the channel informations - double info_time ///< time au quel il vient mis à jour -) -{ - Sens_node_t *pItem = get_node_info(*node_entry,L2_id); - - - if ( pItem != NULL) { - //printf ("node existing\n\n");//dbg - pItem->info_time = info_time ; - pItem->Nb_chan = NB_info ; - - for ( int i=0; iinfo_hd), ch_info_hd[i].Start_f, - ch_info_hd[i].Final_f, ch_info_hd[i].Ch_id, ch_info_hd[i].I0,ch_info_hd[i].mu0,ch_info_hd[i].mu1,//ch_info_hd[i].meas, - ch_info_hd[i].is_free) == NULL ) - fprintf(stderr, "ERROR: info %d problem\n", i) ; - } - } else { - //fprintf(stderr,"DBG2 passed node entry @%p \n", node_entry);//dbg - //fprintf(stderr,"DBG2 passed hd @%p \n", *node_entry); //dbg - //printf ("adding node\n\n");//dbg - pItem = add_node( node_entry, L2_id, NB_info, ch_info_hd, info_time); - } - - //fprintf(stderr,"update_node\n");//dbg - PRINT_SENS_DB( *node_entry ); - return pItem; -} - -/*! -******************************************************************************* -\brief La fonction rafraichit les information relatives à la mesure d'un canal. Si c'est - la premiere fois qu'on receive des info à propos du canal, il rajoute - le canal. - -\return pointer to the channel -*/ -Sens_ch_t *update_channel_info( - Sens_ch_t **ch_entry , ///< pointeur sur un element de la liste des RB - unsigned int Start_f , ///< frequence initial du canal //mod_lor_10_03_17: intxflot - unsigned int Final_f , ///< frequence final du canal //mod_lor_10_03_17: intxflot - unsigned int Ch_id , ///< ID du canal //mod_lor_10_03_17: intxflot - //mod_eure_lor++ - char *I0 , - char *mu0, - char *mu1, - - //float meas , ///< Sensing results - unsigned int *is_free ///< Evaluation about the availability of the channel //mod_lor_10_05_28 ->char instead of int - //mod_eure_lor-- -) -{ - //printf("sens_db update passed ch_id: %d\n",Ch_id);//dbg - - Sens_ch_t *pItem = get_chann_info(*ch_entry,Ch_id); - int i; - - if ( pItem != NULL) { - // printf ("channel existing\n\n");//dbg - // printf("sens_db update1: %d ", pItem->Ch_id);//dbg - //mod_eure_lor++ - memcpy( pItem->I0 ,I0, MAX_NUM_SB); - memcpy( pItem->mu0,mu0, MAX_NUM_SB); - memcpy( pItem->mu1,mu1, MAX_NUM_SB); - memcpy(pItem->is_free, is_free, MAX_NUM_SB*sizeof(unsigned int)); - //pItem->meas = meas ; - //pItem->is_free = is_free ;//mod_lor_10_05_06 - //for (i=0; iis_free[i],is_free[i]);//dbg - // printf("sens_db update2: %d\n", pItem->Ch_id);//dbg - } else { - //printf ("channel to add\n\n");//dbg - //pItem = add_chann( ch_entry, Start_f, Final_f, Ch_id, meas, is_free); - pItem = add_chann( ch_entry, Start_f, Final_f, Ch_id, I0, mu0,mu1,is_free); - } - - //mod_eure_lor-- - - return pItem; -} - -//mod_lor_10_02_19++ -/*! -******************************************************************************* -\brief La fonction rafraichit les parametres du sensing du noeud et, eventuelement, - les misurations. Si c'est la premiere fois qui le node envoye les info, - il rajoute le node dans la liste . - -\return pointer to the node -*/ -Sens_node_t *update_node_par( - Sens_node_t **node_entry , ///< pointeur sur un element de la liste des RB - L2_ID *L2_id , ///< id du noeud à refrechir - unsigned int NB_info , ///< Number of channel info - Sens_ch_t *ch_info_hd, ///< vector with the channel informations - double info_time , ///< time au quel il vient mis à jour - unsigned int tpc , ///< time on each carrier - unsigned int overlap , ///< overlap factor (percentage) - unsigned int sampl_freq ///< sampling frequency (Ms/s) -) -{ - Sens_node_t *pItem = update_node_info(node_entry,L2_id,NB_info,ch_info_hd,info_time); - - pItem->tpc = tpc; - pItem->overlap = overlap; - pItem->sampl_freq = sampl_freq; - - //fprintf(stderr,"update_node\n");//dbg - PRINT_SENS_DB( *node_entry ); - return pItem; -} -//mod_lor_10_02_19-- diff --git a/openair3/MESH/RRM/sens_db.h b/openair3/MESH/RRM/sens_db.h deleted file mode 100755 index cd02454618..0000000000 --- a/openair3/MESH/RRM/sens_db.h +++ /dev/null @@ -1,98 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/*! -******************************************************************************* - -\file sens_db.h - -\brief Fichier d'entete contenant les declarations des types, des defines , - et des fonctions relatives a la gestion de la base de donnée sur - les informations de sensing par chaque noeud avec capacité de sensing. - -\author IACOBELLI Lorenzo - -\date 16/10/09 - - -\par Historique: - $Author$ $Date$ $Revision$ - $Id$ - $Log$ - -******************************************************************************* -*/ -#ifndef SENS_DB_H -#define SENSE_DB_H - -#ifdef __cplusplus -extern "C" { -#endif - -/*! -******************************************************************************* -\brief Entete de la file des messages reçus ou a envoyer -*/ -typedef struct Sens_node_s { - L2_ID L2_id ; ///< id - double info_time ; ///< information age - unsigned int Nb_chan ; ///< number of channel informations - unsigned int tpc ; ///< time on each carrier //mod_lor_10_02_19 - unsigned int overlap ; ///< overlap factor (percentage) //mod_lor_10_02_19 - unsigned int sampl_freq; ///< sampling frequency (Ms/s) //mod_lor_10_02_19 - Sens_ch_t *info_hd ; ///< header of the information list - struct Sens_node_s *next ; ///< next node pointer -} Sens_node_t ; - - -// --------------------------------------------------------------------------- - - -Sens_node_t *add_node( Sens_node_t **node_entry, L2_ID *L2_id, unsigned int NB_info, Sens_ch_t *ch_info_hd, double info_time ) ; -Sens_ch_t *add_chann( Sens_ch_t **ch_entry, unsigned int Start_f, unsigned int Final_f, unsigned int Ch_id, char *I0 ,char *mu0, char *mu1, - unsigned int *is_free); //mod_lor_10_05_28 ->char instead of int -void del_channels_info( Sens_ch_t **ch_info_entry); -void del_node( Sens_node_t **node_entry, L2_ID *L2_id ) ; -void del_all_nodes( Sens_node_t **node_entry ) ; -Sens_node_t *get_node_info ( Sens_node_t *node_entry, L2_ID *L2_id ) ; -Sens_ch_t *get_chann_info( Sens_ch_t *ch_entry , unsigned int Ch_id); //mod_lor_10_03_17: intxflot -Sens_node_t *update_node_info( Sens_node_t **node_entry, L2_ID *L2_id, unsigned int NB_info, Sens_ch_t *ch_info_hd, double info_time); -Sens_node_t *update_node_par( Sens_node_t **node_entry, L2_ID *L2_id, unsigned int NB_info, Sens_ch_t *ch_info_hd, double info_time, - unsigned int tpc, unsigned int overlap, unsigned int sampl_freq); //mod_lor_10_02_19 : function creation -//Sens_ch_t *update_channel_info( Sens_ch_t **ch_entry, unsigned int Start_f, unsigned int Final_f, unsigned int Ch_id, float meas, unsigned int is_free );//mod_lor_10_05_28 ->char instead of int -Sens_ch_t *update_channel_info( Sens_ch_t **ch_entry, unsigned int Start_f, unsigned int Final_f, unsigned int Ch_id, char *I0 ,char *mu0, char *mu1, - unsigned int *is_free ); //mod_lor_10_05_28 ->char instead of int -void print_sens_db( Sens_node_t *pEntry ); - - -#ifdef __cplusplus -} -#endif - -#endif /* SENS_DB_H */ diff --git a/openair3/MESH/RRM/sens_op.c b/openair3/MESH/RRM/sens_op.c deleted file mode 100755 index 0f5878cf9e..0000000000 --- a/openair3/MESH/RRM/sens_op.c +++ /dev/null @@ -1,1311 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/*! -******************************************************************************* - -\file sens_op.c - -\brief Fonctions permettant la gestion des informations de sensing des - differents noeuds - -\author IACOBELLI Lorenzo - -\date 21/10/09 - - -\par Historique: - L.IACOBELLI 2010-03-19 - + "take_decision" function added - -******************************************************************************* -*/ -#include -#include -#include -#include -#include - -#include -#include - -#include - -#include "debug.h" -#include "L3_rrc_defs.h" -#include "L3_rrc_interface.h" -#include "cmm_rrm_interface.h" -#include "rrm_sock.h" -#include "rrc_rrm_msg.h" -#include "ip_msg.h" //mod_lor_10_04_27 -#include "sensing_rrm_msg.h" -#include "cmm_msg.h" -#include "msg_mngt.h" -#include "pusu_msg.h" -#include "rb_db.h" -#include "neighbor_db.h" -#include "sens_db.h" -#include "channels_db.h" -#include "rrm_util.h" -#include "transact.h" -#include "rrm_constant.h" -#include "rrm.h" -#include "sens_op.h" - - -//! Met un message dans la file des messages a envoyer -#define PUT_CMM_MSG(m) put_msg( &(rrm->file_send_cmm_msg), 0, rrm->cmm.s,m ) //mod_lor_10_01_25 -#define PUT_PUSU_MSG(m) put_msg( &(rrm->file_send_cmm_msg), 0, rrm->pusu.s,m) //mod_lor_10_01_25 -#define PUT_RRC_MSG(m) put_msg( &(rrm->file_send_rrc_msg), 0, rrm->rrc.s,m ) //mod_lor_10_01_25 -#define PUT_IP_MSG(m) put_msg( &(rrm->file_send_ip_msg) , 1, rrm->ip.s,m ) //mod_lor_10_01_25 -#define PUT_SENS_MSG(m) put_msg( &(rrm->file_send_sensing_msg), 0, rrm->sensing.s,m ) //mod_lor_10_04_01 - -/*! -******************************************************************************* -\brief Comparaison de deux ID de niveau 2 - -\return si 0 alors les IDs sont identiques -*/ -static int L2_ID_cmp( - L2_ID *L2_id1, ///< ID de niveau 2 - L2_ID *L2_id2 ///< ID de niveau 2 -) -{ - return memcmp( L2_id1, L2_id2, sizeof(L2_ID) ) ; -} - - - -//mod_lor_10_05_26++ -/*! -******************************************************************************* -\brief Function that decides locally if a channel is free using mu0 and mu1 datas: - -\return -*/ -void take_local_decision( - Sens_ch_t *Sens_info -) -{ - unsigned int i; - - for (i=0; i < NUM_SB; i++) { - if (Sens_info->mu0[i]>LAMBDA0 && Sens_info->mu1[i]>LAMBDA1) - Sens_info->is_free[i]=0; // primary system is present - else - Sens_info->is_free[i]=1; // primary system is not present - } -} -//mod_lor_10_05_26-- - -/*! -******************************************************************************* -\brief Updating of the sensing measures received by the rrm from the sensing unit -* of the node. If the node is a mesh router it reports the information to its clusterhead -*/ -void rrc_update_sens( - Instance_t inst , //!< Identification de l'instance - L2_ID L2_id , //!< Adresse L2 of the source of information - unsigned int NB_info , //!< Number of channel info - Sens_ch_t *Sens_meas , //!< Pointer to the sensing information - double info_time -) -{ - rrm_t *rrm = &rrm_inst[inst] ; - - - int i,j; - - //fprintf(stderr,"rrc_update_sens NB_info = %d\n",NB_info);//dbg - // Sens_ch_t *p;//dbg - /*for ( i=0; irrc.pSensEntry != NULL)//dbg - for ( p=rrm->rrc.pSensEntry->info_hd; p!=NULL; p=p->next)//dbg - fprintf(stderr," %d ",p->Ch_id);//dbg - else//dbg - fprintf(stderr," empty ");//dbg - fprintf(stderr,"\n1 update\n");//dbg*/ - for (i=0; irrc.exclu ) ) ; //mod_lor_10_03_08 - update_node_info( &(rrm->rrc.pSensEntry), &L2_id, NB_info, Sens_meas, info_time); - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; //mod_lor_10_03_08 - - - //AAA: for the moment the channel db is reserved for CHs and SUs only in SCEN_2_DISTR - - - if ( SCEN_2_DISTR) { - - //fprintf(stderr,"cluster_head\n");//dbg - - CHANNEL_T channel ; - CHANNELS_DB_T *canal; - unsigned int *is_free; //mod_eure_lor //mod_lor_10_05_28 ->char instead of int - - for (i=0; irrc.exclu ) ) ; //mod_lor_10_03_08 - canal = up_chann_db( &(rrm->rrc.pChannelsEntry), channel, is_free[0], info_time);//TO DO SCEN2 DISTR fix it! - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; //mod_lor_10_03_08 - //fprintf(stderr,"inst %d, channel %d, is_free %d\n", inst,Sens_meas[i].Ch_id,Sens_meas[i].is_free);//dbg - //fprintf(stderr,"chann %d updated\n", Sens_meas[i].Ch_id);//dbg - - } - - //AAA: just to save the right L2_id in SCEN_2_DISTR - if ( rrm->state != CLUSTERHEAD && SCEN_2_DISTR) - memcpy( rrm->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ; - - } - - // mod_lor_10_01_25: monitoring will be launched after an Update SN occupied frequencies message from BTS - /*if ( rrm->state == CLUSTERHEAD && !SCEN_2_DISTR) - { - unsigned int ch_to_scan[NB_info]; - for (i=0; iL2_id_FC), &L2_id))==0){ - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; - rrm->rrc.trans_cnt++ ; - //To send via IP: PUT_RRC_MSG(msg_rrm_clust_mon_req( inst, L2_id, ch_to_scan, NB_info, 0.5, rrm->rrc.trans_cnt)); - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - } - else{ - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; - rrm->rrc.trans_cnt++ ; - PUT_RRC_MSG(msg_rrm_init_mon_req( inst, L2_id, NB_info, 0.5, ch_to_scan, rrm->rrc.trans_cnt)); - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - } - }*/ -#ifndef RRC_EMUL - else if (!SCEN_2_DISTR && rrm->state != CLUSTERHEAD) { ///< Case in which a sensor have to inform the FC via IP about its sensing results - //fprintf (stdout,"msg IP to send from inst %d\n",rrm->id);//dbg - pthread_mutex_lock( &( rrm->ip.exclu ) ) ; - rrm->ip.trans_cnt++ ; - - //mod_lor_10_04_22++ - /*int r = send_msg_int( rrm->ip.s, msg_update_sens_results_3( inst, rrm->L2_id, NB_info, Sens_meas, rrm->ip.trans_cnt)); - WARNING(r!=0);*/ - fprintf(stderr,"before msg_update_sens %d\n",rrm->L2_id.L2_id[0]);//dbg mod_lor_11_02_17 - PUT_IP_MSG(msg_update_sens_results_3( (rrm->L2_id.L2_id[0]-FIRST_MR_ID+1), rrm->L2_id, NB_info, Sens_meas, rrm->ip.trans_cnt)); - - //mod_lor_10_04_22-- - pthread_mutex_unlock( &( rrm->ip.exclu ) ) ; - - //mod_lor_10_04_21++ TO DO -> to remove when sensing remont automatically info - //sleep(10); - /*if(rrm->sensing.sens_active){ - sleep(10); - pthread_mutex_lock( &( rrm->sensing.exclu ) ) ; - rrm->sensing.trans_cnt++ ; - //fprintf(stderr,"sensing counter %d in msg_rrm_scan_ord on socket %d \n",rrm->sensing.trans_cnt,rrm->sensing.s->s);//dbg - PUT_SENS_MSG(msg_rrm_scan_ord( inst, NB_info, 0, 0, 0, Sens_meas, rrm->sensing.trans_cnt )); //mod_lor_10_04_01: Sampl_nb instead of Sampl_freq - pthread_mutex_unlock( &( rrm->sensing.exclu ) ) ; - }*/ - //mod_lor_10_04_21-- - - } - -#endif - //fprintf(stderr,"end funct rrc_update_sens\n");//dbg -} - - -/*! -******************************************************************************* - \brief CMM init sensing request. Only in CH/FC. -*/ -void cmm_init_sensing( - Instance_t inst, //!< identification de l'instance - unsigned int Start_fr, - unsigned int Stop_fr, - unsigned int Meas_band, - unsigned int Meas_tpf, - unsigned int Nb_channels, - unsigned int Overlap, - unsigned int Sampl_freq -) -{ - rrm_t *rrm = &rrm_inst[inst] ; - - //if ( (rrm->state == CLUSTERHEAD_INIT1 ) || (rrm->state == CLUSTERHEAD ) ) - if (rrm->role == FUSIONCENTER || rrm->role == CH_COLL) { //mod_lor_10_05_05 - - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; - rrm->rrc.trans_cnt++ ; - //fprintf(stderr,"rrc counter %d in rrm_init_scan_req \n",rrm->rrc.trans_cnt);//dbg - PUT_RRC_MSG(msg_rrm_init_scan_req( inst, Start_fr ,Stop_fr,Meas_band, Meas_tpf, - Nb_channels, Overlap, Sampl_freq, rrm->rrc.trans_cnt)); - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - - //mod_lor_10_05_05++ - /*if (SCEN_2_CENTR && rrm->role == FUSIONCENTER){ - pthread_mutex_lock( &( rrm->ip.exclu ) ) ; - rrm->ip.trans_cnt++ ; - PUT_IP_MSG(msg_init_coll_sens_req( inst, rrm->L2_id, Start_fr, Stop_fr,Meas_band, Meas_tpf, - Nb_channels, Overlap, Sampl_freq, rrm->ip.trans_cnt)); - pthread_mutex_unlock( &( rrm->ip.exclu ) ) ; - }*/ - //mod_lor_10_05_05-- - - } else { - fprintf(stderr,"It is not a cluster head!!!"); - } - - - -} - -/*! -******************************************************************************* - \brief rrc transmits order to start sensing received from the clusterhead. - * The node will than activate its sensing unit sending a scan_ord message -*/ -//mod_lor_10_03_13++ -void rrc_init_scan_req( - Instance_t inst , //!< identification de l'instance - L2_ID L2_id , //!< FC/CH address - unsigned int Start_fr, - unsigned int Stop_fr, - unsigned int Meas_band, - unsigned int Meas_tpf, - unsigned int Nb_channels, - unsigned int Overlap, - unsigned int Sampl_freq, - Transaction_t Trans_id //!< Transaction ID -) -{ - rrm_t *rrm = &rrm_inst[inst] ; - Sens_ch_t ch_info_init[Nb_channels]; - unsigned int Sampl_nb = 0;//((Start_fr - Stop_fr)/Sampl_freq)/Nb_channels; //mod_lor_10_04_01: number of samples per sub-band - unsigned int act_start_fr = Start_fr; - - for (int i = 0; irrc.exclu ) ) ; //mod_lor_10_03_13 - update_node_par( &(rrm->rrc.pSensEntry), &(rrm->L2_id), Nb_channels, ch_info_init, 0,Meas_tpf,Overlap,Sampl_freq); //mod_lor_10_02_19 - //update_node_info( &(rrm->rrc.pSensEntry), &(rrm->L2_id), Nb_channels, ch_info_init, 0); - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; //mod_lor_10_03_13 - - - memcpy( rrm->L2_id_FC.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ; - - pthread_mutex_lock( &( rrm->sensing.exclu ) ) ; - rrm->sensing.trans_cnt++ ; - //fprintf(stderr,"sensing counter %d in msg_rrm_scan_ord on socket %d \n",rrm->sensing.trans_cnt,rrm->sensing.s->s);//dbg - PUT_SENS_MSG(msg_rrm_scan_ord( inst, Nb_channels, Meas_tpf, Overlap, Sampl_nb, ch_info_init, Trans_id )); //mod_lor_10_04_01: Sampl_nb instead of Sampl_freq - pthread_mutex_unlock( &( rrm->sensing.exclu ) ) ; - -}//mod_lor_10_03_13-- - -/*! -******************************************************************************* - \brief CMM stop sensing request. Only in CH/FC. With this function the node - sends an order to stop sensing to all sensing nodes that were regeistered - in sensing database. -*/ -void cmm_stop_sensing( - Instance_t inst //!< identification de l'instance -) -{ - rrm_t *rrm = &rrm_inst[inst] ; - - // fprintf(stderr,"stop sensing %d role %d\n\n\n\n\n\n\n\n\n", rrm->id, rrm->role);//dbg - // if ( (rrm->state == CLUSTERHEAD_INIT1 ) || (rrm->state == CLUSTERHEAD ) ) - if ( (rrm->role == FUSIONCENTER ) || (rrm->role == CH_COLL ) ) { //mod_lor_10_05_06 - //fprintf(stderr,"2 end\n");//dbg - Sens_node_t *p = rrm->rrc.pSensEntry; - - if (p == NULL) - fprintf(stderr,"no sensor node information saved\n"); - - while (p!=NULL) { - //for ( int i=0;i<8;i++) - // fprintf(stderr,"cmm_stop_sens: to send on %X end\n",p->L2_id.L2_id[i]);//dbg - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; - rrm->rrc.trans_cnt++ ; - //fprintf(stderr,"rrc counter %d in msg_rrm_end_scan_req \n",rrm->rrc.trans_cnt);//dbg - PUT_RRC_MSG(msg_rrm_end_scan_req( inst, p->L2_id, rrm->rrc.trans_cnt)); - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - p = p->next; - } - - //mod_lor_10_05_06++ - if (SCEN_2_CENTR) { //TO DO: need to add control to know if collaboration is active - if (rrm->role == FUSIONCENTER) { - sleep(2); - pthread_mutex_lock( &( rrm->ip.exclu ) ) ; - rrm->ip.trans_cnt++ ; - //fprintf(stderr,"rrc counter %d in msg_rrm_end_scan_req \n",rrm->rrc.trans_cnt);//dbg - PUT_IP_MSG(msg_stop_coll_sens( inst)); - pthread_mutex_unlock( &( rrm->ip.exclu ) ) ; - } else { - pthread_mutex_lock( &( rrm->ip.exclu ) ) ; - rrm->ip.trans_cnt++ ; - //fprintf(stderr,"rrc counter %d in msg_rrm_end_scan_req \n",rrm->rrc.trans_cnt);//dbg - //PUT_IP_MSG(msg_stop_coll_sens_conf( inst)); - pthread_mutex_unlock( &( rrm->ip.exclu ) ) ; - } - } - - /*if (SCEN_2_CENTR ){ //!< To inform the CH that is collaborating in sensing to stop sensing - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; - rrm->rrc.trans_cnt++ ; - //fprintf(stderr,"rrc counter %d in msg_rrm_end_scan_req \n",rrm->rrc.trans_cnt);//dbg - PUT_RRC_MSG(msg_rrm_end_scan_req( inst, rrm->L2_id_FC, rrm->rrc.trans_cnt)); - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - }*/ - //mod_lor_10_05_06-- - - } - - - else { - fprintf(stderr,"It is not a cluster head!!!"); - } - - - -} - - -/*! -\brief RRC ending sensing confirmation - */ -void rrc_end_scan_conf( - Instance_t inst , //!< instance ID - L2_ID L2_id , //!< FC/CH address - Transaction_t Trans_id //!< Transaction ID - -) -{ - rrm_t *rrm = &rrm_inst[inst] ; - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; - del_node( &(rrm->rrc.pSensEntry), &L2_id ) ; - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - - if ((rrm->role == CH_COLL) && (rrm->rrc.pSensEntry == NULL)) { - //printf("before IP message\n");//dbg - pthread_mutex_lock( &( rrm->ip.exclu ) ) ; - PUT_IP_MSG(msg_stop_coll_sens_conf( inst, rrm->L2_id)); //mod_lor_10_05_12 - pthread_mutex_unlock( &( rrm->ip.exclu ) ) ; - //printf("after IP message\n");//dbg - } - - -} - -/*! -\brief RRC ending sensing request - */ -void rrc_end_scan_req( - Instance_t inst , //!< instance ID - L2_ID L2_id , //!< FC/CH address - Transaction_t Trans_id //!< Transaction ID - -) -{ - - //fprintf(stdout,"rrc_end_scan_req() cp1 %d\n",inst); //dbg - rrm_t *rrm = &rrm_inst[inst] ; - Sens_node_t *pNode = rrm->rrc.pSensEntry; - - if (pNode==NULL) - fprintf(stderr,"Database empty \n"); - - else { - if (rrm->role == CH_COLL && (L2_ID_cmp(&(rrm->L2_id_FC), &L2_id))==0 ) { ///< case SCEN_2_CENTR - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;//mod_lor_10_03_08 - pNode = rrm->rrc.pSensEntry;//mod_lor_10_03_08 - - while (pNode!=NULL) { - - rrm->rrc.trans_cnt++ ; - //fprintf(stderr,"rrc counter %d msg_rrm_end_scan_req \n",rrm->rrc.trans_cnt);//dbg - PUT_RRC_MSG(msg_rrm_end_scan_req( inst, pNode->L2_id, rrm->rrc.trans_cnt)); - - pNode = pNode->next; - } - - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; //mod_lor_10_03_08 - - } else { - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;//mod_lor_10_03_08 - pNode = rrm->rrc.pSensEntry;//mod_lor_10_03_08 - unsigned int i=0, Nb_chan = rrm->rrc.pSensEntry->Nb_chan; - Sens_ch_t *ch_point = rrm->rrc.pSensEntry->info_hd; - unsigned int channels[Nb_chan]; - - ch_point = rrm->rrc.pSensEntry->info_hd; - - while (ch_point!=NULL) { - channels[i]=ch_point->Ch_id; - ch_point = ch_point->next; - i++; - } - - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;//mod_lor_10_03_08 - - if ((L2_ID_cmp(&(rrm->L2_id_FC), &L2_id))==0) { - - pthread_mutex_lock( &( rrm->sensing.exclu ) ) ; - rrm->sensing.trans_cnt++ ; - PUT_SENS_MSG(msg_rrm_end_scan_ord(inst, Nb_chan, channels, Trans_id )); - pthread_mutex_unlock( &( rrm->sensing.exclu ) ) ; - } else { - fprintf(stderr,"The message received is not from the right FC \n"); - } - } - } - - //dbg: test end_scan_ack - /* - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; - rrm->rrc.trans_cnt++ ; - - PUT_RRC_MSG(msg_rrm_end_scan_ord(inst, rrm->L2_id_FC, 0, NULL, Trans_id )); - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;*/ - - -} - -/*! -******************************************************************************* - \brief rrc transmits order to monitor channels -*/ -void rrc_init_mon_req( - Instance_t inst , //!< identification de l'instance - L2_ID L2_id , //!< FC address - unsigned int *ch_to_scan , //!< vector of identifiers of the channels to monitor - unsigned int NB_chan , //!< Number of channels to monitor - unsigned int interv , //!< time between two sensing operation - Transaction_t Trans_id //!< Transaction ID -) -{ - rrm_t *rrm = &rrm_inst[inst] ; - - if ((L2_ID_cmp(&(rrm->L2_id_FC), &L2_id))==0) { - - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; - rrm->rrc.trans_cnt++ ; - //memcpy( rrm->L2_id_FC.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ; - //fprintf(stderr,"rrc counter %d msg_rrm_scan_ord \n",rrm->rrc.trans_cnt);//dbg - //PUT_RRC_MSG(msg_rrm_scan_ord( inst, NB_chan, ch_to_scan, Trans_id )); - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - } else { - fprintf(stderr,"The message received is not from the right FC \n"); - } - -} - -//To send via IP: - -/*! -******************************************************************************* - \brief rrc transmits order to monitor channels -*/ -/* -void rrc_clust_scan_req( - Instance_t inst , //!< instance ID - L2_ID L2_id , //!< Layer 2 (MAC) ID of CH1 - float interv , //!< time between two sensing operation - COOPERATION_T coop , //!< Cooperation mode - Transaction_t Trans_id //!< Transaction ID - ) -{ - rrm_t *rrm = &rrm_inst[inst] ; - - memcpy( rrm->L2_id_FC.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ; - rrm->role = CH_COLL; - - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; - rrm->rrc.trans_cnt++ ; - PUT_RRC_MSG(msg_rrm_init_scan_req( inst, interv, rrm->rrc.trans_cnt)); - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; - rrm->rrc.trans_cnt++ ; - PUT_RRC_MSG(msg_rrm_clust_scan_conf( inst, L2_id, coop, Trans_id)); - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - - - -}*/ - -/*! -******************************************************************************* - \brief rrc transmits order from CH1 to monitor channels -*/ -/* -void rrc_clust_mon_req( - Instance_t inst , //!< identification de l'instance - L2_ID L2_id , //!< Layer 2 (MAC) ID of CH1 - unsigned int *ch_to_scan , //!< vector of identifiers of the channels to monitor - unsigned int NB_chan , //!< Number of channels to monitor - float interv , //!< time between two sensing operation - Transaction_t Trans_id //!< Transaction ID - ) -{ - rrm_t *rrm = &rrm_inst[inst] ; - - if ((L2_ID_cmp(&(rrm->L2_id_FC), &L2_id))==0) { - - Sens_node_t *pNode = rrm->rrc.pSensEntry; - while (pNode!=NULL){ - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; - rrm->rrc.trans_cnt++ ; - PUT_RRC_MSG(msg_rrm_init_mon_req( inst, pNode->L2_id, NB_chan, interv, ch_to_scan, Trans_id )); - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - pNode = pNode->next; - } - - - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; - rrm->rrc.trans_cnt++ ; - PUT_RRC_MSG(msg_rrm_clust_mon_conf( inst, L2_id, Trans_id )); - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - - - } - else { - fprintf(stderr,"The message received is not from the right CH \n"); - } -}*/ - -/*!mod_lor_10_11_03 -> part about SCEN_2 and CH_COLL -******************************************************************************* -\brief Updating of the sensing measures received via IP from another node -*/ -unsigned int update_sens_results( - Instance_t inst , //!< Identification de l'instance - L2_ID L2_id , //!< Adresse L2 of the source of information - unsigned int NB_info , //!< Number of channel info - Sens_ch_t *Sens_meas , //!< Pointer to the sensing information - double info_time -) -{ - rrm_t *rrm = &rrm_inst[inst] ; - - CHANNELS_DB_T *channel; - int i,j,k, send_up_to_SN=0; - unsigned int all_result; - int tot_ch; - //L2_ID User_active_L2_id; - - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; - update_node_info( &(rrm->rrc.pSensEntry), &L2_id, NB_info, Sens_meas, info_time); - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - - //mod_lor_10_10_27++ - if(rrm->role == CH_COLL) { - //AAA: add procedure to take decision from the database -> send a probability that the channel is busy to primary - - Sens_ch_t coll_measures[NB_SENS_MAX]; - Sens_node_t *pNode=rrm->rrc.pSensEntry; - unsigned int weight=0; ///number of sensors of CH_COLL - - while (pNode!=NULL) { - weight++; - pNode=pNode->next; - } - - //printf ("nodes %d\n",weight);//dbg - - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; - - for (i=0; take_ch_coll_decision( rrm->rrc.pSensEntry, &coll_measures[i],(i+1))==0; i++); - - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - - // pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; - // take_ch_coll_decision(rrm->rrc.pSensEntry, channel.Ch_id,is_free); - // pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - - pthread_mutex_lock( &( rrm->ip.exclu ) ) ; - rrm->ip.trans_cnt++ ; - PUT_IP_MSG(msg_up_clust_sens_results( inst, rrm->L2_id, i, weight, coll_measures, rrm->ip.trans_cnt)); - pthread_mutex_unlock( &( rrm->ip.exclu ) ) ; - - } - - //mod_lor_10_10_27++ - - //mod_lor_10_05_28 - ///case of scenario 1 - if (SCEN_1) { - if (!(rrm->ip.waiting_SN_update) ) { - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; - channel = rrm->rrc.pChannelsEntry; - - while (channel!=NULL) { - //printf("Channel!=NULL\n"); - if (channel->is_ass) - if((send_up_to_SN = evalaute_sens_info(rrm->rrc.pSensEntry,channel->channel.Start_f,channel->channel.Final_f))) - break; - - channel = channel->next; - } - - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - - if (send_up_to_SN && rrm->role == FUSIONCENTER) { - return 1; - //open_freq_query(inst, L2_id, 0, 0); - } - } - } - ///case of scenario 2 add_lor_10_11_03 - else if (SCEN_2_CENTR) { - int free_av=0; - int N_chan=0; - int chan_in_use=0; - unsigned int reallocate = 0; - L2_ID User_active_L2_id[MAX_USER_NB]; - L2_ID User_dest_L2_id[MAX_USER_NB]; - CHANNELS_DB_T *t_channels_db = NULL; - - ///check part: it evaluates if a channel in use is not free anymore - send_up_to_SN = check_allocated_channels( inst, User_active_L2_id ,User_dest_L2_id ,&free_av); - - ///Attribute new channels to users that have to change or that are waiting - if (send_up_to_SN>0 || rrm->ip.users_waiting_update>0) { - /// case in which there are enough free channels - if (free_av>=(send_up_to_SN + rrm->ip.users_waiting_update)) { - pthread_mutex_lock( &( rrm->ip.exclu ) ) ; - j = rrm->ip.users_waiting_update-1; - - for (k = send_up_to_SN; k<(send_up_to_SN + rrm->ip.users_waiting_update); k++) { - memcpy(User_active_L2_id[k].L2_id , rrm->ip.L2_id_wait_users[j][0].L2_id, sizeof(L2_ID)); - memcpy(User_dest_L2_id[k].L2_id , rrm->ip.L2_id_wait_users[j][1].L2_id, sizeof(L2_ID)); - j--; - } - - all_result = ask_freq_to_CH( inst, User_active_L2_id, User_dest_L2_id,k, 0 ); ///Update of channels for both busy and waiting users - - if (all_result == 0) { - rrm->ip.users_waiting_update=0; - } else { - printf ("ERROR!!! in if free not enough free!!! all_result =%d\n",all_result);//dbg - } - - pthread_mutex_unlock( &( rrm->ip.exclu ) ) ; - } - - ///no channels to change, but users waiting channels //add_lor_10_11_08++ - ///reallocate only if there are more available channels, otherwise don't do anything - else if (send_up_to_SN==0 && rrm->ip.users_waiting_update>0) { - chan_in_use = count_free_channels (inst, &free_av); - tot_ch = chan_in_use + free_av; - N_chan = find_available_channels(rrm->rrc.pSensEntry,&(t_channels_db)); - del_all_channels( &(t_channels_db)); - - if (N_chan>tot_ch) { - reallocate = 1; - } else if (free_av>0) { - pthread_mutex_lock( &( rrm->ip.exclu ) ) ; - - for (k=0; rrm->ip.users_waiting_update>0 && free_av>0; k++) { /// allocate frequencies to waiting users - memcpy(User_active_L2_id[k].L2_id , rrm->ip.L2_id_wait_users[rrm->ip.users_waiting_update-1][0].L2_id, sizeof(L2_ID)); - memcpy(User_dest_L2_id[k].L2_id , rrm->ip.L2_id_wait_users[rrm->ip.users_waiting_update-1][1].L2_id, sizeof(L2_ID)); - free_av--; - rrm->ip.users_waiting_update--; - printf ("N7 tot waiting: %d\n",rrm->ip.users_waiting_update);//db - } - - all_result = ask_freq_to_CH( inst, User_active_L2_id, User_dest_L2_id,k, 0 ); ///Update of channels for waiting users - pthread_mutex_unlock( &( rrm->ip.exclu ) ) ; - } - }//add_lor_10_11_08-- - - ///all channels to reallocate - if (reallocate || (free_av<=(send_up_to_SN + rrm->ip.users_waiting_update) && send_up_to_SN>0)) { - chan_in_use = count_free_channels (inst, &free_av); - tot_ch = chan_in_use + send_up_to_SN; - - if (chan_in_use!=0) { - ///add all channels in use to channels to change - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; - t_channels_db = rrm->rrc.pChannelsEntry; - - while (t_channels_db!=NULL) { - if (t_channels_db->is_ass && t_channels_db->is_free) { - memcpy(User_active_L2_id[send_up_to_SN].L2_id , t_channels_db->source_id.L2_id, sizeof(L2_ID)); - memcpy(User_dest_L2_id[send_up_to_SN].L2_id , t_channels_db->dest_id.L2_id, sizeof(L2_ID)); - send_up_to_SN++; - } - - t_channels_db = t_channels_db->next; - } - - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - } - - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; - del_all_channels( & (rrm->rrc.pChannelsEntry) ); - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - pthread_mutex_lock( &( rrm->ip.exclu ) ) ; - - for (k = send_up_to_SN, j = rrm->ip.users_waiting_update-1; j>=0 ; j--,k++) { - memcpy(User_active_L2_id[k].L2_id , rrm->ip.L2_id_wait_users[j][0].L2_id, sizeof(L2_ID)); - memcpy(User_dest_L2_id[k].L2_id , rrm->ip.L2_id_wait_users[j][1].L2_id, sizeof(L2_ID)); - } - - all_result = ask_freq_to_CH( inst, User_active_L2_id, User_dest_L2_id,k, 0 ); ///Update of channels for waiting users - pthread_mutex_unlock( &( rrm->ip.exclu ) ) ; - - if (all_result == 0) { - pthread_mutex_lock( &( rrm->ip.exclu ) ) ; - rrm->ip.users_waiting_update=0; - pthread_mutex_unlock( &( rrm->ip.exclu ) ) ; - } else { - pthread_mutex_lock( &( rrm->ip.exclu ) ) ; - rrm->ip.users_waiting_update=0; - - for (j=1; j<=all_result; j++) { - memcpy(rrm->ip.L2_id_wait_users[rrm->ip.users_waiting_update][0].L2_id,User_active_L2_id[k-j].L2_id, sizeof(L2_ID)); - memcpy(rrm->ip.L2_id_wait_users[rrm->ip.users_waiting_update][1].L2_id,User_dest_L2_id[k-j].L2_id, sizeof(L2_ID)); - rrm->ip.users_waiting_update++; - printf ("N8 tot waiting: %d\n",rrm->ip.users_waiting_update);//db - } - - pthread_mutex_unlock( &( rrm->ip.exclu ) ) ; - } - } - } - } - - return 0; - - - //fprintf(stderr,"node entry @%p \n", rrm->rrc.pSensEntry);//dbg - //fprintf(stderr,"2 cluster_head\n");//dbg - //AAA: for the moment the channel db is reserved for CHs and SUs only in SCEN_2_DISTR - /*Sens_node_t *pn = rrm->rrc.pSensEntry; - Sens_ch_t *pc; - while (pn!=NULL){ - pc = pn->info_hd; - while (pc!=NULL){ - for (int j=0; jCh_id, j, pc->is_free[j]);//dbg - pc=pc->next; - } - pn=pn->next; - }*/ - - - /*if ( rrm->role == FUSIONCENTER || SCEN_2_DISTR || rrm->role == CH_COLL ) //mod_lor_10_03_08: role instead of status -> to check - //mod_lor_10_05_06 -> 2nd option of if changed (before SCEN_2_DISTR) - { - - //fprintf(stderr,"cluster_head\n");//dbg - CHANNEL_T channel ; - CHANNELS_DB_T *canal; - unsigned int is_free[MAX_NUM_SB];//mod_lor_10_05_28 ->char instead of int - for (i=0;irrc.exclu ) ) ; - take_decision(rrm->rrc.pSensEntry, channel.Ch_id,is_free);//mod_eure_lor - // pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - //mod_lor_10_03_19-- - - //mod_lor_10_05_07++ - if (decision>0) - is_free = 1; - else - is_free = 0;*/ - - - - //Sens_meas[i].meas = decision; - - /* if(rrm->role == CH_COLL){ - memcpy(Sens_meas[i].is_free, is_free, MAX_NUM_SB*sizeof(unsigned int));//mod_lor_10_05_28 ->char instead of int - //Sens_meas[i].meas = decision; - } - //mod_lor_10_05_07-- - - fprintf(stdout,"Channel %d : \n", channel.Ch_id); //dbg ou LOG - for (decision = 0; decisionrrc.exclu ) ) ; - /* canal = up_chann_db( &(rrm->rrc.pChannelsEntry), channel, is_free[0], info_time);//TO DO: fix it! - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - //mod_lor_10_05_12++ - if (!(rrm->ip.waiting_SN_update) && canal->is_ass && !(canal->is_free)){//mod_lor_10_05_18 - //fprintf(stderr,"send_up_to_SN =1\n");//dbg - send_up_to_SN =1;//mod_lor_10_05_12-- - } - //fprintf(stderr,"chann %d updated\n", Sens_meas[i].Ch_id);//dbg - - } - //mod_lor_10_05_07++ - if(rrm->role == CH_COLL){ - pthread_mutex_lock( &( rrm->ip.exclu ) ) ; - rrm->ip.trans_cnt++ ; - PUT_IP_MSG(msg_up_clust_sens_results( inst, rrm->L2_id, NB_info, decision, Sens_meas, rrm->ip.trans_cnt)); - pthread_mutex_unlock( &( rrm->ip.exclu ) ) ; - - }//mod_lor_10_05_07-- - //mod_lor_10_05_12++ - if (send_up_to_SN && rrm->role == FUSIONCENTER){ - open_freq_query(inst, L2_id, 0, 0); - } - - - }else - fprintf(stderr,"error!!! Cannot update channels \n");*/ - -} - -//mod_lor_10_04_14++ -/*! -******************************************************************************* -\brief SENSING unit end scan confirmation -*/ -void sns_end_scan_conf( - Instance_t inst //!< Identification de l'instance -) -{ - rrm_t *rrm = &rrm_inst[inst] ; - - ///< Next three lines delete the local sensing information database - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; - del_node( &(rrm->rrc.pSensEntry), &(rrm->L2_id)); - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - - // AAA TO DO: Confirmation sent via RRC to the fusion centre in case FC id != 0 - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; - rrm->rrc.trans_cnt++ ; - //fprintf(stderr, "before put RRM_end_scan_confirm\n");//dbg - PUT_RRC_MSG(msg_rrm_end_scan_conf( inst, rrm->rrc.trans_cnt)); - //fprintf(stderr, "after put RRM_end_scan_confirm\n"); //dbg - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - -} -//mod_lor_10_04_14-- - -/*!//mod_lor_10_11_03 -******************************************************************************* -\brief Updating of the sensing measures received via IP from another node -*/ -void up_coll_sens_results( - Instance_t inst , //!< Identification de l'instance - L2_ID L2_id , //!< Adresse L2 of the source of information - unsigned int NB_info , //!< Number of channel info - Sens_ch_t *Sens_meas , //!< Pointer to the sensing information - double info_time -) -{ - rrm_t *rrm = &rrm_inst[inst] ; - int free_av=0; - int N_chan=0; - int chan_in_use=0; - unsigned int reallocate = 0; - L2_ID User_active_L2_id[MAX_USER_NB]; - L2_ID User_dest_L2_id[MAX_USER_NB]; - CHANNELS_DB_T *t_channels_db = NULL; - int i,j,k, send_up_to_SN=0; - unsigned int all_result; - int tot_ch; - - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; - update_node_info( &(rrm->rrc.pSensEntry), &L2_id, NB_info, Sens_meas, info_time); - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - - if (SCEN_2_CENTR && rrm->role == FUSIONCENTER) { - ///check part: it evaluates if a channel in use is not free anymore - send_up_to_SN = check_allocated_channels( inst, User_active_L2_id ,User_dest_L2_id ,&free_av); - - ///Attribute new channels to users that have to change or that are waiting - if (send_up_to_SN>0 || rrm->ip.users_waiting_update>0) { - /// case in which there are enough free channels - if (free_av>=(send_up_to_SN + rrm->ip.users_waiting_update)) { - pthread_mutex_lock( &( rrm->ip.exclu ) ) ; - j = rrm->ip.users_waiting_update-1; - - for (k = send_up_to_SN; k<(send_up_to_SN + rrm->ip.users_waiting_update); k++) { - memcpy(User_active_L2_id[k].L2_id , rrm->ip.L2_id_wait_users[j][0].L2_id, sizeof(L2_ID)); - memcpy(User_dest_L2_id[k].L2_id , rrm->ip.L2_id_wait_users[j][1].L2_id, sizeof(L2_ID)); - j--; - } - - all_result = ask_freq_to_CH( inst, User_active_L2_id, User_dest_L2_id,k, 0 ); ///Update of channels for both busy and waiting users - - if (all_result == 0) { - rrm->ip.users_waiting_update=0; - } else { - printf ("ERROR!!! in if free not enough free!!! all_result =%d\n",all_result);//dbg - } - - pthread_mutex_unlock( &( rrm->ip.exclu ) ) ; - } - - ///no channels to change, but users waiting channels //add_lor_10_11_08++ - ///reallocate only if there are more available channels, otherwise don't do anything - else if (send_up_to_SN==0 && rrm->ip.users_waiting_update>0) { - chan_in_use = count_free_channels (inst, &free_av); - tot_ch = chan_in_use + free_av; - N_chan = find_available_channels(rrm->rrc.pSensEntry,&(t_channels_db)); - del_all_channels( &(t_channels_db)); - - if (N_chan>tot_ch) { - reallocate = 1; - } else if (free_av>0) { - pthread_mutex_lock( &( rrm->ip.exclu ) ) ; - - for (k=0; rrm->ip.users_waiting_update>0 && free_av>0; k++) { /// allocate frequencies to waiting users - memcpy(User_active_L2_id[k].L2_id , rrm->ip.L2_id_wait_users[rrm->ip.users_waiting_update-1][0].L2_id, sizeof(L2_ID)); - memcpy(User_dest_L2_id[k].L2_id , rrm->ip.L2_id_wait_users[rrm->ip.users_waiting_update-1][1].L2_id, sizeof(L2_ID)); - free_av--; - rrm->ip.users_waiting_update--; - printf ("N9 tot waiting: %d\n",rrm->ip.users_waiting_update);//db - } - - all_result = ask_freq_to_CH( inst, User_active_L2_id, User_dest_L2_id,k, 0 ); ///Update of channels for waiting users - pthread_mutex_unlock( &( rrm->ip.exclu ) ) ; - } - }//add_lor_10_11_08-- - - ///all channels to reallocate - if (reallocate || (free_av<=(send_up_to_SN + rrm->ip.users_waiting_update) && send_up_to_SN>0)) { - chan_in_use = count_free_channels (inst, &free_av); - tot_ch = chan_in_use + send_up_to_SN; - - if (chan_in_use!=0) { - ///add all channels in use to channels to change - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; - t_channels_db = rrm->rrc.pChannelsEntry; - - while (t_channels_db!=NULL) { - if (t_channels_db->is_ass && t_channels_db->is_free) { - memcpy(User_active_L2_id[send_up_to_SN].L2_id , t_channels_db->source_id.L2_id, sizeof(L2_ID)); - memcpy(User_dest_L2_id[send_up_to_SN].L2_id , t_channels_db->dest_id.L2_id, sizeof(L2_ID)); - send_up_to_SN++; - } - - t_channels_db = t_channels_db->next; - } - - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - } - - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; - del_all_channels( & (rrm->rrc.pChannelsEntry) ); - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - pthread_mutex_lock( &( rrm->ip.exclu ) ) ; - - for (k = send_up_to_SN, j = rrm->ip.users_waiting_update-1; j>=0 ; j--,k++) { - memcpy(User_active_L2_id[k].L2_id , rrm->ip.L2_id_wait_users[j][0].L2_id, sizeof(L2_ID)); - memcpy(User_dest_L2_id[k].L2_id , rrm->ip.L2_id_wait_users[j][1].L2_id, sizeof(L2_ID)); - } - - all_result = ask_freq_to_CH( inst, User_active_L2_id, User_dest_L2_id,k, 0 ); ///Update of channels for waiting users - pthread_mutex_unlock( &( rrm->ip.exclu ) ) ; - - if (all_result == 0) { - pthread_mutex_lock( &( rrm->ip.exclu ) ) ; - rrm->ip.users_waiting_update=0; - pthread_mutex_unlock( &( rrm->ip.exclu ) ) ; - } else { - pthread_mutex_lock( &( rrm->ip.exclu ) ) ; - rrm->ip.users_waiting_update=0; - - for (j=1; j<=all_result; j++) { - memcpy(rrm->ip.L2_id_wait_users[rrm->ip.users_waiting_update][0].L2_id,User_active_L2_id[k-j].L2_id, sizeof(L2_ID)); - memcpy(rrm->ip.L2_id_wait_users[rrm->ip.users_waiting_update][1].L2_id,User_dest_L2_id[k-j].L2_id, sizeof(L2_ID)); - rrm->ip.users_waiting_update++; - printf ("N10 tot waiting: %d\n",rrm->ip.users_waiting_update);//db - } - - pthread_mutex_unlock( &( rrm->ip.exclu ) ) ; - } - } - } - } - - ///check part - // send_up_to_SN = check_allocated_channels( inst, User_active_L2_id ,User_dest_L2_id ,&free_av); - - /*pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; - channel = rrm->rrc.pChannelsEntry; - tot_ch = 0; - send_up_to_SN=0; - k=0; - free_av=0; - while (channel!=NULL){ - if(evalaute_sens_info(rrm->rrc.pSensEntry,channel->channel.Start_f,channel->channel.Final_f)){ - if (channel->is_ass){ - ///save the address of user active on the channel - memcpy( User_active_L2_id[send_up_to_SN].L2_id, channel->source_id.L2_id, sizeof(L2_ID) ) ; - memcpy( User_dest_L2_id[send_up_to_SN].L2_id, channel->dest_id.L2_id, sizeof(L2_ID) ) ; - send_up_to_SN++; - } - channel->is_free=0; - channels_to_change[tot_ch]= channel->channel.Ch_id; - }else{ - if (!(channel->is_ass)) - free_av++; - channels_to_change[tot_ch]=-1; - } - channel = channel->next; - tot_ch++; - } - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;*/ - - ///Attribute new channels to users that have to change - /* if (send_up_to_SN>0){ - //pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; - /// case in which there are enough free channels - if (free_av>=send_up_to_SN){ - for (k = 0; k < send_up_to_SN; k++) { - ask_freq_to_CH( inst, User_active_L2_id[k], User_dest_L2_id[k],1, 0 ); ///QoS fixed to 1 - } - /*k = 0; ///check on channels to attribute - channel = rrm->rrc.pChannelsEntry; - while (channel!=NULL && k< send_up_to_SN){ - if (channel->is_free && !(channel->is_ass)){ - channel->is_ass=1; - memcpy( channel->source_id.L2_id, User_active_L2_id[k].L2_id, sizeof(L2_ID) ) ; - memcpy( channel->dest_id.L2_id, User_dest_L2_id[k].L2_id, sizeof(L2_ID) ) ; - k++; - } - - }*/ - // } - ///all channels to reallocate - /* else{ - del_all_channels( & (rrm->rrc.pChannelsEntry) ); - for (k = 0; k < send_up_to_SN; k++) { - all_result = ask_freq_to_CH( inst, User_active_L2_id[k], User_dest_L2_id[k],1, 0 ); ///QoS fixed to 1 - if (all_result!=0) - break; - } - //add_lor_10_11_08++ - if (k!=send_up_to_SN){ - printf("Not enough available channels for all users!\n%d links not assigned\n",send_up_to_SN-k);//dbg - pthread_mutex_lock( &( rrm->ip.exclu ) ) ; - while (k < send_up_to_SN){ - memcpy(L2_id_wait_users[users_waiting_update][1].L2_id,User_active_L2_id[k].L2_id, sizeof(L2_ID)); - memcpy(L2_id_wait_users[users_waiting_update][2].L2_id,User_dest_L2_id[k].L2_id, sizeof(L2_ID)); - users_waiting_update++; - k++; - } - pthread_mutex_unlock( &( rrm->ip.exclu ) ) ; - } - //add_lor_10_11_08-- - - - /*k = 0; ///check on channels to attribute - channel = rrm->rrc.pChannelsEntry; - while (channel!=NULL){ - if (channel->is_ass){ - memcpy( User_active_L2_id[k].L2_id, channel->source_id.L2_id, sizeof(L2_ID) ) ; - memcpy( User_dest_L2_id[k].L2_id, channel->dest_id.L2_id, sizeof(L2_ID) ) ; - k++; - } - } - - ///new identification of available channels and allocation to users that need to communicate - NB_chan = find_available_channels(rrm->rrc.pSensEntry,&(rrm->rrc.pChannelsEntry)); - printf ("found channels: %d \n", NB_chan);//dbg - - ///Analysing the list of identified channels - channel = rrm->rrc.pChannelsEntry; - j=0; - - while (channel!=NULL && jis_free && !channel->is_ass){ - memcpy(&(ass_channels[j]) , &(channel->channel), sizeof(CHANNEL_T)); - up_chann_ass( rrm->rrc.pChannelsEntry , ass_channels[j].Ch_id, 1, User_active_L2_id[j], User_dest_L2_id[j] ); - printf ("copied channel: %d start %d end %d\n",ass_channels[j].Ch_id,ass_channels[j].Start_f,ass_channels[j].Final_f);//dbg - j++; - } - channel = channel->next; - }*/ - - // } - //pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - // } - - - //ask_freq_to_CH( inst, User_active_L2_id, send_up_to_SN, 0 ); /// Update sent to user active - - - else - fprintf(stderr,"Error!!! Not a fusion center or not in Scenario 2 \n"); - -} - - -/*!//mod_lor_10_11_03 -******************************************************************************* -\brief check channels in use in second scenario -*/ -int check_allocated_channels( - Instance_t inst , //!< Identification de l'instance - L2_ID *User_active_L2_id , - L2_ID *User_dest_L2_id , - int *free_av -) -{ - rrm_t *rrm = &rrm_inst[inst] ; - CHANNELS_DB_T *channel; - int send_up_to_SN=0; - - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; - channel = rrm->rrc.pChannelsEntry; - send_up_to_SN=0; - *free_av=0; - - while (channel!=NULL) { - if(evalaute_sens_info(rrm->rrc.pSensEntry,channel->channel.Start_f,channel->channel.Final_f)) { - if (channel->is_ass) { - ///save the address of user active on the channel - memcpy( User_active_L2_id[send_up_to_SN].L2_id, channel->source_id.L2_id, sizeof(L2_ID) ) ; - memcpy( User_dest_L2_id[send_up_to_SN].L2_id, channel->dest_id.L2_id, sizeof(L2_ID) ) ; - send_up_to_SN++; - } - - channel->is_free=0; - } else { - if (!(channel->is_ass)) - *free_av++; - } - - channel = channel->next; - } - - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - return (send_up_to_SN); -} - - -/*!//mod_lor_10_11_08 -******************************************************************************* -\brief start_coll_sensing -*/ -void cmm_init_coll_sensing( - Instance_t inst, //!< identification de l'instance - unsigned int Start_fr, - unsigned int Stop_fr, - unsigned int Meas_band, - unsigned int Meas_tpf, - unsigned int Nb_channels, - unsigned int Overlap, - unsigned int Sampl_freq -) -{ - rrm_t *rrm = &rrm_inst[inst] ; - - if (SCEN_2_CENTR && rrm->role == FUSIONCENTER) { - pthread_mutex_lock( &( rrm->ip.exclu ) ) ; - rrm->ip.trans_cnt++ ; - PUT_IP_MSG(msg_init_coll_sens_req( inst, rrm->L2_id, Start_fr, Stop_fr,Meas_band, Meas_tpf, - Nb_channels, Overlap, Sampl_freq, rrm->ip.trans_cnt)); - pthread_mutex_unlock( &( rrm->ip.exclu ) ) ; - } else { - printf ("ERROR! Node is not the main CH or not in the right scenario.\n"); - } -} - -/*!//mod_lor_10_11_08 -******************************************************************************* -\brief count channels in use and free channels in second scenario -*/ -int count_free_channels( - Instance_t inst , //!< Identification de l'instance - int *free_av -) -{ - rrm_t *rrm = &rrm_inst[inst] ; - CHANNELS_DB_T *channel; - int used_ch=0; - - pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; - channel = rrm->rrc.pChannelsEntry; - *free_av=0; - - while (channel!=NULL) { - if(!evalaute_sens_info(rrm->rrc.pSensEntry,channel->channel.Start_f,channel->channel.Final_f)) { - if (!(channel->is_ass)) - *free_av++; - else - used_ch++; - } - - channel = channel->next; - } - - pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; - return (used_ch); -} diff --git a/openair3/MESH/RRM/sens_op.h b/openair3/MESH/RRM/sens_op.h deleted file mode 100755 index 8fb7e26d3a..0000000000 --- a/openair3/MESH/RRM/sens_op.h +++ /dev/null @@ -1,125 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/*! -******************************************************************************* - -\file sens_op.h - -\brief Fichier d'entete contenant les declarations des types, des defines , - et des fonctions relatives a la gestion du channel sensing. - -\author IACOBELLI Lorenzo - -\date 21/10/09 - - -\par Historique: - $Author$ $Date$ $Revision$ - $Id$ - $Log$ - -******************************************************************************* -*/ - -#ifndef SENS_OP_H -#define SENS_OP_H - -#ifdef __cplusplus -extern "C" { -#endif - -//mod_lor_10_05_28: declaration of function for sensing and frequency allocation -unsigned int evalaute_sens_info( - Sens_node_t *Sens_db, - unsigned int Start_f, - unsigned int Final_f -); - -void take_decision( - Sens_node_t *SensDB , //!< pointer to the sensing database - unsigned int Ch_id , //!< channel ID - unsigned int *is_free //mod_lor_10_05_28 ->char instead of int - -); - -unsigned int take_decision_sens( - Sens_node_t *SensDB , //!< pointer to the sensing database - Sens_ch_t *finalSensChann, //!< info that will be returned after decision - unsigned int Ch_id //!< channel ID - -); - -unsigned int find_available_channels( - Sens_node_t *Sens_db, - CHANNELS_DB_T **channels_db -); - -unsigned int evalaute_sens_info( - Sens_node_t *Sens_db, - unsigned int Start_f, - unsigned int Final_f -); - -unsigned int check_SN_channels( - Sens_node_t *Sens_db, - CHANNELS_DB_T *channels_db, - unsigned int *used_channels, - unsigned int nb_used_ch -); - -void take_local_decision( - Sens_ch_t *Sens_info -); - -unsigned int take_ch_coll_decision( - Sens_node_t *SensDB , //!< pointer to the sensing database - Sens_ch_t *finalSensChann, //!< info that will be returned after decision - unsigned int Ch_id //!< channel ID -); - -int check_allocated_channels( - Instance_t inst , //!< Identification de l'instance - L2_ID *User_active_L2_id , - L2_ID *User_dest_L2_id , - int *free_av -); - -int count_free_channels( - Instance_t inst , //!< Identification de l'instance - int *free_av -); -// --------------------------------------------------------------------------- - - -#ifdef __cplusplus -} -#endif - -#endif /* SENS_OP_H */ diff --git a/openair3/MESH/RRM/sens_scen_2_form.c b/openair3/MESH/RRM/sens_scen_2_form.c deleted file mode 100644 index 135888d2fe..0000000000 --- a/openair3/MESH/RRM/sens_scen_2_form.c +++ /dev/null @@ -1,62 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/* Form definition file generated with fdesign. */ - -#include "forms.h" -#include -#include "sens_scen_2_form.h" - -FD_sens_scen_2 *create_form_sens_scen_2(void) -{ - FL_OBJECT *obj; - FD_sens_scen_2 *fdui = (FD_sens_scen_2 *) fl_calloc(1, sizeof(*fdui)); - - fdui->sens_scen_2 = fl_bgn_form(FL_NO_BOX, 460, 280); - obj = fl_add_box(FL_UP_BOX,0,0,460,280,""); - fdui->User_1 = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,20,10,420,100,"User_1"); - fl_set_object_color(obj,FL_BLACK,FL_PALEGREEN); - fl_set_object_lsize(obj,FL_NORMAL_SIZE); - /* fdui->User_3 = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,80,340,600,120,"User_3"); - fl_set_object_color(obj,FL_BLACK,FL_BLUE); - fl_set_object_lsize(obj,FL_NORMAL_SIZE); - fdui->User_4 = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,80,490,600,120,"User_4"); - fl_set_object_color(obj,FL_BLACK,FL_BLUE); - fl_set_object_lsize(obj,FL_NORMAL_SIZE);*/ - fdui->User_2 = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,20,140,420,100,"User_2"); - fl_set_object_color(obj,FL_BLACK,FL_PALEGREEN); - fl_set_object_lsize(obj,FL_NORMAL_SIZE); - fl_end_form(); - - fdui->sens_scen_2->fdui = fdui; - - return fdui; -} -/*---------------------------------------*/ - diff --git a/openair3/MESH/RRM/sens_scen_2_form.fd b/openair3/MESH/RRM/sens_scen_2_form.fd deleted file mode 100644 index a30c331d51..0000000000 --- a/openair3/MESH/RRM/sens_scen_2_form.fd +++ /dev/null @@ -1,106 +0,0 @@ -Magic: 13000 - -Internal Form Definition File - (do not change) - -Number of forms: 1 -Unit of measure: FL_COORD_PIXEL - -=============== FORM =============== -Name: sens_scen_2 -Width: 740 -Height: 650 -Number of Objects: 5 - --------------------- -class: FL_BOX -type: UP_BOX -box: 0 0 740 650 -boxtype: FL_UP_BOX -colors: FL_COL1 FL_COL1 -alignment: FL_ALIGN_CENTER -style: FL_NORMAL_STYLE -size: FL_DEFAULT_SIZE -lcol: FL_BLACK -label: -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: -callback: -argument: - --------------------- -class: FL_XYPLOT -type: IMPULSE_XYPLOT -box: 80 20 600 120 -boxtype: FL_FLAT_BOX -colors: FL_BLACK FL_BLUE -alignment: FL_ALIGN_BOTTOM -style: FL_NORMAL_STYLE -size: FL_NORMAL_SIZE -lcol: FL_BLACK -label: User_1 -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: User_1 -callback: -argument: - --------------------- -class: FL_XYPLOT -type: IMPULSE_XYPLOT -box: 80 340 600 120 -boxtype: FL_FLAT_BOX -colors: FL_BLACK FL_BLUE -alignment: FL_ALIGN_BOTTOM -style: FL_NORMAL_STYLE -size: FL_NORMAL_SIZE -lcol: FL_BLACK -label: User_3 -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: User_3 -callback: -argument: - --------------------- -class: FL_XYPLOT -type: IMPULSE_XYPLOT -box: 80 490 600 120 -boxtype: FL_FLAT_BOX -colors: FL_BLACK FL_BLUE -alignment: FL_ALIGN_BOTTOM -style: FL_NORMAL_STYLE -size: FL_NORMAL_SIZE -lcol: FL_BLACK -label: User_4 -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: User_4 -callback: -argument: - --------------------- -class: FL_XYPLOT -type: IMPULSE_XYPLOT -box: 80 180 600 120 -boxtype: FL_FLAT_BOX -colors: FL_BLACK FL_BLUE -alignment: FL_ALIGN_BOTTOM -style: FL_NORMAL_STYLE -size: FL_NORMAL_SIZE -lcol: FL_BLACK -label: User_2 -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: User_2 -callback: -argument: - -============================== -create_the_forms diff --git a/openair3/MESH/RRM/sens_scen_2_form.h b/openair3/MESH/RRM/sens_scen_2_form.h deleted file mode 100644 index 70d69a3273..0000000000 --- a/openair3/MESH/RRM/sens_scen_2_form.h +++ /dev/null @@ -1,52 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/** Header file generated with fdesign on Thu Nov 4 18:36:46 2010.**/ - -#ifndef FD_sens_scen_2_h_ -#define FD_sens_scen_2_h_ - -/** Callbacks, globals and object handlers **/ - - -/**** Forms and Objects ****/ -typedef struct { - FL_FORM *sens_scen_2; - void *vdata; - char *cdata; - long ldata; - FL_OBJECT *User_1; - FL_OBJECT *User_3; - FL_OBJECT *User_4; - FL_OBJECT *User_2; -} FD_sens_scen_2; - -extern FD_sens_scen_2 * create_form_sens_scen_2(void); - -#endif /* FD_sens_scen_2_h_ */ diff --git a/openair3/MESH/RRM/sens_sensor.c b/openair3/MESH/RRM/sens_sensor.c deleted file mode 100644 index 33841fd3f7..0000000000 --- a/openair3/MESH/RRM/sens_sensor.c +++ /dev/null @@ -1,53 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/* Form definition file generated with fdesign. */ - -#include "forms.h" -#include -#include "sens_sensor.h" - -FD_sens_sensor *create_form_sens_sensor(void) -{ - FL_OBJECT *obj; - FD_sens_sensor *fdui = (FD_sens_sensor *) fl_calloc(1, sizeof(*fdui)); - - fdui->sens_sensor = fl_bgn_form(FL_NO_BOX, 940, 280); - obj = fl_add_box(FL_UP_BOX,0,0,940,280,""); - fdui->local_sensing_results = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,30,30,880,210,"Local Sensing Results"); - fl_set_object_color(obj,FL_BLACK,FL_BLUE); - fl_set_object_lsize(obj,FL_NORMAL_SIZE); - fl_end_form(); - - fdui->sens_sensor->fdui = fdui; - - return fdui; -} -/*---------------------------------------*/ - diff --git a/openair3/MESH/RRM/sens_sensor.fd b/openair3/MESH/RRM/sens_sensor.fd deleted file mode 100644 index 91757e916a..0000000000 --- a/openair3/MESH/RRM/sens_sensor.fd +++ /dev/null @@ -1,52 +0,0 @@ -Magic: 13000 - -Internal Form Definition File - (do not change) - -Number of forms: 1 -Unit of measure: FL_COORD_PIXEL - -=============== FORM =============== -Name: sens_sensor -Width: 940 -Height: 280 -Number of Objects: 2 - --------------------- -class: FL_BOX -type: UP_BOX -box: 0 0 940 280 -boxtype: FL_UP_BOX -colors: FL_COL1 FL_COL1 -alignment: FL_ALIGN_CENTER -style: FL_NORMAL_STYLE -size: FL_DEFAULT_SIZE -lcol: FL_BLACK -label: -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: -callback: -argument: - --------------------- -class: FL_XYPLOT -type: IMPULSE_XYPLOT -box: 30 30 880 210 -boxtype: FL_FLAT_BOX -colors: FL_BLACK FL_BLUE -alignment: FL_ALIGN_BOTTOM -style: FL_NORMAL_STYLE -size: FL_NORMAL_SIZE -lcol: FL_BLACK -label: Local Sensing Results -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: local_sensing_results -callback: -argument: - -============================== -create_the_forms diff --git a/openair3/MESH/RRM/sens_sensor.h b/openair3/MESH/RRM/sens_sensor.h deleted file mode 100644 index f8693efbc4..0000000000 --- a/openair3/MESH/RRM/sens_sensor.h +++ /dev/null @@ -1,49 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/** Header file generated with fdesign on Fri Feb 18 14:31:56 2011.**/ - -#ifndef FD_sens_sensor_h_ -#define FD_sens_sensor_h_ - -/** Callbacks, globals and object handlers **/ - - -/**** Forms and Objects ****/ -typedef struct { - FL_FORM *sens_sensor; - void *vdata; - char *cdata; - long ldata; - FL_OBJECT *local_sensing_results; -} FD_sens_sensor; - -extern FD_sens_sensor * create_form_sens_sensor(void); - -#endif /* FD_sens_sensor_h_ */ diff --git a/openair3/MESH/RRM/sensing_2_rrm_msg.c b/openair3/MESH/RRM/sensing_2_rrm_msg.c deleted file mode 100644 index bfc4e931b1..0000000000 --- a/openair3/MESH/RRM/sensing_2_rrm_msg.c +++ /dev/null @@ -1,151 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/*! -******************************************************************************* - -\file rrc_2_rrm_msg.c - -\brief Fonctions permettant le formattage des donnees pour l'envoi d'un - message sur le socket entre le SENSING et le RRM -> to use in emulation of sensing unit - -\author IACOBELLI Lorenzo - -\date 15/04/10 - - -\par Historique: - - -******************************************************************************* -*/ - -#ifdef SNS_EMUL - -#include -#include -#include -#include -#include "L3_rrc_defs.h" -#include "rrm_sock.h" -#include "L3_rrc_interface.h" -#include "rrc_rrm_msg.h" -#include "rrm_util.h" - -#else - -#include "defs.h" - -#endif - -#include "L3_rrc_defs.h" - -#include "rrm_sock.h" -#include "sensing_rrm_msg.h" -#include "rrm_util.h" - -msg_t mesg; - -#ifdef TRACE -//! Macro creant la chaine a partir du nom de la variable -#define STRINGIZER(x) #x -//! Tableau pour le mode trace faisant la translation entre le numero et le nom du message -const char *Str_msg_sns_rrm[NB_MSG_SNS_RRM] = { - STRINGIZER(SNS_UPDATE_SENS ), - STRINGIZER(RRM_SCAN_ORD ), - STRINGIZER(RRM_END_SCAN_ORD ), - STRINGIZER(SNS_END_SCAN_CONF ) -} ; - -#endif - - - - - - -/*! -******************************************************************************* -\brief This function initialize the message header -\return any return value -*/ -static void init_sensing_msg_head( - msg_head_t *msg_head , //!< message header to initialize - Instance_t inst , //!< Instance ID - MSG_SENSING_RRM_T msg_type , //!< type of message to initialize - unsigned int size , //!< size of message - Transaction_t Trans_id //!< transaction id associated to this message -) -{ - if ( msg_head != NULL ) { - msg_head->start = START_MSG ; - msg_head->msg_type = 0xFF & msg_type ; - msg_head->inst = inst ; - msg_head->Trans_id = Trans_id ; - msg_head->size = size; - } -} - -/*****************************************************************************/ - -rrc_update_sens_t P_update_sens; -msg_t * msg_sensing_update_sens( - Instance_t inst , //!< Instance ID - Sens_ch_t *Sens, - unsigned char NB_info -) -{ - - init_sensing_msg_head(&(mesg.head),inst, SNS_UPDATE_SENS, sizeof( rrc_update_sens_t ) ,0); - memcpy( &P_update_sens.Sens_meas[0], (rrc_update_sens_t *)Sens, NB_info*sizeof(Sens_ch_t) ) ; - P_update_sens.NB_info=NB_info; - mesg.data = (char *) &P_update_sens; - return &mesg ; - -} - -/*****************************************************************************/ - -msg_t * msg_sensing_end_scan_conf( - Instance_t inst //!< Instance ID -) -{ - - init_sensing_msg_head(&(mesg.head),inst, SNS_END_SCAN_CONF, 0 ,0); - - mesg.data = NULL; - return &mesg ; - -} - - - - - - diff --git a/openair3/MESH/RRM/sensing_form.c b/openair3/MESH/RRM/sensing_form.c deleted file mode 100644 index ca6a10bb12..0000000000 --- a/openair3/MESH/RRM/sensing_form.c +++ /dev/null @@ -1,62 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/* Form definition file generated with fdesign. */ - -#include "forms.h" -#include -#include "sensing_form.h" - -FD_sensing_form *create_form_sensing_form(void) -{ - FL_OBJECT *obj; - FD_sensing_form *fdui = (FD_sensing_form *) fl_calloc(1, sizeof(*fdui)); - - fdui->sensing_form = fl_bgn_form(FL_NO_BOX, 620, 600); - obj = fl_add_box(FL_UP_BOX,0,0,620,600,""); - fdui->spec_SN1 = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,70,50,500,100,"spectrum_plot_SN1"); - fl_set_object_color(obj,FL_BLACK,FL_BLUE); - fl_set_object_lsize(obj,FL_NORMAL_SIZE); - fdui->spec_SN2 = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,70,180,500,100,"spectrum_plot_SN2"); - fl_set_object_color(obj,FL_BLACK,FL_BLUE); - fl_set_object_lsize(obj,FL_NORMAL_SIZE); - fdui->spec_SN3 = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,70,310,500,100,"spectrum_plot_SN3"); - fl_set_object_color(obj,FL_BLACK,FL_BLUE); - fl_set_object_lsize(obj,FL_NORMAL_SIZE); - fdui->Secondary_Network_frequencies = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,70,460,500,100,"Secondary_Network_frequencies"); - fl_set_object_color(obj,FL_BLACK,FL_GREEN); - fl_set_object_lsize(obj,FL_NORMAL_SIZE); - fl_end_form(); - - fdui->sensing_form->fdui = fdui; - - return fdui; -} -/*---------------------------------------*/ - diff --git a/openair3/MESH/RRM/sensing_form.fd b/openair3/MESH/RRM/sensing_form.fd deleted file mode 100644 index a669121a72..0000000000 --- a/openair3/MESH/RRM/sensing_form.fd +++ /dev/null @@ -1,106 +0,0 @@ -Magic: 13000 - -Internal Form Definition File - (do not change) - -Number of forms: 1 -Unit of measure: FL_COORD_PIXEL - -=============== FORM =============== -Name: sensing_form -Width: 620 -Height: 600 -Number of Objects: 5 - --------------------- -class: FL_BOX -type: UP_BOX -box: 0 0 620 600 -boxtype: FL_UP_BOX -colors: FL_COL1 FL_COL1 -alignment: FL_ALIGN_CENTER -style: FL_NORMAL_STYLE -size: FL_DEFAULT_SIZE -lcol: FL_BLACK -label: -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: -callback: -argument: - --------------------- -class: FL_XYPLOT -type: IMPULSE_XYPLOT -box: 70 20 500 100 -boxtype: FL_FLAT_BOX -colors: FL_BLACK FL_BLUE -alignment: FL_ALIGN_BOTTOM -style: FL_NORMAL_STYLE -size: FL_NORMAL_SIZE -lcol: FL_BLACK -label: spectrum_plot_SN1 -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: spec_SN1 -callback: -argument: - --------------------- -class: FL_XYPLOT -type: IMPULSE_XYPLOT -box: 70 150 500 100 -boxtype: FL_FLAT_BOX -colors: FL_BLACK FL_BLUE -alignment: FL_ALIGN_BOTTOM -style: FL_NORMAL_STYLE -size: FL_NORMAL_SIZE -lcol: FL_BLACK -label: spectrum_plot_SN2 -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: spec_SN2 -callback: -argument: - --------------------- -class: FL_XYPLOT -type: IMPULSE_XYPLOT -box: 70 280 500 100 -boxtype: FL_FLAT_BOX -colors: FL_BLACK FL_BLUE -alignment: FL_ALIGN_BOTTOM -style: FL_NORMAL_STYLE -size: FL_NORMAL_SIZE -lcol: FL_BLACK -label: spectrum_plot_SN3 -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: spec_SN3 -callback: -argument: - --------------------- -class: FL_XYPLOT -type: NORMAL_XYPLOT -box: 70 430 500 110 -boxtype: FL_FLAT_BOX -colors: FL_BLACK FL_GREEN -alignment: FL_ALIGN_BOTTOM -style: FL_NORMAL_STYLE -size: FL_TINY_SIZE -lcol: FL_BLACK -label: -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: Secondary_Network_frequencies -callback: -argument: - -============================== -create_the_forms diff --git a/openair3/MESH/RRM/sensing_form.h b/openair3/MESH/RRM/sensing_form.h deleted file mode 100644 index 461d378e62..0000000000 --- a/openair3/MESH/RRM/sensing_form.h +++ /dev/null @@ -1,52 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/** Header file generated with fdesign on Tue Jun 1 11:00:12 2010.**/ - -#ifndef FD_sensing_form_h_ -#define FD_sensing_form_h_ - -/** Callbacks, globals and object handlers **/ - - -/**** Forms and Objects ****/ -typedef struct { - FL_FORM *sensing_form; - void *vdata; - char *cdata; - long ldata; - FL_OBJECT *spec_SN1; - FL_OBJECT *spec_SN2; - FL_OBJECT *spec_SN3; - FL_OBJECT *Secondary_Network_frequencies; -} FD_sensing_form; - -extern FD_sensing_form * create_form_sensing_form(void); - -#endif /* FD_sensing_form_h_ */ diff --git a/openair3/MESH/RRM/sensing_rrm_msg.h b/openair3/MESH/RRM/sensing_rrm_msg.h deleted file mode 100644 index 03acd9ed68..0000000000 --- a/openair3/MESH/RRM/sensing_rrm_msg.h +++ /dev/null @@ -1,126 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/*! -******************************************************************************* - -\file sensing_msg.h - -\brief Fichier d'entete contenant les declarations des types, des defines , -et des fonctions relatives aux messages RRC-RRM ou RRC-RRCI. - -Les fonctions servent à créer le buffer de message, remplir -l'entete et copier les parametres de fonction. Chaque fonction -retourne le message qui pourra être envoye sur le socket entre le -CMM et le RRM ou RRCI. - -\author BURLOT Pascal - -\date 17/07/08 - -\par Historique: -L.IACOBELLI 2009-10-19 -+ sensing messages - -******************************************************************************* -*/ - -#ifndef __SENSING_RRM_MSG_H -#define __SENSING_RRM_MSG_H - - -#ifdef OPENAIR2_IN -#include "rrm_sock.h" -#else -#include "RRC/MESH/rrc_rrm_interface.h" -#include "RRC/MESH/L3_rrc_defs.h" -#endif -//#include "../../../openair2/RRC/MESH/rrc_rrm_interface.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/*! -******************************************************************************* -\brief Enumeration des messages entre RRM/RRCI et le RRC -*/ -typedef enum { - SNS_UPDATE_SENS , ///< Message SENSING->RRM : update of the sensing information measured by the nodes - RRM_SCAN_ORD , ///< Message RRM->SENSING : order to scann indicated channels - RRM_END_SCAN_ORD , ///< Message RRM->SENSING : end of a scanning process in sensors - SNS_END_SCAN_CONF , ///< Message SENSING->RRC : end of a scanning process in sensors - NB_MSG_SNS_RRM ///< Nombre de message RRM-SENSING -} -MSG_SENSING_RRM_T ; - -/*! -******************************************************************************* -\brief Definition des parametres de la fonction rrm_scan_ord() dans -une structure permettant le passage des parametres via un socket -*/ -typedef struct { - - unsigned int NB_chan ; ///< Number of channels to scan if 0 means all channels - unsigned int Meas_tpf ; ///< time on each carrier //mod_lor_10_02_19 - unsigned int Overlap ; ///< overlap factor (percentage) //mod_lor_10_02_19 - unsigned int Sampl_nb ; ///< number of samples per sub-band //mod_lor_10_04_01 - Sens_ch_t ch_to_scan[NB_SENS_MAX] ; ///< Vector of channels to scan //mod_lor_10_02_19 -} rrm_scan_ord_t ; - -/*! -******************************************************************************* -\brief Definition des parametres de la fonction rrm_end_scan_ord() dans -une structure permettant le passage des parametres via un socket -*/ -typedef struct { - unsigned int NB_chan ; //!< Number of channels - unsigned int channels[NB_SENS_MAX]; //!< Vector of channels -} rrm_end_scan_ord_t ; - -/*! -******************************************************************************* -\brief Definition des parametres de les fonctions rrc_update_sens() - rdans une structure permettant le passage - des parametres via un socket -*/ -typedef struct { - double info_time ; //!< Date of the message - L2_ID L2_id ; //!< Layer 2 ID (MAC) of sensing node - unsigned int NB_info ; //!< number of sensed channels - Sens_ch_t Sens_meas[NB_SENS_MAX] ; //!< sensing information -} rrc_update_sens_t; - - -msg_t *msg_rrm_scan_ord( Instance_t inst, unsigned int NB_chan, unsigned int Meas_tpf, unsigned int Overlap, - unsigned int Sampl_nb, Sens_ch_t *ch_to_scan, Transaction_t Trans_id ); //mod_lor_10_02_19 -msg_t *msg_rrm_end_scan_ord(Instance_t inst, unsigned int NB_chan, unsigned int *channels, - Transaction_t Trans_id ); - -#endif /* SENSING_MSG_H */ diff --git a/openair3/MESH/RRM/transact.c b/openair3/MESH/RRM/transact.c deleted file mode 100644 index a317eb9fc8..0000000000 --- a/openair3/MESH/RRM/transact.c +++ /dev/null @@ -1,251 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/*! -******************************************************************************* - -\file transact.c - -\brief Gestion des transactions entre les différentes entités - -\author BURLOT Pascal - -\date 17/07/08 - -\par Historique: - $Author$ $Date$ $Revision$ - $Id$ - $Log$ - -******************************************************************************* -*/ -#include -#include -#include -#include -#include - -#include "debug.h" -#include "L3_rrc_defs.h" -#include "rrm_util.h" -#include "transact.h" - - -//! Selection locale du mode de debug -#define DBG_TRANSACT 0 - -#if DBG_TRANSACT==0 -//! Macro inactive -#define PRINT_TRANSACT(...) -#else -//! Macro affichant la liste de transaction -#define PRINT_TRANSACT(...) print_transact( __VA_ARGS__ ) -#endif - -/*! -******************************************************************************* -\brief La fonction affiche a l'ecran la liste (pour DEBUG ) - -\return aucune valeur retournee -*/ -static void print_transact( - transact_t *pEntry ///< pointeur sur la liste de transaction -) -{ - transact_t *pCurrentItem = pEntry; - - fprintf(stderr,"transact_t=[\n"); - - while ( pCurrentItem != NULL) { - fprintf(stderr," @%p(.id=%u, .interf_id=%u, .funct_id=%u, .ttl=%u, .next=%p, .parent_id=%d, .parent_status=%d)\n", - pCurrentItem, pCurrentItem->id, pCurrentItem->interf_id,pCurrentItem->funct_id, - pCurrentItem->ttl, pCurrentItem->next, pCurrentItem->parent_id, pCurrentItem->parent_status); - - pCurrentItem = pCurrentItem->next ; - } - - fprintf(stderr," ]\n"); -} - -/*! -******************************************************************************* -\brief La fonction ajoute un element en debut de la liste des transactions - non-cloturees. - -\return retourne le pointeur de debut de liste. -*/ -transact_t *add_item_transact( - transact_t **pEntry , ///< pointeur sur l'entree sur la liste de transaction - Transaction_t id , ///< ID de la transaction - unsigned int interf_id, ///< Identification de l'interface de la transaction - unsigned int funct_id , ///< Identification de la function a l'origine de la transaction - unsigned int parent , ///< Transaction parent - unsigned int status ///< Status de la transaction -) -{ - transact_t *pOldEntry = *pEntry; - - transact_t *pNewItem = RRM_MALLOC(transact_t , 1 ) ; - - PNULL(pNewItem) ; - - if ( pNewItem == NULL ) - return NULL ; - - *pEntry = pNewItem ; - pNewItem->next = pOldEntry ; - pNewItem->id = id ; - pNewItem->interf_id = interf_id ; - pNewItem->funct_id = funct_id ; - pNewItem->parent_id = parent ; - pNewItem->parent_status = status ; - pNewItem->ttl = TTL_DEFAULT_VALUE ; - - PRINT_TRANSACT( *pEntry ); - return pNewItem ; -} - -/*! -******************************************************************************* -\brief La fonction retire un element de la liste des transactions non-cloturees. - -\return aucune valeur. -*/ -void del_item_transact( - transact_t **pEntry , ///< pointeur sur l'entree sur la liste de transaction - Transaction_t id ///< ID de la transaction a detruire -) -{ - transact_t *pCurrentItem = *pEntry; - transact_t *pNextItem ; - transact_t **ppPrevItem = pEntry ; - - if ( (pCurrentItem == NULL) || (pEntry==NULL)) - return ; - - while ( pCurrentItem != NULL ) { - pNextItem = pCurrentItem->next ; - - if ( pCurrentItem->id == id ) { - *ppPrevItem = pNextItem; - RRM_FREE( pCurrentItem ) ; - break ; - } - - ppPrevItem = &(pCurrentItem->next) ; - pCurrentItem = pNextItem ; - } - - PRINT_TRANSACT( *pEntry ); -} - -/*! -******************************************************************************* -\brief La fonction recherche un element dans la liste des transactions - non-cloturees. - -\return la valeur retournee est la transaction trouvee sinon NULL -*/ -transact_t *get_item_transact( - transact_t *pEntry , ///< pointeur sur l'entree sur la liste de transaction - Transaction_t id ///< ID de la transaction a rechercher -) -{ - transact_t *pCurrentItem = pEntry; - - while ( (pCurrentItem != NULL) && ( pCurrentItem->id != id )) { - pCurrentItem = pCurrentItem->next ; - } - - return pCurrentItem ; -} - -/*! -******************************************************************************* -\brief La fonction rearme la valeur du ttl de la transaction - -\return aucune valeur retournee -*/ -void set_ttl_transact( - transact_t *pEntry , ///< pointeur sur l'entree sur la liste de transaction - Transaction_t id , ///< ID de la transaction - unsigned int value ///< valeur du ttl -) -{ - transact_t *transaction = get_item_transact( pEntry , id ) ; - - if ( transaction != NULL ) - transaction->ttl = value ; -} - -/*! -******************************************************************************* -\brief La fonction decremente les valeurs du ttl de toutes les transactions - -\return aucune valeur retournee -*/ -void dec_all_ttl_transact( - transact_t *pEntry ///< pointeur sur l'entree sur la liste de transaction -) -{ - transact_t *pCurrentItem = pEntry; - - while ( pCurrentItem != NULL) { - if (pCurrentItem->ttl !=0 ) - pCurrentItem->ttl -=1 ; - - pCurrentItem = pCurrentItem->next ; - } -} - -/*! -******************************************************************************* -\brief La fonction supprime les transactions dont le ttl est nulle - -\return aucune valeur retournee -*/ -void del_all_obseleted_transact( - transact_t **pEntry ///< pointeur sur l'entree sur la liste de transaction -) -{ - transact_t *pCurrentItem = *pEntry; - transact_t *pNextItem ; - - while ( pCurrentItem != NULL) { - pNextItem = pCurrentItem->next ; - - if (pCurrentItem->ttl == 0 ) { - fprintf(stderr,"Delete obselete Transaction: \n" ) ; - print_transact(pCurrentItem) ; - del_item_transact( pEntry , pCurrentItem->id ) ; - } - - pCurrentItem = pNextItem ; - } -} diff --git a/openair3/MESH/RRM/transact.h b/openair3/MESH/RRM/transact.h deleted file mode 100644 index 351a7b478d..0000000000 --- a/openair3/MESH/RRM/transact.h +++ /dev/null @@ -1,103 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/*! -******************************************************************************* - -\file transact.h - -\brief Fichier d'entete contenant les declarations de type, des defines , - les fonctions relatifs a la gestion des transactions. - -\author BURLOT Pascal - -\date 17/07/08 - -\par Historique: - $Author$ $Date$ $Revision$ - $Id$ - $Log$ - -******************************************************************************* -*/ - -#ifndef TRANSACT_H -#define TRANSACT_H - -#ifdef __cplusplus -extern "C" { -#endif - -//! Valeur par defaut du TTL de transaction -#define TTL_DEFAULT_VALUE 20 - - -//typedef void (*fct_abort_transaction_t)( void *data) ; - -///< \brief Transaction en suspend ( non-traite ) -typedef struct transact_s { - unsigned int id ; ///< Transaction ID - enum { INT_RRC=0, ///< Interface avec le RRC - INT_CMM, ///< Interface avec le CMM - INT_PUSU ///< Interface avec le PUSU - } interf_id ; ///< interface - unsigned int funct_id ; ///< Transaction type - unsigned int ttl ; ///< Time to live of transaction - struct transact_s *next ; ///< next Transaction to process - - unsigned int parent_id ; ///< Transaction parent id - enum { NO_PARENT=0 , - PARENT - } parent_status; ///< Transaction parent status -} transact_t ; - -transact_t *add_item_transact( - transact_t **pEntry , - unsigned int id, - unsigned int interf_id, - unsigned int funct_id, - unsigned int parent, - unsigned int status -); -void del_item_transact( transact_t **pEntry , unsigned int id ); - -transact_t *get_item_transact( - transact_t *pEntry , - unsigned int id -); - -void set_ttl_transact( transact_t *pEntry , Transaction_t id , unsigned int value ); -void dec_all_ttl_transact( transact_t *pEntry ); -void del_all_obseleted_transact( transact_t **pEntry ); - -#ifdef __cplusplus -} -#endif - -#endif /* TRANSACT_H */ diff --git a/openair3/MESH/cmm_ral_interface.h b/openair3/MESH/cmm_ral_interface.h deleted file mode 100644 index 171e5df5b2..0000000000 --- a/openair3/MESH/cmm_ral_interface.h +++ /dev/null @@ -1,62 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/** @addtogroup _mesh_layer3_ - @{ - */ - - -/** - \brief Establish a new classification rule. - @returns status indication -*/ -int cmm_class_setup_req(L3ID_T L3id, //!< L3 ID type (IPv4 Addr,IPv6 Addr,MPLS Labels) - void *InA, //!< L3 ID A - void *InB, //!< L3 ID B - RBID_T Rbid, //!< L2 RBID - L3QOS_T L3QoS, //!< L3 QoS type (DSCP,EXP,ICMPV6) - void *QoS_id, //!< L3 QoS id (DSCP #, EXP #, ICMPv6 message type) - Transaction_t Trans_id //!< Transaction ID - ); - -/** - \brief Release a classification rule which was previously established. - @returns status indication -*/ -int cmm_class_release_req(L3ID_T L3id, //!< L3 ID type (IPv4 Addr,IPv6 Addr,MPLS Labels) - void *InA, //!< L3 ID A - void *InB, //!< L3 ID B - RBID_T Rbid, //!< L2 RBID - L3QOS_T L3QoS, //!< L3 QoS type (DSCP,EXP,ICMPV6) - void *QoS_id, //!< L3 QoS id (DSCP #, EXP #, ICMPv6 message type) - Transaction_t Trans_id //!< Transaction ID - ); - - -/** @} */ diff --git a/openair3/MESH/cmm_rrm_interface.h b/openair3/MESH/cmm_rrm_interface.h deleted file mode 100644 index 9e90c16ed6..0000000000 --- a/openair3/MESH/cmm_rrm_interface.h +++ /dev/null @@ -1,293 +0,0 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - 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 - 06410 Biot Sophia Antipolis cedex, FRANCE - - *******************************************************************************/ - -/*! @addtogroup _mesh_layer3_ - @{ - */ - -/*! - \brief CMM connection setup request. Only in CH. - \return status indication -*/ -int cmm_cx_setup_req( - Instance_t inst , //!< Identification de l'instance - L2_ID Src , //!< L2 source MAC address - L2_ID Dst , //!< L2 destination MAC address - QOS_CLASS_T QoS_class , //!< QOS class index - Transaction_t Trans_id //!< Transaction ID -); - -/*! - \brief RRM connection confirm. Only in CH. Confirms a cmm_cx_setup_req -*/ -void rrm_cx_setup_cnf( - Instance_t inst , //!< Identification de l'instance - RB_ID Rb_id , //!< L2 Rb_id - Transaction_t Trans_id //!< Transaction ID -); - -/*! - \brief CMM connection modify request. Only in CH. - \return status indication -*/ -int cmm_cx_modify_req( - Instance_t inst , //!< Identification de l'instance - RB_ID Rb_id , //!< L2 Rb_id - QOS_CLASS_T QoS_class , //!< QOS class index - Transaction_t Trans_id //!< Transaction ID -); - -/*! - \brief RRM connection modify confirm. Only in CH. Confirms a cmm_cx_modify_req -*/ -void rrm_cx_modify_cnf( - Instance_t inst , //!< Identification de l'instance - Transaction_t Trans_id //!< Transaction ID -); - -/*! - \brief CMM connection release request. Only in CH. - \return status indication -*/ -int cmm_cx_release_req( - Instance_t inst , //!< Identification de l'instance - RB_ID Rb_id , //!< L2 Rb_id - Transaction_t Trans_id //!< Transaction ID -); - -/*! - \brief RRM connection modify confirm. Only in CH. Confirms a cmm_cx_modify_req -*/ -void rrm_cx_release_cnf( - Instance_t inst , //!< Identification de l'instance - Transaction_t Trans_id //!< Transaction ID -); - -/*! - \brief CMM connection release all resources request. Only in CH. - \return status indication -*/ -int cmm_cx_release_all_req( - Instance_t inst , //!< Identification de l'instance - L2_ID L2_id , //!< L2 Rb_id - Transaction_t Trans_id //!< Transaction ID -); - -/*! - \brief RRM connection release all confirm. Only in CH. Confirms a - cmm_cx_release_all_req. -*/ -void rrm_cx_release_all_cnf( - Instance_t inst , //!< Identification de l'instance - Transaction_t Trans_id //!< Transaction ID -); - -/*! - \brief L3 Connection attachment request. Message sent by RRCI in MR after - configuration of initial RBs and reception of CH IPAddr. Here L3_info - contains CH IPAddr. The RBID's of basic IP services are also required. - \return status indication -*/ -int rrci_attach_req( - Instance_t inst , //!< Identification de l'instance - L2_ID L2_id , //!< Layer 2 (MAC) ID - L3_INFO_T L3_info_t , //!< Type of L3 Information - unsigned char *L3_info , //!< L3 addressing Information - RB_ID DTCH_B_id , //!< RBID of broadcast IP service (MR only) - RB_ID DTCH_id , //!< RBID of default IP service (MR only) - Transaction_t Trans_id //!< Transaction ID -); - -/*! - \brief Connection Attachment indication. Message sent by RRM in CH at - completion of attachment phase of a new MR (after configuration - MR IPAddr). Here L3_info contains MR IPAddr. -*/ -void rrm_attach_ind( - Instance_t inst , //!< Identification de l'instance - L2_ID L2_id , //!< Layer 2 (MAC) ID - L3_INFO_T L3_info_t , //!< Type of L3 Information - unsigned char *L3_info , //!< L3 addressing Information - RB_ID DTCH_id //!< RBID of default IP service (MR only) -); - -/*! - \brief L3 Connection Attachment confirmation. Message sent by CMM in MR at - completion of L3 attachment phase of a new MR Here L3_info contains - MR IPAddr. -*/ -void cmm_attach_cnf( - Instance_t inst , //!< Identification de l'instance - L2_ID L2_id , //!< L2_id of CH ( Mesh Router can see 2 CH ) - L3_INFO_T L3_info_t , //!< Type of L3 Information - unsigned char *L3_info , //!< L3 addressing Information - Transaction_t Trans_id //!< Transaction ID -); - - -/*! - \brief Message sent by RRM to CMM to indicate attachement at layer 2 of - a new MR. -*/ -void rrm_MR_attach_ind( - Instance_t inst , //!< Identification de l'instance - L2_ID L2_id //!< MR Layer 2 (MAC) ID -); - -/*! - \brief Message sent by RRM to CMM to indicate that the node function is - Cluster head. CMM initializes then the CH configuration. -*/ -void router_is_CH_ind( - Instance_t inst , //!< Identification de l'instance - L2_ID L2_id //!< CH Layer 2 (MAC) ID -); - -/*! - \brief -*/ -void rrci_CH_synch_ind( - Instance_t inst //!< Identification de l'instance -); - -/*! - \brief -*/ -void cmm_init_mr_req( - Instance_t inst //!< Identification de l'instance -); - -/*! - \brief -*/ -void rrm_MR_synch_ind( - Instance_t inst //!< Identification de l'instance -); - -/*! - \brief -*/ -void rrm_no_synch_ind( - Instance_t inst //!< Identification de l'instance -); - -/*! - \brief -*/ -void cmm_init_ch_req( - Instance_t inst , //!< Identification de l'instance - L3_INFO_T L3_info_t, - void *L3_info -); - -/*! - \brief -*/ -void cmm_init_sensing( - Instance_t inst, //!< identification de l'instance - unsigned int Start_fr, - unsigned int Stop_fr, - unsigned int Meas_band, - unsigned int Meas_tpf, - unsigned int Nb_channels, - unsigned int Overlap, - unsigned int Sampl_freq -); - -/*! - \brief -*/ -void cmm_stop_sensing( - Instance_t inst //!< identification de l'instance -); - -/*! - \brief -*/ -void cmm_ask_freq( - Instance_t inst //!< identification de l'instance -); - -/*! - \brief add_lor_10_11_03 -*/ - -void cmm_need_to_tx( - Instance_t inst ,//!< identification de l'instance - Instance_t dest ,//!< identification de l'instance du noeud destinataire - QOS_CLASS_T QoS_class //!< Required quality of service (i.e. number of channels) -); - -/*! - \brief add_lor_10_11_08 -*/ -void cmm_init_coll_sensing( - Instance_t inst, //!< identification de l'instance - unsigned int Start_fr, - unsigned int Stop_fr, - unsigned int Meas_band, - unsigned int Meas_tpf, - unsigned int Nb_channels, - unsigned int Overlap, - unsigned int Sampl_freq -); -/*! - \brief add_lor_10_11_09 -*/ -void cmm_user_disc( - Instance_t inst //!< identification de l'instance -); -/*! - \brief add_lor_10_11_09 -*/ -void cmm_link_disc( - Instance_t inst ,//!< identification de l'instance - Instance_t dest //!< identification du destinataire -); -/*! - \brief add_lor_10_11_09 -*/ -void disconnect_user( - Instance_t inst , //!< identification de l'instance - L2_ID L2_id //!< L2_id of the SU -); -/*! - \brief add_lor_10_11_09 -*/ -int close_active_link( - Instance_t inst , //!< identification de l'instance - L2_ID L2_id , //!< L2_id of the SU - L2_ID L2_id_dest //!< L2_id of the SU dest -); - - - - - -/*! @} */ diff --git a/openair3/NAS/COMMON/API/NETWORK/COPYING b/openair3/NAS/COMMON/API/NETWORK/COPYING new file mode 100644 index 0000000000..c888423064 --- /dev/null +++ b/openair3/NAS/COMMON/API/NETWORK/COPYING @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ \ No newline at end of file diff --git a/openair3/NAS/COMMON/API/NETWORK/Makefile b/openair3/NAS/COMMON/API/NETWORK/Makefile new file mode 100644 index 0000000000..03b706bc5d --- /dev/null +++ b/openair3/NAS/COMMON/API/NETWORK/Makefile @@ -0,0 +1,22 @@ +ifndef PROJDIR +PROJDIR = $(PWD)/../../.. +INCLUDES = -I. -I$(INCDIR) -I$(UTILDIR) -I$(IESDIR) -I$(EMMMSGDIR) -I$(ESMMSGDIR) +endif + +include $(PROJDIR)/Makerules +include $(PROJDIR)/Makefile.inc + +all: $(OBJS) + +%.o: %.c Makefile + @echo Compiling $< + @$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@ + +clean: + $(RM) $(OBJS) *.bak *~ + +depend: + makedepend -- ${CFLAGS} -- ${SRCS} + +# DO NOT DELETE THIS LINE -- make depend depends on it. + diff --git a/openair-cn/NAS/COMMON/API/NETWORK/as_message.c b/openair3/NAS/COMMON/API/NETWORK/as_message.c similarity index 87% rename from openair-cn/NAS/COMMON/API/NETWORK/as_message.c rename to openair3/NAS/COMMON/API/NETWORK/as_message.c index 5b29016f3a..be850d31af 100644 --- a/openair-cn/NAS/COMMON/API/NETWORK/as_message.c +++ b/openair3/NAS/COMMON/API/NETWORK/as_message.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ /***************************************************************************** Source as_message.c diff --git a/openair-cn/NAS/COMMON/API/NETWORK/as_message.h b/openair3/NAS/COMMON/API/NETWORK/as_message.h similarity index 100% rename from openair-cn/NAS/COMMON/API/NETWORK/as_message.h rename to openair3/NAS/COMMON/API/NETWORK/as_message.h diff --git a/openair-cn/NAS/COMMON/API/NETWORK/l2_message.h b/openair3/NAS/COMMON/API/NETWORK/l2_message.h similarity index 85% rename from openair-cn/NAS/COMMON/API/NETWORK/l2_message.h rename to openair3/NAS/COMMON/API/NETWORK/l2_message.h index d24d78b503..02e5d87354 100644 --- a/openair-cn/NAS/COMMON/API/NETWORK/l2_message.h +++ b/openair3/NAS/COMMON/API/NETWORK/l2_message.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ /***************************************************************************** Source as_message.h diff --git a/openair-cn/NAS/COMMON/API/NETWORK/nas_message.c b/openair3/NAS/COMMON/API/NETWORK/nas_message.c similarity index 97% rename from openair-cn/NAS/COMMON/API/NETWORK/nas_message.c rename to openair3/NAS/COMMON/API/NETWORK/nas_message.c index 611ad6fc3a..a7e5802765 100644 --- a/openair-cn/NAS/COMMON/API/NETWORK/nas_message.c +++ b/openair3/NAS/COMMON/API/NETWORK/nas_message.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ /***************************************************************************** Source nas_message.h diff --git a/openair-cn/NAS/COMMON/API/NETWORK/nas_message.h b/openair3/NAS/COMMON/API/NETWORK/nas_message.h similarity index 68% rename from openair-cn/NAS/COMMON/API/NETWORK/nas_message.h rename to openair3/NAS/COMMON/API/NETWORK/nas_message.h index f4187b7396..cecd676c93 100644 --- a/openair-cn/NAS/COMMON/API/NETWORK/nas_message.h +++ b/openair3/NAS/COMMON/API/NETWORK/nas_message.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ /***************************************************************************** Source nas_message.h diff --git a/openair-cn/NAS/COMMON/API/NETWORK/network_api.c b/openair3/NAS/COMMON/API/NETWORK/network_api.c similarity index 91% rename from openair-cn/NAS/COMMON/API/NETWORK/network_api.c rename to openair3/NAS/COMMON/API/NETWORK/network_api.c index 61814c3e11..a057c7e5b0 100644 --- a/openair-cn/NAS/COMMON/API/NETWORK/network_api.c +++ b/openair3/NAS/COMMON/API/NETWORK/network_api.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ /***************************************************************************** Source network_api.c diff --git a/openair-cn/NAS/COMMON/API/NETWORK/network_api.h b/openair3/NAS/COMMON/API/NETWORK/network_api.h similarity index 52% rename from openair-cn/NAS/COMMON/API/NETWORK/network_api.h rename to openair3/NAS/COMMON/API/NETWORK/network_api.h index f9b04371fe..bf531539bd 100644 --- a/openair-cn/NAS/COMMON/API/NETWORK/network_api.h +++ b/openair3/NAS/COMMON/API/NETWORK/network_api.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ /***************************************************************************** Source network_api.h diff --git a/openair3/NAS/COMMON/COPYING b/openair3/NAS/COMMON/COPYING new file mode 100644 index 0000000000..c888423064 --- /dev/null +++ b/openair3/NAS/COMMON/COPYING @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ \ No newline at end of file diff --git a/openair-cn/NAS/COMMON/EMM/MSG/AttachAccept.c b/openair3/NAS/COMMON/EMM/MSG/AttachAccept.c similarity index 89% rename from openair-cn/NAS/COMMON/EMM/MSG/AttachAccept.c rename to openair3/NAS/COMMON/EMM/MSG/AttachAccept.c index 62eab5acb9..3d800d5c19 100644 --- a/openair-cn/NAS/COMMON/EMM/MSG/AttachAccept.c +++ b/openair3/NAS/COMMON/EMM/MSG/AttachAccept.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/EMM/MSG/AttachAccept.h b/openair3/NAS/COMMON/EMM/MSG/AttachAccept.h similarity index 73% rename from openair-cn/NAS/COMMON/EMM/MSG/AttachAccept.h rename to openair3/NAS/COMMON/EMM/MSG/AttachAccept.h index 2c1fc64bae..760d85ec05 100644 --- a/openair-cn/NAS/COMMON/EMM/MSG/AttachAccept.h +++ b/openair3/NAS/COMMON/EMM/MSG/AttachAccept.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/EMM/MSG/AttachComplete.c b/openair3/NAS/COMMON/EMM/MSG/AttachComplete.c new file mode 100644 index 0000000000..f36176f16b --- /dev/null +++ b/openair3/NAS/COMMON/EMM/MSG/AttachComplete.c @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include +#include + + +#include "TLVEncoder.h" +#include "TLVDecoder.h" +#include "AttachComplete.h" + +int decode_attach_complete(attach_complete_msg *attach_complete, uint8_t *buffer, uint32_t len) +{ + uint32_t decoded = 0; + int decoded_result = 0; + + // Check if we got a NULL pointer and if buffer length is >= minimum length expected for the message. + CHECK_PDU_POINTER_AND_LENGTH_DECODER(buffer, ATTACH_COMPLETE_MINIMUM_LENGTH, len); + + /* Decoding mandatory fields */ + if ((decoded_result = decode_esm_message_container(&attach_complete->esmmessagecontainer, 0, buffer + decoded, len - decoded)) < 0) + return decoded_result; + else + decoded += decoded_result; + + return decoded; +} + +int encode_attach_complete(attach_complete_msg *attach_complete, uint8_t *buffer, uint32_t len) +{ + int encoded = 0; + int encode_result = 0; + + /* Checking IEI and pointer */ + CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, ATTACH_COMPLETE_MINIMUM_LENGTH, len); + + if ((encode_result = + encode_esm_message_container(&attach_complete->esmmessagecontainer, 0, + buffer + encoded, len - encoded)) < 0) //Return in case of error + return encode_result; + else + encoded += encode_result; + + return encoded; +} + diff --git a/openair3/NAS/COMMON/EMM/MSG/AttachComplete.h b/openair3/NAS/COMMON/EMM/MSG/AttachComplete.h new file mode 100644 index 0000000000..f11623ff44 --- /dev/null +++ b/openair3/NAS/COMMON/EMM/MSG/AttachComplete.h @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "ProtocolDiscriminator.h" +#include "SecurityHeaderType.h" +#include "MessageType.h" +#include "EsmMessageContainer.h" + +#ifndef ATTACH_COMPLETE_H_ +#define ATTACH_COMPLETE_H_ + +/* Minimum length macro. Formed by minimum length of each mandatory field */ +#define ATTACH_COMPLETE_MINIMUM_LENGTH ( \ + ESM_MESSAGE_CONTAINER_MINIMUM_LENGTH ) + +/* Maximum length macro. Formed by maximum length of each field */ +#define ATTACH_COMPLETE_MAXIMUM_LENGTH ( \ + ESM_MESSAGE_CONTAINER_MAXIMUM_LENGTH ) + + +/* + * Message name: Attach complete + * Description: This message is sent by the UE to the network in response to an ATTACH ACCEPT message. See table 8.2.2.1. + * Significance: dual + * Direction: UE to network + */ + +typedef struct attach_complete_msg_tag { + /* Mandatory fields */ + ProtocolDiscriminator protocoldiscriminator:4; + SecurityHeaderType securityheadertype:4; + MessageType messagetype; + EsmMessageContainer esmmessagecontainer; +} attach_complete_msg; + +int decode_attach_complete(attach_complete_msg *attachcomplete, uint8_t *buffer, uint32_t len); + +int encode_attach_complete(attach_complete_msg *attachcomplete, uint8_t *buffer, uint32_t len); + +#endif /* ! defined(ATTACH_COMPLETE_H_) */ + diff --git a/openair-cn/NAS/COMMON/EMM/MSG/AttachReject.c b/openair3/NAS/COMMON/EMM/MSG/AttachReject.c similarity index 62% rename from openair-cn/NAS/COMMON/EMM/MSG/AttachReject.c rename to openair3/NAS/COMMON/EMM/MSG/AttachReject.c index 16621cf25e..eed7199635 100644 --- a/openair-cn/NAS/COMMON/EMM/MSG/AttachReject.c +++ b/openair3/NAS/COMMON/EMM/MSG/AttachReject.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/EMM/MSG/AttachReject.h b/openair3/NAS/COMMON/EMM/MSG/AttachReject.h similarity index 52% rename from openair-cn/NAS/COMMON/EMM/MSG/AttachReject.h rename to openair3/NAS/COMMON/EMM/MSG/AttachReject.h index 3d12b7fdad..e65fe17325 100644 --- a/openair-cn/NAS/COMMON/EMM/MSG/AttachReject.h +++ b/openair3/NAS/COMMON/EMM/MSG/AttachReject.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/EMM/MSG/AttachRequest.c b/openair3/NAS/COMMON/EMM/MSG/AttachRequest.c similarity index 92% rename from openair-cn/NAS/COMMON/EMM/MSG/AttachRequest.c rename to openair3/NAS/COMMON/EMM/MSG/AttachRequest.c index f301b44a86..fa11d84ed7 100644 --- a/openair-cn/NAS/COMMON/EMM/MSG/AttachRequest.c +++ b/openair3/NAS/COMMON/EMM/MSG/AttachRequest.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/EMM/MSG/AttachRequest.h b/openair3/NAS/COMMON/EMM/MSG/AttachRequest.h similarity index 80% rename from openair-cn/NAS/COMMON/EMM/MSG/AttachRequest.h rename to openair3/NAS/COMMON/EMM/MSG/AttachRequest.h index f19c53f1ad..26937ad5d6 100644 --- a/openair-cn/NAS/COMMON/EMM/MSG/AttachRequest.h +++ b/openair3/NAS/COMMON/EMM/MSG/AttachRequest.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/EMM/MSG/AuthenticationFailure.c b/openair3/NAS/COMMON/EMM/MSG/AuthenticationFailure.c similarity index 64% rename from openair-cn/NAS/COMMON/EMM/MSG/AuthenticationFailure.c rename to openair3/NAS/COMMON/EMM/MSG/AuthenticationFailure.c index 979ade2f24..79a12874cf 100644 --- a/openair-cn/NAS/COMMON/EMM/MSG/AuthenticationFailure.c +++ b/openair3/NAS/COMMON/EMM/MSG/AuthenticationFailure.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/EMM/MSG/AuthenticationFailure.h b/openair3/NAS/COMMON/EMM/MSG/AuthenticationFailure.h similarity index 55% rename from openair-cn/NAS/COMMON/EMM/MSG/AuthenticationFailure.h rename to openair3/NAS/COMMON/EMM/MSG/AuthenticationFailure.h index 8c9b66dd32..978bf31f18 100644 --- a/openair-cn/NAS/COMMON/EMM/MSG/AuthenticationFailure.h +++ b/openair3/NAS/COMMON/EMM/MSG/AuthenticationFailure.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/EMM/MSG/AuthenticationReject.c b/openair3/NAS/COMMON/EMM/MSG/AuthenticationReject.c new file mode 100644 index 0000000000..1b8643083e --- /dev/null +++ b/openair3/NAS/COMMON/EMM/MSG/AuthenticationReject.c @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include +#include + + +#include "TLVEncoder.h" +#include "TLVDecoder.h" +#include "AuthenticationReject.h" + +int decode_authentication_reject(authentication_reject_msg *authentication_reject, uint8_t *buffer, uint32_t len) +{ + uint32_t decoded = 0; + // Check if we got a NULL pointer and if buffer length is >= minimum length expected for the message. + CHECK_PDU_POINTER_AND_LENGTH_DECODER(buffer, AUTHENTICATION_REJECT_MINIMUM_LENGTH, len); + + /* Decoding mandatory fields */ + return decoded; +} + +int encode_authentication_reject(authentication_reject_msg *authentication_reject, uint8_t *buffer, uint32_t len) +{ + int encoded = 0; + /* Checking IEI and pointer */ + CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, AUTHENTICATION_REJECT_MINIMUM_LENGTH, len); + + return encoded; +} + diff --git a/openair3/NAS/COMMON/EMM/MSG/AuthenticationReject.h b/openair3/NAS/COMMON/EMM/MSG/AuthenticationReject.h new file mode 100644 index 0000000000..629b032074 --- /dev/null +++ b/openair3/NAS/COMMON/EMM/MSG/AuthenticationReject.h @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "ProtocolDiscriminator.h" +#include "SecurityHeaderType.h" +#include "MessageType.h" + +#ifndef AUTHENTICATION_REJECT_H_ +#define AUTHENTICATION_REJECT_H_ + +/* Minimum length macro. Formed by minimum length of each mandatory field */ +#define AUTHENTICATION_REJECT_MINIMUM_LENGTH (0) + +/* Maximum length macro. Formed by maximum length of each field */ +#define AUTHENTICATION_REJECT_MAXIMUM_LENGTH (0) + +/* + * Message name: Authentication reject + * Description: This message is sent by the network to the UE to indicate that the authentication procedure has failed and that the UE shall abort all activities. See table 8.2.6.1. + * Significance: dual + * Direction: network to UE + */ + +typedef struct authentication_reject_msg_tag { + /* Mandatory fields */ + ProtocolDiscriminator protocoldiscriminator:4; + SecurityHeaderType securityheadertype:4; + MessageType messagetype; +} authentication_reject_msg; + +int decode_authentication_reject(authentication_reject_msg *authenticationreject, uint8_t *buffer, uint32_t len); + +int encode_authentication_reject(authentication_reject_msg *authenticationreject, uint8_t *buffer, uint32_t len); + +#endif /* ! defined(AUTHENTICATION_REJECT_H_) */ + diff --git a/openair-cn/NAS/COMMON/EMM/MSG/AuthenticationRequest.c b/openair3/NAS/COMMON/EMM/MSG/AuthenticationRequest.c similarity index 58% rename from openair-cn/NAS/COMMON/EMM/MSG/AuthenticationRequest.c rename to openair3/NAS/COMMON/EMM/MSG/AuthenticationRequest.c index e6f10c9ef6..bba6ea7f3b 100644 --- a/openair-cn/NAS/COMMON/EMM/MSG/AuthenticationRequest.c +++ b/openair3/NAS/COMMON/EMM/MSG/AuthenticationRequest.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/EMM/MSG/AuthenticationRequest.h b/openair3/NAS/COMMON/EMM/MSG/AuthenticationRequest.h similarity index 53% rename from openair-cn/NAS/COMMON/EMM/MSG/AuthenticationRequest.h rename to openair3/NAS/COMMON/EMM/MSG/AuthenticationRequest.h index 1bfe9f1719..2997836b0f 100644 --- a/openair-cn/NAS/COMMON/EMM/MSG/AuthenticationRequest.h +++ b/openair3/NAS/COMMON/EMM/MSG/AuthenticationRequest.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/EMM/MSG/AuthenticationResponse.c b/openair3/NAS/COMMON/EMM/MSG/AuthenticationResponse.c new file mode 100644 index 0000000000..db508c5786 --- /dev/null +++ b/openair3/NAS/COMMON/EMM/MSG/AuthenticationResponse.c @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include +#include + + +#include "TLVEncoder.h" +#include "TLVDecoder.h" +#include "AuthenticationResponse.h" + +int decode_authentication_response(authentication_response_msg *authentication_response, uint8_t *buffer, uint32_t len) +{ + uint32_t decoded = 0; + int decoded_result = 0; + + // Check if we got a NULL pointer and if buffer length is >= minimum length expected for the message. + CHECK_PDU_POINTER_AND_LENGTH_DECODER(buffer, AUTHENTICATION_RESPONSE_MINIMUM_LENGTH, len); + + /* Decoding mandatory fields */ + if ((decoded_result = decode_authentication_response_parameter(&authentication_response->authenticationresponseparameter, 0, buffer + decoded, len - decoded)) < 0) + return decoded_result; + else + decoded += decoded_result; + + return decoded; +} + +int encode_authentication_response(authentication_response_msg *authentication_response, uint8_t *buffer, uint32_t len) +{ + int encoded = 0; + int encode_result = 0; + + /* Checking IEI and pointer */ + CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, AUTHENTICATION_RESPONSE_MINIMUM_LENGTH, len); + + if ((encode_result = + encode_authentication_response_parameter(&authentication_response->authenticationresponseparameter, + 0, buffer + encoded, len - encoded)) < 0) //Return in case of error + return encode_result; + else + encoded += encode_result; + + return encoded; +} + diff --git a/openair3/NAS/COMMON/EMM/MSG/AuthenticationResponse.h b/openair3/NAS/COMMON/EMM/MSG/AuthenticationResponse.h new file mode 100644 index 0000000000..3442e34064 --- /dev/null +++ b/openair3/NAS/COMMON/EMM/MSG/AuthenticationResponse.h @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "ProtocolDiscriminator.h" +#include "SecurityHeaderType.h" +#include "MessageType.h" +#include "AuthenticationResponseParameter.h" + +#ifndef AUTHENTICATION_RESPONSE_H_ +#define AUTHENTICATION_RESPONSE_H_ + +/* Minimum length macro. Formed by minimum length of each mandatory field */ +#define AUTHENTICATION_RESPONSE_MINIMUM_LENGTH ( \ + AUTHENTICATION_RESPONSE_PARAMETER_MINIMUM_LENGTH ) + +/* Maximum length macro. Formed by maximum length of each field */ +#define AUTHENTICATION_RESPONSE_MAXIMUM_LENGTH ( \ + AUTHENTICATION_RESPONSE_PARAMETER_MAXIMUM_LENGTH ) + + +/* + * Message name: Authentication response + * Description: This message is sent by the UE to the network to deliver a calculated authentication response to the network. See table 8.2.8.1. + * Significance: dual + * Direction: UE to network + */ + +typedef struct authentication_response_msg_tag { + /* Mandatory fields */ + ProtocolDiscriminator protocoldiscriminator:4; + SecurityHeaderType securityheadertype:4; + MessageType messagetype; + AuthenticationResponseParameter authenticationresponseparameter; +} authentication_response_msg; + +int decode_authentication_response(authentication_response_msg *authenticationresponse, uint8_t *buffer, uint32_t len); + +int encode_authentication_response(authentication_response_msg *authenticationresponse, uint8_t *buffer, uint32_t len); + +#endif /* ! defined(AUTHENTICATION_RESPONSE_H_) */ + diff --git a/openair3/NAS/COMMON/EMM/MSG/COPYING b/openair3/NAS/COMMON/EMM/MSG/COPYING new file mode 100644 index 0000000000..c888423064 --- /dev/null +++ b/openair3/NAS/COMMON/EMM/MSG/COPYING @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ \ No newline at end of file diff --git a/openair-cn/NAS/COMMON/EMM/MSG/CsServiceNotification.c b/openair3/NAS/COMMON/EMM/MSG/CsServiceNotification.c similarity index 78% rename from openair-cn/NAS/COMMON/EMM/MSG/CsServiceNotification.c rename to openair3/NAS/COMMON/EMM/MSG/CsServiceNotification.c index d299fd8d13..08514dfbe1 100644 --- a/openair-cn/NAS/COMMON/EMM/MSG/CsServiceNotification.c +++ b/openair3/NAS/COMMON/EMM/MSG/CsServiceNotification.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/EMM/MSG/CsServiceNotification.h b/openair3/NAS/COMMON/EMM/MSG/CsServiceNotification.h similarity index 63% rename from openair-cn/NAS/COMMON/EMM/MSG/CsServiceNotification.h rename to openair3/NAS/COMMON/EMM/MSG/CsServiceNotification.h index 6fcb5e0bab..e726802840 100644 --- a/openair-cn/NAS/COMMON/EMM/MSG/CsServiceNotification.h +++ b/openair3/NAS/COMMON/EMM/MSG/CsServiceNotification.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/EMM/MSG/DetachAccept.c b/openair3/NAS/COMMON/EMM/MSG/DetachAccept.c new file mode 100644 index 0000000000..7b3a79453a --- /dev/null +++ b/openair3/NAS/COMMON/EMM/MSG/DetachAccept.c @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include +#include + + +#include "TLVEncoder.h" +#include "TLVDecoder.h" +#include "DetachAccept.h" + +int decode_detach_accept(detach_accept_msg *detach_accept, uint8_t *buffer, uint32_t len) +{ + uint32_t decoded = 0; + // Check if we got a NULL pointer and if buffer length is >= minimum length expected for the message. + CHECK_PDU_POINTER_AND_LENGTH_DECODER(buffer, DETACH_ACCEPT_MINIMUM_LENGTH, len); + + /* Decoding mandatory fields */ + return decoded; +} + +int encode_detach_accept(detach_accept_msg *detach_accept, uint8_t *buffer, uint32_t len) +{ + int encoded = 0; + /* Checking IEI and pointer */ + CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, DETACH_ACCEPT_MINIMUM_LENGTH, len); + + return encoded; +} + diff --git a/openair3/NAS/COMMON/EMM/MSG/DetachAccept.h b/openair3/NAS/COMMON/EMM/MSG/DetachAccept.h new file mode 100644 index 0000000000..a04905aef6 --- /dev/null +++ b/openair3/NAS/COMMON/EMM/MSG/DetachAccept.h @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "ProtocolDiscriminator.h" +#include "SecurityHeaderType.h" +#include "MessageType.h" + +#ifndef DETACH_ACCEPT_H_ +#define DETACH_ACCEPT_H_ + +/* Minimum length macro. Formed by minimum length of each mandatory field */ +#define DETACH_ACCEPT_MINIMUM_LENGTH (0) + +/* Maximum length macro. Formed by maximum length of each field */ +#define DETACH_ACCEPT_MAXIMUM_LENGTH (0) + +/* + * Message name: Detach accept + * Description: This message is sent by the network to indicate that the detach procedure has been completed. See table 8.2.10.1.1. + * Significance: dual + * Direction: network to UE + */ + +typedef struct detach_accept_msg_tag { + /* Mandatory fields */ + ProtocolDiscriminator protocoldiscriminator:4; + SecurityHeaderType securityheadertype:4; + MessageType messagetype; +} detach_accept_msg; + +int decode_detach_accept(detach_accept_msg *detachaccept, uint8_t *buffer, uint32_t len); + +int encode_detach_accept(detach_accept_msg *detachaccept, uint8_t *buffer, uint32_t len); + +#endif /* ! defined(DETACH_ACCEPT_H_) */ + diff --git a/openair-cn/NAS/COMMON/EMM/MSG/DetachRequest.c b/openair3/NAS/COMMON/EMM/MSG/DetachRequest.c similarity index 52% rename from openair-cn/NAS/COMMON/EMM/MSG/DetachRequest.c rename to openair3/NAS/COMMON/EMM/MSG/DetachRequest.c index 32b9a8f37f..81675e6fd0 100644 --- a/openair-cn/NAS/COMMON/EMM/MSG/DetachRequest.c +++ b/openair3/NAS/COMMON/EMM/MSG/DetachRequest.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/EMM/MSG/DetachRequest.h b/openair3/NAS/COMMON/EMM/MSG/DetachRequest.h new file mode 100644 index 0000000000..572466d139 --- /dev/null +++ b/openair3/NAS/COMMON/EMM/MSG/DetachRequest.h @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "ProtocolDiscriminator.h" +#include "SecurityHeaderType.h" +#include "MessageType.h" +#include "DetachType.h" +#include "NasKeySetIdentifier.h" +#include "EpsMobileIdentity.h" + +#ifndef DETACH_REQUEST_H_ +#define DETACH_REQUEST_H_ + +/* Minimum length macro. Formed by minimum length of each mandatory field */ +#define DETACH_REQUEST_MINIMUM_LENGTH ( \ + DETACH_TYPE_MINIMUM_LENGTH + \ + NAS_KEY_SET_IDENTIFIER_MINIMUM_LENGTH + \ + EPS_MOBILE_IDENTITY_MINIMUM_LENGTH ) + +/* Maximum length macro. Formed by maximum length of each field */ +#define DETACH_REQUEST_MAXIMUM_LENGTH ( \ + DETACH_TYPE_MAXIMUM_LENGTH + \ + NAS_KEY_SET_IDENTIFIER_MAXIMUM_LENGTH + \ + EPS_MOBILE_IDENTITY_MAXIMUM_LENGTH ) + + +/* + * Message name: Detach request + * Description: This message is sent by the UE to request the release of an EMM context. See table 8.2.11.1.1. + * Significance: dual + * Direction: UE to network + */ + +typedef struct detach_request_msg_tag { + /* Mandatory fields */ + ProtocolDiscriminator protocoldiscriminator:4; + SecurityHeaderType securityheadertype:4; + MessageType messagetype; + DetachType detachtype; + NasKeySetIdentifier naskeysetidentifier; + EpsMobileIdentity gutiorimsi; +} detach_request_msg; + +int decode_detach_request(detach_request_msg *detachrequest, uint8_t *buffer, uint32_t len); + +int encode_detach_request(detach_request_msg *detachrequest, uint8_t *buffer, uint32_t len); + +#endif /* ! defined(DETACH_REQUEST_H_) */ + diff --git a/openair3/NAS/COMMON/EMM/MSG/DownlinkNasTransport.c b/openair3/NAS/COMMON/EMM/MSG/DownlinkNasTransport.c new file mode 100644 index 0000000000..a5255e99ea --- /dev/null +++ b/openair3/NAS/COMMON/EMM/MSG/DownlinkNasTransport.c @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include +#include + + +#include "TLVEncoder.h" +#include "TLVDecoder.h" +#include "DownlinkNasTransport.h" + +int decode_downlink_nas_transport(downlink_nas_transport_msg *downlink_nas_transport, uint8_t *buffer, uint32_t len) +{ + uint32_t decoded = 0; + int decoded_result = 0; + + // Check if we got a NULL pointer and if buffer length is >= minimum length expected for the message. + CHECK_PDU_POINTER_AND_LENGTH_DECODER(buffer, DOWNLINK_NAS_TRANSPORT_MINIMUM_LENGTH, len); + + /* Decoding mandatory fields */ + if ((decoded_result = decode_nas_message_container(&downlink_nas_transport->nasmessagecontainer, 0, buffer + decoded, len - decoded)) < 0) + return decoded_result; + else + decoded += decoded_result; + + return decoded; +} + +int encode_downlink_nas_transport(downlink_nas_transport_msg *downlink_nas_transport, uint8_t *buffer, uint32_t len) +{ + int encoded = 0; + int encode_result = 0; + + /* Checking IEI and pointer */ + CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, DOWNLINK_NAS_TRANSPORT_MINIMUM_LENGTH, len); + + if ((encode_result = + encode_nas_message_container(&downlink_nas_transport->nasmessagecontainer, + 0, buffer + encoded, len - encoded)) < 0) //Return in case of error + return encode_result; + else + encoded += encode_result; + + return encoded; +} + diff --git a/openair3/NAS/COMMON/EMM/MSG/DownlinkNasTransport.h b/openair3/NAS/COMMON/EMM/MSG/DownlinkNasTransport.h new file mode 100644 index 0000000000..111958fdf1 --- /dev/null +++ b/openair3/NAS/COMMON/EMM/MSG/DownlinkNasTransport.h @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "ProtocolDiscriminator.h" +#include "SecurityHeaderType.h" +#include "MessageType.h" +#include "NasMessageContainer.h" + +#ifndef DOWNLINK_NAS_TRANSPORT_H_ +#define DOWNLINK_NAS_TRANSPORT_H_ + +/* Minimum length macro. Formed by minimum length of each mandatory field */ +#define DOWNLINK_NAS_TRANSPORT_MINIMUM_LENGTH ( \ + NAS_MESSAGE_CONTAINER_MINIMUM_LENGTH ) + +/* Maximum length macro. Formed by maximum length of each field */ +#define DOWNLINK_NAS_TRANSPORT_MAXIMUM_LENGTH ( \ + NAS_MESSAGE_CONTAINER_MAXIMUM_LENGTH ) + + +/* + * Message name: Downlink NAS Transport + * Description: This message is sent by the network to the UE in order to carry an SMS message in encapsulated format. See table 8.2.12.1. + * Significance: dual + * Direction: network to UE + */ + +typedef struct downlink_nas_transport_msg_tag { + /* Mandatory fields */ + ProtocolDiscriminator protocoldiscriminator:4; + SecurityHeaderType securityheadertype:4; + MessageType messagetype; + NasMessageContainer nasmessagecontainer; +} downlink_nas_transport_msg; + +int decode_downlink_nas_transport(downlink_nas_transport_msg *downlinknastransport, uint8_t *buffer, uint32_t len); + +int encode_downlink_nas_transport(downlink_nas_transport_msg *downlinknastransport, uint8_t *buffer, uint32_t len); + +#endif /* ! defined(DOWNLINK_NAS_TRANSPORT_H_) */ + diff --git a/openair-cn/NAS/COMMON/EMM/MSG/EmmInformation.c b/openair3/NAS/COMMON/EMM/MSG/EmmInformation.c similarity index 80% rename from openair-cn/NAS/COMMON/EMM/MSG/EmmInformation.c rename to openair3/NAS/COMMON/EMM/MSG/EmmInformation.c index c7a041ed7d..2901998eb6 100644 --- a/openair-cn/NAS/COMMON/EMM/MSG/EmmInformation.c +++ b/openair3/NAS/COMMON/EMM/MSG/EmmInformation.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/EMM/MSG/EmmInformation.h b/openair3/NAS/COMMON/EMM/MSG/EmmInformation.h similarity index 63% rename from openair-cn/NAS/COMMON/EMM/MSG/EmmInformation.h rename to openair3/NAS/COMMON/EMM/MSG/EmmInformation.h index ce87feb4e7..a3f8059561 100644 --- a/openair-cn/NAS/COMMON/EMM/MSG/EmmInformation.h +++ b/openair3/NAS/COMMON/EMM/MSG/EmmInformation.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/EMM/MSG/EmmStatus.c b/openair3/NAS/COMMON/EMM/MSG/EmmStatus.c new file mode 100644 index 0000000000..274f8d47c0 --- /dev/null +++ b/openair3/NAS/COMMON/EMM/MSG/EmmStatus.c @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include +#include + + +#include "TLVEncoder.h" +#include "TLVDecoder.h" +#include "EmmStatus.h" + +int decode_emm_status(emm_status_msg *emm_status, uint8_t *buffer, uint32_t len) +{ + uint32_t decoded = 0; + int decoded_result = 0; + + // Check if we got a NULL pointer and if buffer length is >= minimum length expected for the message. + CHECK_PDU_POINTER_AND_LENGTH_DECODER(buffer, EMM_STATUS_MINIMUM_LENGTH, len); + + /* Decoding mandatory fields */ + if ((decoded_result = decode_emm_cause(&emm_status->emmcause, 0, buffer + decoded, len - decoded)) < 0) + return decoded_result; + else + decoded += decoded_result; + + return decoded; +} + +int encode_emm_status(emm_status_msg *emm_status, uint8_t *buffer, uint32_t len) +{ + int encoded = 0; + int encode_result = 0; + + /* Checking IEI and pointer */ + CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, EMM_STATUS_MINIMUM_LENGTH, len); + + if ((encode_result = encode_emm_cause(&emm_status->emmcause, 0, buffer + + encoded, len - encoded)) < 0) //Return in case of error + return encode_result; + else + encoded += encode_result; + + return encoded; +} + diff --git a/openair3/NAS/COMMON/EMM/MSG/EmmStatus.h b/openair3/NAS/COMMON/EMM/MSG/EmmStatus.h new file mode 100644 index 0000000000..716d08763a --- /dev/null +++ b/openair3/NAS/COMMON/EMM/MSG/EmmStatus.h @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "ProtocolDiscriminator.h" +#include "SecurityHeaderType.h" +#include "MessageType.h" +#include "EmmCause.h" + +#ifndef EMM_STATUS_H_ +#define EMM_STATUS_H_ + +/* Minimum length macro. Formed by minimum length of each mandatory field */ +#define EMM_STATUS_MINIMUM_LENGTH ( \ + EMM_CAUSE_MINIMUM_LENGTH ) + +/* Maximum length macro. Formed by maximum length of each field */ +#define EMM_STATUS_MAXIMUM_LENGTH ( \ + EMM_CAUSE_MAXIMUM_LENGTH ) + + +/* + * Message name: EMM status + * Description: This message is sent by the UE or by the network at any time to report certain error conditions listed in clause 7. See table 8.2.14.1. + * Significance: local + * Direction: both + */ + +typedef struct emm_status_msg_tag { + /* Mandatory fields */ + ProtocolDiscriminator protocoldiscriminator:4; + SecurityHeaderType securityheadertype:4; + MessageType messagetype; + EmmCause emmcause; +} emm_status_msg; + +int decode_emm_status(emm_status_msg *emmstatus, uint8_t *buffer, uint32_t len); + +int encode_emm_status(emm_status_msg *emmstatus, uint8_t *buffer, uint32_t len); + +#endif /* ! defined(EMM_STATUS_H_) */ + diff --git a/openair-cn/NAS/COMMON/EMM/MSG/ExtendedServiceRequest.c b/openair3/NAS/COMMON/EMM/MSG/ExtendedServiceRequest.c similarity index 57% rename from openair-cn/NAS/COMMON/EMM/MSG/ExtendedServiceRequest.c rename to openair3/NAS/COMMON/EMM/MSG/ExtendedServiceRequest.c index 85e337bc31..903d92c51f 100644 --- a/openair-cn/NAS/COMMON/EMM/MSG/ExtendedServiceRequest.c +++ b/openair3/NAS/COMMON/EMM/MSG/ExtendedServiceRequest.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/EMM/MSG/ExtendedServiceRequest.h b/openair3/NAS/COMMON/EMM/MSG/ExtendedServiceRequest.h similarity index 55% rename from openair-cn/NAS/COMMON/EMM/MSG/ExtendedServiceRequest.h rename to openair3/NAS/COMMON/EMM/MSG/ExtendedServiceRequest.h index 06d40edc19..d0a9d02e92 100644 --- a/openair-cn/NAS/COMMON/EMM/MSG/ExtendedServiceRequest.h +++ b/openair3/NAS/COMMON/EMM/MSG/ExtendedServiceRequest.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/EMM/MSG/GutiReallocationCommand.c b/openair3/NAS/COMMON/EMM/MSG/GutiReallocationCommand.c similarity index 63% rename from openair-cn/NAS/COMMON/EMM/MSG/GutiReallocationCommand.c rename to openair3/NAS/COMMON/EMM/MSG/GutiReallocationCommand.c index e3f7764139..313212c09d 100644 --- a/openair-cn/NAS/COMMON/EMM/MSG/GutiReallocationCommand.c +++ b/openair3/NAS/COMMON/EMM/MSG/GutiReallocationCommand.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/EMM/MSG/GutiReallocationCommand.h b/openair3/NAS/COMMON/EMM/MSG/GutiReallocationCommand.h similarity index 55% rename from openair-cn/NAS/COMMON/EMM/MSG/GutiReallocationCommand.h rename to openair3/NAS/COMMON/EMM/MSG/GutiReallocationCommand.h index 7e7ffb7636..68a68d6dc6 100644 --- a/openair-cn/NAS/COMMON/EMM/MSG/GutiReallocationCommand.h +++ b/openair3/NAS/COMMON/EMM/MSG/GutiReallocationCommand.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/EMM/MSG/GutiReallocationComplete.c b/openair3/NAS/COMMON/EMM/MSG/GutiReallocationComplete.c new file mode 100644 index 0000000000..c7bdda8a0f --- /dev/null +++ b/openair3/NAS/COMMON/EMM/MSG/GutiReallocationComplete.c @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include +#include + + +#include "TLVEncoder.h" +#include "TLVDecoder.h" +#include "GutiReallocationComplete.h" + +int decode_guti_reallocation_complete(guti_reallocation_complete_msg *guti_reallocation_complete, uint8_t *buffer, uint32_t len) +{ + uint32_t decoded = 0; + // Check if we got a NULL pointer and if buffer length is >= minimum length expected for the message. + CHECK_PDU_POINTER_AND_LENGTH_DECODER(buffer, GUTI_REALLOCATION_COMPLETE_MINIMUM_LENGTH, len); + + /* Decoding mandatory fields */ + return decoded; +} + +int encode_guti_reallocation_complete(guti_reallocation_complete_msg *guti_reallocation_complete, uint8_t *buffer, uint32_t len) +{ + int encoded = 0; + /* Checking IEI and pointer */ + CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, GUTI_REALLOCATION_COMPLETE_MINIMUM_LENGTH, len); + + return encoded; +} + diff --git a/openair3/NAS/COMMON/EMM/MSG/GutiReallocationComplete.h b/openair3/NAS/COMMON/EMM/MSG/GutiReallocationComplete.h new file mode 100644 index 0000000000..63a51cbe2c --- /dev/null +++ b/openair3/NAS/COMMON/EMM/MSG/GutiReallocationComplete.h @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "ProtocolDiscriminator.h" +#include "SecurityHeaderType.h" +#include "MessageType.h" + +#ifndef GUTI_REALLOCATION_COMPLETE_H_ +#define GUTI_REALLOCATION_COMPLETE_H_ + +/* Minimum length macro. Formed by minimum length of each mandatory field */ +#define GUTI_REALLOCATION_COMPLETE_MINIMUM_LENGTH (0) + +/* Maximum length macro. Formed by maximum length of each field */ +#define GUTI_REALLOCATION_COMPLETE_MAXIMUM_LENGTH (0) + +/* + * Message name: GUTI reallocation complete + * Description: This message is sent by the UE to the network to indicate that reallocation of a GUTI has taken place. See table 8.2.17.1. + * Significance: dual + * Direction: UE to network + */ + +typedef struct guti_reallocation_complete_msg_tag { + /* Mandatory fields */ + ProtocolDiscriminator protocoldiscriminator:4; + SecurityHeaderType securityheadertype:4; + MessageType messagetype; +} guti_reallocation_complete_msg; + +int decode_guti_reallocation_complete(guti_reallocation_complete_msg *gutireallocationcomplete, uint8_t *buffer, uint32_t len); + +int encode_guti_reallocation_complete(guti_reallocation_complete_msg *gutireallocationcomplete, uint8_t *buffer, uint32_t len); + +#endif /* ! defined(GUTI_REALLOCATION_COMPLETE_H_) */ + diff --git a/openair3/NAS/COMMON/EMM/MSG/IdentityRequest.c b/openair3/NAS/COMMON/EMM/MSG/IdentityRequest.c new file mode 100644 index 0000000000..3d785cddf8 --- /dev/null +++ b/openair3/NAS/COMMON/EMM/MSG/IdentityRequest.c @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include +#include + + +#include "TLVEncoder.h" +#include "TLVDecoder.h" +#include "IdentityRequest.h" + +int decode_identity_request(identity_request_msg *identity_request, uint8_t *buffer, uint32_t len) +{ + uint32_t decoded = 0; + int decoded_result = 0; + + // Check if we got a NULL pointer and if buffer length is >= minimum length expected for the message. + CHECK_PDU_POINTER_AND_LENGTH_DECODER(buffer, IDENTITY_REQUEST_MINIMUM_LENGTH, len); + + /* Decoding mandatory fields */ + if ((decoded_result = decode_u8_identity_type_2(&identity_request->identitytype, 0, *(buffer + decoded) >> 4, len - decoded)) < 0) + return decoded_result; + + decoded++; + return decoded; +} + +int encode_identity_request(identity_request_msg *identity_request, uint8_t *buffer, uint32_t len) +{ + int encoded = 0; + + /* Checking IEI and pointer */ + CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, IDENTITY_REQUEST_MINIMUM_LENGTH, len); + + *(buffer + encoded) = encode_u8_identity_type_2(&identity_request->identitytype) & 0x0f; + encoded++; + return encoded; +} + diff --git a/openair3/NAS/COMMON/EMM/MSG/IdentityRequest.h b/openair3/NAS/COMMON/EMM/MSG/IdentityRequest.h new file mode 100644 index 0000000000..97f783addd --- /dev/null +++ b/openair3/NAS/COMMON/EMM/MSG/IdentityRequest.h @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "ProtocolDiscriminator.h" +#include "SecurityHeaderType.h" +#include "MessageType.h" +#include "IdentityType2.h" + +#ifndef IDENTITY_REQUEST_H_ +#define IDENTITY_REQUEST_H_ + +/* Minimum length macro. Formed by minimum length of each mandatory field */ +#define IDENTITY_REQUEST_MINIMUM_LENGTH ( \ + IDENTITY_TYPE_2_MINIMUM_LENGTH ) + +/* Maximum length macro. Formed by maximum length of each field */ +#define IDENTITY_REQUEST_MAXIMUM_LENGTH ( \ + IDENTITY_TYPE_2_MAXIMUM_LENGTH ) + + +/* + * Message name: Identity request + * Description: This message is sent by the network to the UE to request the UE to provide the specified identity. See table 8.2.18.1. + * Significance: dual + * Direction: network to UE + */ + +typedef struct identity_request_msg_tag { + /* Mandatory fields */ + ProtocolDiscriminator protocoldiscriminator:4; + SecurityHeaderType securityheadertype:4; + MessageType messagetype; + IdentityType2 identitytype; +} identity_request_msg; + +int decode_identity_request(identity_request_msg *identityrequest, uint8_t *buffer, uint32_t len); + +int encode_identity_request(identity_request_msg *identityrequest, uint8_t *buffer, uint32_t len); + +#endif /* ! defined(IDENTITY_REQUEST_H_) */ + diff --git a/openair3/NAS/COMMON/EMM/MSG/IdentityResponse.c b/openair3/NAS/COMMON/EMM/MSG/IdentityResponse.c new file mode 100644 index 0000000000..827b9e64e0 --- /dev/null +++ b/openair3/NAS/COMMON/EMM/MSG/IdentityResponse.c @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include +#include + + +#include "TLVEncoder.h" +#include "TLVDecoder.h" +#include "IdentityResponse.h" + +int decode_identity_response(identity_response_msg *identity_response, uint8_t *buffer, uint32_t len) +{ + uint32_t decoded = 0; + int decoded_result = 0; + + // Check if we got a NULL pointer and if buffer length is >= minimum length expected for the message. + CHECK_PDU_POINTER_AND_LENGTH_DECODER(buffer, IDENTITY_RESPONSE_MINIMUM_LENGTH, len); + + /* Decoding mandatory fields */ + if ((decoded_result = decode_mobile_identity(&identity_response->mobileidentity, 0, buffer + decoded, len - decoded)) < 0) + return decoded_result; + else + decoded += decoded_result; + + return decoded; +} + +int encode_identity_response(identity_response_msg *identity_response, uint8_t *buffer, uint32_t len) +{ + int encoded = 0; + int encode_result = 0; + + /* Checking IEI and pointer */ + CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, IDENTITY_RESPONSE_MINIMUM_LENGTH, len); + + if ((encode_result = + encode_mobile_identity(&identity_response->mobileidentity, 0, buffer + + encoded, len - encoded)) < 0) //Return in case of error + return encode_result; + else + encoded += encode_result; + + return encoded; +} + diff --git a/openair3/NAS/COMMON/EMM/MSG/IdentityResponse.h b/openair3/NAS/COMMON/EMM/MSG/IdentityResponse.h new file mode 100644 index 0000000000..c6bb0d8f71 --- /dev/null +++ b/openair3/NAS/COMMON/EMM/MSG/IdentityResponse.h @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "ProtocolDiscriminator.h" +#include "SecurityHeaderType.h" +#include "MessageType.h" +#include "MobileIdentity.h" + +#ifndef IDENTITY_RESPONSE_H_ +#define IDENTITY_RESPONSE_H_ + +/* Minimum length macro. Formed by minimum length of each mandatory field */ +#define IDENTITY_RESPONSE_MINIMUM_LENGTH ( \ + MOBILE_IDENTITY_MINIMUM_LENGTH ) + +/* Maximum length macro. Formed by maximum length of each field */ +#define IDENTITY_RESPONSE_MAXIMUM_LENGTH ( \ + MOBILE_IDENTITY_MAXIMUM_LENGTH ) + + +/* + * Message name: Identity response + * Description: This message is sent by the UE to the network in response to an IDENTITY REQUEST message and provides the requested identity. See table 8.2.19.1. + * Significance: dual + * Direction: UE to network + */ + +typedef struct identity_response_msg_tag { + /* Mandatory fields */ + ProtocolDiscriminator protocoldiscriminator:4; + SecurityHeaderType securityheadertype:4; + MessageType messagetype; + MobileIdentity mobileidentity; +} identity_response_msg; + +int decode_identity_response(identity_response_msg *identityresponse, uint8_t *buffer, uint32_t len); + +int encode_identity_response(identity_response_msg *identityresponse, uint8_t *buffer, uint32_t len); + +#endif /* ! defined(IDENTITY_RESPONSE_H_) */ + diff --git a/openair3/NAS/COMMON/EMM/MSG/Makefile b/openair3/NAS/COMMON/EMM/MSG/Makefile new file mode 100644 index 0000000000..10f3cda68b --- /dev/null +++ b/openair3/NAS/COMMON/EMM/MSG/Makefile @@ -0,0 +1,41 @@ +ifndef PROJDIR +PROJDIR = $(PWD)/../../.. +endif + +include $(PROJDIR)/Makerules +include $(PROJDIR)/Makefile.inc + +INCLUDES = -I. -I$(INCDIR) -I$(UTILDIR) -I$(IESDIR) + +TARGET = $(LIBEMMMSG) +TARGETS = $(TARGET).a $(TARGET).so + +all: $(TARGETS) + +%.o: %.c %.h Makefile $(LIBDIR)/$(LIBIES).a $(UTILDIR)/TLVEncoder.h $(UTILDIR)/TLVDecoder.h + @echo Compiling $< + @$(CC) $(CFLAGS) -c $< -o $@ + +$(TARGET).a: $(OBJS) + @$(RM) $@ + @$(AR) $(ARFLAGS) $@ $(OBJS) + @echo Replacing $@ to $(LIBDIR) + @$(RM) $(LIBDIR)/$@ + @$(CP) $@ $(LIBDIR) + +$(TARGET).so: $(OBJS) + @$(LD) -G -o $@ $(OBJS) + @echo Replacing $@ to $(LIBDIR) + @$(RM) $(LIBDIR)/$@ + @$(CP) $@ $(LIBDIR) + +clean: + $(RM) $(OBJS) .bak *~ + +veryclean: clean + $(RM) $(TARGETS) + +depend: + makedepend -- ${CFLAGS} -- ${SRCS} + +# DO NOT DELETE THIS LINE -- make depend depends on it. diff --git a/openair-cn/NAS/COMMON/EMM/MSG/NASSecurityModeCommand.h b/openair3/NAS/COMMON/EMM/MSG/NASSecurityModeCommand.h similarity index 63% rename from openair-cn/NAS/COMMON/EMM/MSG/NASSecurityModeCommand.h rename to openair3/NAS/COMMON/EMM/MSG/NASSecurityModeCommand.h index 96bef59660..66baa17269 100644 --- a/openair-cn/NAS/COMMON/EMM/MSG/NASSecurityModeCommand.h +++ b/openair3/NAS/COMMON/EMM/MSG/NASSecurityModeCommand.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/EMM/MSG/NASSecurityModeComplete.h b/openair3/NAS/COMMON/EMM/MSG/NASSecurityModeComplete.h similarity index 52% rename from openair-cn/NAS/COMMON/EMM/MSG/NASSecurityModeComplete.h rename to openair3/NAS/COMMON/EMM/MSG/NASSecurityModeComplete.h index 5643e0ef8a..0c4c5400d9 100644 --- a/openair-cn/NAS/COMMON/EMM/MSG/NASSecurityModeComplete.h +++ b/openair3/NAS/COMMON/EMM/MSG/NASSecurityModeComplete.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/EMM/MSG/SecurityModeCommand.c b/openair3/NAS/COMMON/EMM/MSG/SecurityModeCommand.c similarity index 77% rename from openair-cn/NAS/COMMON/EMM/MSG/SecurityModeCommand.c rename to openair3/NAS/COMMON/EMM/MSG/SecurityModeCommand.c index 60946cd4ea..2086d59489 100644 --- a/openair-cn/NAS/COMMON/EMM/MSG/SecurityModeCommand.c +++ b/openair3/NAS/COMMON/EMM/MSG/SecurityModeCommand.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/EMM/MSG/SecurityModeComplete.c b/openair3/NAS/COMMON/EMM/MSG/SecurityModeComplete.c similarity index 58% rename from openair-cn/NAS/COMMON/EMM/MSG/SecurityModeComplete.c rename to openair3/NAS/COMMON/EMM/MSG/SecurityModeComplete.c index 971f94f05f..e3fbbf3a78 100644 --- a/openair-cn/NAS/COMMON/EMM/MSG/SecurityModeComplete.c +++ b/openair3/NAS/COMMON/EMM/MSG/SecurityModeComplete.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/EMM/MSG/SecurityModeReject.c b/openair3/NAS/COMMON/EMM/MSG/SecurityModeReject.c new file mode 100644 index 0000000000..972aad0444 --- /dev/null +++ b/openair3/NAS/COMMON/EMM/MSG/SecurityModeReject.c @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include +#include + + +#include "TLVEncoder.h" +#include "TLVDecoder.h" +#include "SecurityModeReject.h" + +int decode_security_mode_reject(security_mode_reject_msg *security_mode_reject, uint8_t *buffer, uint32_t len) +{ + uint32_t decoded = 0; + int decoded_result = 0; + + // Check if we got a NULL pointer and if buffer length is >= minimum length expected for the message. + CHECK_PDU_POINTER_AND_LENGTH_DECODER(buffer, SECURITY_MODE_REJECT_MINIMUM_LENGTH, len); + + /* Decoding mandatory fields */ + if ((decoded_result = decode_emm_cause(&security_mode_reject->emmcause, 0, buffer + decoded, len - decoded)) < 0) + return decoded_result; + else + decoded += decoded_result; + + return decoded; +} + +int encode_security_mode_reject(security_mode_reject_msg *security_mode_reject, uint8_t *buffer, uint32_t len) +{ + int encoded = 0; + int encode_result = 0; + + /* Checking IEI and pointer */ + CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, SECURITY_MODE_REJECT_MINIMUM_LENGTH, len); + + if ((encode_result = encode_emm_cause(&security_mode_reject->emmcause, 0, + buffer + encoded, len - encoded)) < 0) //Return in case of error + return encode_result; + else + encoded += encode_result; + + return encoded; +} + diff --git a/openair3/NAS/COMMON/EMM/MSG/SecurityModeReject.h b/openair3/NAS/COMMON/EMM/MSG/SecurityModeReject.h new file mode 100644 index 0000000000..0067104fcd --- /dev/null +++ b/openair3/NAS/COMMON/EMM/MSG/SecurityModeReject.h @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "ProtocolDiscriminator.h" +#include "SecurityHeaderType.h" +#include "MessageType.h" +#include "EmmCause.h" + +#ifndef SECURITY_MODE_REJECT_H_ +#define SECURITY_MODE_REJECT_H_ + +/* Minimum length macro. Formed by minimum length of each mandatory field */ +#define SECURITY_MODE_REJECT_MINIMUM_LENGTH ( \ + EMM_CAUSE_MINIMUM_LENGTH ) + +/* Maximum length macro. Formed by maximum length of each field */ +#define SECURITY_MODE_REJECT_MAXIMUM_LENGTH ( \ + EMM_CAUSE_MAXIMUM_LENGTH ) + + +/* + * Message name: Security mode reject + * Description: This message is sent by the UE to the network to indicate that the corresponding security mode command has been rejected. See table 8.2.22.1. + * Significance: dual + * Direction: UE to network + */ + +typedef struct security_mode_reject_msg_tag { + /* Mandatory fields */ + ProtocolDiscriminator protocoldiscriminator:4; + SecurityHeaderType securityheadertype:4; + MessageType messagetype; + EmmCause emmcause; +} security_mode_reject_msg; + +int decode_security_mode_reject(security_mode_reject_msg *securitymodereject, uint8_t *buffer, uint32_t len); + +int encode_security_mode_reject(security_mode_reject_msg *securitymodereject, uint8_t *buffer, uint32_t len); + +#endif /* ! defined(SECURITY_MODE_REJECT_H_) */ + diff --git a/openair3/NAS/COMMON/EMM/MSG/ServiceReject.c b/openair3/NAS/COMMON/EMM/MSG/ServiceReject.c new file mode 100644 index 0000000000..0e2aff4374 --- /dev/null +++ b/openair3/NAS/COMMON/EMM/MSG/ServiceReject.c @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include +#include + + +#include "TLVEncoder.h" +#include "TLVDecoder.h" +#include "ServiceReject.h" + +int decode_service_reject(service_reject_msg *service_reject, uint8_t *buffer, uint32_t len) +{ + uint32_t decoded = 0; + int decoded_result = 0; + + // Check if we got a NULL pointer and if buffer length is >= minimum length expected for the message. + CHECK_PDU_POINTER_AND_LENGTH_DECODER(buffer, SERVICE_REJECT_MINIMUM_LENGTH, len); + + /* Decoding mandatory fields */ + if ((decoded_result = decode_emm_cause(&service_reject->emmcause, 0, buffer + decoded, len - decoded)) < 0) + return decoded_result; + else + decoded += decoded_result; + + return decoded; +} + +int encode_service_reject(service_reject_msg *service_reject, uint8_t *buffer, uint32_t len) +{ + int encoded = 0; + int encode_result = 0; + + /* Checking IEI and pointer */ + CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, SERVICE_REJECT_MINIMUM_LENGTH, len); + + if ((encode_result = encode_emm_cause(&service_reject->emmcause, 0, buffer + + encoded, len - encoded)) < 0) //Return in case of error + return encode_result; + else + encoded += encode_result; + + if ((encode_result = encode_gprs_timer(&service_reject->t3442value, 0, + buffer + encoded, len - encoded)) < 0) //Return in case of error + return encode_result; + else + encoded += encode_result; + + return encoded; +} + diff --git a/openair3/NAS/COMMON/EMM/MSG/ServiceReject.h b/openair3/NAS/COMMON/EMM/MSG/ServiceReject.h new file mode 100644 index 0000000000..8a5525d00c --- /dev/null +++ b/openair3/NAS/COMMON/EMM/MSG/ServiceReject.h @@ -0,0 +1,75 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "ProtocolDiscriminator.h" +#include "SecurityHeaderType.h" +#include "MessageType.h" +#include "EmmCause.h" +#include "GprsTimer.h" + +#ifndef SERVICE_REJECT_H_ +#define SERVICE_REJECT_H_ + +/* Minimum length macro. Formed by minimum length of each mandatory field */ +#define SERVICE_REJECT_MINIMUM_LENGTH ( \ + EMM_CAUSE_MINIMUM_LENGTH ) + +/* Maximum length macro. Formed by maximum length of each field */ +#define SERVICE_REJECT_MAXIMUM_LENGTH ( \ + EMM_CAUSE_MAXIMUM_LENGTH + \ + GPRS_TIMER_MAXIMUM_LENGTH ) + + +/* + * Message name: Service reject + * Description: This message is sent by the network to the UE in order to reject the service request procedure. See table 8.2.24.1. + * Significance: dual + * Direction: network to UE + */ + +typedef struct service_reject_msg_tag { + /* Mandatory fields */ + ProtocolDiscriminator protocoldiscriminator:4; + SecurityHeaderType securityheadertype:4; + MessageType messagetype; + EmmCause emmcause; + /* Optional fields */ + uint32_t presencemask; + GprsTimer t3442value; +} service_reject_msg; + +int decode_service_reject(service_reject_msg *servicereject, uint8_t *buffer, uint32_t len); + +int encode_service_reject(service_reject_msg *servicereject, uint8_t *buffer, uint32_t len); + +#endif /* ! defined(SERVICE_REJECT_H_) */ + diff --git a/openair-cn/NAS/COMMON/EMM/MSG/ServiceRequest.c b/openair3/NAS/COMMON/EMM/MSG/ServiceRequest.c similarity index 53% rename from openair-cn/NAS/COMMON/EMM/MSG/ServiceRequest.c rename to openair3/NAS/COMMON/EMM/MSG/ServiceRequest.c index 28e22b773d..df51149b88 100644 --- a/openair-cn/NAS/COMMON/EMM/MSG/ServiceRequest.c +++ b/openair3/NAS/COMMON/EMM/MSG/ServiceRequest.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/EMM/MSG/ServiceRequest.h b/openair3/NAS/COMMON/EMM/MSG/ServiceRequest.h new file mode 100644 index 0000000000..999d5d9f37 --- /dev/null +++ b/openair3/NAS/COMMON/EMM/MSG/ServiceRequest.h @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "ProtocolDiscriminator.h" +#include "SecurityHeaderType.h" +#include "KsiAndSequenceNumber.h" +#include "ShortMac.h" + +#ifndef SERVICE_REQUEST_H_ +#define SERVICE_REQUEST_H_ + +/* Minimum length macro. Formed by minimum length of each mandatory field */ +#define SERVICE_REQUEST_MINIMUM_LENGTH ( \ + KSI_AND_SEQUENCE_NUMBER_MINIMUM_LENGTH + \ + SHORT_MAC_MINIMUM_LENGTH ) + +/* Maximum length macro. Formed by maximum length of each field */ +#define SERVICE_REQUEST_MAXIMUM_LENGTH ( \ + KSI_AND_SEQUENCE_NUMBER_MAXIMUM_LENGTH + \ + SHORT_MAC_MAXIMUM_LENGTH ) + + +/* + * Message name: Service request + * Description: This message is sent by the UE to the network to request the establishment of a NAS signalling connection and of the radio and S1 bearers. Its structure does not follow the structure of a standard layer 3 message. See table 8.2.25.1. + * Significance: dual + * Direction: UE to network + */ + +typedef struct service_request_msg_tag { + /* Mandatory fields */ + ProtocolDiscriminator protocoldiscriminator:4; + SecurityHeaderType securityheadertype:4; + KsiAndSequenceNumber ksiandsequencenumber; + ShortMac messageauthenticationcode; +} service_request_msg; + +int decode_service_request(service_request_msg *servicerequest, uint8_t *buffer, uint32_t len); + +int encode_service_request(service_request_msg *servicerequest, uint8_t *buffer, uint32_t len); + +#endif /* ! defined(SERVICE_REQUEST_H_) */ + diff --git a/openair-cn/NAS/COMMON/EMM/MSG/TrackingAreaUpdateAccept.c b/openair3/NAS/COMMON/EMM/MSG/TrackingAreaUpdateAccept.c similarity index 90% rename from openair-cn/NAS/COMMON/EMM/MSG/TrackingAreaUpdateAccept.c rename to openair3/NAS/COMMON/EMM/MSG/TrackingAreaUpdateAccept.c index 267534f18a..0d4aea3f12 100644 --- a/openair-cn/NAS/COMMON/EMM/MSG/TrackingAreaUpdateAccept.c +++ b/openair3/NAS/COMMON/EMM/MSG/TrackingAreaUpdateAccept.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/EMM/MSG/TrackingAreaUpdateAccept.h b/openair3/NAS/COMMON/EMM/MSG/TrackingAreaUpdateAccept.h similarity index 78% rename from openair-cn/NAS/COMMON/EMM/MSG/TrackingAreaUpdateAccept.h rename to openair3/NAS/COMMON/EMM/MSG/TrackingAreaUpdateAccept.h index 1765f38836..1b07da4c7f 100644 --- a/openair-cn/NAS/COMMON/EMM/MSG/TrackingAreaUpdateAccept.h +++ b/openair3/NAS/COMMON/EMM/MSG/TrackingAreaUpdateAccept.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/EMM/MSG/TrackingAreaUpdateComplete.c b/openair3/NAS/COMMON/EMM/MSG/TrackingAreaUpdateComplete.c new file mode 100644 index 0000000000..5facc985f5 --- /dev/null +++ b/openair3/NAS/COMMON/EMM/MSG/TrackingAreaUpdateComplete.c @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include +#include + + +#include "TLVEncoder.h" +#include "TLVDecoder.h" +#include "TrackingAreaUpdateComplete.h" + +int decode_tracking_area_update_complete(tracking_area_update_complete_msg *tracking_area_update_complete, uint8_t *buffer, uint32_t len) +{ + uint32_t decoded = 0; + // Check if we got a NULL pointer and if buffer length is >= minimum length expected for the message. + CHECK_PDU_POINTER_AND_LENGTH_DECODER(buffer, TRACKING_AREA_UPDATE_COMPLETE_MINIMUM_LENGTH, len); + + /* Decoding mandatory fields */ + return decoded; +} + +int encode_tracking_area_update_complete(tracking_area_update_complete_msg *tracking_area_update_complete, uint8_t *buffer, uint32_t len) +{ + int encoded = 0; + /* Checking IEI and pointer */ + CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, TRACKING_AREA_UPDATE_COMPLETE_MINIMUM_LENGTH, len); + + return encoded; +} + diff --git a/openair3/NAS/COMMON/EMM/MSG/TrackingAreaUpdateComplete.h b/openair3/NAS/COMMON/EMM/MSG/TrackingAreaUpdateComplete.h new file mode 100644 index 0000000000..bdb7083c35 --- /dev/null +++ b/openair3/NAS/COMMON/EMM/MSG/TrackingAreaUpdateComplete.h @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "ProtocolDiscriminator.h" +#include "SecurityHeaderType.h" +#include "MessageType.h" + +#ifndef TRACKING_AREA_UPDATE_COMPLETE_H_ +#define TRACKING_AREA_UPDATE_COMPLETE_H_ + +/* Minimum length macro. Formed by minimum length of each mandatory field */ +#define TRACKING_AREA_UPDATE_COMPLETE_MINIMUM_LENGTH (0) + +/* Maximum length macro. Formed by maximum length of each field */ +#define TRACKING_AREA_UPDATE_COMPLETE_MAXIMUM_LENGTH (0) + +/* + * Message name: Tracking area update complete + * Description: This message shall be sent by the UE to the network in response to a tracking area update accept message if a GUTI has been changed or a new TMSI has been assigned. See table 8.2.27.1. + * Significance: dual + * Direction: UE to network + */ + +typedef struct tracking_area_update_complete_msg_tag { + /* Mandatory fields */ + ProtocolDiscriminator protocoldiscriminator:4; + SecurityHeaderType securityheadertype:4; + MessageType messagetype; +} tracking_area_update_complete_msg; + +int decode_tracking_area_update_complete(tracking_area_update_complete_msg *trackingareaupdatecomplete, uint8_t *buffer, uint32_t len); + +int encode_tracking_area_update_complete(tracking_area_update_complete_msg *trackingareaupdatecomplete, uint8_t *buffer, uint32_t len); + +#endif /* ! defined(TRACKING_AREA_UPDATE_COMPLETE_H_) */ + diff --git a/openair3/NAS/COMMON/EMM/MSG/TrackingAreaUpdateReject.c b/openair3/NAS/COMMON/EMM/MSG/TrackingAreaUpdateReject.c new file mode 100644 index 0000000000..56bbcdc7e5 --- /dev/null +++ b/openair3/NAS/COMMON/EMM/MSG/TrackingAreaUpdateReject.c @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include +#include + + +#include "TLVEncoder.h" +#include "TLVDecoder.h" +#include "TrackingAreaUpdateReject.h" + +int decode_tracking_area_update_reject(tracking_area_update_reject_msg *tracking_area_update_reject, uint8_t *buffer, uint32_t len) +{ + uint32_t decoded = 0; + int decoded_result = 0; + + // Check if we got a NULL pointer and if buffer length is >= minimum length expected for the message. + CHECK_PDU_POINTER_AND_LENGTH_DECODER(buffer, TRACKING_AREA_UPDATE_REJECT_MINIMUM_LENGTH, len); + + /* Decoding mandatory fields */ + if ((decoded_result = decode_emm_cause(&tracking_area_update_reject->emmcause, 0, buffer + decoded, len - decoded)) < 0) + return decoded_result; + else + decoded += decoded_result; + + return decoded; +} + +int encode_tracking_area_update_reject(tracking_area_update_reject_msg *tracking_area_update_reject, uint8_t *buffer, uint32_t len) +{ + int encoded = 0; + int encode_result = 0; + + /* Checking IEI and pointer */ + CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, TRACKING_AREA_UPDATE_REJECT_MINIMUM_LENGTH, len); + + if ((encode_result = + encode_emm_cause(&tracking_area_update_reject->emmcause, 0, buffer + + encoded, len - encoded)) < 0) //Return in case of error + return encode_result; + else + encoded += encode_result; + + return encoded; +} + diff --git a/openair3/NAS/COMMON/EMM/MSG/TrackingAreaUpdateReject.h b/openair3/NAS/COMMON/EMM/MSG/TrackingAreaUpdateReject.h new file mode 100644 index 0000000000..055ae55ae7 --- /dev/null +++ b/openair3/NAS/COMMON/EMM/MSG/TrackingAreaUpdateReject.h @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "ProtocolDiscriminator.h" +#include "SecurityHeaderType.h" +#include "MessageType.h" +#include "EmmCause.h" + +#ifndef TRACKING_AREA_UPDATE_REJECT_H_ +#define TRACKING_AREA_UPDATE_REJECT_H_ + +/* Minimum length macro. Formed by minimum length of each mandatory field */ +#define TRACKING_AREA_UPDATE_REJECT_MINIMUM_LENGTH ( \ + EMM_CAUSE_MINIMUM_LENGTH ) + +/* Maximum length macro. Formed by maximum length of each field */ +#define TRACKING_AREA_UPDATE_REJECT_MAXIMUM_LENGTH ( \ + EMM_CAUSE_MAXIMUM_LENGTH ) + + +/* + * Message name: Tracking area update reject + * Description: This message is sent by the network to the UE in order to reject the tracking area updating procedure. See table 8.2.28.1. + * Significance: dual + * Direction: network to UE + */ + +typedef struct tracking_area_update_reject_msg_tag { + /* Mandatory fields */ + ProtocolDiscriminator protocoldiscriminator:4; + SecurityHeaderType securityheadertype:4; + MessageType messagetype; + EmmCause emmcause; +} tracking_area_update_reject_msg; + +int decode_tracking_area_update_reject(tracking_area_update_reject_msg *trackingareaupdatereject, uint8_t *buffer, uint32_t len); + +int encode_tracking_area_update_reject(tracking_area_update_reject_msg *trackingareaupdatereject, uint8_t *buffer, uint32_t len); + +#endif /* ! defined(TRACKING_AREA_UPDATE_REJECT_H_) */ + diff --git a/openair-cn/NAS/COMMON/EMM/MSG/TrackingAreaUpdateRequest.c b/openair3/NAS/COMMON/EMM/MSG/TrackingAreaUpdateRequest.c similarity index 93% rename from openair-cn/NAS/COMMON/EMM/MSG/TrackingAreaUpdateRequest.c rename to openair3/NAS/COMMON/EMM/MSG/TrackingAreaUpdateRequest.c index ca614ce1af..53fe541e47 100644 --- a/openair-cn/NAS/COMMON/EMM/MSG/TrackingAreaUpdateRequest.c +++ b/openair3/NAS/COMMON/EMM/MSG/TrackingAreaUpdateRequest.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/EMM/MSG/TrackingAreaUpdateRequest.h b/openair3/NAS/COMMON/EMM/MSG/TrackingAreaUpdateRequest.h similarity index 83% rename from openair-cn/NAS/COMMON/EMM/MSG/TrackingAreaUpdateRequest.h rename to openair3/NAS/COMMON/EMM/MSG/TrackingAreaUpdateRequest.h index d8ce48027b..b4ee5bcb42 100644 --- a/openair-cn/NAS/COMMON/EMM/MSG/TrackingAreaUpdateRequest.h +++ b/openair3/NAS/COMMON/EMM/MSG/TrackingAreaUpdateRequest.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/EMM/MSG/UplinkNasTransport.c b/openair3/NAS/COMMON/EMM/MSG/UplinkNasTransport.c new file mode 100644 index 0000000000..61b85ca2ca --- /dev/null +++ b/openair3/NAS/COMMON/EMM/MSG/UplinkNasTransport.c @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include +#include + + +#include "TLVEncoder.h" +#include "TLVDecoder.h" +#include "UplinkNasTransport.h" + +int decode_uplink_nas_transport(uplink_nas_transport_msg *uplink_nas_transport, uint8_t *buffer, uint32_t len) +{ + uint32_t decoded = 0; + int decoded_result = 0; + + // Check if we got a NULL pointer and if buffer length is >= minimum length expected for the message. + CHECK_PDU_POINTER_AND_LENGTH_DECODER(buffer, UPLINK_NAS_TRANSPORT_MINIMUM_LENGTH, len); + + /* Decoding mandatory fields */ + if ((decoded_result = decode_nas_message_container(&uplink_nas_transport->nasmessagecontainer, 0, buffer + decoded, len - decoded)) < 0) + return decoded_result; + else + decoded += decoded_result; + + return decoded; +} + +int encode_uplink_nas_transport(uplink_nas_transport_msg *uplink_nas_transport, uint8_t *buffer, uint32_t len) +{ + int encoded = 0; + int encode_result = 0; + + /* Checking IEI and pointer */ + CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, UPLINK_NAS_TRANSPORT_MINIMUM_LENGTH, len); + + if ((encode_result = + encode_nas_message_container(&uplink_nas_transport->nasmessagecontainer, + 0, buffer + encoded, len - encoded)) < 0) //Return in case of error + return encode_result; + else + encoded += encode_result; + + return encoded; +} + diff --git a/openair3/NAS/COMMON/EMM/MSG/UplinkNasTransport.h b/openair3/NAS/COMMON/EMM/MSG/UplinkNasTransport.h new file mode 100644 index 0000000000..02a58b104f --- /dev/null +++ b/openair3/NAS/COMMON/EMM/MSG/UplinkNasTransport.h @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "ProtocolDiscriminator.h" +#include "SecurityHeaderType.h" +#include "MessageType.h" +#include "NasMessageContainer.h" + +#ifndef UPLINK_NAS_TRANSPORT_H_ +#define UPLINK_NAS_TRANSPORT_H_ + +/* Minimum length macro. Formed by minimum length of each mandatory field */ +#define UPLINK_NAS_TRANSPORT_MINIMUM_LENGTH ( \ + NAS_MESSAGE_CONTAINER_MINIMUM_LENGTH ) + +/* Maximum length macro. Formed by maximum length of each field */ +#define UPLINK_NAS_TRANSPORT_MAXIMUM_LENGTH ( \ + NAS_MESSAGE_CONTAINER_MAXIMUM_LENGTH ) + + +/* + * Message name: Uplink NAS Transport + * Description: This message is sent by the UE to the network in order to carry an SMS message in encapsulated format. See table 8.2.30.1. + * Significance: dual + * Direction: UE to network + */ + +typedef struct uplink_nas_transport_msg_tag { + /* Mandatory fields */ + ProtocolDiscriminator protocoldiscriminator:4; + SecurityHeaderType securityheadertype:4; + MessageType messagetype; + NasMessageContainer nasmessagecontainer; +} uplink_nas_transport_msg; + +int decode_uplink_nas_transport(uplink_nas_transport_msg *uplinknastransport, uint8_t *buffer, uint32_t len); + +int encode_uplink_nas_transport(uplink_nas_transport_msg *uplinknastransport, uint8_t *buffer, uint32_t len); + +#endif /* ! defined(UPLINK_NAS_TRANSPORT_H_) */ + diff --git a/openair-cn/NAS/COMMON/EMM/MSG/emm_cause.h b/openair3/NAS/COMMON/EMM/MSG/emm_cause.h similarity index 69% rename from openair-cn/NAS/COMMON/EMM/MSG/emm_cause.h rename to openair3/NAS/COMMON/EMM/MSG/emm_cause.h index c5419201d2..231e8bfe86 100644 --- a/openair-cn/NAS/COMMON/EMM/MSG/emm_cause.h +++ b/openair3/NAS/COMMON/EMM/MSG/emm_cause.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ /***************************************************************************** Source emm_cause.h diff --git a/openair-cn/NAS/COMMON/EMM/MSG/emm_msg.c b/openair3/NAS/COMMON/EMM/MSG/emm_msg.c similarity index 92% rename from openair-cn/NAS/COMMON/EMM/MSG/emm_msg.c rename to openair3/NAS/COMMON/EMM/MSG/emm_msg.c index 979210c615..b727b09a73 100644 --- a/openair-cn/NAS/COMMON/EMM/MSG/emm_msg.c +++ b/openair3/NAS/COMMON/EMM/MSG/emm_msg.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ /***************************************************************************** Source emm_msg.c diff --git a/openair-cn/NAS/COMMON/EMM/MSG/emm_msg.h b/openair3/NAS/COMMON/EMM/MSG/emm_msg.h similarity index 71% rename from openair-cn/NAS/COMMON/EMM/MSG/emm_msg.h rename to openair3/NAS/COMMON/EMM/MSG/emm_msg.h index bb66c5e68b..db36f45948 100644 --- a/openair-cn/NAS/COMMON/EMM/MSG/emm_msg.h +++ b/openair3/NAS/COMMON/EMM/MSG/emm_msg.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ /***************************************************************************** Source emm_msg.h diff --git a/openair-cn/NAS/COMMON/EMM/MSG/emm_msgDef.h b/openair3/NAS/COMMON/EMM/MSG/emm_msgDef.h similarity index 75% rename from openair-cn/NAS/COMMON/EMM/MSG/emm_msgDef.h rename to openair3/NAS/COMMON/EMM/MSG/emm_msgDef.h index 862204d37e..3e7ba3b50f 100644 --- a/openair-cn/NAS/COMMON/EMM/MSG/emm_msgDef.h +++ b/openair3/NAS/COMMON/EMM/MSG/emm_msgDef.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ /***************************************************************************** Version 0.1 diff --git a/openair-cn/NAS/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextAccept.c b/openair3/NAS/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextAccept.c similarity index 63% rename from openair-cn/NAS/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextAccept.c rename to openair3/NAS/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextAccept.c index c377e11680..1e95091471 100644 --- a/openair-cn/NAS/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextAccept.c +++ b/openair3/NAS/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextAccept.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextAccept.h b/openair3/NAS/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextAccept.h similarity index 61% rename from openair-cn/NAS/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextAccept.h rename to openair3/NAS/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextAccept.h index c8e1275086..90db94714b 100644 --- a/openair-cn/NAS/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextAccept.h +++ b/openair3/NAS/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextAccept.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextReject.c b/openair3/NAS/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextReject.c similarity index 67% rename from openair-cn/NAS/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextReject.c rename to openair3/NAS/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextReject.c index 95c6591281..09b9ef66f6 100644 --- a/openair-cn/NAS/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextReject.c +++ b/openair3/NAS/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextReject.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextReject.h b/openair3/NAS/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextReject.h similarity index 62% rename from openair-cn/NAS/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextReject.h rename to openair3/NAS/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextReject.h index e766ba18fe..30e1e72d62 100644 --- a/openair-cn/NAS/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextReject.h +++ b/openair3/NAS/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextReject.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextRequest.c b/openair3/NAS/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextRequest.c similarity index 87% rename from openair-cn/NAS/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextRequest.c rename to openair3/NAS/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextRequest.c index 750793784d..2c081468b2 100644 --- a/openair-cn/NAS/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextRequest.c +++ b/openair3/NAS/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextRequest.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextRequest.h b/openair3/NAS/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextRequest.h similarity index 75% rename from openair-cn/NAS/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextRequest.h rename to openair3/NAS/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextRequest.h index cc7d65555a..89ce283302 100644 --- a/openair-cn/NAS/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextRequest.h +++ b/openair3/NAS/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextRequest.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/ESM/MSG/ActivateDefaultEpsBearerContextAccept.c b/openair3/NAS/COMMON/ESM/MSG/ActivateDefaultEpsBearerContextAccept.c similarity index 63% rename from openair-cn/NAS/COMMON/ESM/MSG/ActivateDefaultEpsBearerContextAccept.c rename to openair3/NAS/COMMON/ESM/MSG/ActivateDefaultEpsBearerContextAccept.c index a4806d58d4..116160b0e1 100644 --- a/openair-cn/NAS/COMMON/ESM/MSG/ActivateDefaultEpsBearerContextAccept.c +++ b/openair3/NAS/COMMON/ESM/MSG/ActivateDefaultEpsBearerContextAccept.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/ESM/MSG/ActivateDefaultEpsBearerContextAccept.h b/openair3/NAS/COMMON/ESM/MSG/ActivateDefaultEpsBearerContextAccept.h similarity index 60% rename from openair-cn/NAS/COMMON/ESM/MSG/ActivateDefaultEpsBearerContextAccept.h rename to openair3/NAS/COMMON/ESM/MSG/ActivateDefaultEpsBearerContextAccept.h index c678d9b9d2..231a87d117 100644 --- a/openair-cn/NAS/COMMON/ESM/MSG/ActivateDefaultEpsBearerContextAccept.h +++ b/openair3/NAS/COMMON/ESM/MSG/ActivateDefaultEpsBearerContextAccept.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/ESM/MSG/ActivateDefaultEpsBearerContextReject.c b/openair3/NAS/COMMON/ESM/MSG/ActivateDefaultEpsBearerContextReject.c similarity index 67% rename from openair-cn/NAS/COMMON/ESM/MSG/ActivateDefaultEpsBearerContextReject.c rename to openair3/NAS/COMMON/ESM/MSG/ActivateDefaultEpsBearerContextReject.c index a8252622c8..ecb40aee2b 100644 --- a/openair-cn/NAS/COMMON/ESM/MSG/ActivateDefaultEpsBearerContextReject.c +++ b/openair3/NAS/COMMON/ESM/MSG/ActivateDefaultEpsBearerContextReject.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/ESM/MSG/ActivateDefaultEpsBearerContextReject.h b/openair3/NAS/COMMON/ESM/MSG/ActivateDefaultEpsBearerContextReject.h similarity index 61% rename from openair-cn/NAS/COMMON/ESM/MSG/ActivateDefaultEpsBearerContextReject.h rename to openair3/NAS/COMMON/ESM/MSG/ActivateDefaultEpsBearerContextReject.h index 2bfe844c6b..b18cf46a62 100644 --- a/openair-cn/NAS/COMMON/ESM/MSG/ActivateDefaultEpsBearerContextReject.h +++ b/openair3/NAS/COMMON/ESM/MSG/ActivateDefaultEpsBearerContextReject.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/ESM/MSG/ActivateDefaultEpsBearerContextRequest.c b/openair3/NAS/COMMON/ESM/MSG/ActivateDefaultEpsBearerContextRequest.c similarity index 90% rename from openair-cn/NAS/COMMON/ESM/MSG/ActivateDefaultEpsBearerContextRequest.c rename to openair3/NAS/COMMON/ESM/MSG/ActivateDefaultEpsBearerContextRequest.c index 3dec0a429a..56e570903d 100644 --- a/openair-cn/NAS/COMMON/ESM/MSG/ActivateDefaultEpsBearerContextRequest.c +++ b/openair3/NAS/COMMON/ESM/MSG/ActivateDefaultEpsBearerContextRequest.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/ESM/MSG/ActivateDefaultEpsBearerContextRequest.h b/openair3/NAS/COMMON/ESM/MSG/ActivateDefaultEpsBearerContextRequest.h similarity index 77% rename from openair-cn/NAS/COMMON/ESM/MSG/ActivateDefaultEpsBearerContextRequest.h rename to openair3/NAS/COMMON/ESM/MSG/ActivateDefaultEpsBearerContextRequest.h index 749c64f93d..254087da4e 100644 --- a/openair-cn/NAS/COMMON/ESM/MSG/ActivateDefaultEpsBearerContextRequest.h +++ b/openair3/NAS/COMMON/ESM/MSG/ActivateDefaultEpsBearerContextRequest.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/ESM/MSG/BearerResourceAllocationReject.c b/openair3/NAS/COMMON/ESM/MSG/BearerResourceAllocationReject.c similarity index 65% rename from openair-cn/NAS/COMMON/ESM/MSG/BearerResourceAllocationReject.c rename to openair3/NAS/COMMON/ESM/MSG/BearerResourceAllocationReject.c index 9ca43d45f8..ff859d659b 100644 --- a/openair-cn/NAS/COMMON/ESM/MSG/BearerResourceAllocationReject.c +++ b/openair3/NAS/COMMON/ESM/MSG/BearerResourceAllocationReject.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/ESM/MSG/BearerResourceAllocationReject.h b/openair3/NAS/COMMON/ESM/MSG/BearerResourceAllocationReject.h similarity index 59% rename from openair-cn/NAS/COMMON/ESM/MSG/BearerResourceAllocationReject.h rename to openair3/NAS/COMMON/ESM/MSG/BearerResourceAllocationReject.h index e31a6f6d8a..41073b2aa6 100644 --- a/openair-cn/NAS/COMMON/ESM/MSG/BearerResourceAllocationReject.h +++ b/openair3/NAS/COMMON/ESM/MSG/BearerResourceAllocationReject.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/ESM/MSG/BearerResourceAllocationRequest.c b/openair3/NAS/COMMON/ESM/MSG/BearerResourceAllocationRequest.c similarity index 71% rename from openair-cn/NAS/COMMON/ESM/MSG/BearerResourceAllocationRequest.c rename to openair3/NAS/COMMON/ESM/MSG/BearerResourceAllocationRequest.c index 73968f489b..2ad5018d15 100644 --- a/openair-cn/NAS/COMMON/ESM/MSG/BearerResourceAllocationRequest.c +++ b/openair3/NAS/COMMON/ESM/MSG/BearerResourceAllocationRequest.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/ESM/MSG/BearerResourceAllocationRequest.h b/openair3/NAS/COMMON/ESM/MSG/BearerResourceAllocationRequest.h similarity index 63% rename from openair-cn/NAS/COMMON/ESM/MSG/BearerResourceAllocationRequest.h rename to openair3/NAS/COMMON/ESM/MSG/BearerResourceAllocationRequest.h index 48a28c5090..8b4ef0fff9 100644 --- a/openair-cn/NAS/COMMON/ESM/MSG/BearerResourceAllocationRequest.h +++ b/openair3/NAS/COMMON/ESM/MSG/BearerResourceAllocationRequest.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/ESM/MSG/BearerResourceModificationReject.c b/openair3/NAS/COMMON/ESM/MSG/BearerResourceModificationReject.c similarity index 66% rename from openair-cn/NAS/COMMON/ESM/MSG/BearerResourceModificationReject.c rename to openair3/NAS/COMMON/ESM/MSG/BearerResourceModificationReject.c index 52fbc55b69..57591de457 100644 --- a/openair-cn/NAS/COMMON/ESM/MSG/BearerResourceModificationReject.c +++ b/openair3/NAS/COMMON/ESM/MSG/BearerResourceModificationReject.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/ESM/MSG/BearerResourceModificationReject.h b/openair3/NAS/COMMON/ESM/MSG/BearerResourceModificationReject.h similarity index 60% rename from openair-cn/NAS/COMMON/ESM/MSG/BearerResourceModificationReject.h rename to openair3/NAS/COMMON/ESM/MSG/BearerResourceModificationReject.h index 07a9d00e08..e06922fa20 100644 --- a/openair-cn/NAS/COMMON/ESM/MSG/BearerResourceModificationReject.h +++ b/openair3/NAS/COMMON/ESM/MSG/BearerResourceModificationReject.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/ESM/MSG/BearerResourceModificationRequest.c b/openair3/NAS/COMMON/ESM/MSG/BearerResourceModificationRequest.c similarity index 78% rename from openair-cn/NAS/COMMON/ESM/MSG/BearerResourceModificationRequest.c rename to openair3/NAS/COMMON/ESM/MSG/BearerResourceModificationRequest.c index a3b821ee47..b5e623343a 100644 --- a/openair-cn/NAS/COMMON/ESM/MSG/BearerResourceModificationRequest.c +++ b/openair3/NAS/COMMON/ESM/MSG/BearerResourceModificationRequest.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/ESM/MSG/BearerResourceModificationRequest.h b/openair3/NAS/COMMON/ESM/MSG/BearerResourceModificationRequest.h similarity index 67% rename from openair-cn/NAS/COMMON/ESM/MSG/BearerResourceModificationRequest.h rename to openair3/NAS/COMMON/ESM/MSG/BearerResourceModificationRequest.h index f17a89b348..e209c74bfe 100644 --- a/openair-cn/NAS/COMMON/ESM/MSG/BearerResourceModificationRequest.h +++ b/openair3/NAS/COMMON/ESM/MSG/BearerResourceModificationRequest.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/ESM/MSG/COPYING b/openair3/NAS/COMMON/ESM/MSG/COPYING new file mode 100644 index 0000000000..c888423064 --- /dev/null +++ b/openair3/NAS/COMMON/ESM/MSG/COPYING @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ \ No newline at end of file diff --git a/openair-cn/NAS/COMMON/ESM/MSG/DeactivateEpsBearerContextAccept.c b/openair3/NAS/COMMON/ESM/MSG/DeactivateEpsBearerContextAccept.c similarity index 62% rename from openair-cn/NAS/COMMON/ESM/MSG/DeactivateEpsBearerContextAccept.c rename to openair3/NAS/COMMON/ESM/MSG/DeactivateEpsBearerContextAccept.c index 38383ecc07..3d05c2e7d1 100644 --- a/openair-cn/NAS/COMMON/ESM/MSG/DeactivateEpsBearerContextAccept.c +++ b/openair3/NAS/COMMON/ESM/MSG/DeactivateEpsBearerContextAccept.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/ESM/MSG/DeactivateEpsBearerContextAccept.h b/openair3/NAS/COMMON/ESM/MSG/DeactivateEpsBearerContextAccept.h similarity index 59% rename from openair-cn/NAS/COMMON/ESM/MSG/DeactivateEpsBearerContextAccept.h rename to openair3/NAS/COMMON/ESM/MSG/DeactivateEpsBearerContextAccept.h index 0ef58548f5..23b46c7b2f 100644 --- a/openair-cn/NAS/COMMON/ESM/MSG/DeactivateEpsBearerContextAccept.h +++ b/openair3/NAS/COMMON/ESM/MSG/DeactivateEpsBearerContextAccept.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/ESM/MSG/DeactivateEpsBearerContextRequest.c b/openair3/NAS/COMMON/ESM/MSG/DeactivateEpsBearerContextRequest.c similarity index 66% rename from openair-cn/NAS/COMMON/ESM/MSG/DeactivateEpsBearerContextRequest.c rename to openair3/NAS/COMMON/ESM/MSG/DeactivateEpsBearerContextRequest.c index 6030a119a3..77038dee23 100644 --- a/openair-cn/NAS/COMMON/ESM/MSG/DeactivateEpsBearerContextRequest.c +++ b/openair3/NAS/COMMON/ESM/MSG/DeactivateEpsBearerContextRequest.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/ESM/MSG/DeactivateEpsBearerContextRequest.h b/openair3/NAS/COMMON/ESM/MSG/DeactivateEpsBearerContextRequest.h similarity index 60% rename from openair-cn/NAS/COMMON/ESM/MSG/DeactivateEpsBearerContextRequest.h rename to openair3/NAS/COMMON/ESM/MSG/DeactivateEpsBearerContextRequest.h index b85c5710e8..3cfa64a57a 100644 --- a/openair-cn/NAS/COMMON/ESM/MSG/DeactivateEpsBearerContextRequest.h +++ b/openair3/NAS/COMMON/ESM/MSG/DeactivateEpsBearerContextRequest.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/ESM/MSG/EsmInformationRequest.c b/openair3/NAS/COMMON/ESM/MSG/EsmInformationRequest.c new file mode 100644 index 0000000000..79e5b3d732 --- /dev/null +++ b/openair3/NAS/COMMON/ESM/MSG/EsmInformationRequest.c @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include +#include + + +#include "TLVEncoder.h" +#include "TLVDecoder.h" +#include "EsmInformationRequest.h" + +int decode_esm_information_request(esm_information_request_msg *esm_information_request, uint8_t *buffer, uint32_t len) +{ + uint32_t decoded = 0; + + // Check if we got a NULL pointer and if buffer length is >= minimum length expected for the message. + CHECK_PDU_POINTER_AND_LENGTH_DECODER(buffer, ESM_INFORMATION_REQUEST_MINIMUM_LENGTH, len); + + /* Decoding mandatory fields */ + return decoded; +} + +int encode_esm_information_request(esm_information_request_msg *esm_information_request, uint8_t *buffer, uint32_t len) +{ + int encoded = 0; + + /* Checking IEI and pointer */ + CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, ESM_INFORMATION_REQUEST_MINIMUM_LENGTH, len); + + return encoded; +} + diff --git a/openair3/NAS/COMMON/ESM/MSG/EsmInformationRequest.h b/openair3/NAS/COMMON/ESM/MSG/EsmInformationRequest.h new file mode 100644 index 0000000000..d2dad73b46 --- /dev/null +++ b/openair3/NAS/COMMON/ESM/MSG/EsmInformationRequest.h @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "ProtocolDiscriminator.h" +#include "EpsBearerIdentity.h" +#include "ProcedureTransactionIdentity.h" +#include "MessageType.h" + +#ifndef ESM_INFORMATION_REQUEST_H_ +#define ESM_INFORMATION_REQUEST_H_ + +/* Minimum length macro. Formed by minimum length of each mandatory field */ +#define ESM_INFORMATION_REQUEST_MINIMUM_LENGTH (0) + +/* Maximum length macro. Formed by maximum length of each field */ +#define ESM_INFORMATION_REQUEST_MAXIMUM_LENGTH (0) + +/* + * Message name: ESM information request + * Description: This message is sent by the network to the UE to request the UE to provide ESM information, i.e. protocol configuration options or APN or both. See table 8.3.13.1. + * Significance: dual + * Direction: network to UE + */ + +typedef struct esm_information_request_msg_tag { + /* Mandatory fields */ + ProtocolDiscriminator protocoldiscriminator:4; + EpsBearerIdentity epsbeareridentity:4; + ProcedureTransactionIdentity proceduretransactionidentity; + MessageType messagetype; +} esm_information_request_msg; + +int decode_esm_information_request(esm_information_request_msg *esminformationrequest, uint8_t *buffer, uint32_t len); + +int encode_esm_information_request(esm_information_request_msg *esminformationrequest, uint8_t *buffer, uint32_t len); + +#endif /* ! defined(ESM_INFORMATION_REQUEST_H_) */ + diff --git a/openair-cn/NAS/COMMON/ESM/MSG/EsmInformationResponse.c b/openair3/NAS/COMMON/ESM/MSG/EsmInformationResponse.c similarity index 68% rename from openair-cn/NAS/COMMON/ESM/MSG/EsmInformationResponse.c rename to openair3/NAS/COMMON/ESM/MSG/EsmInformationResponse.c index 1609de75f4..c278784ae2 100644 --- a/openair-cn/NAS/COMMON/ESM/MSG/EsmInformationResponse.c +++ b/openair3/NAS/COMMON/ESM/MSG/EsmInformationResponse.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/ESM/MSG/EsmInformationResponse.h b/openair3/NAS/COMMON/ESM/MSG/EsmInformationResponse.h similarity index 59% rename from openair-cn/NAS/COMMON/ESM/MSG/EsmInformationResponse.h rename to openair3/NAS/COMMON/ESM/MSG/EsmInformationResponse.h index 186c582e91..3b66dadcc4 100644 --- a/openair-cn/NAS/COMMON/ESM/MSG/EsmInformationResponse.h +++ b/openair3/NAS/COMMON/ESM/MSG/EsmInformationResponse.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/ESM/MSG/EsmStatus.c b/openair3/NAS/COMMON/ESM/MSG/EsmStatus.c new file mode 100644 index 0000000000..7f6be43a9f --- /dev/null +++ b/openair3/NAS/COMMON/ESM/MSG/EsmStatus.c @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include +#include + + +#include "TLVEncoder.h" +#include "TLVDecoder.h" +#include "EsmStatus.h" + +int decode_esm_status(esm_status_msg *esm_status, uint8_t *buffer, uint32_t len) +{ + uint32_t decoded = 0; + int decoded_result = 0; + + // Check if we got a NULL pointer and if buffer length is >= minimum length expected for the message. + CHECK_PDU_POINTER_AND_LENGTH_DECODER(buffer, ESM_STATUS_MINIMUM_LENGTH, len); + + /* Decoding mandatory fields */ + if ((decoded_result = decode_esm_cause(&esm_status->esmcause, 0, buffer + decoded, len - decoded)) < 0) + return decoded_result; + else + decoded += decoded_result; + + return decoded; +} + +int encode_esm_status(esm_status_msg *esm_status, uint8_t *buffer, uint32_t len) +{ + int encoded = 0; + int encode_result = 0; + + /* Checking IEI and pointer */ + CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, ESM_STATUS_MINIMUM_LENGTH, len); + + if ((encode_result = encode_esm_cause(&esm_status->esmcause, 0, buffer + + encoded, len - encoded)) < 0) //Return in case of error + return encode_result; + else + encoded += encode_result; + + return encoded; +} + diff --git a/openair3/NAS/COMMON/ESM/MSG/EsmStatus.h b/openair3/NAS/COMMON/ESM/MSG/EsmStatus.h new file mode 100644 index 0000000000..afcf3142af --- /dev/null +++ b/openair3/NAS/COMMON/ESM/MSG/EsmStatus.h @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "ProtocolDiscriminator.h" +#include "EpsBearerIdentity.h" +#include "ProcedureTransactionIdentity.h" +#include "MessageType.h" +#include "EsmCause.h" + +#ifndef ESM_STATUS_H_ +#define ESM_STATUS_H_ + +/* Minimum length macro. Formed by minimum length of each mandatory field */ +#define ESM_STATUS_MINIMUM_LENGTH ( \ + ESM_CAUSE_MINIMUM_LENGTH ) + +/* Maximum length macro. Formed by maximum length of each field */ +#define ESM_STATUS_MAXIMUM_LENGTH ( \ + ESM_CAUSE_MAXIMUM_LENGTH ) + + +/* + * Message name: ESM status + * Description: This message is sent by the network or the UE to pass information on the status of the indicated EPS bearer context and report certain error conditions (e.g. as listed in clause 7). See table 8.3.15.1. + * Significance: dual + * Direction: both + */ + +typedef struct esm_status_msg_tag { + /* Mandatory fields */ + ProtocolDiscriminator protocoldiscriminator:4; + EpsBearerIdentity epsbeareridentity:4; + ProcedureTransactionIdentity proceduretransactionidentity; + MessageType messagetype; + EsmCause esmcause; +} esm_status_msg; + +int decode_esm_status(esm_status_msg *esmstatus, uint8_t *buffer, uint32_t len); + +int encode_esm_status(esm_status_msg *esmstatus, uint8_t *buffer, uint32_t len); + +#endif /* ! defined(ESM_STATUS_H_) */ + diff --git a/openair3/NAS/COMMON/ESM/MSG/Makefile b/openair3/NAS/COMMON/ESM/MSG/Makefile new file mode 100644 index 0000000000..7f8c40a5a0 --- /dev/null +++ b/openair3/NAS/COMMON/ESM/MSG/Makefile @@ -0,0 +1,42 @@ + +ifndef PROJDIR +PROJDIR = $(PWD)/../../.. +endif + +include $(PROJDIR)/Makerules +include $(PROJDIR)/Makefile.inc + +INCLUDES = -I. -I$(INCDIR) -I$(UTILDIR) -I$(IESDIR) + +TARGET = $(LIBESMMSG) +TARGETS = $(TARGET).a $(TARGET).so + +all: $(TARGETS) + +%.o: %.c %.h Makefile $(LIBDIR)/$(LIBIES).a $(UTILDIR)/TLVEncoder.h $(UTILDIR)/TLVDecoder.h + @echo Compiling $< + @$(CC) $(CFLAGS) -c $< -o $@ + +$(TARGET).a: $(OBJS) + @$(RM) $@ + @$(AR) $(ARFLAGS) $@ $(OBJS) + @echo Replacing $@ to $(LIBDIR) + @$(RM) $(LIBDIR)/$@ + @$(CP) $@ $(LIBDIR) + +$(TARGET).so: $(OBJS) + @$(LD) -G -o $@ $(OBJS) + @echo Replacing $@ to $(LIBDIR) + @$(RM) $(LIBDIR)/$@ + @$(CP) $@ $(LIBDIR) + +clean: + $(RM) $(OBJS) *.bak *~ + +veryclean: clean + $(RM) $(TARGETS) + +depend: + makedepend -- ${CFLAGS} -- ${SRCS} + +# DO NOT DELETE THIS LINE -- make depend depends on it. diff --git a/openair-cn/NAS/COMMON/ESM/MSG/ModifyEpsBearerContextAccept.c b/openair3/NAS/COMMON/ESM/MSG/ModifyEpsBearerContextAccept.c similarity index 61% rename from openair-cn/NAS/COMMON/ESM/MSG/ModifyEpsBearerContextAccept.c rename to openair3/NAS/COMMON/ESM/MSG/ModifyEpsBearerContextAccept.c index b7da151edb..b4f6833dfc 100644 --- a/openair-cn/NAS/COMMON/ESM/MSG/ModifyEpsBearerContextAccept.c +++ b/openair3/NAS/COMMON/ESM/MSG/ModifyEpsBearerContextAccept.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/ESM/MSG/ModifyEpsBearerContextAccept.h b/openair3/NAS/COMMON/ESM/MSG/ModifyEpsBearerContextAccept.h similarity index 57% rename from openair-cn/NAS/COMMON/ESM/MSG/ModifyEpsBearerContextAccept.h rename to openair3/NAS/COMMON/ESM/MSG/ModifyEpsBearerContextAccept.h index e80a7f8dbc..688e0ec814 100644 --- a/openair-cn/NAS/COMMON/ESM/MSG/ModifyEpsBearerContextAccept.h +++ b/openair3/NAS/COMMON/ESM/MSG/ModifyEpsBearerContextAccept.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/ESM/MSG/ModifyEpsBearerContextReject.c b/openair3/NAS/COMMON/ESM/MSG/ModifyEpsBearerContextReject.c similarity index 65% rename from openair-cn/NAS/COMMON/ESM/MSG/ModifyEpsBearerContextReject.c rename to openair3/NAS/COMMON/ESM/MSG/ModifyEpsBearerContextReject.c index c3b216bb24..01aaa5575d 100644 --- a/openair-cn/NAS/COMMON/ESM/MSG/ModifyEpsBearerContextReject.c +++ b/openair3/NAS/COMMON/ESM/MSG/ModifyEpsBearerContextReject.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/ESM/MSG/ModifyEpsBearerContextReject.h b/openair3/NAS/COMMON/ESM/MSG/ModifyEpsBearerContextReject.h similarity index 59% rename from openair-cn/NAS/COMMON/ESM/MSG/ModifyEpsBearerContextReject.h rename to openair3/NAS/COMMON/ESM/MSG/ModifyEpsBearerContextReject.h index 2c023c914b..5c40f44879 100644 --- a/openair-cn/NAS/COMMON/ESM/MSG/ModifyEpsBearerContextReject.h +++ b/openair3/NAS/COMMON/ESM/MSG/ModifyEpsBearerContextReject.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/ESM/MSG/ModifyEpsBearerContextRequest.c b/openair3/NAS/COMMON/ESM/MSG/ModifyEpsBearerContextRequest.c similarity index 86% rename from openair-cn/NAS/COMMON/ESM/MSG/ModifyEpsBearerContextRequest.c rename to openair3/NAS/COMMON/ESM/MSG/ModifyEpsBearerContextRequest.c index 62e7fc8a22..1624e4e3c3 100644 --- a/openair-cn/NAS/COMMON/ESM/MSG/ModifyEpsBearerContextRequest.c +++ b/openair3/NAS/COMMON/ESM/MSG/ModifyEpsBearerContextRequest.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/ESM/MSG/ModifyEpsBearerContextRequest.h b/openair3/NAS/COMMON/ESM/MSG/ModifyEpsBearerContextRequest.h similarity index 73% rename from openair-cn/NAS/COMMON/ESM/MSG/ModifyEpsBearerContextRequest.h rename to openair3/NAS/COMMON/ESM/MSG/ModifyEpsBearerContextRequest.h index 1c2f24950c..2b21e1b2fd 100644 --- a/openair-cn/NAS/COMMON/ESM/MSG/ModifyEpsBearerContextRequest.h +++ b/openair3/NAS/COMMON/ESM/MSG/ModifyEpsBearerContextRequest.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/ESM/MSG/PdnConnectivityReject.c b/openair3/NAS/COMMON/ESM/MSG/PdnConnectivityReject.c similarity index 64% rename from openair-cn/NAS/COMMON/ESM/MSG/PdnConnectivityReject.c rename to openair3/NAS/COMMON/ESM/MSG/PdnConnectivityReject.c index 6d08e046cc..30fa4242f4 100644 --- a/openair-cn/NAS/COMMON/ESM/MSG/PdnConnectivityReject.c +++ b/openair3/NAS/COMMON/ESM/MSG/PdnConnectivityReject.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/ESM/MSG/PdnConnectivityReject.h b/openair3/NAS/COMMON/ESM/MSG/PdnConnectivityReject.h similarity index 56% rename from openair-cn/NAS/COMMON/ESM/MSG/PdnConnectivityReject.h rename to openair3/NAS/COMMON/ESM/MSG/PdnConnectivityReject.h index 9712f2118c..3e5ad16c02 100644 --- a/openair-cn/NAS/COMMON/ESM/MSG/PdnConnectivityReject.h +++ b/openair3/NAS/COMMON/ESM/MSG/PdnConnectivityReject.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/ESM/MSG/PdnConnectivityRequest.c b/openair3/NAS/COMMON/ESM/MSG/PdnConnectivityRequest.c similarity index 76% rename from openair-cn/NAS/COMMON/ESM/MSG/PdnConnectivityRequest.c rename to openair3/NAS/COMMON/ESM/MSG/PdnConnectivityRequest.c index 6ff9acab12..6ca5ca94ab 100644 --- a/openair-cn/NAS/COMMON/ESM/MSG/PdnConnectivityRequest.c +++ b/openair3/NAS/COMMON/ESM/MSG/PdnConnectivityRequest.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/ESM/MSG/PdnConnectivityRequest.h b/openair3/NAS/COMMON/ESM/MSG/PdnConnectivityRequest.h similarity index 63% rename from openair-cn/NAS/COMMON/ESM/MSG/PdnConnectivityRequest.h rename to openair3/NAS/COMMON/ESM/MSG/PdnConnectivityRequest.h index 2a30138f9e..78b227ce37 100644 --- a/openair-cn/NAS/COMMON/ESM/MSG/PdnConnectivityRequest.h +++ b/openair3/NAS/COMMON/ESM/MSG/PdnConnectivityRequest.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/ESM/MSG/PdnDisconnectReject.c b/openair3/NAS/COMMON/ESM/MSG/PdnDisconnectReject.c similarity index 63% rename from openair-cn/NAS/COMMON/ESM/MSG/PdnDisconnectReject.c rename to openair3/NAS/COMMON/ESM/MSG/PdnDisconnectReject.c index 0e710bf968..73a095d15d 100644 --- a/openair-cn/NAS/COMMON/ESM/MSG/PdnDisconnectReject.c +++ b/openair3/NAS/COMMON/ESM/MSG/PdnDisconnectReject.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/ESM/MSG/PdnDisconnectReject.h b/openair3/NAS/COMMON/ESM/MSG/PdnDisconnectReject.h similarity index 56% rename from openair-cn/NAS/COMMON/ESM/MSG/PdnDisconnectReject.h rename to openair3/NAS/COMMON/ESM/MSG/PdnDisconnectReject.h index 3d6508a869..980d0f6d09 100644 --- a/openair-cn/NAS/COMMON/ESM/MSG/PdnDisconnectReject.h +++ b/openair3/NAS/COMMON/ESM/MSG/PdnDisconnectReject.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/ESM/MSG/PdnDisconnectRequest.c b/openair3/NAS/COMMON/ESM/MSG/PdnDisconnectRequest.c similarity index 63% rename from openair-cn/NAS/COMMON/ESM/MSG/PdnDisconnectRequest.c rename to openair3/NAS/COMMON/ESM/MSG/PdnDisconnectRequest.c index 2127384006..7ab48c6c39 100644 --- a/openair-cn/NAS/COMMON/ESM/MSG/PdnDisconnectRequest.c +++ b/openair3/NAS/COMMON/ESM/MSG/PdnDisconnectRequest.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/ESM/MSG/PdnDisconnectRequest.h b/openair3/NAS/COMMON/ESM/MSG/PdnDisconnectRequest.h similarity index 57% rename from openair-cn/NAS/COMMON/ESM/MSG/PdnDisconnectRequest.h rename to openair3/NAS/COMMON/ESM/MSG/PdnDisconnectRequest.h index 449a088c6a..9ac114df3a 100644 --- a/openair-cn/NAS/COMMON/ESM/MSG/PdnDisconnectRequest.h +++ b/openair3/NAS/COMMON/ESM/MSG/PdnDisconnectRequest.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/ESM/MSG/esm_cause.h b/openair3/NAS/COMMON/ESM/MSG/esm_cause.h similarity index 72% rename from openair-cn/NAS/COMMON/ESM/MSG/esm_cause.h rename to openair3/NAS/COMMON/ESM/MSG/esm_cause.h index 65063a8dda..e731ec1a8b 100644 --- a/openair-cn/NAS/COMMON/ESM/MSG/esm_cause.h +++ b/openair3/NAS/COMMON/ESM/MSG/esm_cause.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ /***************************************************************************** Source esm_cause.h diff --git a/openair-cn/NAS/COMMON/ESM/MSG/esm_msg.c b/openair3/NAS/COMMON/ESM/MSG/esm_msg.c similarity index 92% rename from openair-cn/NAS/COMMON/ESM/MSG/esm_msg.c rename to openair3/NAS/COMMON/ESM/MSG/esm_msg.c index 2f5dbc8727..d9f7df6854 100644 --- a/openair-cn/NAS/COMMON/ESM/MSG/esm_msg.c +++ b/openair3/NAS/COMMON/ESM/MSG/esm_msg.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ /***************************************************************************** Source esm_msg.c diff --git a/openair-cn/NAS/COMMON/ESM/MSG/esm_msg.h b/openair3/NAS/COMMON/ESM/MSG/esm_msg.h similarity index 72% rename from openair-cn/NAS/COMMON/ESM/MSG/esm_msg.h rename to openair3/NAS/COMMON/ESM/MSG/esm_msg.h index 4c93296989..9ed64ea2a5 100644 --- a/openair-cn/NAS/COMMON/ESM/MSG/esm_msg.h +++ b/openair3/NAS/COMMON/ESM/MSG/esm_msg.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ /***************************************************************************** Source esm_msg.h diff --git a/openair-cn/NAS/COMMON/ESM/MSG/esm_msgDef.h b/openair3/NAS/COMMON/ESM/MSG/esm_msgDef.h similarity index 73% rename from openair-cn/NAS/COMMON/ESM/MSG/esm_msgDef.h rename to openair3/NAS/COMMON/ESM/MSG/esm_msgDef.h index 71a76a8f36..2bb0a4e188 100644 --- a/openair-cn/NAS/COMMON/ESM/MSG/esm_msgDef.h +++ b/openair3/NAS/COMMON/ESM/MSG/esm_msgDef.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ /***************************************************************************** Version 0.1 diff --git a/openair-cn/NAS/COMMON/IES/AccessPointName.c b/openair3/NAS/COMMON/IES/AccessPointName.c similarity index 63% rename from openair-cn/NAS/COMMON/IES/AccessPointName.c rename to openair3/NAS/COMMON/IES/AccessPointName.c index 286b0afd7f..3a40d84a23 100644 --- a/openair-cn/NAS/COMMON/IES/AccessPointName.c +++ b/openair3/NAS/COMMON/IES/AccessPointName.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/IES/AccessPointName.h b/openair3/NAS/COMMON/IES/AccessPointName.h new file mode 100644 index 0000000000..a05d6f0d53 --- /dev/null +++ b/openair3/NAS/COMMON/IES/AccessPointName.h @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef ACCESS_POINT_NAME_H_ +#define ACCESS_POINT_NAME_H_ + +#define ACCESS_POINT_NAME_MINIMUM_LENGTH 3 +#define ACCESS_POINT_NAME_MAXIMUM_LENGTH 102 + +typedef struct AccessPointName_tag { + OctetString accesspointnamevalue; +} AccessPointName; + +int encode_access_point_name(AccessPointName *accesspointname, uint8_t iei, uint8_t *buffer, uint32_t len); + +int decode_access_point_name(AccessPointName *accesspointname, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_access_point_name_xml(AccessPointName *accesspointname, uint8_t iei); + +#endif /* ACCESS POINT NAME_H_ */ + diff --git a/openair-cn/NAS/COMMON/IES/AdditionalUpdateResult.c b/openair3/NAS/COMMON/IES/AdditionalUpdateResult.c similarity index 58% rename from openair-cn/NAS/COMMON/IES/AdditionalUpdateResult.c rename to openair3/NAS/COMMON/IES/AdditionalUpdateResult.c index d8c306ba43..7a24f4a31e 100644 --- a/openair-cn/NAS/COMMON/IES/AdditionalUpdateResult.c +++ b/openair3/NAS/COMMON/IES/AdditionalUpdateResult.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/IES/AdditionalUpdateResult.h b/openair3/NAS/COMMON/IES/AdditionalUpdateResult.h new file mode 100644 index 0000000000..6c96baaa2a --- /dev/null +++ b/openair3/NAS/COMMON/IES/AdditionalUpdateResult.h @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef ADDITIONAL_UPDATE_RESULT_H_ +#define ADDITIONAL_UPDATE_RESULT_H_ + +#define ADDITIONAL_UPDATE_RESULT_MINIMUM_LENGTH 1 +#define ADDITIONAL_UPDATE_RESULT_MAXIMUM_LENGTH 1 + +typedef uint8_t AdditionalUpdateResult; + +int encode_additional_update_result(AdditionalUpdateResult *additionalupdateresult, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_additional_update_result_xml(AdditionalUpdateResult *additionalupdateresult, uint8_t iei); + +uint8_t encode_u8_additional_update_result(AdditionalUpdateResult *additionalupdateresult); + +int decode_additional_update_result(AdditionalUpdateResult *additionalupdateresult, uint8_t iei, uint8_t *buffer, uint32_t len); + +int decode_u8_additional_update_result(AdditionalUpdateResult *additionalupdateresult, uint8_t iei, uint8_t value, uint32_t len); + +#endif /* ADDITIONAL UPDATE RESULT_H_ */ + diff --git a/openair3/NAS/COMMON/IES/AdditionalUpdateType.c b/openair3/NAS/COMMON/IES/AdditionalUpdateType.c new file mode 100644 index 0000000000..d3e713480e --- /dev/null +++ b/openair3/NAS/COMMON/IES/AdditionalUpdateType.c @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + + +#include "TLVEncoder.h" +#include "TLVDecoder.h" +#include "AdditionalUpdateType.h" + +int decode_additional_update_type(AdditionalUpdateType *additionalupdatetype, uint8_t iei, uint8_t *buffer, uint32_t len) +{ + int decoded = 0; + *additionalupdatetype = *buffer & 0x1; + decoded++; +#if defined (NAS_DEBUG) + dump_additional_update_type_xml(additionalupdatetype, iei); +#endif + return decoded; +} + +int encode_additional_update_type(AdditionalUpdateType *additionalupdatetype, uint8_t iei, uint8_t *buffer, uint32_t len) +{ + return 0; +} +void dump_additional_update_type_xml(AdditionalUpdateType *additionalupdatetype, uint8_t iei) +{ + printf("\n"); + + if (iei > 0) + /* Don't display IEI if = 0 */ + printf(" 0x%X\n", iei); + + printf(" %u\n", *additionalupdatetype); + printf("\n"); +} + diff --git a/openair3/NAS/COMMON/IES/AdditionalUpdateType.h b/openair3/NAS/COMMON/IES/AdditionalUpdateType.h new file mode 100644 index 0000000000..49fbcc137e --- /dev/null +++ b/openair3/NAS/COMMON/IES/AdditionalUpdateType.h @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef ADDITIONAL_UPDATE_TYPE_H_ +#define ADDITIONAL_UPDATE_TYPE_H_ + +#define ADDITIONAL_UPDATE_TYPE_MINIMUM_LENGTH 1 +#define ADDITIONAL_UPDATE_TYPE_MAXIMUM_LENGTH 1 + +typedef uint8_t AdditionalUpdateType; + +int encode_additional_update_type(AdditionalUpdateType *additionalupdatetype, uint8_t iei, uint8_t *buffer, uint32_t len); + +int decode_additional_update_type(AdditionalUpdateType *additionalupdatetype, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_additional_update_type_xml(AdditionalUpdateType *additionalupdatetype, uint8_t iei); + +#endif /* ADDITIONAL UPDATE TYPE_H_ */ + diff --git a/openair-cn/NAS/COMMON/IES/ApnAggregateMaximumBitRate.c b/openair3/NAS/COMMON/IES/ApnAggregateMaximumBitRate.c similarity index 71% rename from openair-cn/NAS/COMMON/IES/ApnAggregateMaximumBitRate.c rename to openair3/NAS/COMMON/IES/ApnAggregateMaximumBitRate.c index b92ed3732e..f892f93450 100644 --- a/openair-cn/NAS/COMMON/IES/ApnAggregateMaximumBitRate.c +++ b/openair3/NAS/COMMON/IES/ApnAggregateMaximumBitRate.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/IES/ApnAggregateMaximumBitRate.h b/openair3/NAS/COMMON/IES/ApnAggregateMaximumBitRate.h new file mode 100644 index 0000000000..e7eb8da33f --- /dev/null +++ b/openair3/NAS/COMMON/IES/ApnAggregateMaximumBitRate.h @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef APN_AGGREGATE_MAXIMUM_BIT_RATE_H_ +#define APN_AGGREGATE_MAXIMUM_BIT_RATE_H_ + +#define APN_AGGREGATE_MAXIMUM_BIT_RATE_MINIMUM_LENGTH 4 +#define APN_AGGREGATE_MAXIMUM_BIT_RATE_MAXIMUM_LENGTH 8 + +#define APN_AGGREGATE_MAXIMUM_BIT_RATE_MAXIMUM_EXTENSION_PRESENT (1<<0) +#define APN_AGGREGATE_MAXIMUM_BIT_RATE_MAXIMUM_EXTENSION2_PRESENT (1<<1) + +typedef struct ApnAggregateMaximumBitRate_tag { + uint8_t apnambrfordownlink; + uint8_t apnambrforuplink; + uint8_t apnambrfordownlink_extended; + uint8_t apnambrforuplink_extended; + uint8_t apnambrfordownlink_extended2; + uint8_t apnambrforuplink_extended2; + uint8_t extensions; +} ApnAggregateMaximumBitRate; + +int encode_apn_aggregate_maximum_bit_rate(ApnAggregateMaximumBitRate *apnaggregatemaximumbitrate, uint8_t iei, uint8_t *buffer, uint32_t len); + +int decode_apn_aggregate_maximum_bit_rate(ApnAggregateMaximumBitRate *apnaggregatemaximumbitrate, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_apn_aggregate_maximum_bit_rate_xml(ApnAggregateMaximumBitRate *apnaggregatemaximumbitrate, uint8_t iei); + +#endif /* APN AGGREGATE MAXIMUM BIT RATE_H_ */ + diff --git a/openair-cn/NAS/COMMON/IES/AuthenticationFailureParameter.c b/openair3/NAS/COMMON/IES/AuthenticationFailureParameter.c similarity index 56% rename from openair-cn/NAS/COMMON/IES/AuthenticationFailureParameter.c rename to openair3/NAS/COMMON/IES/AuthenticationFailureParameter.c index 68b6424307..179808307e 100644 --- a/openair-cn/NAS/COMMON/IES/AuthenticationFailureParameter.c +++ b/openair3/NAS/COMMON/IES/AuthenticationFailureParameter.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/IES/AuthenticationFailureParameter.h b/openair3/NAS/COMMON/IES/AuthenticationFailureParameter.h new file mode 100644 index 0000000000..f2208ef057 --- /dev/null +++ b/openair3/NAS/COMMON/IES/AuthenticationFailureParameter.h @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef AUTHENTICATION_FAILURE_PARAMETER_H_ +#define AUTHENTICATION_FAILURE_PARAMETER_H_ + +#define AUTHENTICATION_FAILURE_PARAMETER_MINIMUM_LENGTH 16 +#define AUTHENTICATION_FAILURE_PARAMETER_MAXIMUM_LENGTH 16 + +typedef struct AuthenticationFailureParameter_tag { + OctetString auts; +} AuthenticationFailureParameter; + +int encode_authentication_failure_parameter(AuthenticationFailureParameter *authenticationfailureparameter, uint8_t iei, uint8_t *buffer, uint32_t len); + +int decode_authentication_failure_parameter(AuthenticationFailureParameter *authenticationfailureparameter, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_authentication_failure_parameter_xml(AuthenticationFailureParameter *authenticationfailureparameter, uint8_t iei); + +#endif /* AUTHENTICATION FAILURE PARAMETER_H_ */ + diff --git a/openair-cn/NAS/COMMON/IES/AuthenticationParameterAutn.c b/openair3/NAS/COMMON/IES/AuthenticationParameterAutn.c similarity index 55% rename from openair-cn/NAS/COMMON/IES/AuthenticationParameterAutn.c rename to openair3/NAS/COMMON/IES/AuthenticationParameterAutn.c index f338b11f48..b2b9c72696 100644 --- a/openair-cn/NAS/COMMON/IES/AuthenticationParameterAutn.c +++ b/openair3/NAS/COMMON/IES/AuthenticationParameterAutn.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/IES/AuthenticationParameterAutn.h b/openair3/NAS/COMMON/IES/AuthenticationParameterAutn.h new file mode 100644 index 0000000000..d75855e45a --- /dev/null +++ b/openair3/NAS/COMMON/IES/AuthenticationParameterAutn.h @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef AUTHENTICATION_PARAMETER_AUTN_H_ +#define AUTHENTICATION_PARAMETER_AUTN_H_ + +#define AUTHENTICATION_PARAMETER_AUTN_MINIMUM_LENGTH 17 +#define AUTHENTICATION_PARAMETER_AUTN_MAXIMUM_LENGTH 17 + +typedef struct AuthenticationParameterAutn_tag { + OctetString autn; +} AuthenticationParameterAutn; + +int encode_authentication_parameter_autn(AuthenticationParameterAutn *authenticationparameterautn, uint8_t iei, uint8_t *buffer, uint32_t len); + +int decode_authentication_parameter_autn(AuthenticationParameterAutn *authenticationparameterautn, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_authentication_parameter_autn_xml(AuthenticationParameterAutn *authenticationparameterautn, uint8_t iei); + +#endif /* AUTHENTICATION PARAMETER AUTN_H_ */ + diff --git a/openair-cn/NAS/COMMON/IES/AuthenticationParameterRand.c b/openair3/NAS/COMMON/IES/AuthenticationParameterRand.c similarity index 53% rename from openair-cn/NAS/COMMON/IES/AuthenticationParameterRand.c rename to openair3/NAS/COMMON/IES/AuthenticationParameterRand.c index ebc44a5d7c..ae402e41c7 100644 --- a/openair-cn/NAS/COMMON/IES/AuthenticationParameterRand.c +++ b/openair3/NAS/COMMON/IES/AuthenticationParameterRand.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/IES/AuthenticationParameterRand.h b/openair3/NAS/COMMON/IES/AuthenticationParameterRand.h new file mode 100644 index 0000000000..b940e8304f --- /dev/null +++ b/openair3/NAS/COMMON/IES/AuthenticationParameterRand.h @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef AUTHENTICATION_PARAMETER_RAND_H_ +#define AUTHENTICATION_PARAMETER_RAND_H_ + +#define AUTHENTICATION_PARAMETER_RAND_MINIMUM_LENGTH 16 +#define AUTHENTICATION_PARAMETER_RAND_MAXIMUM_LENGTH 16 + +typedef struct AuthenticationParameterRand_tag { + OctetString rand; +} AuthenticationParameterRand; + +int encode_authentication_parameter_rand(AuthenticationParameterRand *authenticationparameterrand, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_authentication_parameter_rand_xml(AuthenticationParameterRand *authenticationparameterrand, uint8_t iei); + +int decode_authentication_parameter_rand(AuthenticationParameterRand *authenticationparameterrand, uint8_t iei, uint8_t *buffer, uint32_t len); + +#endif /* AUTHENTICATION PARAMETER RAND_H_ */ + diff --git a/openair-cn/NAS/COMMON/IES/AuthenticationResponseParameter.c b/openair3/NAS/COMMON/IES/AuthenticationResponseParameter.c similarity index 55% rename from openair-cn/NAS/COMMON/IES/AuthenticationResponseParameter.c rename to openair3/NAS/COMMON/IES/AuthenticationResponseParameter.c index 94dd1c0dd4..b142fed5a6 100644 --- a/openair-cn/NAS/COMMON/IES/AuthenticationResponseParameter.c +++ b/openair3/NAS/COMMON/IES/AuthenticationResponseParameter.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/IES/AuthenticationResponseParameter.h b/openair3/NAS/COMMON/IES/AuthenticationResponseParameter.h new file mode 100644 index 0000000000..0ea7c1af04 --- /dev/null +++ b/openair3/NAS/COMMON/IES/AuthenticationResponseParameter.h @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef AUTHENTICATION_RESPONSE_PARAMETER_H_ +#define AUTHENTICATION_RESPONSE_PARAMETER_H_ + +#define AUTHENTICATION_RESPONSE_PARAMETER_MINIMUM_LENGTH 6 +#define AUTHENTICATION_RESPONSE_PARAMETER_MAXIMUM_LENGTH 18 + +typedef struct AuthenticationResponseParameter_tag { + OctetString res; +} AuthenticationResponseParameter; + +int encode_authentication_response_parameter(AuthenticationResponseParameter *authenticationresponseparameter, uint8_t iei, uint8_t *buffer, uint32_t len); + +int decode_authentication_response_parameter(AuthenticationResponseParameter *authenticationresponseparameter, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_authentication_response_parameter_xml(AuthenticationResponseParameter *authenticationresponseparameter, uint8_t iei); + +#endif /* AUTHENTICATION RESPONSE PARAMETER_H_ */ + diff --git a/openair3/NAS/COMMON/IES/COPYING b/openair3/NAS/COMMON/IES/COPYING new file mode 100644 index 0000000000..c888423064 --- /dev/null +++ b/openair3/NAS/COMMON/IES/COPYING @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ \ No newline at end of file diff --git a/openair-cn/NAS/COMMON/IES/CipheringKeySequenceNumber.c b/openair3/NAS/COMMON/IES/CipheringKeySequenceNumber.c similarity index 59% rename from openair-cn/NAS/COMMON/IES/CipheringKeySequenceNumber.c rename to openair3/NAS/COMMON/IES/CipheringKeySequenceNumber.c index 16f039627e..c2e395f4fb 100644 --- a/openair-cn/NAS/COMMON/IES/CipheringKeySequenceNumber.c +++ b/openair3/NAS/COMMON/IES/CipheringKeySequenceNumber.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/IES/CipheringKeySequenceNumber.h b/openair3/NAS/COMMON/IES/CipheringKeySequenceNumber.h new file mode 100644 index 0000000000..d1fd9627f4 --- /dev/null +++ b/openair3/NAS/COMMON/IES/CipheringKeySequenceNumber.h @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef CIPHERING_KEY_SEQUENCE_NUMBER_H_ +#define CIPHERING_KEY_SEQUENCE_NUMBER_H_ + +#define CIPHERING_KEY_SEQUENCE_NUMBER_MINIMUM_LENGTH 1 +#define CIPHERING_KEY_SEQUENCE_NUMBER_MAXIMUM_LENGTH 1 + +typedef uint8_t CipheringKeySequenceNumber; + +int encode_ciphering_key_sequence_number(CipheringKeySequenceNumber *cipheringkeysequencenumber, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_ciphering_key_sequence_number_xml(CipheringKeySequenceNumber *cipheringkeysequencenumber, uint8_t iei); + +uint8_t encode_u8_ciphering_key_sequence_number(CipheringKeySequenceNumber *cipheringkeysequencenumber); + +int decode_ciphering_key_sequence_number(CipheringKeySequenceNumber *cipheringkeysequencenumber, uint8_t iei, uint8_t *buffer, uint32_t len); + +int decode_u8_ciphering_key_sequence_number(CipheringKeySequenceNumber *cipheringkeysequencenumber, uint8_t iei, uint8_t value, uint32_t len); + +#endif /* CIPHERING KEY SEQUENCE NUMBER_H_ */ + diff --git a/openair3/NAS/COMMON/IES/Cli.c b/openair3/NAS/COMMON/IES/Cli.c new file mode 100644 index 0000000000..e8c662e289 --- /dev/null +++ b/openair3/NAS/COMMON/IES/Cli.c @@ -0,0 +1,102 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + + +#include "TLVEncoder.h" +#include "TLVDecoder.h" +#include "Cli.h" + +int decode_cli(Cli *cli, uint8_t iei, uint8_t *buffer, uint32_t len) +{ + int decoded = 0; + uint8_t ielen = 0; + int decode_result; + + if (iei > 0) { + CHECK_IEI_DECODER(iei, *buffer); + decoded++; + } + + ielen = *(buffer + decoded); + decoded++; + CHECK_LENGTH_DECODER(len - decoded, ielen); + + if ((decode_result = decode_octet_string(&cli->clivalue, ielen, buffer + decoded, len - decoded)) < 0) + return decode_result; + else + decoded += decode_result; + +#if defined (NAS_DEBUG) + dump_cli_xml(cli, iei); +#endif + return decoded; +} +int encode_cli(Cli *cli, uint8_t iei, uint8_t *buffer, uint32_t len) +{ + uint8_t *lenPtr; + uint32_t encoded = 0; + int encode_result; + /* Checking IEI and pointer */ + CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, CLI_MINIMUM_LENGTH, len); +#if defined (NAS_DEBUG) + dump_cli_xml(cli, iei); +#endif + + if (iei > 0) { + *buffer = iei; + encoded++; + } + + lenPtr = (buffer + encoded); + encoded ++; + + if ((encode_result = encode_octet_string(&cli->clivalue, buffer + encoded, len - encoded)) < 0) + return encode_result; + else + encoded += encode_result; + + *lenPtr = encoded - 1 - ((iei > 0) ? 1 : 0); + return encoded; +} + +void dump_cli_xml(Cli *cli, uint8_t iei) +{ + printf("\n"); + + if (iei > 0) + /* Don't display IEI if = 0 */ + printf(" 0x%X\n", iei); + + printf("%s", dump_octet_string_xml(&cli->clivalue)); + printf("\n"); +} + diff --git a/openair3/NAS/COMMON/IES/Cli.h b/openair3/NAS/COMMON/IES/Cli.h new file mode 100644 index 0000000000..293bdf28a2 --- /dev/null +++ b/openair3/NAS/COMMON/IES/Cli.h @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef CLI_H_ +#define CLI_H_ + +#define CLI_MINIMUM_LENGTH 3 +#define CLI_MAXIMUM_LENGTH 14 + +typedef struct Cli_tag { + OctetString clivalue; +} Cli; + +int encode_cli(Cli *cli, uint8_t iei, uint8_t *buffer, uint32_t len); + +int decode_cli(Cli *cli, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_cli_xml(Cli *cli, uint8_t iei); + +#endif /* CLI_H_ */ + diff --git a/openair-cn/NAS/COMMON/IES/CsfbResponse.c b/openair3/NAS/COMMON/IES/CsfbResponse.c similarity index 54% rename from openair-cn/NAS/COMMON/IES/CsfbResponse.c rename to openair3/NAS/COMMON/IES/CsfbResponse.c index 84ce13a322..aa0e2478af 100644 --- a/openair-cn/NAS/COMMON/IES/CsfbResponse.c +++ b/openair3/NAS/COMMON/IES/CsfbResponse.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/IES/CsfbResponse.h b/openair3/NAS/COMMON/IES/CsfbResponse.h new file mode 100644 index 0000000000..b20a50bcb0 --- /dev/null +++ b/openair3/NAS/COMMON/IES/CsfbResponse.h @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef CSFB_RESPONSE_H_ +#define CSFB_RESPONSE_H_ + +#define CSFB_RESPONSE_MINIMUM_LENGTH 1 +#define CSFB_RESPONSE_MAXIMUM_LENGTH 1 + +typedef uint8_t CsfbResponse; + +int encode_csfb_response(CsfbResponse *csfbresponse, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_csfb_response_xml(CsfbResponse *csfbresponse, uint8_t iei); + +uint8_t encode_u8_csfb_response(CsfbResponse *csfbresponse); + +int decode_csfb_response(CsfbResponse *csfbresponse, uint8_t iei, uint8_t *buffer, uint32_t len); + +int decode_u8_csfb_response(CsfbResponse *csfbresponse, uint8_t iei, uint8_t value, uint32_t len); + +#endif /* CSFB RESPONSE_H_ */ + diff --git a/openair3/NAS/COMMON/IES/DaylightSavingTime.c b/openair3/NAS/COMMON/IES/DaylightSavingTime.c new file mode 100644 index 0000000000..fe10157bb9 --- /dev/null +++ b/openair3/NAS/COMMON/IES/DaylightSavingTime.c @@ -0,0 +1,93 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + + +#include "TLVEncoder.h" +#include "TLVDecoder.h" +#include "DaylightSavingTime.h" + +int decode_daylight_saving_time(DaylightSavingTime *daylightsavingtime, uint8_t iei, uint8_t *buffer, uint32_t len) +{ + int decoded = 0; + uint8_t ielen = 0; + + if (iei > 0) { + CHECK_IEI_DECODER(iei, *buffer); + decoded++; + } + + ielen = *(buffer + decoded); + decoded++; + CHECK_LENGTH_DECODER(len - decoded, ielen); + *daylightsavingtime = *buffer & 0x3; + decoded++; +#if defined (NAS_DEBUG) + dump_daylight_saving_time_xml(daylightsavingtime, iei); +#endif + return decoded; +} +int encode_daylight_saving_time(DaylightSavingTime *daylightsavingtime, uint8_t iei, uint8_t *buffer, uint32_t len) +{ + uint8_t *lenPtr; + uint32_t encoded = 0; + /* Checking IEI and pointer */ + CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, DAYLIGHT_SAVING_TIME_MINIMUM_LENGTH, len); +#if defined (NAS_DEBUG) + dump_daylight_saving_time_xml(daylightsavingtime, iei); +#endif + + if (iei > 0) { + *buffer = iei; + encoded++; + } + + lenPtr = (buffer + encoded); + encoded ++; + *(buffer + encoded) = 0x00 | + (*daylightsavingtime & 0x3); + encoded++; + *lenPtr = encoded - 1 - ((iei > 0) ? 1 : 0); + return encoded; +} + +void dump_daylight_saving_time_xml(DaylightSavingTime *daylightsavingtime, uint8_t iei) +{ + printf("\n"); + + if (iei > 0) + /* Don't display IEI if = 0 */ + printf(" 0x%X\n", iei); + + printf(" %u\n", *daylightsavingtime); + printf("\n"); +} + diff --git a/openair3/NAS/COMMON/IES/DaylightSavingTime.h b/openair3/NAS/COMMON/IES/DaylightSavingTime.h new file mode 100644 index 0000000000..6e676d6e72 --- /dev/null +++ b/openair3/NAS/COMMON/IES/DaylightSavingTime.h @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef DAYLIGHT_SAVING_TIME_H_ +#define DAYLIGHT_SAVING_TIME_H_ + +#define DAYLIGHT_SAVING_TIME_MINIMUM_LENGTH 3 +#define DAYLIGHT_SAVING_TIME_MAXIMUM_LENGTH 3 + +typedef uint8_t DaylightSavingTime; + +int encode_daylight_saving_time(DaylightSavingTime *daylightsavingtime, uint8_t iei, uint8_t *buffer, uint32_t len); + +int decode_daylight_saving_time(DaylightSavingTime *daylightsavingtime, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_daylight_saving_time_xml(DaylightSavingTime *daylightsavingtime, uint8_t iei); + +#endif /* DAYLIGHT SAVING TIME_H_ */ + diff --git a/openair-cn/NAS/COMMON/IES/DetachType.c b/openair3/NAS/COMMON/IES/DetachType.c similarity index 58% rename from openair-cn/NAS/COMMON/IES/DetachType.c rename to openair3/NAS/COMMON/IES/DetachType.c index 7a92ffebca..b27fae53d4 100644 --- a/openair-cn/NAS/COMMON/IES/DetachType.c +++ b/openair3/NAS/COMMON/IES/DetachType.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/IES/DetachType.h b/openair3/NAS/COMMON/IES/DetachType.h new file mode 100644 index 0000000000..3728aa7702 --- /dev/null +++ b/openair3/NAS/COMMON/IES/DetachType.h @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef DETACH_TYPE_H_ +#define DETACH_TYPE_H_ + +#define DETACH_TYPE_MINIMUM_LENGTH 1 +#define DETACH_TYPE_MAXIMUM_LENGTH 1 + +typedef struct DetachType_tag { +#define DETACH_TYPE_NORMAL_DETACH 0 +#define DETACH_TYPE_SWITCH_OFF 1 + uint8_t switchoff:1; +#define DETACH_TYPE_EPS 0b001 +#define DETACH_TYPE_IMSI 0b010 +#define DETACH_TYPE_EPS_IMSI 0b011 +#define DETACH_TYPE_RESERVED_1 0b110 +#define DETACH_TYPE_RESERVED_2 0b111 + uint8_t typeofdetach:3; +} DetachType; + +int encode_detach_type(DetachType *detachtype, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_detach_type_xml(DetachType *detachtype, uint8_t iei); + +uint8_t encode_u8_detach_type(DetachType *detachtype); + +int decode_detach_type(DetachType *detachtype, uint8_t iei, uint8_t *buffer, uint32_t len); + +int decode_u8_detach_type(DetachType *detachtype, uint8_t iei, uint8_t value, uint32_t len); + +#endif /* DETACH TYPE_H_ */ + diff --git a/openair-cn/NAS/COMMON/IES/DrxParameter.c b/openair3/NAS/COMMON/IES/DrxParameter.c similarity index 57% rename from openair-cn/NAS/COMMON/IES/DrxParameter.c rename to openair3/NAS/COMMON/IES/DrxParameter.c index c9528e1cae..f920ead27f 100644 --- a/openair-cn/NAS/COMMON/IES/DrxParameter.c +++ b/openair3/NAS/COMMON/IES/DrxParameter.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/IES/DrxParameter.h b/openair3/NAS/COMMON/IES/DrxParameter.h new file mode 100644 index 0000000000..d30c0e033a --- /dev/null +++ b/openair3/NAS/COMMON/IES/DrxParameter.h @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef DRX_PARAMETER_H_ +#define DRX_PARAMETER_H_ + +#define DRX_PARAMETER_MINIMUM_LENGTH 3 +#define DRX_PARAMETER_MAXIMUM_LENGTH 3 + +typedef struct DrxParameter_tag { + uint8_t splitpgcyclecode; + uint8_t cnspecificdrxcyclelengthcoefficientanddrxvaluefors1mode:4; + uint8_t splitonccch:1; + uint8_t nondrxtimer:3; +} DrxParameter; + +int encode_drx_parameter(DrxParameter *drxparameter, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_drx_parameter_xml(DrxParameter *drxparameter, uint8_t iei); + +int decode_drx_parameter(DrxParameter *drxparameter, uint8_t iei, uint8_t *buffer, uint32_t len); + +#endif /* DRX PARAMETER_H_ */ + diff --git a/openair-cn/NAS/COMMON/IES/EmergencyNumberList.c b/openair3/NAS/COMMON/IES/EmergencyNumberList.c similarity index 55% rename from openair-cn/NAS/COMMON/IES/EmergencyNumberList.c rename to openair3/NAS/COMMON/IES/EmergencyNumberList.c index 3939acd6f8..084dbd15fa 100644 --- a/openair-cn/NAS/COMMON/IES/EmergencyNumberList.c +++ b/openair3/NAS/COMMON/IES/EmergencyNumberList.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/IES/EmergencyNumberList.h b/openair3/NAS/COMMON/IES/EmergencyNumberList.h new file mode 100644 index 0000000000..090ce1ec38 --- /dev/null +++ b/openair3/NAS/COMMON/IES/EmergencyNumberList.h @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef EMERGENCY_NUMBER_LIST_H_ +#define EMERGENCY_NUMBER_LIST_H_ + +#define EMERGENCY_NUMBER_LIST_MINIMUM_LENGTH 5 +#define EMERGENCY_NUMBER_LIST_MAXIMUM_LENGTH 50 + +typedef struct EmergencyNumberList_tag { + uint8_t lengthofemergency; + uint8_t emergencyservicecategoryvalue:5; +} EmergencyNumberList; + +int encode_emergency_number_list(EmergencyNumberList *emergencynumberlist, uint8_t iei, uint8_t *buffer, uint32_t len); + +int decode_emergency_number_list(EmergencyNumberList *emergencynumberlist, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_emergency_number_list_xml(EmergencyNumberList *emergencynumberlist, uint8_t iei); + +#endif /* EMERGENCY NUMBER LIST_H_ */ + diff --git a/openair3/NAS/COMMON/IES/EmmCause.c b/openair3/NAS/COMMON/IES/EmmCause.c new file mode 100644 index 0000000000..a89d0d6c30 --- /dev/null +++ b/openair3/NAS/COMMON/IES/EmmCause.c @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + + +#include "TLVEncoder.h" +#include "TLVDecoder.h" +#include "EmmCause.h" + +int decode_emm_cause(EmmCause *emmcause, uint8_t iei, uint8_t *buffer, uint32_t len) +{ + int decoded = 0; + + if (iei > 0) { + CHECK_IEI_DECODER(iei, *buffer); + decoded++; + } + + *emmcause = *(buffer + decoded); + decoded++; +#if defined (NAS_DEBUG) + dump_emm_cause_xml(emmcause, iei); +#endif + return decoded; +} + +int encode_emm_cause(EmmCause *emmcause, uint8_t iei, uint8_t *buffer, uint32_t len) +{ + uint32_t encoded = 0; + /* Checking IEI and pointer */ + CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, EMM_CAUSE_MINIMUM_LENGTH, len); +#if defined (NAS_DEBUG) + dump_emm_cause_xml(emmcause, iei); +#endif + + if (iei > 0) { + *buffer = iei; + encoded++; + } + + *(buffer + encoded) = *emmcause; + encoded++; + return encoded; +} + +void dump_emm_cause_xml(EmmCause *emmcause, uint8_t iei) +{ + printf("\n"); + + if (iei > 0) + /* Don't display IEI if = 0 */ + printf(" 0x%X\n", iei); + + printf(" %u\n", *emmcause); + printf("\n"); +} + diff --git a/openair3/NAS/COMMON/IES/EmmCause.h b/openair3/NAS/COMMON/IES/EmmCause.h new file mode 100644 index 0000000000..42d9f51904 --- /dev/null +++ b/openair3/NAS/COMMON/IES/EmmCause.h @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef EMM_CAUSE_H_ +#define EMM_CAUSE_H_ + +#define EMM_CAUSE_MINIMUM_LENGTH 1 +#define EMM_CAUSE_MAXIMUM_LENGTH 1 + +typedef uint8_t EmmCause; + +int encode_emm_cause(EmmCause *emmcause, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_emm_cause_xml(EmmCause *emmcause, uint8_t iei); + +int decode_emm_cause(EmmCause *emmcause, uint8_t iei, uint8_t *buffer, uint32_t len); + +#endif /* EMM CAUSE_H_ */ + diff --git a/openair-cn/NAS/COMMON/IES/EpsAttachResult.c b/openair3/NAS/COMMON/IES/EpsAttachResult.c similarity index 56% rename from openair-cn/NAS/COMMON/IES/EpsAttachResult.c rename to openair3/NAS/COMMON/IES/EpsAttachResult.c index dff7004ff6..6b70585324 100644 --- a/openair-cn/NAS/COMMON/IES/EpsAttachResult.c +++ b/openair3/NAS/COMMON/IES/EpsAttachResult.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/IES/EpsAttachResult.h b/openair3/NAS/COMMON/IES/EpsAttachResult.h new file mode 100644 index 0000000000..1c459ce914 --- /dev/null +++ b/openair3/NAS/COMMON/IES/EpsAttachResult.h @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef EPS_ATTACH_RESULT_H_ +#define EPS_ATTACH_RESULT_H_ + +#define EPS_ATTACH_RESULT_MINIMUM_LENGTH 1 +#define EPS_ATTACH_RESULT_MAXIMUM_LENGTH 1 + +#define EPS_ATTACH_RESULT_EPS 0b001 +#define EPS_ATTACH_RESULT_EPS_IMSI 0b010 +typedef uint8_t EpsAttachResult; + +int encode_eps_attach_result(EpsAttachResult *epsattachresult, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_eps_attach_result_xml(EpsAttachResult *epsattachresult, uint8_t iei); + +uint8_t encode_u8_eps_attach_result(EpsAttachResult *epsattachresult); + +int decode_eps_attach_result(EpsAttachResult *epsattachresult, uint8_t iei, uint8_t *buffer, uint32_t len); + +int decode_u8_eps_attach_result(EpsAttachResult *epsattachresult, uint8_t iei, uint8_t value, uint32_t len); + +#endif /* EPS ATTACH RESULT_H_ */ + diff --git a/openair-cn/NAS/COMMON/IES/EpsAttachType.c b/openair3/NAS/COMMON/IES/EpsAttachType.c similarity index 55% rename from openair-cn/NAS/COMMON/IES/EpsAttachType.c rename to openair3/NAS/COMMON/IES/EpsAttachType.c index b7946edb0e..8bc691fe55 100644 --- a/openair-cn/NAS/COMMON/IES/EpsAttachType.c +++ b/openair3/NAS/COMMON/IES/EpsAttachType.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/IES/EpsAttachType.h b/openair3/NAS/COMMON/IES/EpsAttachType.h new file mode 100644 index 0000000000..268c997db2 --- /dev/null +++ b/openair3/NAS/COMMON/IES/EpsAttachType.h @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef EPS_ATTACH_TYPE_H_ +#define EPS_ATTACH_TYPE_H_ + +#define EPS_ATTACH_TYPE_MINIMUM_LENGTH 1 +#define EPS_ATTACH_TYPE_MAXIMUM_LENGTH 1 + +#define EPS_ATTACH_TYPE_EPS 0b0001 +#define EPS_ATTACH_TYPE_IMSI 0b0010 +#define EPS_ATTACH_TYPE_EMERGENCY 0b0110 +#define EPS_ATTACH_TYPE_RESERVED 0b0111 +typedef uint8_t EpsAttachType; + +int encode_eps_attach_type(EpsAttachType *epsattachtype, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_eps_attach_type_xml(EpsAttachType *epsattachtype, uint8_t iei); + +uint8_t encode_u8_eps_attach_type(EpsAttachType *epsattachtype); + +int decode_eps_attach_type(EpsAttachType *epsattachtype, uint8_t iei, uint8_t *buffer, uint32_t len); + +int decode_u8_eps_attach_type(EpsAttachType *epsattachtype, uint8_t iei, uint8_t value, uint32_t len); + +#endif /* EPS ATTACH TYPE_H_ */ + diff --git a/openair-cn/NAS/COMMON/IES/EpsBearerContextStatus.c b/openair3/NAS/COMMON/IES/EpsBearerContextStatus.c similarity index 50% rename from openair-cn/NAS/COMMON/IES/EpsBearerContextStatus.c rename to openair3/NAS/COMMON/IES/EpsBearerContextStatus.c index 9ef3a4e8f5..b51cf95b67 100644 --- a/openair-cn/NAS/COMMON/IES/EpsBearerContextStatus.c +++ b/openair3/NAS/COMMON/IES/EpsBearerContextStatus.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/IES/EpsBearerContextStatus.h b/openair3/NAS/COMMON/IES/EpsBearerContextStatus.h new file mode 100644 index 0000000000..be1fd2f21c --- /dev/null +++ b/openair3/NAS/COMMON/IES/EpsBearerContextStatus.h @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef EPS_BEARER_CONTEXT_STATUS_H_ +#define EPS_BEARER_CONTEXT_STATUS_H_ + +#define EPS_BEARER_CONTEXT_STATUS_MINIMUM_LENGTH 4 +#define EPS_BEARER_CONTEXT_STATUS_MAXIMUM_LENGTH 4 + +typedef uint16_t EpsBearerContextStatus; + +int encode_eps_bearer_context_status(EpsBearerContextStatus *epsbearercontextstatus, uint8_t iei, uint8_t *buffer, uint32_t len); + +int decode_eps_bearer_context_status(EpsBearerContextStatus *epsbearercontextstatus, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_eps_bearer_context_status_xml(EpsBearerContextStatus *epsbearercontextstatus, uint8_t iei); + +#endif /* EPS BEARER CONTEXT STATUS_H_ */ + diff --git a/openair3/NAS/COMMON/IES/EpsBearerIdentity.c b/openair3/NAS/COMMON/IES/EpsBearerIdentity.c new file mode 100644 index 0000000000..f7d405a415 --- /dev/null +++ b/openair3/NAS/COMMON/IES/EpsBearerIdentity.c @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + + +#include "TLVEncoder.h" +#include "TLVDecoder.h" +#include "EpsBearerIdentity.h" + +int decode_eps_bearer_identity(EpsBearerIdentity *epsbeareridentity, uint8_t iei, uint8_t *buffer, uint32_t len) +{ + return 0; +} + +int encode_eps_bearer_identity(EpsBearerIdentity *epsbeareridentity, uint8_t iei, uint8_t *buffer, uint32_t len) +{ + return 0; +} + diff --git a/openair3/NAS/COMMON/IES/EpsBearerIdentity.h b/openair3/NAS/COMMON/IES/EpsBearerIdentity.h new file mode 100644 index 0000000000..2c6c9868ab --- /dev/null +++ b/openair3/NAS/COMMON/IES/EpsBearerIdentity.h @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef EPS_BEARER_IDENTITY_H_ +#define EPS_BEARER_IDENTITY_H_ + +#define EPS_BEARER_IDENTITY_MINIMUM_LENGTH 1 +#define EPS_BEARER_IDENTITY_MAXIMUM_LENGTH 1 + +#define EPS_BEARER_IDENTITY_UNASSIGNED 0 +#define EPS_BEARER_IDENTITY_FIRST 5 +#define EPS_BEARER_IDENTITY_LAST 15 +typedef uint8_t EpsBearerIdentity; + +int encode_eps_bearer_identity(EpsBearerIdentity *epsbeareridentity, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_eps_bearer_identity_xml(EpsBearerIdentity *epsbeareridentity, uint8_t iei); + +int decode_eps_bearer_identity(EpsBearerIdentity *epsbeareridentity, uint8_t iei, uint8_t *buffer, uint32_t len); + +#endif /* EPS BEARER IDENTITY_H_ */ + diff --git a/openair-cn/NAS/COMMON/IES/EpsMobileIdentity.c b/openair3/NAS/COMMON/IES/EpsMobileIdentity.c similarity index 88% rename from openair-cn/NAS/COMMON/IES/EpsMobileIdentity.c rename to openair3/NAS/COMMON/IES/EpsMobileIdentity.c index 4d154a3b66..448858f55c 100644 --- a/openair-cn/NAS/COMMON/IES/EpsMobileIdentity.c +++ b/openair3/NAS/COMMON/IES/EpsMobileIdentity.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/IES/EpsMobileIdentity.h b/openair3/NAS/COMMON/IES/EpsMobileIdentity.h similarity index 52% rename from openair-cn/NAS/COMMON/IES/EpsMobileIdentity.h rename to openair3/NAS/COMMON/IES/EpsMobileIdentity.h index 6f2360c56d..105db68a05 100644 --- a/openair-cn/NAS/COMMON/IES/EpsMobileIdentity.h +++ b/openair3/NAS/COMMON/IES/EpsMobileIdentity.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/IES/EpsNetworkFeatureSupport.c b/openair3/NAS/COMMON/IES/EpsNetworkFeatureSupport.c similarity index 51% rename from openair-cn/NAS/COMMON/IES/EpsNetworkFeatureSupport.c rename to openair3/NAS/COMMON/IES/EpsNetworkFeatureSupport.c index 0063fb5339..162db783d5 100644 --- a/openair-cn/NAS/COMMON/IES/EpsNetworkFeatureSupport.c +++ b/openair3/NAS/COMMON/IES/EpsNetworkFeatureSupport.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/IES/EpsNetworkFeatureSupport.h b/openair3/NAS/COMMON/IES/EpsNetworkFeatureSupport.h new file mode 100644 index 0000000000..cbe1a0d6f1 --- /dev/null +++ b/openair3/NAS/COMMON/IES/EpsNetworkFeatureSupport.h @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef EPS_NETWORK_FEATURE_SUPPORT_H_ +#define EPS_NETWORK_FEATURE_SUPPORT_H_ + +#define EPS_NETWORK_FEATURE_SUPPORT_MINIMUM_LENGTH 3 +#define EPS_NETWORK_FEATURE_SUPPORT_MAXIMUM_LENGTH 3 + +typedef uint8_t EpsNetworkFeatureSupport; + +int encode_eps_network_feature_support(EpsNetworkFeatureSupport *epsnetworkfeaturesupport, uint8_t iei, uint8_t *buffer, uint32_t len); + +int decode_eps_network_feature_support(EpsNetworkFeatureSupport *epsnetworkfeaturesupport, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_eps_network_feature_support_xml(EpsNetworkFeatureSupport *epsnetworkfeaturesupport, uint8_t iei); + +#endif /* EPS NETWORK FEATURE SUPPORT_H_ */ + diff --git a/openair-cn/NAS/COMMON/IES/EpsQualityOfService.c b/openair3/NAS/COMMON/IES/EpsQualityOfService.c similarity index 77% rename from openair-cn/NAS/COMMON/IES/EpsQualityOfService.c rename to openair3/NAS/COMMON/IES/EpsQualityOfService.c index ade4ca8ed2..0a467baffe 100644 --- a/openair-cn/NAS/COMMON/IES/EpsQualityOfService.c +++ b/openair3/NAS/COMMON/IES/EpsQualityOfService.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/IES/EpsQualityOfService.h b/openair3/NAS/COMMON/IES/EpsQualityOfService.h new file mode 100644 index 0000000000..10703399e9 --- /dev/null +++ b/openair3/NAS/COMMON/IES/EpsQualityOfService.h @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#ifndef EPS_QUALITY_OF_SERVICE_H_ +#define EPS_QUALITY_OF_SERVICE_H_ + +#define EPS_QUALITY_OF_SERVICE_MINIMUM_LENGTH 2 +#define EPS_QUALITY_OF_SERVICE_MAXIMUM_LENGTH 10 + +typedef struct { + uint8_t maxBitRateForUL; + uint8_t maxBitRateForDL; + uint8_t guarBitRateForUL; + uint8_t guarBitRateForDL; +} EpsQoSBitRates; + +typedef struct { + uint8_t bitRatesPresent:1; + uint8_t bitRatesExtPresent:1; + uint8_t qci; + EpsQoSBitRates bitRates; + EpsQoSBitRates bitRatesExt; +} EpsQualityOfService; + +//typedef uint8_t EpsQualityOfService; + +int encode_eps_quality_of_service(EpsQualityOfService *epsqualityofservice, uint8_t iei, uint8_t *buffer, uint32_t len); + +int decode_eps_quality_of_service(EpsQualityOfService *epsqualityofservice, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_eps_quality_of_service_xml(EpsQualityOfService *epsqualityofservice, uint8_t iei); + +int eps_qos_bit_rate_value(uint8_t br); +int eps_qos_bit_rate_ext_value(uint8_t br); + +#endif /* EPS QUALITY OF SERVICE_H_ */ + diff --git a/openair-cn/NAS/COMMON/IES/EpsUpdateResult.c b/openair3/NAS/COMMON/IES/EpsUpdateResult.c similarity index 56% rename from openair-cn/NAS/COMMON/IES/EpsUpdateResult.c rename to openair3/NAS/COMMON/IES/EpsUpdateResult.c index 5f1822d4ab..8ee25b4aba 100644 --- a/openair-cn/NAS/COMMON/IES/EpsUpdateResult.c +++ b/openair3/NAS/COMMON/IES/EpsUpdateResult.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/IES/EpsUpdateResult.h b/openair3/NAS/COMMON/IES/EpsUpdateResult.h new file mode 100644 index 0000000000..d3aabc3402 --- /dev/null +++ b/openair3/NAS/COMMON/IES/EpsUpdateResult.h @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef EPS_UPDATE_RESULT_H_ +#define EPS_UPDATE_RESULT_H_ + +#define EPS_UPDATE_RESULT_MINIMUM_LENGTH 1 +#define EPS_UPDATE_RESULT_MAXIMUM_LENGTH 1 + +typedef uint8_t EpsUpdateResult; + +int encode_eps_update_result(EpsUpdateResult *epsupdateresult, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_eps_update_result_xml(EpsUpdateResult *epsupdateresult, uint8_t iei); + +uint8_t encode_u8_eps_update_result(EpsUpdateResult *epsupdateresult); + +int decode_eps_update_result(EpsUpdateResult *epsupdateresult, uint8_t iei, uint8_t *buffer, uint32_t len); + +int decode_u8_eps_update_result(EpsUpdateResult *epsupdateresult, uint8_t iei, uint8_t value, uint32_t len); + +#endif /* EPS UPDATE RESULT_H_ */ + diff --git a/openair-cn/NAS/COMMON/IES/EpsUpdateType.c b/openair3/NAS/COMMON/IES/EpsUpdateType.c similarity index 60% rename from openair-cn/NAS/COMMON/IES/EpsUpdateType.c rename to openair3/NAS/COMMON/IES/EpsUpdateType.c index 39dd4461d9..571b267dcb 100644 --- a/openair-cn/NAS/COMMON/IES/EpsUpdateType.c +++ b/openair3/NAS/COMMON/IES/EpsUpdateType.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/IES/EpsUpdateType.h b/openair3/NAS/COMMON/IES/EpsUpdateType.h new file mode 100644 index 0000000000..09578574f6 --- /dev/null +++ b/openair3/NAS/COMMON/IES/EpsUpdateType.h @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef EPS_UPDATE_TYPE_H_ +#define EPS_UPDATE_TYPE_H_ + +#define EPS_UPDATE_TYPE_MINIMUM_LENGTH 1 +#define EPS_UPDATE_TYPE_MAXIMUM_LENGTH 1 + +typedef struct EpsUpdateType_tag { + uint8_t activeflag:1; + uint8_t epsupdatetypevalue:3; +} EpsUpdateType; + +int encode_eps_update_type(EpsUpdateType *epsupdatetype, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_eps_update_type_xml(EpsUpdateType *epsupdatetype, uint8_t iei); + +uint8_t encode_u8_eps_update_type(EpsUpdateType *epsupdatetype); + +int decode_eps_update_type(EpsUpdateType *epsupdatetype, uint8_t iei, uint8_t *buffer, uint32_t len); + +int decode_u8_eps_update_type(EpsUpdateType *epsupdatetype, uint8_t iei, uint8_t value, uint32_t len); + +#endif /* EPS UPDATE TYPE_H_ */ + diff --git a/openair3/NAS/COMMON/IES/EsmCause.c b/openair3/NAS/COMMON/IES/EsmCause.c new file mode 100644 index 0000000000..8c5436d855 --- /dev/null +++ b/openair3/NAS/COMMON/IES/EsmCause.c @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + + +#include "TLVEncoder.h" +#include "TLVDecoder.h" +#include "EsmCause.h" + +int decode_esm_cause(EsmCause *esmcause, uint8_t iei, uint8_t *buffer, uint32_t len) +{ + int decoded = 0; + + if (iei > 0) { + CHECK_IEI_DECODER(iei, *buffer); + decoded++; + } + + *esmcause = *(buffer + decoded); + decoded++; +#if defined (NAS_DEBUG) + dump_esm_cause_xml(esmcause, iei); +#endif + return decoded; +} + +int encode_esm_cause(EsmCause *esmcause, uint8_t iei, uint8_t *buffer, uint32_t len) +{ + uint32_t encoded = 0; + /* Checking IEI and pointer */ + CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, ESM_CAUSE_MINIMUM_LENGTH, len); +#if defined (NAS_DEBUG) + dump_esm_cause_xml(esmcause, iei); +#endif + + if (iei > 0) { + *buffer = iei; + encoded++; + } + + *(buffer + encoded) = *esmcause; + encoded++; + return encoded; +} + +void dump_esm_cause_xml(EsmCause *esmcause, uint8_t iei) +{ + printf("\n"); + + if (iei > 0) + /* Don't display IEI if = 0 */ + printf(" 0x%X\n", iei); + + printf(" %u\n", *esmcause); + printf("\n"); +} + diff --git a/openair3/NAS/COMMON/IES/EsmCause.h b/openair3/NAS/COMMON/IES/EsmCause.h new file mode 100644 index 0000000000..e79c51ac19 --- /dev/null +++ b/openair3/NAS/COMMON/IES/EsmCause.h @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef ESM_CAUSE_H_ +#define ESM_CAUSE_H_ + +#define ESM_CAUSE_MINIMUM_LENGTH 1 +#define ESM_CAUSE_MAXIMUM_LENGTH 1 + +typedef uint8_t EsmCause; + +int encode_esm_cause(EsmCause *esmcause, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_esm_cause_xml(EsmCause *esmcause, uint8_t iei); + +int decode_esm_cause(EsmCause *esmcause, uint8_t iei, uint8_t *buffer, uint32_t len); + +#endif /* ESM CAUSE_H_ */ + diff --git a/openair-cn/NAS/COMMON/IES/EsmInformationTransferFlag.c b/openair3/NAS/COMMON/IES/EsmInformationTransferFlag.c similarity index 59% rename from openair-cn/NAS/COMMON/IES/EsmInformationTransferFlag.c rename to openair3/NAS/COMMON/IES/EsmInformationTransferFlag.c index 1c42a93058..b4d69c44f7 100644 --- a/openair-cn/NAS/COMMON/IES/EsmInformationTransferFlag.c +++ b/openair3/NAS/COMMON/IES/EsmInformationTransferFlag.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/IES/EsmInformationTransferFlag.h b/openair3/NAS/COMMON/IES/EsmInformationTransferFlag.h new file mode 100644 index 0000000000..cfaf82a560 --- /dev/null +++ b/openair3/NAS/COMMON/IES/EsmInformationTransferFlag.h @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef ESM_INFORMATION_TRANSFER_FLAG_H_ +#define ESM_INFORMATION_TRANSFER_FLAG_H_ + +#define ESM_INFORMATION_TRANSFER_FLAG_MINIMUM_LENGTH 1 +#define ESM_INFORMATION_TRANSFER_FLAG_MAXIMUM_LENGTH 1 + +typedef uint8_t EsmInformationTransferFlag; + +int encode_esm_information_transfer_flag(EsmInformationTransferFlag *esminformationtransferflag, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_esm_information_transfer_flag_xml(EsmInformationTransferFlag *esminformationtransferflag, uint8_t iei); + +uint8_t encode_u8_esm_information_transfer_flag(EsmInformationTransferFlag *esminformationtransferflag); + +int decode_esm_information_transfer_flag(EsmInformationTransferFlag *esminformationtransferflag, uint8_t iei, uint8_t *buffer, uint32_t len); + +int decode_u8_esm_information_transfer_flag(EsmInformationTransferFlag *esminformationtransferflag, uint8_t iei, uint8_t value, uint32_t len); + +#endif /* ESM INFORMATION TRANSFER FLAG_H_ */ + diff --git a/openair-cn/NAS/COMMON/IES/EsmMessageContainer.c b/openair3/NAS/COMMON/IES/EsmMessageContainer.c similarity index 59% rename from openair-cn/NAS/COMMON/IES/EsmMessageContainer.c rename to openair3/NAS/COMMON/IES/EsmMessageContainer.c index edb4cef9d8..080374e681 100644 --- a/openair-cn/NAS/COMMON/IES/EsmMessageContainer.c +++ b/openair3/NAS/COMMON/IES/EsmMessageContainer.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/IES/EsmMessageContainer.h b/openair3/NAS/COMMON/IES/EsmMessageContainer.h new file mode 100644 index 0000000000..326a9dd4e5 --- /dev/null +++ b/openair3/NAS/COMMON/IES/EsmMessageContainer.h @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef ESM_MESSAGE_CONTAINER_H_ +#define ESM_MESSAGE_CONTAINER_H_ + +#define ESM_MESSAGE_CONTAINER_MINIMUM_LENGTH 2 // [length]+[length] +#define ESM_MESSAGE_CONTAINER_MAXIMUM_LENGTH 65538 // [IEI]+[length]+[length]+[ESM msg] + +typedef struct EsmMessageContainer_tag { + OctetString esmmessagecontainercontents; +} EsmMessageContainer; + +int encode_esm_message_container(EsmMessageContainer *esmmessagecontainer, uint8_t iei, uint8_t *buffer, uint32_t len); + +int decode_esm_message_container(EsmMessageContainer *esmmessagecontainer, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_esm_message_container_xml(EsmMessageContainer *esmmessagecontainer, uint8_t iei); + +#endif /* ESM MESSAGE CONTAINER_H_ */ + diff --git a/openair3/NAS/COMMON/IES/GprsTimer.c b/openair3/NAS/COMMON/IES/GprsTimer.c new file mode 100644 index 0000000000..9d8889ec6b --- /dev/null +++ b/openair3/NAS/COMMON/IES/GprsTimer.c @@ -0,0 +1,95 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + + +#include "TLVEncoder.h" +#include "TLVDecoder.h" +#include "GprsTimer.h" + +static const long _gprs_timer_unit[] = {2, 60, 360, 60, 60, 60, 60, 0}; + +int decode_gprs_timer(GprsTimer *gprstimer, uint8_t iei, uint8_t *buffer, uint32_t len) +{ + int decoded = 0; + + if (iei > 0) { + CHECK_IEI_DECODER(iei, *buffer); + decoded++; + } + + gprstimer->unit = (*(buffer + decoded) >> 5) & 0x7; + gprstimer->timervalue = *(buffer + decoded) & 0x1f; + decoded++; +#if defined (NAS_DEBUG) + dump_gprs_timer_xml(gprstimer, iei); +#endif + return decoded; +} + +int encode_gprs_timer(GprsTimer *gprstimer, uint8_t iei, uint8_t *buffer, uint32_t len) +{ + uint32_t encoded = 0; + /* Checking IEI and pointer */ + CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, GPRS_TIMER_MINIMUM_LENGTH, len); +#if defined (NAS_DEBUG) + dump_gprs_timer_xml(gprstimer, iei); +#endif + + if (iei > 0) { + *buffer = iei; + encoded++; + } + + *(buffer + encoded) = 0x00 | ((gprstimer->unit & 0x7) << 5) | + (gprstimer->timervalue & 0x1f); + encoded++; + return encoded; +} + +void dump_gprs_timer_xml(GprsTimer *gprstimer, uint8_t iei) +{ + printf("\n"); + + if (iei > 0) + /* Don't display IEI if = 0 */ + printf(" 0x%X\n", iei); + + printf(" %u\n", gprstimer->unit); + printf(" %u\n", gprstimer->timervalue); + printf("\n"); +} + +long gprs_timer_value(GprsTimer *gprstimer) +{ + return (gprstimer->timervalue * _gprs_timer_unit[gprstimer->unit]); +} + diff --git a/openair3/NAS/COMMON/IES/GprsTimer.h b/openair3/NAS/COMMON/IES/GprsTimer.h new file mode 100644 index 0000000000..66468b75aa --- /dev/null +++ b/openair3/NAS/COMMON/IES/GprsTimer.h @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef GPRS_TIMER_H_ +#define GPRS_TIMER_H_ + +#define GPRS_TIMER_MINIMUM_LENGTH 2 +#define GPRS_TIMER_MAXIMUM_LENGTH 2 + +typedef struct GprsTimer_tag { +#define GPRS_TIMER_UNIT_2S 0b000 /* 2 seconds */ +#define GPRS_TIMER_UNIT_60S 0b001 /* 1 minute */ +#define GPRS_TIMER_UNIT_360S 0b010 /* decihours */ +#define GPRS_TIMER_UNIT_0S 0b111 /* deactivated */ + uint8_t unit:3; + uint8_t timervalue:5; +} GprsTimer; + +int encode_gprs_timer(GprsTimer *gprstimer, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_gprs_timer_xml(GprsTimer *gprstimer, uint8_t iei); + +int decode_gprs_timer(GprsTimer *gprstimer, uint8_t iei, uint8_t *buffer, uint32_t len); + +long gprs_timer_value(GprsTimer *gprstimer); + +#endif /* GPRS TIMER_H_ */ + diff --git a/openair-cn/NAS/COMMON/IES/GutiType.c b/openair3/NAS/COMMON/IES/GutiType.c similarity index 53% rename from openair-cn/NAS/COMMON/IES/GutiType.c rename to openair3/NAS/COMMON/IES/GutiType.c index 8edf37dbe7..7391edb53c 100644 --- a/openair-cn/NAS/COMMON/IES/GutiType.c +++ b/openair3/NAS/COMMON/IES/GutiType.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/IES/GutiType.h b/openair3/NAS/COMMON/IES/GutiType.h new file mode 100644 index 0000000000..4df547ff06 --- /dev/null +++ b/openair3/NAS/COMMON/IES/GutiType.h @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef GUTI_TYPE_H_ +#define GUTI_TYPE_H_ + +#define GUTI_TYPE_MINIMUM_LENGTH 1 +#define GUTI_TYPE_MAXIMUM_LENGTH 1 + +#define GUTI_NATIVE 0 +#define GUTI_MAPPED 1 +typedef uint8_t GutiType; + +int encode_guti_type(GutiType *gutitype, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_guti_type_xml(GutiType *gutitype, uint8_t iei); + +uint8_t encode_u8_guti_type(GutiType *gutitype); + +int decode_guti_type(GutiType *gutitype, uint8_t iei, uint8_t *buffer, uint32_t len); + +int decode_u8_guti_type(GutiType *gutitype, uint8_t iei, uint8_t value, uint32_t len); + +#endif /* GUTI_TYPE_H_ */ + diff --git a/openair-cn/NAS/COMMON/IES/IdentityType2.c b/openair3/NAS/COMMON/IES/IdentityType2.c similarity index 55% rename from openair-cn/NAS/COMMON/IES/IdentityType2.c rename to openair3/NAS/COMMON/IES/IdentityType2.c index ddcfb54c2d..c50a1fc0f7 100644 --- a/openair-cn/NAS/COMMON/IES/IdentityType2.c +++ b/openair3/NAS/COMMON/IES/IdentityType2.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/IES/IdentityType2.h b/openair3/NAS/COMMON/IES/IdentityType2.h new file mode 100644 index 0000000000..9d7e075b7a --- /dev/null +++ b/openair3/NAS/COMMON/IES/IdentityType2.h @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef IDENTITY_TYPE_2_H_ +#define IDENTITY_TYPE_2_H_ + +#define IDENTITY_TYPE_2_MINIMUM_LENGTH 1 +#define IDENTITY_TYPE_2_MAXIMUM_LENGTH 1 + +#define IDENTITY_TYPE_2_IMSI 0b001 +#define IDENTITY_TYPE_2_IMEI 0b010 +#define IDENTITY_TYPE_2_IMEISV 0b011 +#define IDENTITY_TYPE_2_TMSI 0b100 +typedef uint8_t IdentityType2; + +int encode_identity_type_2(IdentityType2 *identitytype2, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_identity_type_2_xml(IdentityType2 *identitytype2, uint8_t iei); + +uint8_t encode_u8_identity_type_2(IdentityType2 *identitytype2); + +int decode_identity_type_2(IdentityType2 *identitytype2, uint8_t iei, uint8_t *buffer, uint32_t len); + +int decode_u8_identity_type_2(IdentityType2 *identitytype2, uint8_t iei, uint8_t value, uint32_t len); + +#endif /* IDENTITY TYPE 2_H_ */ + diff --git a/openair-cn/NAS/COMMON/IES/ImeisvRequest.c b/openair3/NAS/COMMON/IES/ImeisvRequest.c similarity index 55% rename from openair-cn/NAS/COMMON/IES/ImeisvRequest.c rename to openair3/NAS/COMMON/IES/ImeisvRequest.c index c6dfbe5f72..798ce55dce 100644 --- a/openair-cn/NAS/COMMON/IES/ImeisvRequest.c +++ b/openair3/NAS/COMMON/IES/ImeisvRequest.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/IES/ImeisvRequest.h b/openair3/NAS/COMMON/IES/ImeisvRequest.h new file mode 100644 index 0000000000..71c319bc8d --- /dev/null +++ b/openair3/NAS/COMMON/IES/ImeisvRequest.h @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef IMEISV_REQUEST_H_ +#define IMEISV_REQUEST_H_ + +#define IMEISV_REQUEST_MINIMUM_LENGTH 1 +#define IMEISV_REQUEST_MAXIMUM_LENGTH 1 + +typedef uint8_t ImeisvRequest; + +int encode_imeisv_request(ImeisvRequest *imeisvrequest, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_imeisv_request_xml(ImeisvRequest *imeisvrequest, uint8_t iei); + +uint8_t encode_u8_imeisv_request(ImeisvRequest *imeisvrequest); + +int decode_imeisv_request(ImeisvRequest *imeisvrequest, uint8_t iei, uint8_t *buffer, uint32_t len); + +int decode_u8_imeisv_request(ImeisvRequest *imeisvrequest, uint8_t iei, uint8_t value, uint32_t len); + +#endif /* IMEISV REQUEST_H_ */ + diff --git a/openair-cn/NAS/COMMON/IES/KsiAndSequenceNumber.c b/openair3/NAS/COMMON/IES/KsiAndSequenceNumber.c similarity index 50% rename from openair-cn/NAS/COMMON/IES/KsiAndSequenceNumber.c rename to openair3/NAS/COMMON/IES/KsiAndSequenceNumber.c index 4be3a1d729..c552654aa8 100644 --- a/openair-cn/NAS/COMMON/IES/KsiAndSequenceNumber.c +++ b/openair3/NAS/COMMON/IES/KsiAndSequenceNumber.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/IES/KsiAndSequenceNumber.h b/openair3/NAS/COMMON/IES/KsiAndSequenceNumber.h new file mode 100644 index 0000000000..042f56d1f8 --- /dev/null +++ b/openair3/NAS/COMMON/IES/KsiAndSequenceNumber.h @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef KSI_AND_SEQUENCE_NUMBER_H_ +#define KSI_AND_SEQUENCE_NUMBER_H_ + +#define KSI_AND_SEQUENCE_NUMBER_MINIMUM_LENGTH 2 +#define KSI_AND_SEQUENCE_NUMBER_MAXIMUM_LENGTH 2 + +typedef struct KsiAndSequenceNumber_tag { + uint8_t ksi:3; + uint8_t sequencenumber:5; +} KsiAndSequenceNumber; + +int encode_ksi_and_sequence_number(KsiAndSequenceNumber *ksiandsequencenumber, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_ksi_and_sequence_number_xml(KsiAndSequenceNumber *ksiandsequencenumber, uint8_t iei); + +int decode_ksi_and_sequence_number(KsiAndSequenceNumber *ksiandsequencenumber, uint8_t iei, uint8_t *buffer, uint32_t len); + +#endif /* KSI AND SEQUENCE NUMBER_H_ */ + diff --git a/openair-cn/NAS/COMMON/IES/LcsClientIdentity.c b/openair3/NAS/COMMON/IES/LcsClientIdentity.c similarity index 53% rename from openair-cn/NAS/COMMON/IES/LcsClientIdentity.c rename to openair3/NAS/COMMON/IES/LcsClientIdentity.c index 5c59acb781..9daf2125e1 100644 --- a/openair-cn/NAS/COMMON/IES/LcsClientIdentity.c +++ b/openair3/NAS/COMMON/IES/LcsClientIdentity.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/IES/LcsClientIdentity.h b/openair3/NAS/COMMON/IES/LcsClientIdentity.h new file mode 100644 index 0000000000..4f4880956d --- /dev/null +++ b/openair3/NAS/COMMON/IES/LcsClientIdentity.h @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef LCS_CLIENT_IDENTITY_H_ +#define LCS_CLIENT_IDENTITY_H_ + +#define LCS_CLIENT_IDENTITY_MINIMUM_LENGTH 3 +#define LCS_CLIENT_IDENTITY_MAXIMUM_LENGTH 257 + +typedef struct LcsClientIdentity_tag { + OctetString lcsclientidentityvalue; +} LcsClientIdentity; + +int encode_lcs_client_identity(LcsClientIdentity *lcsclientidentity, uint8_t iei, uint8_t *buffer, uint32_t len); + +int decode_lcs_client_identity(LcsClientIdentity *lcsclientidentity, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_lcs_client_identity_xml(LcsClientIdentity *lcsclientidentity, uint8_t iei); + +#endif /* LCS CLIENT IDENTITY_H_ */ + diff --git a/openair3/NAS/COMMON/IES/LcsIndicator.c b/openair3/NAS/COMMON/IES/LcsIndicator.c new file mode 100644 index 0000000000..224886fae8 --- /dev/null +++ b/openair3/NAS/COMMON/IES/LcsIndicator.c @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + + +#include "TLVEncoder.h" +#include "TLVDecoder.h" +#include "LcsIndicator.h" + +int decode_lcs_indicator(LcsIndicator *lcsindicator, uint8_t iei, uint8_t *buffer, uint32_t len) +{ + int decoded = 0; + + if (iei > 0) { + CHECK_IEI_DECODER(iei, *buffer); + decoded++; + } + + *lcsindicator = *(buffer + decoded); + decoded++; +#if defined (NAS_DEBUG) + dump_lcs_indicator_xml(lcsindicator, iei); +#endif + return decoded; +} + +int encode_lcs_indicator(LcsIndicator *lcsindicator, uint8_t iei, uint8_t *buffer, uint32_t len) +{ + uint32_t encoded = 0; + /* Checking IEI and pointer */ + CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, LCS_INDICATOR_MINIMUM_LENGTH, len); +#if defined (NAS_DEBUG) + dump_lcs_indicator_xml(lcsindicator, iei); +#endif + + if (iei > 0) { + *buffer = iei; + encoded++; + } + + *(buffer + encoded) = *lcsindicator; + encoded++; + return encoded; +} + +void dump_lcs_indicator_xml(LcsIndicator *lcsindicator, uint8_t iei) +{ + printf("\n"); + + if (iei > 0) + /* Don't display IEI if = 0 */ + printf(" 0x%X\n", iei); + + printf(" %u\n", *lcsindicator); + printf("\n"); +} + diff --git a/openair3/NAS/COMMON/IES/LcsIndicator.h b/openair3/NAS/COMMON/IES/LcsIndicator.h new file mode 100644 index 0000000000..341c5f2caf --- /dev/null +++ b/openair3/NAS/COMMON/IES/LcsIndicator.h @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef LCS_INDICATOR_H_ +#define LCS_INDICATOR_H_ + +#define LCS_INDICATOR_MINIMUM_LENGTH 2 +#define LCS_INDICATOR_MAXIMUM_LENGTH 2 + +typedef uint8_t LcsIndicator; + +int encode_lcs_indicator(LcsIndicator *lcsindicator, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_lcs_indicator_xml(LcsIndicator *lcsindicator, uint8_t iei); + +int decode_lcs_indicator(LcsIndicator *lcsindicator, uint8_t iei, uint8_t *buffer, uint32_t len); + +#endif /* LCS INDICATOR_H_ */ + diff --git a/openair-cn/NAS/COMMON/IES/LinkedEpsBearerIdentity.c b/openair3/NAS/COMMON/IES/LinkedEpsBearerIdentity.c similarity index 59% rename from openair-cn/NAS/COMMON/IES/LinkedEpsBearerIdentity.c rename to openair3/NAS/COMMON/IES/LinkedEpsBearerIdentity.c index 47a55b50fc..eec53404ef 100644 --- a/openair-cn/NAS/COMMON/IES/LinkedEpsBearerIdentity.c +++ b/openair3/NAS/COMMON/IES/LinkedEpsBearerIdentity.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/IES/LinkedEpsBearerIdentity.h b/openair3/NAS/COMMON/IES/LinkedEpsBearerIdentity.h new file mode 100644 index 0000000000..393da23e41 --- /dev/null +++ b/openair3/NAS/COMMON/IES/LinkedEpsBearerIdentity.h @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef LINKED_EPS_BEARER_IDENTITY_H_ +#define LINKED_EPS_BEARER_IDENTITY_H_ + +#define LINKED_EPS_BEARER_IDENTITY_MINIMUM_LENGTH 1 +#define LINKED_EPS_BEARER_IDENTITY_MAXIMUM_LENGTH 1 + +typedef uint8_t LinkedEpsBearerIdentity; + +int encode_linked_eps_bearer_identity(LinkedEpsBearerIdentity *linkedepsbeareridentity, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_linked_eps_bearer_identity_xml(LinkedEpsBearerIdentity *linkedepsbeareridentity, uint8_t iei); + +uint8_t encode_u8_linked_eps_bearer_identity(LinkedEpsBearerIdentity *linkedepsbeareridentity); + +int decode_linked_eps_bearer_identity(LinkedEpsBearerIdentity *linkedepsbeareridentity, uint8_t iei, uint8_t *buffer, uint32_t len); + +int decode_u8_linked_eps_bearer_identity(LinkedEpsBearerIdentity *linkedepsbeareridentity, uint8_t iei, uint8_t value, uint32_t len); + +#endif /* LINKED EPS BEARER IDENTITY_H_ */ + diff --git a/openair-cn/NAS/COMMON/IES/LlcServiceAccessPointIdentifier.c b/openair3/NAS/COMMON/IES/LlcServiceAccessPointIdentifier.c similarity index 50% rename from openair-cn/NAS/COMMON/IES/LlcServiceAccessPointIdentifier.c rename to openair3/NAS/COMMON/IES/LlcServiceAccessPointIdentifier.c index 231676ba9e..e30f4dcdbe 100644 --- a/openair-cn/NAS/COMMON/IES/LlcServiceAccessPointIdentifier.c +++ b/openair3/NAS/COMMON/IES/LlcServiceAccessPointIdentifier.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/IES/LlcServiceAccessPointIdentifier.h b/openair3/NAS/COMMON/IES/LlcServiceAccessPointIdentifier.h new file mode 100644 index 0000000000..ba6e40c61b --- /dev/null +++ b/openair3/NAS/COMMON/IES/LlcServiceAccessPointIdentifier.h @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef LLC_SERVICE_ACCESS_POINT_IDENTIFIER_H_ +#define LLC_SERVICE_ACCESS_POINT_IDENTIFIER_H_ + +#define LLC_SERVICE_ACCESS_POINT_IDENTIFIER_MINIMUM_LENGTH 2 +#define LLC_SERVICE_ACCESS_POINT_IDENTIFIER_MAXIMUM_LENGTH 2 + +typedef uint8_t LlcServiceAccessPointIdentifier; + +int encode_llc_service_access_point_identifier(LlcServiceAccessPointIdentifier *llcserviceaccesspointidentifier, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_llc_service_access_point_identifier_xml(LlcServiceAccessPointIdentifier *llcserviceaccesspointidentifier, uint8_t iei); + +int decode_llc_service_access_point_identifier(LlcServiceAccessPointIdentifier *llcserviceaccesspointidentifier, uint8_t iei, uint8_t *buffer, uint32_t len); + +#endif /* LLC SERVICE ACCESS POINT IDENTIFIER_H_ */ + diff --git a/openair-cn/NAS/COMMON/IES/LocationAreaIdentification.c b/openair3/NAS/COMMON/IES/LocationAreaIdentification.c similarity index 65% rename from openair-cn/NAS/COMMON/IES/LocationAreaIdentification.c rename to openair3/NAS/COMMON/IES/LocationAreaIdentification.c index 43b9868a99..1fc04dc038 100644 --- a/openair-cn/NAS/COMMON/IES/LocationAreaIdentification.c +++ b/openair3/NAS/COMMON/IES/LocationAreaIdentification.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/IES/LocationAreaIdentification.h b/openair3/NAS/COMMON/IES/LocationAreaIdentification.h new file mode 100644 index 0000000000..3c52e94809 --- /dev/null +++ b/openair3/NAS/COMMON/IES/LocationAreaIdentification.h @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef LOCATION_AREA_IDENTIFICATION_H_ +#define LOCATION_AREA_IDENTIFICATION_H_ + +#define LOCATION_AREA_IDENTIFICATION_MINIMUM_LENGTH 6 +#define LOCATION_AREA_IDENTIFICATION_MAXIMUM_LENGTH 6 + +typedef struct LocationAreaIdentification_tag { + uint8_t mccdigit2:4; + uint8_t mccdigit1:4; + uint8_t mncdigit3:4; + uint8_t mccdigit3:4; + uint8_t mncdigit2:4; + uint8_t mncdigit1:4; + uint16_t lac; +} LocationAreaIdentification; + +int encode_location_area_identification(LocationAreaIdentification *locationareaidentification, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_location_area_identification_xml(LocationAreaIdentification *locationareaidentification, uint8_t iei); + +int decode_location_area_identification(LocationAreaIdentification *locationareaidentification, uint8_t iei, uint8_t *buffer, uint32_t len); + +#endif /* LOCATION AREA IDENTIFICATION_H_ */ + diff --git a/openair3/NAS/COMMON/IES/Makefile b/openair3/NAS/COMMON/IES/Makefile new file mode 100644 index 0000000000..d4a24f657c --- /dev/null +++ b/openair3/NAS/COMMON/IES/Makefile @@ -0,0 +1,45 @@ + +ifndef PROJDIR +PROJDIR = $(PWD)/../.. +endif + +include $(PROJDIR)/Makerules +include $(PROJDIR)/Makefile.inc + +INCLUDES = -I. -I$(UTILDIR) + +#DEFINES += -DNAS_DEBUG + +TARGET = $(LIBIES) +TARGETS = $(TARGET).a $(TARGET).so + +all: $(TARGETS) + +%.o: %.c %.h Makefile + @echo Compiling $< + @$(CC) $(CFLAGS) -c $< -o $@ + +$(TARGET).a: $(OBJS) + @$(RM) $@ + @$(AR) $(ARFLAGS) $@ $(OBJS) + @echo Replacing $@ to $(LIBDIR) + @$(RM) $(LIBDIR)/$@ + @$(CP) $@ $(LIBDIR) + +$(TARGET).so: $(OBJS) + @$(LD) -G -o $@ $(OBJS) + @echo Replacing $@ to $(LIBDIR) + @$(RM) $(LIBDIR)/$@ + @$(CP) $@ $(LIBDIR) + +clean: + $(RM) $(OBJS) *.bak *~ + +veryclean: clean + $(RM) $(TARGETS) + +depend: + makedepend -- ${CFLAGS} -- ${SRCS} + +# DO NOT DELETE THIS LINE -- make depend depends on it. + diff --git a/openair3/NAS/COMMON/IES/MessageType.c b/openair3/NAS/COMMON/IES/MessageType.c new file mode 100644 index 0000000000..17a23ab383 --- /dev/null +++ b/openair3/NAS/COMMON/IES/MessageType.c @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + + +#include "TLVEncoder.h" +#include "TLVDecoder.h" +#include "MessageType.h" + +int decode_message_type(MessageType *messagetype, uint8_t iei, uint8_t *buffer, uint32_t len) +{ + return 0; +} + +int encode_message_type(MessageType *messagetype, uint8_t iei, uint8_t *buffer, uint32_t len) +{ + return 0; +} + diff --git a/openair3/NAS/COMMON/IES/MessageType.h b/openair3/NAS/COMMON/IES/MessageType.h new file mode 100644 index 0000000000..7dd001ae96 --- /dev/null +++ b/openair3/NAS/COMMON/IES/MessageType.h @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef MESSAGE_TYPE_H_ +#define MESSAGE_TYPE_H_ + +#define MESSAGE_TYPE_MINIMUM_LENGTH 1 +#define MESSAGE_TYPE_MAXIMUM_LENGTH 1 + +typedef uint8_t MessageType; + +int encode_message_type(MessageType *messagetype, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_message_type_xml(MessageType *messagetype, uint8_t iei); + +int decode_message_type(MessageType *messagetype, uint8_t iei, uint8_t *buffer, uint32_t len); + +#endif /* MESSAGE TYPE_H_ */ + diff --git a/openair-cn/NAS/COMMON/IES/MobileIdentity.c b/openair3/NAS/COMMON/IES/MobileIdentity.c similarity index 93% rename from openair-cn/NAS/COMMON/IES/MobileIdentity.c rename to openair3/NAS/COMMON/IES/MobileIdentity.c index 14d9902142..75c152106a 100644 --- a/openair-cn/NAS/COMMON/IES/MobileIdentity.c +++ b/openair3/NAS/COMMON/IES/MobileIdentity.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/IES/MobileIdentity.h b/openair3/NAS/COMMON/IES/MobileIdentity.h similarity index 58% rename from openair-cn/NAS/COMMON/IES/MobileIdentity.h rename to openair3/NAS/COMMON/IES/MobileIdentity.h index 206685c7f3..791dfc6f72 100644 --- a/openair-cn/NAS/COMMON/IES/MobileIdentity.h +++ b/openair3/NAS/COMMON/IES/MobileIdentity.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/IES/MobileStationClassmark2.c b/openair3/NAS/COMMON/IES/MobileStationClassmark2.c similarity index 76% rename from openair-cn/NAS/COMMON/IES/MobileStationClassmark2.c rename to openair3/NAS/COMMON/IES/MobileStationClassmark2.c index 3e97e164ad..459d716fcb 100644 --- a/openair-cn/NAS/COMMON/IES/MobileStationClassmark2.c +++ b/openair3/NAS/COMMON/IES/MobileStationClassmark2.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/IES/MobileStationClassmark2.h b/openair3/NAS/COMMON/IES/MobileStationClassmark2.h new file mode 100644 index 0000000000..06c6250de9 --- /dev/null +++ b/openair3/NAS/COMMON/IES/MobileStationClassmark2.h @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef MOBILE_STATION_CLASSMARK_2_H_ +#define MOBILE_STATION_CLASSMARK_2_H_ + +#define MOBILE_STATION_CLASSMARK_2_MINIMUM_LENGTH 5 +#define MOBILE_STATION_CLASSMARK_2_MAXIMUM_LENGTH 5 + +typedef struct MobileStationClassmark2_tag { + uint8_t revisionlevel:2; + uint8_t esind:1; + uint8_t a51:1; + uint8_t rfpowercapability:3; + uint8_t pscapability:1; + uint8_t ssscreenindicator:2; + uint8_t smcapability:1; + uint8_t vbs:1; + uint8_t vgcs:1; + uint8_t fc:1; + uint8_t cm3:1; + uint8_t lcsvacap:1; + uint8_t ucs2:1; + uint8_t solsa:1; + uint8_t cmsp:1; + uint8_t a53:1; + uint8_t a52:1; +} MobileStationClassmark2; + +int encode_mobile_station_classmark_2(MobileStationClassmark2 *mobilestationclassmark2, uint8_t iei, uint8_t *buffer, uint32_t len); + +int decode_mobile_station_classmark_2(MobileStationClassmark2 *mobilestationclassmark2, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_mobile_station_classmark_2_xml(MobileStationClassmark2 *mobilestationclassmark2, uint8_t iei); + +#endif /* MOBILE STATION CLASSMARK 2_H_ */ + diff --git a/openair3/NAS/COMMON/IES/MobileStationClassmark3.c b/openair3/NAS/COMMON/IES/MobileStationClassmark3.c new file mode 100644 index 0000000000..d53f054532 --- /dev/null +++ b/openair3/NAS/COMMON/IES/MobileStationClassmark3.c @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + + +#include "TLVEncoder.h" +#include "TLVDecoder.h" +#include "MobileStationClassmark3.h" + +int decode_mobile_station_classmark_3(MobileStationClassmark3 *mobilestationclassmark3, uint8_t iei, uint8_t *buffer, uint32_t len) +{ + return 0; +} + +int encode_mobile_station_classmark_3(MobileStationClassmark3 *mobilestationclassmark3, uint8_t iei, uint8_t *buffer, uint32_t len) +{ + return 0; +} + diff --git a/openair3/NAS/COMMON/IES/MobileStationClassmark3.h b/openair3/NAS/COMMON/IES/MobileStationClassmark3.h new file mode 100644 index 0000000000..25de9191ee --- /dev/null +++ b/openair3/NAS/COMMON/IES/MobileStationClassmark3.h @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef MOBILE_STATION_CLASSMARK_3_H_ +#define MOBILE_STATION_CLASSMARK_3_H_ + +#define MOBILE_STATION_CLASSMARK_3_MINIMUM_LENGTH 1 +#define MOBILE_STATION_CLASSMARK_3_MAXIMUM_LENGTH 1 + +typedef struct { + uint8_t field; +} MobileStationClassmark3; + +int encode_mobile_station_classmark_3(MobileStationClassmark3 *mobilestationclassmark3, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_mobile_station_classmark_3_xml(MobileStationClassmark3 *mobilestationclassmark3, uint8_t iei); + +int decode_mobile_station_classmark_3(MobileStationClassmark3 *mobilestationclassmark3, uint8_t iei, uint8_t *buffer, uint32_t len); + +#endif /* MOBILE STATION CLASSMARK 3_H_ */ + diff --git a/openair-cn/NAS/COMMON/IES/MsNetworkCapability.c b/openair3/NAS/COMMON/IES/MsNetworkCapability.c similarity index 54% rename from openair-cn/NAS/COMMON/IES/MsNetworkCapability.c rename to openair3/NAS/COMMON/IES/MsNetworkCapability.c index 2fc8a72c87..bda91e876a 100644 --- a/openair-cn/NAS/COMMON/IES/MsNetworkCapability.c +++ b/openair3/NAS/COMMON/IES/MsNetworkCapability.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/IES/MsNetworkCapability.h b/openair3/NAS/COMMON/IES/MsNetworkCapability.h new file mode 100644 index 0000000000..e940d91218 --- /dev/null +++ b/openair3/NAS/COMMON/IES/MsNetworkCapability.h @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef MS_NETWORK_CAPABILITY_H_ +#define MS_NETWORK_CAPABILITY_H_ + +#define MS_NETWORK_CAPABILITY_MINIMUM_LENGTH 3 +#define MS_NETWORK_CAPABILITY_MAXIMUM_LENGTH 10 + +typedef struct MsNetworkCapability_tag { + OctetString msnetworkcapabilityvalue; +} MsNetworkCapability; + +int encode_ms_network_capability(MsNetworkCapability *msnetworkcapability, uint8_t iei, uint8_t *buffer, uint32_t len); + +int decode_ms_network_capability(MsNetworkCapability *msnetworkcapability, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_ms_network_capability_xml(MsNetworkCapability *msnetworkcapability, uint8_t iei); + +#endif /* MS NETWORK CAPABILITY_H_ */ + diff --git a/openair-cn/NAS/COMMON/IES/MsNetworkFeatureSupport.c b/openair3/NAS/COMMON/IES/MsNetworkFeatureSupport.c similarity index 52% rename from openair-cn/NAS/COMMON/IES/MsNetworkFeatureSupport.c rename to openair3/NAS/COMMON/IES/MsNetworkFeatureSupport.c index e05968c2d5..d8efa5312b 100644 --- a/openair-cn/NAS/COMMON/IES/MsNetworkFeatureSupport.c +++ b/openair3/NAS/COMMON/IES/MsNetworkFeatureSupport.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/IES/MsNetworkFeatureSupport.h b/openair3/NAS/COMMON/IES/MsNetworkFeatureSupport.h new file mode 100644 index 0000000000..0210e787a7 --- /dev/null +++ b/openair3/NAS/COMMON/IES/MsNetworkFeatureSupport.h @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef MS_NETWORK_FEATURE_SUPPORT_H_ +#define MS_NETWORK_FEATURE_SUPPORT_H_ + +#define MS_NETWORK_FEATURE_SUPPORT_MINIMUM_LENGTH 3 +#define MS_NETWORK_FEATURE_SUPPORT_MAXIMUM_LENGTH 10 + +typedef struct MsNetworkFeatureSupport_tag { + uint8_t spare_bits:3; + uint8_t extended_periodic_timers:1; +} MsNetworkFeatureSupport; + +int encode_ms_network_feature_support(MsNetworkFeatureSupport *msnetworkfeaturesupport, uint8_t iei, uint8_t *buffer, uint32_t len); + +int decode_ms_network_feature_support(MsNetworkFeatureSupport *msnetworkfeaturesupport, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_ms_network_feature_support_xml(MsNetworkFeatureSupport *msnetworkfeaturesupport, uint8_t iei); + +#endif /* MS NETWORK CAPABILITY_H_ */ + diff --git a/openair-cn/NAS/COMMON/IES/NasKeySetIdentifier.c b/openair3/NAS/COMMON/IES/NasKeySetIdentifier.c similarity index 62% rename from openair-cn/NAS/COMMON/IES/NasKeySetIdentifier.c rename to openair3/NAS/COMMON/IES/NasKeySetIdentifier.c index 2ab41a17e8..1f1e2bd726 100644 --- a/openair-cn/NAS/COMMON/IES/NasKeySetIdentifier.c +++ b/openair3/NAS/COMMON/IES/NasKeySetIdentifier.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/IES/NasKeySetIdentifier.h b/openair3/NAS/COMMON/IES/NasKeySetIdentifier.h new file mode 100644 index 0000000000..46af36c5b5 --- /dev/null +++ b/openair3/NAS/COMMON/IES/NasKeySetIdentifier.h @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef NAS_KEY_SET_IDENTIFIER_H_ +#define NAS_KEY_SET_IDENTIFIER_H_ + +#define NAS_KEY_SET_IDENTIFIER_MINIMUM_LENGTH 1 +#define NAS_KEY_SET_IDENTIFIER_MAXIMUM_LENGTH 1 + +typedef struct NasKeySetIdentifier_tag { +#define NAS_KEY_SET_IDENTIFIER_NATIVE 0 +#define NAS_KEY_SET_IDENTIFIER_MAPPED 1 + uint8_t tsc:1; +#define NAS_KEY_SET_IDENTIFIER_NOT_AVAILABLE 0b111 + uint8_t naskeysetidentifier:3; +} NasKeySetIdentifier; + +int encode_nas_key_set_identifier(NasKeySetIdentifier *naskeysetidentifier, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_nas_key_set_identifier_xml(NasKeySetIdentifier *naskeysetidentifier, uint8_t iei); + +uint8_t encode_u8_nas_key_set_identifier(NasKeySetIdentifier *naskeysetidentifier); + +int decode_nas_key_set_identifier(NasKeySetIdentifier *naskeysetidentifier, uint8_t iei, uint8_t *buffer, uint32_t len); + +int decode_u8_nas_key_set_identifier(NasKeySetIdentifier *naskeysetidentifier, uint8_t iei, uint8_t value, uint32_t len); + +#endif /* NAS KEY SET IDENTIFIER_H_ */ + diff --git a/openair-cn/NAS/COMMON/IES/NasMessageContainer.c b/openair3/NAS/COMMON/IES/NasMessageContainer.c similarity index 54% rename from openair-cn/NAS/COMMON/IES/NasMessageContainer.c rename to openair3/NAS/COMMON/IES/NasMessageContainer.c index 248d14c890..2f295b0cc1 100644 --- a/openair-cn/NAS/COMMON/IES/NasMessageContainer.c +++ b/openair3/NAS/COMMON/IES/NasMessageContainer.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/IES/NasMessageContainer.h b/openair3/NAS/COMMON/IES/NasMessageContainer.h new file mode 100644 index 0000000000..a16684a088 --- /dev/null +++ b/openair3/NAS/COMMON/IES/NasMessageContainer.h @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef NAS_MESSAGE_CONTAINER_H_ +#define NAS_MESSAGE_CONTAINER_H_ + +#define NAS_MESSAGE_CONTAINER_MINIMUM_LENGTH 4 +#define NAS_MESSAGE_CONTAINER_MAXIMUM_LENGTH 253 + +typedef struct NasMessageContainer_tag { + OctetString nasmessagecontainercontents; +} NasMessageContainer; + +int encode_nas_message_container(NasMessageContainer *nasmessagecontainer, uint8_t iei, uint8_t *buffer, uint32_t len); + +int decode_nas_message_container(NasMessageContainer *nasmessagecontainer, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_nas_message_container_xml(NasMessageContainer *nasmessagecontainer, uint8_t iei); + +#endif /* NAS MESSAGE CONTAINER_H_ */ + diff --git a/openair-cn/NAS/COMMON/IES/NasRequestType.c b/openair3/NAS/COMMON/IES/NasRequestType.c similarity index 54% rename from openair-cn/NAS/COMMON/IES/NasRequestType.c rename to openair3/NAS/COMMON/IES/NasRequestType.c index d2afc7f0f8..9cbbbdb7f7 100644 --- a/openair-cn/NAS/COMMON/IES/NasRequestType.c +++ b/openair3/NAS/COMMON/IES/NasRequestType.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/IES/NasRequestType.h b/openair3/NAS/COMMON/IES/NasRequestType.h new file mode 100644 index 0000000000..c6e28298d6 --- /dev/null +++ b/openair3/NAS/COMMON/IES/NasRequestType.h @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef NAS_REQUEST_TYPE_H_ +#define NAS_REQUEST_TYPE_H_ + +#define REQUEST_TYPE_MINIMUM_LENGTH 1 +#define REQUEST_TYPE_MAXIMUM_LENGTH 1 + +#define REQUEST_TYPE_INITIAL_REQUEST 0b001 +#define REQUEST_TYPE_HANDOVER 0b010 +#define REQUEST_TYPE_UNUSED 0b011 +#define REQUEST_TYPE_EMERGENCY 0b100 +typedef uint8_t RequestType; + +int encode_request_type(RequestType *requesttype, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_request_type_xml(RequestType *requesttype, uint8_t iei); + +uint8_t encode_u8_request_type(RequestType *requesttype); + +int decode_request_type(RequestType *requesttype, uint8_t iei, uint8_t *buffer, uint32_t len); + +int decode_u8_request_type(RequestType *requesttype, uint8_t iei, uint8_t value, uint32_t len); + +#endif /* NAS_REQUEST_TYPE_H_ */ + diff --git a/openair-cn/NAS/COMMON/IES/NasSecurityAlgorithms.c b/openair3/NAS/COMMON/IES/NasSecurityAlgorithms.c similarity index 53% rename from openair-cn/NAS/COMMON/IES/NasSecurityAlgorithms.c rename to openair3/NAS/COMMON/IES/NasSecurityAlgorithms.c index b1713b74f9..cafb734811 100644 --- a/openair-cn/NAS/COMMON/IES/NasSecurityAlgorithms.c +++ b/openair3/NAS/COMMON/IES/NasSecurityAlgorithms.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/IES/NasSecurityAlgorithms.h b/openair3/NAS/COMMON/IES/NasSecurityAlgorithms.h new file mode 100644 index 0000000000..f74b2c39ab --- /dev/null +++ b/openair3/NAS/COMMON/IES/NasSecurityAlgorithms.h @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef NAS_SECURITY_ALGORITHMS_H_ +#define NAS_SECURITY_ALGORITHMS_H_ + +#define NAS_SECURITY_ALGORITHMS_MINIMUM_LENGTH 1 +#define NAS_SECURITY_ALGORITHMS_MAXIMUM_LENGTH 2 + +typedef struct NasSecurityAlgorithms_tag { +#define NAS_SECURITY_ALGORITHMS_EEA0 0b000 +#define NAS_SECURITY_ALGORITHMS_EEA1 0b001 +#define NAS_SECURITY_ALGORITHMS_EEA2 0b010 +#define NAS_SECURITY_ALGORITHMS_EEA3 0b011 +#define NAS_SECURITY_ALGORITHMS_EEA4 0b100 +#define NAS_SECURITY_ALGORITHMS_EEA5 0b101 +#define NAS_SECURITY_ALGORITHMS_EEA6 0b110 +#define NAS_SECURITY_ALGORITHMS_EEA7 0b111 + uint8_t typeofcipheringalgorithm:3; +#define NAS_SECURITY_ALGORITHMS_EIA0 0b000 +#define NAS_SECURITY_ALGORITHMS_EIA1 0b001 +#define NAS_SECURITY_ALGORITHMS_EIA2 0b010 +#define NAS_SECURITY_ALGORITHMS_EIA3 0b011 +#define NAS_SECURITY_ALGORITHMS_EIA4 0b100 +#define NAS_SECURITY_ALGORITHMS_EIA5 0b101 +#define NAS_SECURITY_ALGORITHMS_EIA6 0b110 +#define NAS_SECURITY_ALGORITHMS_EIA7 0b111 + uint8_t typeofintegrityalgorithm:3; +} NasSecurityAlgorithms; + +int encode_nas_security_algorithms(NasSecurityAlgorithms *nassecurityalgorithms, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_nas_security_algorithms_xml(NasSecurityAlgorithms *nassecurityalgorithms, uint8_t iei); + +int decode_nas_security_algorithms(NasSecurityAlgorithms *nassecurityalgorithms, uint8_t iei, uint8_t *buffer, uint32_t len); + +#endif /* NAS SECURITY ALGORITHMS_H_ */ + diff --git a/openair-cn/NAS/COMMON/IES/NetworkName.c b/openair3/NAS/COMMON/IES/NetworkName.c similarity index 61% rename from openair-cn/NAS/COMMON/IES/NetworkName.c rename to openair3/NAS/COMMON/IES/NetworkName.c index 284b451ce5..521e421c8d 100644 --- a/openair-cn/NAS/COMMON/IES/NetworkName.c +++ b/openair3/NAS/COMMON/IES/NetworkName.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/IES/NetworkName.h b/openair3/NAS/COMMON/IES/NetworkName.h new file mode 100644 index 0000000000..c2a8850bc3 --- /dev/null +++ b/openair3/NAS/COMMON/IES/NetworkName.h @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef NETWORK_NAME_H_ +#define NETWORK_NAME_H_ + +#define NETWORK_NAME_MINIMUM_LENGTH 3 +#define NETWORK_NAME_MAXIMUM_LENGTH 255 + +typedef struct NetworkName_tag { + uint8_t codingscheme:3; + uint8_t addci:1; + uint8_t numberofsparebitsinlastoctet:3; + OctetString textstring; +} NetworkName; + +int encode_network_name(NetworkName *networkname, uint8_t iei, uint8_t *buffer, uint32_t len); + +int decode_network_name(NetworkName *networkname, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_network_name_xml(NetworkName *networkname, uint8_t iei); + +#endif /* NETWORK NAME_H_ */ + diff --git a/openair3/NAS/COMMON/IES/Nonce.c b/openair3/NAS/COMMON/IES/Nonce.c new file mode 100644 index 0000000000..438d117fd7 --- /dev/null +++ b/openair3/NAS/COMMON/IES/Nonce.c @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + + +#include "TLVEncoder.h" +#include "TLVDecoder.h" +#include "Nonce.h" + +int decode_nonce(Nonce *nonce, uint8_t iei, uint8_t *buffer, uint32_t len) +{ + int decoded = 0; + + if (iei > 0) { + CHECK_IEI_DECODER(iei, *buffer); + decoded++; + } + + //IES_DECODE_U32(*nonce, *(buffer + decoded)); + IES_DECODE_U32(buffer, decoded, *nonce); +#if defined (NAS_DEBUG) + dump_nonce_xml(nonce, iei); +#endif + return decoded; +} + +int encode_nonce(Nonce *nonce, uint8_t iei, uint8_t *buffer, uint32_t len) +{ + uint32_t encoded = 0; + /* Checking IEI and pointer */ + CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, NONCE_MINIMUM_LENGTH, len); +#if defined (NAS_DEBUG) + dump_nonce_xml(nonce, iei); +#endif + + if (iei > 0) { + *buffer = iei; + encoded++; + } + + IES_ENCODE_U32(buffer, encoded, *nonce); + return encoded; +} + +void dump_nonce_xml(Nonce *nonce, uint8_t iei) +{ + printf("\n"); + + if (iei > 0) + /* Don't display IEI if = 0 */ + printf(" 0x%X\n", iei); + + printf(" %u\n", *nonce); + printf("\n"); +} + diff --git a/openair3/NAS/COMMON/IES/Nonce.h b/openair3/NAS/COMMON/IES/Nonce.h new file mode 100644 index 0000000000..7956177494 --- /dev/null +++ b/openair3/NAS/COMMON/IES/Nonce.h @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef NONCE_H_ +#define NONCE_H_ + +#define NONCE_MINIMUM_LENGTH 5 +#define NONCE_MAXIMUM_LENGTH 5 + +typedef uint32_t Nonce; + +int encode_nonce(Nonce *nonce, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_nonce_xml(Nonce *nonce, uint8_t iei); + +int decode_nonce(Nonce *nonce, uint8_t iei, uint8_t *buffer, uint32_t len); + +#endif /* NONCE_H_ */ + diff --git a/openair-cn/NAS/COMMON/IES/PTmsiSignature.c b/openair3/NAS/COMMON/IES/PTmsiSignature.c similarity index 50% rename from openair-cn/NAS/COMMON/IES/PTmsiSignature.c rename to openair3/NAS/COMMON/IES/PTmsiSignature.c index 21738a02db..3ed25f994a 100644 --- a/openair-cn/NAS/COMMON/IES/PTmsiSignature.c +++ b/openair3/NAS/COMMON/IES/PTmsiSignature.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/IES/PTmsiSignature.h b/openair3/NAS/COMMON/IES/PTmsiSignature.h new file mode 100644 index 0000000000..e51bcc41a9 --- /dev/null +++ b/openair3/NAS/COMMON/IES/PTmsiSignature.h @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef P_TMSI_SIGNATURE_H_ +#define P_TMSI_SIGNATURE_H_ + +#define P_TMSI_SIGNATURE_MINIMUM_LENGTH 4 +#define P_TMSI_SIGNATURE_MAXIMUM_LENGTH 4 + +typedef struct PTmsiSignature_tag { + OctetString ptmsisignaturevalue; +} PTmsiSignature; + +int encode_p_tmsi_signature(PTmsiSignature *ptmsisignature, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_p_tmsi_signature_xml(PTmsiSignature *ptmsisignature, uint8_t iei); + +int decode_p_tmsi_signature(PTmsiSignature *ptmsisignature, uint8_t iei, uint8_t *buffer, uint32_t len); + +#endif /* P TMSI SIGNATURE_H_ */ + diff --git a/openair-cn/NAS/COMMON/IES/PacketFlowIdentifier.c b/openair3/NAS/COMMON/IES/PacketFlowIdentifier.c similarity index 51% rename from openair-cn/NAS/COMMON/IES/PacketFlowIdentifier.c rename to openair3/NAS/COMMON/IES/PacketFlowIdentifier.c index 2e694ae8b0..a108760cfa 100644 --- a/openair-cn/NAS/COMMON/IES/PacketFlowIdentifier.c +++ b/openair3/NAS/COMMON/IES/PacketFlowIdentifier.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/IES/PacketFlowIdentifier.h b/openair3/NAS/COMMON/IES/PacketFlowIdentifier.h new file mode 100644 index 0000000000..24f5dc9a97 --- /dev/null +++ b/openair3/NAS/COMMON/IES/PacketFlowIdentifier.h @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef PACKET_FLOW_IDENTIFIER_H_ +#define PACKET_FLOW_IDENTIFIER_H_ + +#define PACKET_FLOW_IDENTIFIER_MINIMUM_LENGTH 3 +#define PACKET_FLOW_IDENTIFIER_MAXIMUM_LENGTH 3 + +typedef uint8_t PacketFlowIdentifier; + +int encode_packet_flow_identifier(PacketFlowIdentifier *packetflowidentifier, uint8_t iei, uint8_t *buffer, uint32_t len); + +int decode_packet_flow_identifier(PacketFlowIdentifier *packetflowidentifier, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_packet_flow_identifier_xml(PacketFlowIdentifier *packetflowidentifier, uint8_t iei); + +#endif /* PACKET FLOW IDENTIFIER_H_ */ + diff --git a/openair3/NAS/COMMON/IES/PagingIdentity.c b/openair3/NAS/COMMON/IES/PagingIdentity.c new file mode 100644 index 0000000000..9b0c72b7af --- /dev/null +++ b/openair3/NAS/COMMON/IES/PagingIdentity.c @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + + +#include "TLVEncoder.h" +#include "TLVDecoder.h" +#include "PagingIdentity.h" + +int decode_paging_identity(PagingIdentity *pagingidentity, uint8_t iei, uint8_t *buffer, uint32_t len) +{ + int decoded = 0; + + if (iei > 0) { + CHECK_IEI_DECODER(iei, *buffer); + decoded++; + } + + *pagingidentity = *buffer & 0x1; + decoded++; +#if defined (NAS_DEBUG) + dump_paging_identity_xml(pagingidentity, iei); +#endif + return decoded; +} + +int encode_paging_identity(PagingIdentity *pagingidentity, uint8_t iei, uint8_t *buffer, uint32_t len) +{ + uint32_t encoded = 0; + /* Checking IEI and pointer */ + CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, PAGING_IDENTITY_MINIMUM_LENGTH, len); +#if defined (NAS_DEBUG) + dump_paging_identity_xml(pagingidentity, iei); +#endif + + if (iei > 0) { + *buffer = iei; + encoded++; + } + + *(buffer + encoded) = 0x00 | + (*pagingidentity & 0x1); + encoded++; + return encoded; +} + +void dump_paging_identity_xml(PagingIdentity *pagingidentity, uint8_t iei) +{ + printf("\n"); + + if (iei > 0) + /* Don't display IEI if = 0 */ + printf(" 0x%X\n", iei); + + printf(" %u\n", *pagingidentity); + printf("\n"); +} + diff --git a/openair3/NAS/COMMON/IES/PagingIdentity.h b/openair3/NAS/COMMON/IES/PagingIdentity.h new file mode 100644 index 0000000000..60f93caebd --- /dev/null +++ b/openair3/NAS/COMMON/IES/PagingIdentity.h @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef PAGING_IDENTITY_H_ +#define PAGING_IDENTITY_H_ + +#define PAGING_IDENTITY_MINIMUM_LENGTH 2 +#define PAGING_IDENTITY_MAXIMUM_LENGTH 2 + +typedef uint8_t PagingIdentity; + +int encode_paging_identity(PagingIdentity *pagingidentity, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_paging_identity_xml(PagingIdentity *pagingidentity, uint8_t iei); + +int decode_paging_identity(PagingIdentity *pagingidentity, uint8_t iei, uint8_t *buffer, uint32_t len); + +#endif /* PAGING IDENTITY_H_ */ + diff --git a/openair-cn/NAS/COMMON/IES/PdnAddress.c b/openair3/NAS/COMMON/IES/PdnAddress.c similarity index 55% rename from openair-cn/NAS/COMMON/IES/PdnAddress.c rename to openair3/NAS/COMMON/IES/PdnAddress.c index c95cb1528f..12dee958f5 100644 --- a/openair-cn/NAS/COMMON/IES/PdnAddress.c +++ b/openair3/NAS/COMMON/IES/PdnAddress.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/IES/PdnAddress.h b/openair3/NAS/COMMON/IES/PdnAddress.h new file mode 100644 index 0000000000..22a7dd282c --- /dev/null +++ b/openair3/NAS/COMMON/IES/PdnAddress.h @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef PDN_ADDRESS_H_ +#define PDN_ADDRESS_H_ + +#define PDN_ADDRESS_MINIMUM_LENGTH 7 +#define PDN_ADDRESS_MAXIMUM_LENGTH 15 + +typedef struct PdnAddress_tag { +#define PDN_VALUE_TYPE_IPV4 0b001 +#define PDN_VALUE_TYPE_IPV6 0b010 +#define PDN_VALUE_TYPE_IPV4V6 0b011 + uint8_t pdntypevalue:3; + OctetString pdnaddressinformation; +} PdnAddress; + +int encode_pdn_address(PdnAddress *pdnaddress, uint8_t iei, uint8_t *buffer, uint32_t len); + +int decode_pdn_address(PdnAddress *pdnaddress, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_pdn_address_xml(PdnAddress *pdnaddress, uint8_t iei); + +#endif /* PDN ADDRESS_H_ */ + diff --git a/openair-cn/NAS/COMMON/IES/PdnType.c b/openair3/NAS/COMMON/IES/PdnType.c similarity index 52% rename from openair-cn/NAS/COMMON/IES/PdnType.c rename to openair3/NAS/COMMON/IES/PdnType.c index e4a39d1f1c..0dc20ba6e1 100644 --- a/openair-cn/NAS/COMMON/IES/PdnType.c +++ b/openair3/NAS/COMMON/IES/PdnType.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/IES/PdnType.h b/openair3/NAS/COMMON/IES/PdnType.h new file mode 100644 index 0000000000..13c97a6602 --- /dev/null +++ b/openair3/NAS/COMMON/IES/PdnType.h @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef PDN_TYPE_H_ +#define PDN_TYPE_H_ + +#define PDN_TYPE_MINIMUM_LENGTH 1 +#define PDN_TYPE_MAXIMUM_LENGTH 1 + +#define PDN_TYPE_IPV4 0b001 +#define PDN_TYPE_IPV6 0b010 +#define PDN_TYPE_IPV4V6 0b011 +#define PDN_TYPE_UNUSED 0b100 +typedef uint8_t PdnType; + +int encode_pdn_type(PdnType *pdntype, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_pdn_type_xml(PdnType *pdntype, uint8_t iei); + +uint8_t encode_u8_pdn_type(PdnType *pdntype); + +int decode_pdn_type(PdnType *pdntype, uint8_t iei, uint8_t *buffer, uint32_t len); + +int decode_u8_pdn_type(PdnType *pdntype, uint8_t iei, uint8_t value, uint32_t len); + +#endif /* PDN TYPE_H_ */ + diff --git a/openair-cn/NAS/COMMON/IES/PlmnList.c b/openair3/NAS/COMMON/IES/PlmnList.c similarity index 59% rename from openair-cn/NAS/COMMON/IES/PlmnList.c rename to openair3/NAS/COMMON/IES/PlmnList.c index 226a26c661..2e84bdb74a 100644 --- a/openair-cn/NAS/COMMON/IES/PlmnList.c +++ b/openair3/NAS/COMMON/IES/PlmnList.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/IES/PlmnList.h b/openair3/NAS/COMMON/IES/PlmnList.h new file mode 100644 index 0000000000..485e88a6a2 --- /dev/null +++ b/openair3/NAS/COMMON/IES/PlmnList.h @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef PLMN_LIST_H_ +#define PLMN_LIST_H_ + +#define PLMN_LIST_MINIMUM_LENGTH 5 +#define PLMN_LIST_MAXIMUM_LENGTH 47 + +typedef struct PlmnList_tag { + uint8_t mccdigit2:4; + uint8_t mccdigit1:4; + uint8_t mncdigit3:4; + uint8_t mccdigit3:4; + uint8_t mncdigit2:4; + uint8_t mncdigit1:4; +} PlmnList; + +int encode_plmn_list(PlmnList *plmnlist, uint8_t iei, uint8_t *buffer, uint32_t len); + +int decode_plmn_list(PlmnList *plmnlist, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_plmn_list_xml(PlmnList *plmnlist, uint8_t iei); + +#endif /* PLMN LIST_H_ */ + diff --git a/openair3/NAS/COMMON/IES/ProcedureTransactionIdentity.c b/openair3/NAS/COMMON/IES/ProcedureTransactionIdentity.c new file mode 100644 index 0000000000..522307467e --- /dev/null +++ b/openair3/NAS/COMMON/IES/ProcedureTransactionIdentity.c @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + + +#include "TLVEncoder.h" +#include "TLVDecoder.h" +#include "ProcedureTransactionIdentity.h" + +int decode_procedure_transaction_identity(ProcedureTransactionIdentity *proceduretransactionidentity, uint8_t iei, uint8_t *buffer, uint32_t len) +{ + return 0; +} + +int encode_procedure_transaction_identity(ProcedureTransactionIdentity *proceduretransactionidentity, uint8_t iei, uint8_t *buffer, uint32_t len) +{ + return 0; +} + diff --git a/openair3/NAS/COMMON/IES/ProcedureTransactionIdentity.h b/openair3/NAS/COMMON/IES/ProcedureTransactionIdentity.h new file mode 100644 index 0000000000..2bc3f098d9 --- /dev/null +++ b/openair3/NAS/COMMON/IES/ProcedureTransactionIdentity.h @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef PROCEDURE_TRANSACTION_IDENTITY_H_ +#define PROCEDURE_TRANSACTION_IDENTITY_H_ + +#define PROCEDURE_TRANSACTION_IDENTITY_MINIMUM_LENGTH 1 +#define PROCEDURE_TRANSACTION_IDENTITY_MAXIMUM_LENGTH 1 + +#define PROCEDURE_TRANSACTION_IDENTITY_UNASSIGNED 0 +#define PROCEDURE_TRANSACTION_IDENTITY_FIRST 1 +#define PROCEDURE_TRANSACTION_IDENTITY_LAST 254 +typedef uint8_t ProcedureTransactionIdentity; + +int encode_procedure_transaction_identity(ProcedureTransactionIdentity *proceduretransactionidentity, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_procedure_transaction_identity_xml(ProcedureTransactionIdentity *proceduretransactionidentity, uint8_t iei); + +int decode_procedure_transaction_identity(ProcedureTransactionIdentity *proceduretransactionidentity, uint8_t iei, uint8_t *buffer, uint32_t len); + +#endif /* PROCEDURE TRANSACTION IDENTITY_H_ */ + diff --git a/openair-cn/NAS/COMMON/IES/ProtocolConfigurationOptions.c b/openair3/NAS/COMMON/IES/ProtocolConfigurationOptions.c similarity index 75% rename from openair-cn/NAS/COMMON/IES/ProtocolConfigurationOptions.c rename to openair3/NAS/COMMON/IES/ProtocolConfigurationOptions.c index dc17201da0..15f20ef195 100644 --- a/openair-cn/NAS/COMMON/IES/ProtocolConfigurationOptions.c +++ b/openair3/NAS/COMMON/IES/ProtocolConfigurationOptions.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/IES/ProtocolConfigurationOptions.h b/openair3/NAS/COMMON/IES/ProtocolConfigurationOptions.h similarity index 54% rename from openair-cn/NAS/COMMON/IES/ProtocolConfigurationOptions.h rename to openair3/NAS/COMMON/IES/ProtocolConfigurationOptions.h index bd59d2c4ac..8110cb96bc 100644 --- a/openair-cn/NAS/COMMON/IES/ProtocolConfigurationOptions.h +++ b/openair3/NAS/COMMON/IES/ProtocolConfigurationOptions.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/IES/ProtocolDiscriminator.c b/openair3/NAS/COMMON/IES/ProtocolDiscriminator.c new file mode 100644 index 0000000000..a58ae57faa --- /dev/null +++ b/openair3/NAS/COMMON/IES/ProtocolDiscriminator.c @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + + +#include "TLVEncoder.h" +#include "TLVDecoder.h" +#include "ProtocolDiscriminator.h" + +int decode_protocol_discriminator(ProtocolDiscriminator *protocoldiscriminator, uint8_t iei, uint8_t *buffer, uint32_t len) +{ + return 0; +} + +int encode_protocol_discriminator(ProtocolDiscriminator *protocoldiscriminator, uint8_t iei, uint8_t *buffer, uint32_t len) +{ + return 0; +} + diff --git a/openair3/NAS/COMMON/IES/ProtocolDiscriminator.h b/openair3/NAS/COMMON/IES/ProtocolDiscriminator.h new file mode 100644 index 0000000000..04c04e801f --- /dev/null +++ b/openair3/NAS/COMMON/IES/ProtocolDiscriminator.h @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef PROTOCOL_DISCRIMINATOR_H_ +#define PROTOCOL_DISCRIMINATOR_H_ + +#define PROTOCOL_DISCRIMINATOR_MINIMUM_LENGTH 1 +#define PROTOCOL_DISCRIMINATOR_MAXIMUM_LENGTH 1 + +typedef uint8_t ProtocolDiscriminator; + +int encode_protocol_discriminator(ProtocolDiscriminator *protocoldiscriminator, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_protocol_discriminator_xml(ProtocolDiscriminator *protocoldiscriminator, uint8_t iei); + +int decode_protocol_discriminator(ProtocolDiscriminator *protocoldiscriminator, uint8_t iei, uint8_t *buffer, uint32_t len); + +#endif /* PROTOCOL DISCRIMINATOR_H_ */ + diff --git a/openair-cn/NAS/COMMON/IES/QualityOfService.c b/openair3/NAS/COMMON/IES/QualityOfService.c similarity index 79% rename from openair-cn/NAS/COMMON/IES/QualityOfService.c rename to openair3/NAS/COMMON/IES/QualityOfService.c index 2d5ea1c5ea..27d4a78e55 100644 --- a/openair-cn/NAS/COMMON/IES/QualityOfService.c +++ b/openair3/NAS/COMMON/IES/QualityOfService.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/IES/QualityOfService.h b/openair3/NAS/COMMON/IES/QualityOfService.h new file mode 100644 index 0000000000..6ce363aacc --- /dev/null +++ b/openair3/NAS/COMMON/IES/QualityOfService.h @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef QUALITY_OF_SERVICE_H_ +#define QUALITY_OF_SERVICE_H_ + +#define QUALITY_OF_SERVICE_MINIMUM_LENGTH 14 +#define QUALITY_OF_SERVICE_MAXIMUM_LENGTH 14 + +typedef struct QualityOfService_tag { + uint8_t delayclass:3; + uint8_t reliabilityclass:3; + uint8_t peakthroughput:4; + uint8_t precedenceclass:3; + uint8_t meanthroughput:5; + uint8_t trafficclass:3; + uint8_t deliveryorder:2; + uint8_t deliveryoferroneoussdu:3; + uint8_t maximumsdusize; + uint8_t maximumbitrateuplink; + uint8_t maximumbitratedownlink; + uint8_t residualber:4; + uint8_t sduratioerror:4; + uint8_t transferdelay:6; + uint8_t traffichandlingpriority:2; + uint8_t guaranteedbitrateuplink; + uint8_t guaranteedbitratedownlink; + uint8_t signalingindication:1; + uint8_t sourcestatisticsdescriptor:4; +} QualityOfService; + +int encode_quality_of_service(QualityOfService *qualityofservice, uint8_t iei, uint8_t *buffer, uint32_t len); + +int decode_quality_of_service(QualityOfService *qualityofservice, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_quality_of_service_xml(QualityOfService *qualityofservice, uint8_t iei); + +#endif /* QUALITY OF SERVICE_H_ */ + diff --git a/openair-cn/NAS/COMMON/IES/RadioPriority.c b/openair3/NAS/COMMON/IES/RadioPriority.c similarity index 55% rename from openair-cn/NAS/COMMON/IES/RadioPriority.c rename to openair3/NAS/COMMON/IES/RadioPriority.c index 1350cb0ba1..8e1183eb7b 100644 --- a/openair-cn/NAS/COMMON/IES/RadioPriority.c +++ b/openair3/NAS/COMMON/IES/RadioPriority.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/IES/RadioPriority.h b/openair3/NAS/COMMON/IES/RadioPriority.h new file mode 100644 index 0000000000..629a624eec --- /dev/null +++ b/openair3/NAS/COMMON/IES/RadioPriority.h @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef RADIO_PRIORITY_H_ +#define RADIO_PRIORITY_H_ + +#define RADIO_PRIORITY_MINIMUM_LENGTH 1 +#define RADIO_PRIORITY_MAXIMUM_LENGTH 1 + +typedef uint8_t RadioPriority; + +int encode_radio_priority(RadioPriority *radiopriority, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_radio_priority_xml(RadioPriority *radiopriority, uint8_t iei); + +uint8_t encode_u8_radio_priority(RadioPriority *radiopriority); + +int decode_radio_priority(RadioPriority *radiopriority, uint8_t iei, uint8_t *buffer, uint32_t len); + +int decode_u8_radio_priority(RadioPriority *radiopriority, uint8_t iei, uint8_t value, uint32_t len); + +#endif /* RADIO PRIORITY_H_ */ + diff --git a/openair3/NAS/COMMON/IES/SecurityHeaderType.c b/openair3/NAS/COMMON/IES/SecurityHeaderType.c new file mode 100644 index 0000000000..89facd28c1 --- /dev/null +++ b/openair3/NAS/COMMON/IES/SecurityHeaderType.c @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + + +#include "TLVEncoder.h" +#include "TLVDecoder.h" +#include "SecurityHeaderType.h" + +int decode_security_header_type(SecurityHeaderType *securityheadertype, uint8_t iei, uint8_t *buffer, uint32_t len) +{ + return 0; +} + +int encode_security_header_type(SecurityHeaderType *securityheadertype, uint8_t iei, uint8_t *buffer, uint32_t len) +{ + return 0; +} + diff --git a/openair3/NAS/COMMON/IES/SecurityHeaderType.h b/openair3/NAS/COMMON/IES/SecurityHeaderType.h new file mode 100644 index 0000000000..d83ec1e17a --- /dev/null +++ b/openair3/NAS/COMMON/IES/SecurityHeaderType.h @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef SECURITY_HEADER_TYPE_H_ +#define SECURITY_HEADER_TYPE_H_ + +#define SECURITY_HEADER_TYPE_MINIMUM_LENGTH 1 +#define SECURITY_HEADER_TYPE_MAXIMUM_LENGTH 1 + +typedef uint8_t SecurityHeaderType; + +int encode_security_header_type(SecurityHeaderType *securityheadertype, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_security_header_type_xml(SecurityHeaderType *securityheadertype, uint8_t iei); + +int decode_security_header_type(SecurityHeaderType *securityheadertype, uint8_t iei, uint8_t *buffer, uint32_t len); + +#endif /* SECURITY HEADER TYPE_H_ */ + diff --git a/openair-cn/NAS/COMMON/IES/ServiceType.c b/openair3/NAS/COMMON/IES/ServiceType.c similarity index 54% rename from openair-cn/NAS/COMMON/IES/ServiceType.c rename to openair3/NAS/COMMON/IES/ServiceType.c index bab2e96bb0..3f35abbfaa 100644 --- a/openair-cn/NAS/COMMON/IES/ServiceType.c +++ b/openair3/NAS/COMMON/IES/ServiceType.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/IES/ServiceType.h b/openair3/NAS/COMMON/IES/ServiceType.h new file mode 100644 index 0000000000..c3aedebc0c --- /dev/null +++ b/openair3/NAS/COMMON/IES/ServiceType.h @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef SERVICE_TYPE_H_ +#define SERVICE_TYPE_H_ + +#define SERVICE_TYPE_MINIMUM_LENGTH 1 +#define SERVICE_TYPE_MAXIMUM_LENGTH 1 + +typedef uint8_t ServiceType; + +int encode_service_type(ServiceType *servicetype, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_service_type_xml(ServiceType *servicetype, uint8_t iei); + +uint8_t encode_u8_service_type(ServiceType *servicetype); + +int decode_service_type(ServiceType *servicetype, uint8_t iei, uint8_t *buffer, uint32_t len); + +int decode_u8_service_type(ServiceType *servicetype, uint8_t iei, uint8_t value, uint32_t len); + +#endif /* SERVICE TYPE_H_ */ + diff --git a/openair3/NAS/COMMON/IES/ShortMac.c b/openair3/NAS/COMMON/IES/ShortMac.c new file mode 100644 index 0000000000..d481b1bba7 --- /dev/null +++ b/openair3/NAS/COMMON/IES/ShortMac.c @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + + +#include "TLVEncoder.h" +#include "TLVDecoder.h" +#include "ShortMac.h" + +int decode_short_mac(ShortMac *shortmac, uint8_t iei, uint8_t *buffer, uint32_t len) +{ + int decoded = 0; + + if (iei > 0) { + CHECK_IEI_DECODER(iei, *buffer); + decoded++; + } + + //IES_DECODE_U16(*shortmac, *(buffer + decoded)); + IES_DECODE_U16(buffer, decoded, *shortmac); +#if defined (NAS_DEBUG) + dump_short_mac_xml(shortmac, iei); +#endif + return decoded; +} + +int encode_short_mac(ShortMac *shortmac, uint8_t iei, uint8_t *buffer, uint32_t len) +{ + uint32_t encoded = 0; + /* Checking IEI and pointer */ + CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, SHORT_MAC_MINIMUM_LENGTH, len); +#if defined (NAS_DEBUG) + dump_short_mac_xml(shortmac, iei); +#endif + + if (iei > 0) { + *buffer = iei; + encoded++; + } + + IES_ENCODE_U16(buffer, encoded, *shortmac); + return encoded; +} + +void dump_short_mac_xml(ShortMac *shortmac, uint8_t iei) +{ + printf("\n"); + + if (iei > 0) + /* Don't display IEI if = 0 */ + printf(" 0x%X\n", iei); + + printf(" %u\n", *shortmac); + printf("\n"); +} + diff --git a/openair3/NAS/COMMON/IES/ShortMac.h b/openair3/NAS/COMMON/IES/ShortMac.h new file mode 100644 index 0000000000..896f9e42da --- /dev/null +++ b/openair3/NAS/COMMON/IES/ShortMac.h @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef SHORT_MAC_H_ +#define SHORT_MAC_H_ + +#define SHORT_MAC_MINIMUM_LENGTH 3 +#define SHORT_MAC_MAXIMUM_LENGTH 3 + +typedef uint16_t ShortMac; + +int encode_short_mac(ShortMac *shortmac, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_short_mac_xml(ShortMac *shortmac, uint8_t iei); + +int decode_short_mac(ShortMac *shortmac, uint8_t iei, uint8_t *buffer, uint32_t len); + +#endif /* SHORT MAC_H_ */ + diff --git a/openair3/NAS/COMMON/IES/SsCode.c b/openair3/NAS/COMMON/IES/SsCode.c new file mode 100644 index 0000000000..e0566c9f15 --- /dev/null +++ b/openair3/NAS/COMMON/IES/SsCode.c @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + + +#include "TLVEncoder.h" +#include "TLVDecoder.h" +#include "SsCode.h" + +int decode_ss_code(SsCode *sscode, uint8_t iei, uint8_t *buffer, uint32_t len) +{ + int decoded = 0; + + if (iei > 0) { + CHECK_IEI_DECODER(iei, *buffer); + decoded++; + } + + *sscode = *(buffer + decoded); + decoded++; +#if defined (NAS_DEBUG) + dump_ss_code_xml(sscode, iei); +#endif + return decoded; +} + +int encode_ss_code(SsCode *sscode, uint8_t iei, uint8_t *buffer, uint32_t len) +{ + uint32_t encoded = 0; + /* Checking IEI and pointer */ + CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, SS_CODE_MINIMUM_LENGTH, len); +#if defined (NAS_DEBUG) + dump_ss_code_xml(sscode, iei); +#endif + + if (iei > 0) { + *buffer = iei; + encoded++; + } + + *(buffer + encoded) = *sscode; + encoded++; + return encoded; +} + +void dump_ss_code_xml(SsCode *sscode, uint8_t iei) +{ + printf("\n"); + + if (iei > 0) + /* Don't display IEI if = 0 */ + printf(" 0x%X\n", iei); + + printf(" %u\n", *sscode); + printf("\n"); +} + diff --git a/openair3/NAS/COMMON/IES/SsCode.h b/openair3/NAS/COMMON/IES/SsCode.h new file mode 100644 index 0000000000..68017184ce --- /dev/null +++ b/openair3/NAS/COMMON/IES/SsCode.h @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef SS_CODE_H_ +#define SS_CODE_H_ + +#define SS_CODE_MINIMUM_LENGTH 2 +#define SS_CODE_MAXIMUM_LENGTH 2 + +typedef uint8_t SsCode; + +int encode_ss_code(SsCode *sscode, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_ss_code_xml(SsCode *sscode, uint8_t iei); + +int decode_ss_code(SsCode *sscode, uint8_t iei, uint8_t *buffer, uint32_t len); + +#endif /* SS CODE_H_ */ + diff --git a/openair-cn/NAS/COMMON/IES/SupportedCodecList.c b/openair3/NAS/COMMON/IES/SupportedCodecList.c similarity index 57% rename from openair-cn/NAS/COMMON/IES/SupportedCodecList.c rename to openair3/NAS/COMMON/IES/SupportedCodecList.c index 284ee27dc9..375d2255a4 100644 --- a/openair-cn/NAS/COMMON/IES/SupportedCodecList.c +++ b/openair3/NAS/COMMON/IES/SupportedCodecList.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/IES/SupportedCodecList.h b/openair3/NAS/COMMON/IES/SupportedCodecList.h new file mode 100644 index 0000000000..83396b62d4 --- /dev/null +++ b/openair3/NAS/COMMON/IES/SupportedCodecList.h @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef SUPPORTED_CODEC_LIST_H_ +#define SUPPORTED_CODEC_LIST_H_ + +#define SUPPORTED_CODEC_LIST_MINIMUM_LENGTH 5 +#define SUPPORTED_CODEC_LIST_MAXIMUM_LENGTH 5 + +typedef struct SupportedCodecList_tag { + uint8_t systemidentification; + uint8_t lengthofbitmap; + uint16_t codecbitmap; +} SupportedCodecList; + +int encode_supported_codec_list(SupportedCodecList *supportedcodeclist, uint8_t iei, uint8_t *buffer, uint32_t len); + +int decode_supported_codec_list(SupportedCodecList *supportedcodeclist, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_supported_codec_list_xml(SupportedCodecList *supportedcodeclist, uint8_t iei); + +#endif /* SUPPORTED CODEC LIST_H_ */ + diff --git a/openair3/NAS/COMMON/IES/TimeZone.c b/openair3/NAS/COMMON/IES/TimeZone.c new file mode 100644 index 0000000000..39fe50c307 --- /dev/null +++ b/openair3/NAS/COMMON/IES/TimeZone.c @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + + +#include "TLVEncoder.h" +#include "TLVDecoder.h" +#include "TimeZone.h" + +int decode_time_zone(TimeZone *timezone, uint8_t iei, uint8_t *buffer, uint32_t len) +{ + int decoded = 0; + + if (iei > 0) { + CHECK_IEI_DECODER(iei, *buffer); + decoded++; + } + + *timezone = *(buffer + decoded); + decoded++; +#if defined (NAS_DEBUG) + dump_time_zone_xml(timezone, iei); +#endif + return decoded; +} + +int encode_time_zone(TimeZone *timezone, uint8_t iei, uint8_t *buffer, uint32_t len) +{ + uint32_t encoded = 0; + /* Checking IEI and pointer */ + CHECK_PDU_POINTER_AND_LENGTH_ENCODER(buffer, TIME_ZONE_MINIMUM_LENGTH, len); +#if defined (NAS_DEBUG) + dump_time_zone_xml(timezone, iei); +#endif + + if (iei > 0) { + *buffer = iei; + encoded++; + } + + *(buffer + encoded) = *timezone; + encoded++; + return encoded; +} + +void dump_time_zone_xml(TimeZone *timezone, uint8_t iei) +{ + printf("\n"); +} + diff --git a/openair3/NAS/COMMON/IES/TimeZone.h b/openair3/NAS/COMMON/IES/TimeZone.h new file mode 100644 index 0000000000..bfa2d38996 --- /dev/null +++ b/openair3/NAS/COMMON/IES/TimeZone.h @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef TIME_ZONE_H_ +#define TIME_ZONE_H_ + +#define TIME_ZONE_MINIMUM_LENGTH 2 +#define TIME_ZONE_MAXIMUM_LENGTH 2 + +typedef uint8_t TimeZone; + +int encode_time_zone(TimeZone *timezone, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_time_zone_xml(TimeZone *timezone, uint8_t iei); + +int decode_time_zone(TimeZone *timezone, uint8_t iei, uint8_t *buffer, uint32_t len); + +#endif /* TIME ZONE_H_ */ + diff --git a/openair-cn/NAS/COMMON/IES/TimeZoneAndTime.c b/openair3/NAS/COMMON/IES/TimeZoneAndTime.c similarity index 59% rename from openair-cn/NAS/COMMON/IES/TimeZoneAndTime.c rename to openair3/NAS/COMMON/IES/TimeZoneAndTime.c index dacfb22896..08a8bcdf70 100644 --- a/openair-cn/NAS/COMMON/IES/TimeZoneAndTime.c +++ b/openair3/NAS/COMMON/IES/TimeZoneAndTime.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/IES/TimeZoneAndTime.h b/openair3/NAS/COMMON/IES/TimeZoneAndTime.h new file mode 100644 index 0000000000..27c763cf88 --- /dev/null +++ b/openair3/NAS/COMMON/IES/TimeZoneAndTime.h @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef TIME_ZONE_AND_TIME_H_ +#define TIME_ZONE_AND_TIME_H_ + +#define TIME_ZONE_AND_TIME_MINIMUM_LENGTH 8 +#define TIME_ZONE_AND_TIME_MAXIMUM_LENGTH 8 + +typedef struct TimeZoneAndTime_tag { + uint8_t year; + uint8_t month; + uint8_t day; + uint8_t hour; + uint8_t minute; + uint8_t second; + uint8_t timezone; +} TimeZoneAndTime; + +int encode_time_zone_and_time(TimeZoneAndTime *timezoneandtime, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_time_zone_and_time_xml(TimeZoneAndTime *timezoneandtime, uint8_t iei); + +int decode_time_zone_and_time(TimeZoneAndTime *timezoneandtime, uint8_t iei, uint8_t *buffer, uint32_t len); + +#endif /* TIME ZONE AND TIME_H_ */ + diff --git a/openair-cn/NAS/COMMON/IES/TmsiStatus.c b/openair3/NAS/COMMON/IES/TmsiStatus.c similarity index 53% rename from openair-cn/NAS/COMMON/IES/TmsiStatus.c rename to openair3/NAS/COMMON/IES/TmsiStatus.c index 7d21e5f758..1ebbf5beaf 100644 --- a/openair-cn/NAS/COMMON/IES/TmsiStatus.c +++ b/openair3/NAS/COMMON/IES/TmsiStatus.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/IES/TmsiStatus.h b/openair3/NAS/COMMON/IES/TmsiStatus.h new file mode 100644 index 0000000000..6387ca7cec --- /dev/null +++ b/openair3/NAS/COMMON/IES/TmsiStatus.h @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef TMSI_STATUS_H_ +#define TMSI_STATUS_H_ + +#define TMSI_STATUS_MINIMUM_LENGTH 1 +#define TMSI_STATUS_MAXIMUM_LENGTH 1 + +typedef uint8_t TmsiStatus; + +int encode_tmsi_status(TmsiStatus *tmsistatus, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_tmsi_status_xml(TmsiStatus *tmsistatus, uint8_t iei); + +uint8_t encode_u8_tmsi_status(TmsiStatus *tmsistatus); + +int decode_tmsi_status(TmsiStatus *tmsistatus, uint8_t iei, uint8_t *buffer, uint32_t len); + +int decode_u8_tmsi_status(TmsiStatus *tmsistatus, uint8_t iei, uint8_t value, uint32_t len); + +#endif /* TMSI STATUS_H_ */ + diff --git a/openair-cn/NAS/COMMON/IES/TrackingAreaIdentity.c b/openair3/NAS/COMMON/IES/TrackingAreaIdentity.c similarity index 64% rename from openair-cn/NAS/COMMON/IES/TrackingAreaIdentity.c rename to openair3/NAS/COMMON/IES/TrackingAreaIdentity.c index dd50d9566f..14b08e7e24 100644 --- a/openair-cn/NAS/COMMON/IES/TrackingAreaIdentity.c +++ b/openair3/NAS/COMMON/IES/TrackingAreaIdentity.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/IES/TrackingAreaIdentity.h b/openair3/NAS/COMMON/IES/TrackingAreaIdentity.h new file mode 100644 index 0000000000..7249d3c5c1 --- /dev/null +++ b/openair3/NAS/COMMON/IES/TrackingAreaIdentity.h @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef TRACKING_AREA_IDENTITY_H_ +#define TRACKING_AREA_IDENTITY_H_ + +#define TRACKING_AREA_IDENTITY_MINIMUM_LENGTH 6 +#define TRACKING_AREA_IDENTITY_MAXIMUM_LENGTH 6 + +typedef struct TrackingAreaIdentity_tag { + uint8_t mccdigit2:4; + uint8_t mccdigit1:4; + uint8_t mncdigit3:4; + uint8_t mccdigit3:4; + uint8_t mncdigit2:4; + uint8_t mncdigit1:4; + uint16_t tac; +} TrackingAreaIdentity; + +int encode_tracking_area_identity(TrackingAreaIdentity *trackingareaidentity, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_tracking_area_identity_xml(TrackingAreaIdentity *trackingareaidentity, uint8_t iei); + +int decode_tracking_area_identity(TrackingAreaIdentity *trackingareaidentity, uint8_t iei, uint8_t *buffer, uint32_t len); + +#endif /* TRACKING AREA IDENTITY_H_ */ + diff --git a/openair-cn/NAS/COMMON/IES/TrackingAreaIdentityList.c b/openair3/NAS/COMMON/IES/TrackingAreaIdentityList.c similarity index 71% rename from openair-cn/NAS/COMMON/IES/TrackingAreaIdentityList.c rename to openair3/NAS/COMMON/IES/TrackingAreaIdentityList.c index eb0e30d01c..eae44e8e58 100644 --- a/openair-cn/NAS/COMMON/IES/TrackingAreaIdentityList.c +++ b/openair3/NAS/COMMON/IES/TrackingAreaIdentityList.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/IES/TrackingAreaIdentityList.h b/openair3/NAS/COMMON/IES/TrackingAreaIdentityList.h new file mode 100644 index 0000000000..345aacf438 --- /dev/null +++ b/openair3/NAS/COMMON/IES/TrackingAreaIdentityList.h @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef TRACKING_AREA_IDENTITY_LIST_H_ +#define TRACKING_AREA_IDENTITY_LIST_H_ + +#define TRACKING_AREA_IDENTITY_LIST_MINIMUM_LENGTH 8 +#define TRACKING_AREA_IDENTITY_LIST_MAXIMUM_LENGTH 98 + +typedef struct TrackingAreaIdentityList_tag { + /* XXX - The only supported type of list is a list of TACs + * belonging to one PLMN, with consecutive TAC values */ + //#define TRACKING_AREA_IDENTITY_LIST_ONE_PLMN_NON_CONSECUTIVE_TACS 0b00 +#define TRACKING_AREA_IDENTITY_LIST_ONE_PLMN_CONSECUTIVE_TACS 0b01 + //#define TRACKING_AREA_IDENTITY_LIST_MANY_PLMNS 0b10 + uint8_t typeoflist:2; + uint8_t numberofelements:5; + uint8_t mccdigit2:4; + uint8_t mccdigit1:4; + uint8_t mncdigit3:4; + uint8_t mccdigit3:4; + uint8_t mncdigit2:4; + uint8_t mncdigit1:4; + uint16_t tac; +} TrackingAreaIdentityList; + +int encode_tracking_area_identity_list(TrackingAreaIdentityList *trackingareaidentitylist, uint8_t iei, uint8_t *buffer, uint32_t len); + +int decode_tracking_area_identity_list(TrackingAreaIdentityList *trackingareaidentitylist, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_tracking_area_identity_list_xml(TrackingAreaIdentityList *trackingareaidentitylist, uint8_t iei); + +#endif /* TRACKING AREA IDENTITY LIST_H_ */ + diff --git a/openair3/NAS/COMMON/IES/TrafficFlowAggregateDescription.c b/openair3/NAS/COMMON/IES/TrafficFlowAggregateDescription.c new file mode 100644 index 0000000000..b2ea6a83b9 --- /dev/null +++ b/openair3/NAS/COMMON/IES/TrafficFlowAggregateDescription.c @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + + +#include "TLVEncoder.h" +#include "TLVDecoder.h" +#include "TrafficFlowAggregateDescription.h" + +int decode_traffic_flow_aggregate_description(TrafficFlowAggregateDescription *trafficflowaggregatedescription, uint8_t iei, uint8_t *buffer, uint32_t len) +{ + return 0; +} + +int encode_traffic_flow_aggregate_description(TrafficFlowAggregateDescription *trafficflowaggregatedescription, uint8_t iei, uint8_t *buffer, uint32_t len) +{ + return 0; +} + diff --git a/openair3/NAS/COMMON/IES/TrafficFlowAggregateDescription.h b/openair3/NAS/COMMON/IES/TrafficFlowAggregateDescription.h new file mode 100644 index 0000000000..3058873621 --- /dev/null +++ b/openair3/NAS/COMMON/IES/TrafficFlowAggregateDescription.h @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef TRAFFIC_FLOW_AGGREGATE_DESCRIPTION_H_ +#define TRAFFIC_FLOW_AGGREGATE_DESCRIPTION_H_ + +#define TRAFFIC_FLOW_AGGREGATE_DESCRIPTION_MINIMUM_LENGTH 1 +#define TRAFFIC_FLOW_AGGREGATE_DESCRIPTION_MAXIMUM_LENGTH 1 + +typedef struct { + uint8_t field; +} TrafficFlowAggregateDescription; + +int encode_traffic_flow_aggregate_description(TrafficFlowAggregateDescription *trafficflowaggregatedescription, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_traffic_flow_aggregate_description_xml(TrafficFlowAggregateDescription *trafficflowaggregatedescription, uint8_t iei); + +int decode_traffic_flow_aggregate_description(TrafficFlowAggregateDescription *trafficflowaggregatedescription, uint8_t iei, uint8_t *buffer, uint32_t len); + +#endif /* TRAFFIC FLOW AGGREGATE DESCRIPTION_H_ */ + diff --git a/openair-cn/NAS/COMMON/IES/TrafficFlowTemplate.c b/openair3/NAS/COMMON/IES/TrafficFlowTemplate.c similarity index 94% rename from openair-cn/NAS/COMMON/IES/TrafficFlowTemplate.c rename to openair3/NAS/COMMON/IES/TrafficFlowTemplate.c index 931e2326aa..e18ffc92c5 100644 --- a/openair-cn/NAS/COMMON/IES/TrafficFlowTemplate.c +++ b/openair3/NAS/COMMON/IES/TrafficFlowTemplate.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/IES/TrafficFlowTemplate.h b/openair3/NAS/COMMON/IES/TrafficFlowTemplate.h similarity index 78% rename from openair-cn/NAS/COMMON/IES/TrafficFlowTemplate.h rename to openair3/NAS/COMMON/IES/TrafficFlowTemplate.h index 5c01c228aa..40f9c6b4a6 100644 --- a/openair-cn/NAS/COMMON/IES/TrafficFlowTemplate.h +++ b/openair3/NAS/COMMON/IES/TrafficFlowTemplate.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/IES/TransactionIdentifier.c b/openair3/NAS/COMMON/IES/TransactionIdentifier.c new file mode 100644 index 0000000000..c48ae31a63 --- /dev/null +++ b/openair3/NAS/COMMON/IES/TransactionIdentifier.c @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + + +#include "TLVEncoder.h" +#include "TLVDecoder.h" +#include "TransactionIdentifier.h" + +int decode_transaction_identifier(TransactionIdentifier *transactionidentifier, uint8_t iei, uint8_t *buffer, uint32_t len) +{ + return 0; +} + +int encode_transaction_identifier(TransactionIdentifier *transactionidentifier, uint8_t iei, uint8_t *buffer, uint32_t len) +{ + return 0; +} + diff --git a/openair3/NAS/COMMON/IES/TransactionIdentifier.h b/openair3/NAS/COMMON/IES/TransactionIdentifier.h new file mode 100644 index 0000000000..061db1c654 --- /dev/null +++ b/openair3/NAS/COMMON/IES/TransactionIdentifier.h @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef TRANSACTION_IDENTIFIER_H_ +#define TRANSACTION_IDENTIFIER_H_ + +#define TRANSACTION_IDENTIFIER_MINIMUM_LENGTH 1 +#define TRANSACTION_IDENTIFIER_MAXIMUM_LENGTH 1 + +typedef struct { + uint8_t field; +} TransactionIdentifier; + +int encode_transaction_identifier(TransactionIdentifier *transactionidentifier, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_transaction_identifier_xml(TransactionIdentifier *transactionidentifier, uint8_t iei); + +int decode_transaction_identifier(TransactionIdentifier *transactionidentifier, uint8_t iei, uint8_t *buffer, uint32_t len); + +#endif /* TRANSACTION IDENTIFIER_H_ */ + diff --git a/openair-cn/NAS/COMMON/IES/UeNetworkCapability.c b/openair3/NAS/COMMON/IES/UeNetworkCapability.c similarity index 75% rename from openair-cn/NAS/COMMON/IES/UeNetworkCapability.c rename to openair3/NAS/COMMON/IES/UeNetworkCapability.c index 839acc080b..41393e7689 100644 --- a/openair-cn/NAS/COMMON/IES/UeNetworkCapability.c +++ b/openair3/NAS/COMMON/IES/UeNetworkCapability.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/IES/UeNetworkCapability.h b/openair3/NAS/COMMON/IES/UeNetworkCapability.h similarity index 66% rename from openair-cn/NAS/COMMON/IES/UeNetworkCapability.h rename to openair3/NAS/COMMON/IES/UeNetworkCapability.h index a385fefea9..56451159a5 100644 --- a/openair-cn/NAS/COMMON/IES/UeNetworkCapability.h +++ b/openair3/NAS/COMMON/IES/UeNetworkCapability.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/IES/UeRadioCapabilityInformationUpdateNeeded.c b/openair3/NAS/COMMON/IES/UeRadioCapabilityInformationUpdateNeeded.c similarity index 64% rename from openair-cn/NAS/COMMON/IES/UeRadioCapabilityInformationUpdateNeeded.c rename to openair3/NAS/COMMON/IES/UeRadioCapabilityInformationUpdateNeeded.c index 08020581e4..36d612bf6f 100644 --- a/openair-cn/NAS/COMMON/IES/UeRadioCapabilityInformationUpdateNeeded.c +++ b/openair3/NAS/COMMON/IES/UeRadioCapabilityInformationUpdateNeeded.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/IES/UeRadioCapabilityInformationUpdateNeeded.h b/openair3/NAS/COMMON/IES/UeRadioCapabilityInformationUpdateNeeded.h new file mode 100644 index 0000000000..853ecea045 --- /dev/null +++ b/openair3/NAS/COMMON/IES/UeRadioCapabilityInformationUpdateNeeded.h @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef UE_RADIO_CAPABILITY_INFORMATION_UPDATE_NEEDED_H_ +#define UE_RADIO_CAPABILITY_INFORMATION_UPDATE_NEEDED_H_ + +#define UE_RADIO_CAPABILITY_INFORMATION_UPDATE_NEEDED_MINIMUM_LENGTH 1 +#define UE_RADIO_CAPABILITY_INFORMATION_UPDATE_NEEDED_MAXIMUM_LENGTH 1 + +typedef uint8_t UeRadioCapabilityInformationUpdateNeeded; + +int encode_ue_radio_capability_information_update_needed(UeRadioCapabilityInformationUpdateNeeded *ueradiocapabilityinformationupdateneeded, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_ue_radio_capability_information_update_needed_xml(UeRadioCapabilityInformationUpdateNeeded *ueradiocapabilityinformationupdateneeded, uint8_t iei); + +uint8_t encode_u8_ue_radio_capability_information_update_needed(UeRadioCapabilityInformationUpdateNeeded *ueradiocapabilityinformationupdateneeded); + +int decode_ue_radio_capability_information_update_needed(UeRadioCapabilityInformationUpdateNeeded *ueradiocapabilityinformationupdateneeded, uint8_t iei, uint8_t *buffer, uint32_t len); + +int decode_u8_ue_radio_capability_information_update_needed(UeRadioCapabilityInformationUpdateNeeded *ueradiocapabilityinformationupdateneeded, uint8_t iei, uint8_t value, uint32_t len); + +#endif /* UE RADIO CAPABILITY INFORMATION UPDATE NEEDED_H_ */ + diff --git a/openair-cn/NAS/COMMON/IES/UeSecurityCapability.c b/openair3/NAS/COMMON/IES/UeSecurityCapability.c similarity index 70% rename from openair-cn/NAS/COMMON/IES/UeSecurityCapability.c rename to openair3/NAS/COMMON/IES/UeSecurityCapability.c index 5c4610ccde..ecc55ae5ff 100644 --- a/openair-cn/NAS/COMMON/IES/UeSecurityCapability.c +++ b/openair3/NAS/COMMON/IES/UeSecurityCapability.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/IES/UeSecurityCapability.h b/openair3/NAS/COMMON/IES/UeSecurityCapability.h similarity index 64% rename from openair-cn/NAS/COMMON/IES/UeSecurityCapability.h rename to openair3/NAS/COMMON/IES/UeSecurityCapability.h index 9009937cf4..dede6af9f8 100644 --- a/openair-cn/NAS/COMMON/IES/UeSecurityCapability.h +++ b/openair3/NAS/COMMON/IES/UeSecurityCapability.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/IES/VoiceDomainPreferenceAndUeUsageSetting.c b/openair3/NAS/COMMON/IES/VoiceDomainPreferenceAndUeUsageSetting.c similarity index 61% rename from openair-cn/NAS/COMMON/IES/VoiceDomainPreferenceAndUeUsageSetting.c rename to openair3/NAS/COMMON/IES/VoiceDomainPreferenceAndUeUsageSetting.c index 38a8cf10a6..0c84ba0a8e 100644 --- a/openair-cn/NAS/COMMON/IES/VoiceDomainPreferenceAndUeUsageSetting.c +++ b/openair3/NAS/COMMON/IES/VoiceDomainPreferenceAndUeUsageSetting.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/NAS/COMMON/IES/VoiceDomainPreferenceAndUeUsageSetting.h b/openair3/NAS/COMMON/IES/VoiceDomainPreferenceAndUeUsageSetting.h new file mode 100644 index 0000000000..13a8b668ec --- /dev/null +++ b/openair3/NAS/COMMON/IES/VoiceDomainPreferenceAndUeUsageSetting.h @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "OctetString.h" + +#ifndef VOICE_DOMAIN_PREFERENCE_AND_UE_USAGE_SETTING_H_ +#define VOICE_DOMAIN_PREFERENCE_AND_UE_USAGE_SETTING_H_ + +#define VOICE_DOMAIN_PREFERENCE_AND_UE_USAGE_SETTING_MINIMUM_LENGTH 1 +#define VOICE_DOMAIN_PREFERENCE_AND_UE_USAGE_SETTING_MAXIMUM_LENGTH 1 + +typedef struct VoiceDomainPreferenceAndUeUsageSetting_tag { + uint8_t spare:5; +#define UE_USAGE_SETTING_VOICE_CENTRIC 0b0 +#define UE_USAGE_SETTING_DATA_CENTRIC 0b1 + uint8_t ue_usage_setting:1; +#define VOICE_DOMAIN_PREFERENCE_CS_VOICE_ONLY 0b00 +#define VOICE_DOMAIN_PREFERENCE_IMS_PS_VOICE_ONLY 0b01 +#define VOICE_DOMAIN_PREFERENCE_CS_VOICE_PREFERRED_IMS_PS_VOICE_AS_SECONDARY 0b10 +#define VOICE_DOMAIN_PREFERENCE_IMS_PS_VOICE_PREFERRED_CS_VOICE_AS_SECONDARY 0b11 + uint8_t voice_domain_for_eutran:2; +} VoiceDomainPreferenceAndUeUsageSetting; + +int encode_voice_domain_preference_and_ue_usage_setting(VoiceDomainPreferenceAndUeUsageSetting *voicedomainpreferenceandueusagesetting, uint8_t iei, uint8_t *buffer, uint32_t len); + +int decode_voice_domain_preference_and_ue_usage_setting(VoiceDomainPreferenceAndUeUsageSetting *voicedomainpreferenceandueusagesetting, uint8_t iei, uint8_t *buffer, uint32_t len); + +void dump_voice_domain_preference_and_ue_usage_setting_xml(VoiceDomainPreferenceAndUeUsageSetting *voicedomainpreferenceandueusagesetting, uint8_t iei); + +#endif /* VOICE DOMAIN PREFERENCE AND UE USAGE SETTING_H_ */ + diff --git a/openair3/NAS/COMMON/UTIL/COPYING b/openair3/NAS/COMMON/UTIL/COPYING new file mode 100644 index 0000000000..c888423064 --- /dev/null +++ b/openair3/NAS/COMMON/UTIL/COPYING @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ \ No newline at end of file diff --git a/openair3/NAS/COMMON/UTIL/Makefile b/openair3/NAS/COMMON/UTIL/Makefile new file mode 100644 index 0000000000..b0977b8112 --- /dev/null +++ b/openair3/NAS/COMMON/UTIL/Makefile @@ -0,0 +1,43 @@ + +ifndef PROJDIR +PROJDIR = $(PWD)/../.. +endif + +include $(PROJDIR)/Makerules +include $(PROJDIR)/Makefile.inc + +INCLUDES = -I. -I$(INCDIR) + +TARGET = $(LIBUTIL) +TARGETS = $(TARGET).a $(TARGET).so + +all: $(TARGETS) + +%.o: %.c Makefile + @echo Compiling $< + @$(CC) $(CFLAGS) -c $< -o $@ + +$(TARGET).a: $(OBJS) + @$(RM) $@ + @$(AR) $(ARFLAGS) $@ $(OBJS) + @echo Replacing $@ to $(LIBDIR) + @$(RM) $(LIBDIR)/$@ + @$(CP) $@ $(LIBDIR) + +$(TARGET).so: $(OBJS) + @$(LD) -G -o $@ $(OBJS) + @echo Replacing $@ to $(LIBDIR) + @$(RM) $(LIBDIR)/$@ + @$(CP) $@ $(LIBDIR) + +clean: + $(RM) $(OBJS) *.bak *~ + +veryclean: clean + $(RM) $(TARGETS) + +depend: + makedepend -- ${CFLAGS} -- ${SRCS} + +# DO NOT DELETE THIS LINE -- make depend depends on it. + diff --git a/openair-cn/NAS/COMMON/UTIL/OctetString.c b/openair3/NAS/COMMON/UTIL/OctetString.c similarity index 62% rename from openair-cn/NAS/COMMON/UTIL/OctetString.c rename to openair3/NAS/COMMON/UTIL/OctetString.c index fd16e27014..4a429d84a7 100644 --- a/openair-cn/NAS/COMMON/UTIL/OctetString.c +++ b/openair3/NAS/COMMON/UTIL/OctetString.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/NAS/COMMON/UTIL/OctetString.h b/openair3/NAS/COMMON/UTIL/OctetString.h similarity index 56% rename from openair-cn/NAS/COMMON/UTIL/OctetString.h rename to openair3/NAS/COMMON/UTIL/OctetString.h index 15cd8f6823..b3ea818cc8 100644 --- a/openair-cn/NAS/COMMON/UTIL/OctetString.h +++ b/openair3/NAS/COMMON/UTIL/OctetString.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include diff --git a/openair3/NAS/COMMON/UTIL/TLVDecoder.c b/openair3/NAS/COMMON/UTIL/TLVDecoder.c new file mode 100644 index 0000000000..c1ce58ea00 --- /dev/null +++ b/openair3/NAS/COMMON/UTIL/TLVDecoder.c @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "TLVDecoder.h" + +int errorCodeDecoder = 0; + +const char *errorCodeStringDecoder[] = { + "No error", + "Buffer NULL", + "Buffer too short", + "Unexpected IEI", + "Mandatory field not present", + "Wrong message type", + "EXT value doesn't match", + "Protocol not supported", +}; + +void tlv_decode_perror(void) +{ + if (errorCodeDecoder >= 0) + // No error or TLV_DECODE_ERR_OK + return; + + printf("TLV decoder error: (%d, %s)\n", errorCodeDecoder, errorCodeStringDecoder[errorCodeDecoder * -1]); +} + + diff --git a/openair-cn/NAS/COMMON/UTIL/TLVDecoder.h b/openair3/NAS/COMMON/UTIL/TLVDecoder.h similarity index 75% rename from openair-cn/NAS/COMMON/UTIL/TLVDecoder.h rename to openair3/NAS/COMMON/UTIL/TLVDecoder.h index 152fd9c737..99e1b9d90f 100644 --- a/openair-cn/NAS/COMMON/UTIL/TLVDecoder.h +++ b/openair3/NAS/COMMON/UTIL/TLVDecoder.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #ifndef TLV_DECODER_H_ #define TLV_DECODER_H_ diff --git a/openair3/NAS/COMMON/UTIL/TLVEncoder.c b/openair3/NAS/COMMON/UTIL/TLVEncoder.c new file mode 100644 index 0000000000..0ad394e97a --- /dev/null +++ b/openair3/NAS/COMMON/UTIL/TLVEncoder.c @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include +#include +#include + +#include "TLVEncoder.h" + +int errorCodeEncoder = 0; + +const char *errorCodeStringEncoder[] = { + "No error", + "Buffer NULL", + "Buffer too short", + "Octet string too long for IEI", + "Wrong message type", + "Protocol not supported", +}; + +void tlv_encode_perror(void) +{ + if (errorCodeEncoder >= 0) + // No error or TLV_DECODE_ERR_OK + return; + + printf("error: (%d, %s)\n", errorCodeEncoder, errorCodeStringEncoder[errorCodeEncoder * -1]); +} + diff --git a/openair-cn/NAS/COMMON/UTIL/TLVEncoder.h b/openair3/NAS/COMMON/UTIL/TLVEncoder.h similarity index 66% rename from openair-cn/NAS/COMMON/UTIL/TLVEncoder.h rename to openair3/NAS/COMMON/UTIL/TLVEncoder.h index 287635e9be..2917594618 100644 --- a/openair-cn/NAS/COMMON/UTIL/TLVEncoder.h +++ b/openair3/NAS/COMMON/UTIL/TLVEncoder.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #ifndef TLV_ENCODER_H_ #define TLV_ENCODER_H_ diff --git a/openair-cn/NAS/COMMON/UTIL/device.c b/openair3/NAS/COMMON/UTIL/device.c similarity index 85% rename from openair-cn/NAS/COMMON/UTIL/device.c rename to openair3/NAS/COMMON/UTIL/device.c index d6ab908a6c..375ffe0846 100644 --- a/openair-cn/NAS/COMMON/UTIL/device.c +++ b/openair3/NAS/COMMON/UTIL/device.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ /***************************************************************************** Source device.c diff --git a/openair-cn/NAS/COMMON/UTIL/device.h b/openair3/NAS/COMMON/UTIL/device.h similarity index 52% rename from openair-cn/NAS/COMMON/UTIL/device.h rename to openair3/NAS/COMMON/UTIL/device.h index b67a2cdbc3..ded1aca095 100644 --- a/openair-cn/NAS/COMMON/UTIL/device.h +++ b/openair3/NAS/COMMON/UTIL/device.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ /***************************************************************************** Source device.h diff --git a/openair-cn/NAS/COMMON/UTIL/memory.c b/openair3/NAS/COMMON/UTIL/memory.c similarity index 80% rename from openair-cn/NAS/COMMON/UTIL/memory.c rename to openair3/NAS/COMMON/UTIL/memory.c index 739509c228..18c7f8b1af 100644 --- a/openair-cn/NAS/COMMON/UTIL/memory.c +++ b/openair3/NAS/COMMON/UTIL/memory.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ /***************************************************************************** Source memory.c diff --git a/openair3/NAS/COMMON/UTIL/memory.h b/openair3/NAS/COMMON/UTIL/memory.h new file mode 100644 index 0000000000..0314630f0c --- /dev/null +++ b/openair3/NAS/COMMON/UTIL/memory.h @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +/***************************************************************************** +Source memory.h + +Version 0.1 + +Date 2012/10/09 + +Product NAS stack + +Subsystem Utilities + +Author Frederic Maurel + +Description Memory access utilities + +*****************************************************************************/ +#ifndef __MEMORY_H__ +#define __MEMORY_H__ + +#include // size_t + +/****************************************************************************/ +/********************* G L O B A L C O N S T A N T S *******************/ +/****************************************************************************/ + +/****************************************************************************/ +/************************ G L O B A L T Y P E S ************************/ +/****************************************************************************/ + +/****************************************************************************/ +/******************** G L O B A L V A R I A B L E S ********************/ +/****************************************************************************/ + +/****************************************************************************/ +/****************** E X P O R T E D F U N C T I O N S ******************/ +/****************************************************************************/ + +char* memory_get_path(const char* dirname, const char* filename); + +int memory_read(const char* datafile, void* data, size_t size); + +int memory_write(const char* datafile, const void* data, size_t size); + +#endif /* __MEMORY_H__*/ diff --git a/openair-cn/NAS/COMMON/UTIL/nas_log.c b/openair3/NAS/COMMON/UTIL/nas_log.c similarity index 86% rename from openair-cn/NAS/COMMON/UTIL/nas_log.c rename to openair3/NAS/COMMON/UTIL/nas_log.c index a781d25971..f0d6a24ffe 100644 --- a/openair-cn/NAS/COMMON/UTIL/nas_log.c +++ b/openair3/NAS/COMMON/UTIL/nas_log.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ /***************************************************************************** Source nas_log.c diff --git a/openair-cn/NAS/COMMON/UTIL/nas_log.h b/openair3/NAS/COMMON/UTIL/nas_log.h similarity index 79% rename from openair-cn/NAS/COMMON/UTIL/nas_log.h rename to openair3/NAS/COMMON/UTIL/nas_log.h index b947e33563..c17efb3383 100644 --- a/openair-cn/NAS/COMMON/UTIL/nas_log.h +++ b/openair3/NAS/COMMON/UTIL/nas_log.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ /***************************************************************************** Source nas_log.h diff --git a/openair-cn/NAS/COMMON/UTIL/nas_timer.c b/openair3/NAS/COMMON/UTIL/nas_timer.c similarity index 95% rename from openair-cn/NAS/COMMON/UTIL/nas_timer.c rename to openair3/NAS/COMMON/UTIL/nas_timer.c index d7c1eb9f0e..5dc6923140 100644 --- a/openair-cn/NAS/COMMON/UTIL/nas_timer.c +++ b/openair3/NAS/COMMON/UTIL/nas_timer.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ /***************************************************************************** Source nas_timer.c diff --git a/openair-cn/NAS/COMMON/UTIL/nas_timer.h b/openair3/NAS/COMMON/UTIL/nas_timer.h similarity index 55% rename from openair-cn/NAS/COMMON/UTIL/nas_timer.h rename to openair3/NAS/COMMON/UTIL/nas_timer.h index 891eeab5e7..0b65da4159 100644 --- a/openair-cn/NAS/COMMON/UTIL/nas_timer.h +++ b/openair3/NAS/COMMON/UTIL/nas_timer.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ /***************************************************************************** Source nas_timer.h diff --git a/openair-cn/NAS/COMMON/UTIL/parser.c b/openair3/NAS/COMMON/UTIL/parser.c similarity index 79% rename from openair-cn/NAS/COMMON/UTIL/parser.c rename to openair3/NAS/COMMON/UTIL/parser.c index cb69a63703..5f8350ea58 100644 --- a/openair-cn/NAS/COMMON/UTIL/parser.c +++ b/openair3/NAS/COMMON/UTIL/parser.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ /***************************************************************************** Source parser.c diff --git a/openair-cn/NAS/COMMON/UTIL/parser.h b/openair3/NAS/COMMON/UTIL/parser.h similarity index 60% rename from openair-cn/NAS/COMMON/UTIL/parser.h rename to openair3/NAS/COMMON/UTIL/parser.h index 0fe247015f..fc8a9ad126 100644 --- a/openair-cn/NAS/COMMON/UTIL/parser.h +++ b/openair3/NAS/COMMON/UTIL/parser.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ /***************************************************************************** Source parser.h diff --git a/openair-cn/NAS/COMMON/UTIL/socket.c b/openair3/NAS/COMMON/UTIL/socket.c similarity index 91% rename from openair-cn/NAS/COMMON/UTIL/socket.c rename to openair3/NAS/COMMON/UTIL/socket.c index f7793204f2..b76506109b 100644 --- a/openair-cn/NAS/COMMON/UTIL/socket.c +++ b/openair3/NAS/COMMON/UTIL/socket.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ /***************************************************************************** Source socket.c diff --git a/openair-cn/NAS/COMMON/UTIL/socket.h b/openair3/NAS/COMMON/UTIL/socket.h similarity index 53% rename from openair-cn/NAS/COMMON/UTIL/socket.h rename to openair3/NAS/COMMON/UTIL/socket.h index 1bf885d962..4be749d3cc 100644 --- a/openair-cn/NAS/COMMON/UTIL/socket.h +++ b/openair3/NAS/COMMON/UTIL/socket.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ /***************************************************************************** Source socket.h diff --git a/openair-cn/NAS/COMMON/UTIL/stty.c b/openair3/NAS/COMMON/UTIL/stty.c similarity index 85% rename from openair-cn/NAS/COMMON/UTIL/stty.c rename to openair3/NAS/COMMON/UTIL/stty.c index 67819a8e46..1fb72e9204 100644 --- a/openair-cn/NAS/COMMON/UTIL/stty.c +++ b/openair3/NAS/COMMON/UTIL/stty.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ /***************************************************************************** Source stty.c diff --git a/openair3/NAS/COMMON/UTIL/tst/Makefile b/openair3/NAS/COMMON/UTIL/tst/Makefile new file mode 100644 index 0000000000..efaaff22fa --- /dev/null +++ b/openair3/NAS/COMMON/UTIL/tst/Makefile @@ -0,0 +1,36 @@ + +ifndef PROJDIR +PROJDIR = $(PWD)/../../.. +endif + +include $(PROJDIR)/Makerules +include $(PROJDIR)/Makefile.inc + +LIBS = -lutil +INCLUDES = -I. -I$(INCDIR) -I$(UTILDIR) + +LIBSUTIL = $(LIBDIR)/$(LIBUTIL).a $(LIBDIR)/$(LIBUTIL).so + +TIMER_OBJ = timer.o + +TIMER_TARGET = timer + +TARGETS = $(TIMER_TARGET) + +all: $(TARGETS) + +%.o: %.c Makefile + $(CC) $(CFLAGS) -c $< -o $@ + +$(TIMER_TARGET): $(TIMER_OBJ) $(LIBSUTIL) + $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) + +clean: + $(RM) $(OBJS) $(TARGETS) *.bak *~ + +depend: + makedepend -- ${CFLAGS} -- ${SRCS} + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +timer.o: $(UTILDIR)/timer.h $(INCDIR)/commonDef.h diff --git a/openair-cn/NAS/COMMON/UTIL/tst/timer.c b/openair3/NAS/COMMON/UTIL/tst/timer.c similarity index 78% rename from openair-cn/NAS/COMMON/UTIL/tst/timer.c rename to openair3/NAS/COMMON/UTIL/tst/timer.c index 458a94861d..7b963fba30 100644 --- a/openair-cn/NAS/COMMON/UTIL/tst/timer.c +++ b/openair3/NAS/COMMON/UTIL/tst/timer.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ /***************************************************************************** Source timer.c diff --git a/openair-cn/NAS/COMMON/UTIL/tst/timer_debug.txt b/openair3/NAS/COMMON/UTIL/tst/timer_debug.txt similarity index 100% rename from openair-cn/NAS/COMMON/UTIL/tst/timer_debug.txt rename to openair3/NAS/COMMON/UTIL/tst/timer_debug.txt diff --git a/openair-cn/NAS/COMMON/commonDef.h b/openair3/NAS/COMMON/commonDef.h similarity index 100% rename from openair-cn/NAS/COMMON/commonDef.h rename to openair3/NAS/COMMON/commonDef.h diff --git a/openair-cn/NAS/COMMON/networkDef.h b/openair3/NAS/COMMON/networkDef.h similarity index 100% rename from openair-cn/NAS/COMMON/networkDef.h rename to openair3/NAS/COMMON/networkDef.h diff --git a/openair-cn/NAS/COMMON/securityDef.h b/openair3/NAS/COMMON/securityDef.h similarity index 67% rename from openair-cn/NAS/COMMON/securityDef.h rename to openair3/NAS/COMMON/securityDef.h index 88325f0aaf..c418de2c60 100644 --- a/openair-cn/NAS/COMMON/securityDef.h +++ b/openair3/NAS/COMMON/securityDef.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ /***************************************************************************** Source securityDef.h diff --git a/openair-cn/NAS/COMMON/userDef.h b/openair3/NAS/COMMON/userDef.h similarity index 58% rename from openair-cn/NAS/COMMON/userDef.h rename to openair3/NAS/COMMON/userDef.h index b99e263382..f6398794fe 100644 --- a/openair-cn/NAS/COMMON/userDef.h +++ b/openair3/NAS/COMMON/userDef.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ /***************************************************************************** Source userDef.h diff --git a/openair-cn/DOCS/Latex/DefaultBearer/COPYING b/openair3/NAS/COPYING similarity index 100% rename from openair-cn/DOCS/Latex/DefaultBearer/COPYING rename to openair3/NAS/COPYING diff --git a/openair-cn/DOCS/Latex/EPC/COPYING b/openair3/NAS/TEST/AS_SIMULATOR/COPYING similarity index 100% rename from openair-cn/DOCS/Latex/EPC/COPYING rename to openair3/NAS/TEST/AS_SIMULATOR/COPYING diff --git a/openair-cn/NAS/TEST/AS_SIMULATOR/Makefile b/openair3/NAS/TEST/AS_SIMULATOR/Makefile similarity index 96% rename from openair-cn/NAS/TEST/AS_SIMULATOR/Makefile rename to openair3/NAS/TEST/AS_SIMULATOR/Makefile index 94c27037e4..91146b1afa 100644 --- a/openair-cn/NAS/TEST/AS_SIMULATOR/Makefile +++ b/openair3/NAS/TEST/AS_SIMULATOR/Makefile @@ -21,7 +21,7 @@ # Contact Information # OpenAirInterface Admin: openair_admin@eurecom.fr # OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr +# OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr # # Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. # diff --git a/openair-cn/NAS/TEST/AS_SIMULATOR/as_data.c b/openair3/NAS/TEST/AS_SIMULATOR/as_data.c similarity index 100% rename from openair-cn/NAS/TEST/AS_SIMULATOR/as_data.c rename to openair3/NAS/TEST/AS_SIMULATOR/as_data.c diff --git a/openair-cn/NAS/TEST/AS_SIMULATOR/as_data.h b/openair3/NAS/TEST/AS_SIMULATOR/as_data.h similarity index 100% rename from openair-cn/NAS/TEST/AS_SIMULATOR/as_data.h rename to openair3/NAS/TEST/AS_SIMULATOR/as_data.h diff --git a/openair-cn/NAS/TEST/AS_SIMULATOR/as_process.c b/openair3/NAS/TEST/AS_SIMULATOR/as_process.c similarity index 100% rename from openair-cn/NAS/TEST/AS_SIMULATOR/as_process.c rename to openair3/NAS/TEST/AS_SIMULATOR/as_process.c diff --git a/openair-cn/NAS/TEST/AS_SIMULATOR/as_process.h b/openair3/NAS/TEST/AS_SIMULATOR/as_process.h similarity index 100% rename from openair-cn/NAS/TEST/AS_SIMULATOR/as_process.h rename to openair3/NAS/TEST/AS_SIMULATOR/as_process.h diff --git a/openair-cn/NAS/TEST/AS_SIMULATOR/as_simulator.c b/openair3/NAS/TEST/AS_SIMULATOR/as_simulator.c similarity index 100% rename from openair-cn/NAS/TEST/AS_SIMULATOR/as_simulator.c rename to openair3/NAS/TEST/AS_SIMULATOR/as_simulator.c diff --git a/openair-cn/NAS/TEST/AS_SIMULATOR/as_simulator_parser.c b/openair3/NAS/TEST/AS_SIMULATOR/as_simulator_parser.c similarity index 100% rename from openair-cn/NAS/TEST/AS_SIMULATOR/as_simulator_parser.c rename to openair3/NAS/TEST/AS_SIMULATOR/as_simulator_parser.c diff --git a/openair-cn/NAS/TEST/AS_SIMULATOR/as_simulator_parser.h b/openair3/NAS/TEST/AS_SIMULATOR/as_simulator_parser.h similarity index 100% rename from openair-cn/NAS/TEST/AS_SIMULATOR/as_simulator_parser.h rename to openair3/NAS/TEST/AS_SIMULATOR/as_simulator_parser.h diff --git a/openair-cn/NAS/TEST/AS_SIMULATOR/nas_data.c b/openair3/NAS/TEST/AS_SIMULATOR/nas_data.c similarity index 100% rename from openair-cn/NAS/TEST/AS_SIMULATOR/nas_data.c rename to openair3/NAS/TEST/AS_SIMULATOR/nas_data.c diff --git a/openair-cn/NAS/TEST/AS_SIMULATOR/nas_data.h b/openair3/NAS/TEST/AS_SIMULATOR/nas_data.h similarity index 100% rename from openair-cn/NAS/TEST/AS_SIMULATOR/nas_data.h rename to openair3/NAS/TEST/AS_SIMULATOR/nas_data.h diff --git a/openair-cn/NAS/TEST/AS_SIMULATOR/nas_process.c b/openair3/NAS/TEST/AS_SIMULATOR/nas_process.c similarity index 100% rename from openair-cn/NAS/TEST/AS_SIMULATOR/nas_process.c rename to openair3/NAS/TEST/AS_SIMULATOR/nas_process.c diff --git a/openair-cn/NAS/TEST/AS_SIMULATOR/nas_process.h b/openair3/NAS/TEST/AS_SIMULATOR/nas_process.h similarity index 100% rename from openair-cn/NAS/TEST/AS_SIMULATOR/nas_process.h rename to openair3/NAS/TEST/AS_SIMULATOR/nas_process.h diff --git a/openair-cn/MME_APP/COPYING b/openair3/NAS/TEST/COPYING similarity index 100% rename from openair-cn/MME_APP/COPYING rename to openair3/NAS/TEST/COPYING diff --git a/openair-cn/NAS/TEST/MSC/ActivatePDN.png b/openair3/NAS/TEST/MSC/ActivatePDN.png similarity index 100% rename from openair-cn/NAS/TEST/MSC/ActivatePDN.png rename to openair3/NAS/TEST/MSC/ActivatePDN.png diff --git a/openair-cn/NAS/TEST/MSC/AuthenticationReject.png b/openair3/NAS/TEST/MSC/AuthenticationReject.png similarity index 100% rename from openair-cn/NAS/TEST/MSC/AuthenticationReject.png rename to openair3/NAS/TEST/MSC/AuthenticationReject.png diff --git a/openair-cn/NAS/COMMON/API/NETWORK/COPYING b/openair3/NAS/TEST/MSC/COPYING similarity index 100% rename from openair-cn/NAS/COMMON/API/NETWORK/COPYING rename to openair3/NAS/TEST/MSC/COPYING diff --git a/openair-cn/NAS/TEST/MSC/DeactivatePDN.png b/openair3/NAS/TEST/MSC/DeactivatePDN.png similarity index 100% rename from openair-cn/NAS/TEST/MSC/DeactivatePDN.png rename to openair3/NAS/TEST/MSC/DeactivatePDN.png diff --git a/openair-cn/NAS/TEST/MSC/InitialAttach.png b/openair3/NAS/TEST/MSC/InitialAttach.png similarity index 100% rename from openair-cn/NAS/TEST/MSC/InitialAttach.png rename to openair3/NAS/TEST/MSC/InitialAttach.png diff --git a/openair-cn/NAS/TEST/MSC/InitialAttachReject.png b/openair3/NAS/TEST/MSC/InitialAttachReject.png similarity index 100% rename from openair-cn/NAS/TEST/MSC/InitialAttachReject.png rename to openair3/NAS/TEST/MSC/InitialAttachReject.png diff --git a/openair-cn/NAS/TEST/MSC/NomalDetach.png b/openair3/NAS/TEST/MSC/NomalDetach.png similarity index 100% rename from openair-cn/NAS/TEST/MSC/NomalDetach.png rename to openair3/NAS/TEST/MSC/NomalDetach.png diff --git a/openair-cn/NAS/TEST/MSC/README b/openair3/NAS/TEST/MSC/README similarity index 100% rename from openair-cn/NAS/TEST/MSC/README rename to openair3/NAS/TEST/MSC/README diff --git a/openair-cn/NAS/TEST/MSC/SwitchOffDetach.png b/openair3/NAS/TEST/MSC/SwitchOffDetach.png similarity index 100% rename from openair-cn/NAS/TEST/MSC/SwitchOffDetach.png rename to openair3/NAS/TEST/MSC/SwitchOffDetach.png diff --git a/openair-cn/NAS/TEST/MSC/msc_gen.py b/openair3/NAS/TEST/MSC/msc_gen.py similarity index 100% rename from openair-cn/NAS/TEST/MSC/msc_gen.py rename to openair3/NAS/TEST/MSC/msc_gen.py diff --git a/openair-cn/NAS/TEST/MSC/mscgen b/openair3/NAS/TEST/MSC/mscgen similarity index 100% rename from openair-cn/NAS/TEST/MSC/mscgen rename to openair3/NAS/TEST/MSC/mscgen diff --git a/openair-cn/NAS/COMMON/COPYING b/openair3/NAS/TEST/NETWORK/COPYING similarity index 100% rename from openair-cn/NAS/COMMON/COPYING rename to openair3/NAS/TEST/NETWORK/COPYING diff --git a/openair-cn/NAS/TEST/NETWORK/Makefile b/openair3/NAS/TEST/NETWORK/Makefile similarity index 96% rename from openair-cn/NAS/TEST/NETWORK/Makefile rename to openair3/NAS/TEST/NETWORK/Makefile index b9075e5c77..e6e03f1362 100644 --- a/openair-cn/NAS/TEST/NETWORK/Makefile +++ b/openair3/NAS/TEST/NETWORK/Makefile @@ -21,7 +21,7 @@ # Contact Information # OpenAirInterface Admin: openair_admin@eurecom.fr # OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr +# OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr # # Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. # diff --git a/openair-cn/NAS/TEST/NETWORK/README b/openair3/NAS/TEST/NETWORK/README similarity index 100% rename from openair-cn/NAS/TEST/NETWORK/README rename to openair3/NAS/TEST/NETWORK/README diff --git a/openair-cn/NAS/TEST/NETWORK/network_parser.c b/openair3/NAS/TEST/NETWORK/network_parser.c similarity index 100% rename from openair-cn/NAS/TEST/NETWORK/network_parser.c rename to openair3/NAS/TEST/NETWORK/network_parser.c diff --git a/openair-cn/NAS/TEST/NETWORK/network_parser.h b/openair3/NAS/TEST/NETWORK/network_parser.h similarity index 100% rename from openair-cn/NAS/TEST/NETWORK/network_parser.h rename to openair3/NAS/TEST/NETWORK/network_parser.h diff --git a/openair-cn/NAS/TEST/NETWORK/network_simulator.c b/openair3/NAS/TEST/NETWORK/network_simulator.c similarity index 100% rename from openair-cn/NAS/TEST/NETWORK/network_simulator.c rename to openair3/NAS/TEST/NETWORK/network_simulator.c diff --git a/openair-cn/NAS/COMMON/EMM/MSG/COPYING b/openair3/NAS/TEST/USER/COPYING similarity index 100% rename from openair-cn/NAS/COMMON/EMM/MSG/COPYING rename to openair3/NAS/TEST/USER/COPYING diff --git a/openair-cn/NAS/TEST/USER/Makefile b/openair3/NAS/TEST/USER/Makefile similarity index 96% rename from openair-cn/NAS/TEST/USER/Makefile rename to openair3/NAS/TEST/USER/Makefile index 797d0614ab..f65e6ff557 100644 --- a/openair-cn/NAS/TEST/USER/Makefile +++ b/openair3/NAS/TEST/USER/Makefile @@ -21,7 +21,7 @@ # Contact Information # OpenAirInterface Admin: openair_admin@eurecom.fr # OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr +# OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr # # Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. # diff --git a/openair-cn/NAS/TEST/USER/user_parser.c b/openair3/NAS/TEST/USER/user_parser.c similarity index 100% rename from openair-cn/NAS/TEST/USER/user_parser.c rename to openair3/NAS/TEST/USER/user_parser.c diff --git a/openair-cn/NAS/TEST/USER/user_parser.h b/openair3/NAS/TEST/USER/user_parser.h similarity index 100% rename from openair-cn/NAS/TEST/USER/user_parser.h rename to openair3/NAS/TEST/USER/user_parser.h diff --git a/openair-cn/NAS/TEST/USER/user_simulator.c b/openair3/NAS/TEST/USER/user_simulator.c similarity index 100% rename from openair-cn/NAS/TEST/USER/user_simulator.c rename to openair3/NAS/TEST/USER/user_simulator.c diff --git a/openair-cn/NAS/COMMON/ESM/MSG/COPYING b/openair3/NAS/TOOLS/COPYING similarity index 100% rename from openair-cn/NAS/COMMON/ESM/MSG/COPYING rename to openair3/NAS/TOOLS/COPYING diff --git a/openair-cn/NAS/TOOLS/Makefile b/openair3/NAS/TOOLS/Makefile similarity index 97% rename from openair-cn/NAS/TOOLS/Makefile rename to openair3/NAS/TOOLS/Makefile index 9c3c54e602..d54edd3049 100644 --- a/openair-cn/NAS/TOOLS/Makefile +++ b/openair3/NAS/TOOLS/Makefile @@ -21,7 +21,7 @@ # Contact Information # OpenAirInterface Admin: openair_admin@eurecom.fr # OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr +# OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr # # Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. # diff --git a/openair-cn/NAS/TOOLS/network.h b/openair3/NAS/TOOLS/network.h similarity index 98% rename from openair-cn/NAS/TOOLS/network.h rename to openair3/NAS/TOOLS/network.h index 849c30f88f..54bf61a7b4 100644 --- a/openair-cn/NAS/TOOLS/network.h +++ b/openair3/NAS/TOOLS/network.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/TOOLS/ue_data.c b/openair3/NAS/TOOLS/ue_data.c similarity index 99% rename from openair-cn/NAS/TOOLS/ue_data.c rename to openair3/NAS/TOOLS/ue_data.c index 5dcbdf79de..478119acda 100644 --- a/openair-cn/NAS/TOOLS/ue_data.c +++ b/openair3/NAS/TOOLS/ue_data.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/TOOLS/usim_data.c b/openair3/NAS/TOOLS/usim_data.c similarity index 99% rename from openair-cn/NAS/TOOLS/usim_data.c rename to openair3/NAS/TOOLS/usim_data.c index ea867fef3c..ea046245ed 100644 --- a/openair-cn/NAS/TOOLS/usim_data.c +++ b/openair3/NAS/TOOLS/usim_data.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/COMMON/IES/COPYING b/openair3/NAS/UE/API/USER/COPYING similarity index 100% rename from openair-cn/NAS/COMMON/IES/COPYING rename to openair3/NAS/UE/API/USER/COPYING diff --git a/openair-cn/NAS/UE/API/USIM/Makefile b/openair3/NAS/UE/API/USER/Makefile similarity index 96% rename from openair-cn/NAS/UE/API/USIM/Makefile rename to openair3/NAS/UE/API/USER/Makefile index 8e7c24a4c4..d4981975fc 100644 --- a/openair-cn/NAS/UE/API/USIM/Makefile +++ b/openair3/NAS/UE/API/USER/Makefile @@ -21,7 +21,7 @@ # Contact Information # OpenAirInterface Admin: openair_admin@eurecom.fr # OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr +# OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr # # Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. # diff --git a/openair-cn/NAS/UE/API/USER/at_command.c b/openair3/NAS/UE/API/USER/at_command.c similarity index 99% rename from openair-cn/NAS/UE/API/USER/at_command.c rename to openair3/NAS/UE/API/USER/at_command.c index c6f26a4b1b..dc4dd3c040 100644 --- a/openair-cn/NAS/UE/API/USER/at_command.c +++ b/openair3/NAS/UE/API/USER/at_command.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/API/USER/at_command.h b/openair3/NAS/UE/API/USER/at_command.h similarity index 99% rename from openair-cn/NAS/UE/API/USER/at_command.h rename to openair3/NAS/UE/API/USER/at_command.h index d1b74dc4c3..4c65b0cf2c 100644 --- a/openair-cn/NAS/UE/API/USER/at_command.h +++ b/openair3/NAS/UE/API/USER/at_command.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/API/USER/at_error.c b/openair3/NAS/UE/API/USER/at_error.c similarity index 99% rename from openair-cn/NAS/UE/API/USER/at_error.c rename to openair3/NAS/UE/API/USER/at_error.c index 440db34d9f..7b93fb5808 100644 --- a/openair-cn/NAS/UE/API/USER/at_error.c +++ b/openair3/NAS/UE/API/USER/at_error.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/API/USER/at_error.h b/openair3/NAS/UE/API/USER/at_error.h similarity index 99% rename from openair-cn/NAS/UE/API/USER/at_error.h rename to openair3/NAS/UE/API/USER/at_error.h index d03896a383..1554f3fa3e 100644 --- a/openair-cn/NAS/UE/API/USER/at_error.h +++ b/openair3/NAS/UE/API/USER/at_error.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/API/USER/at_response.c b/openair3/NAS/UE/API/USER/at_response.c similarity index 99% rename from openair-cn/NAS/UE/API/USER/at_response.c rename to openair3/NAS/UE/API/USER/at_response.c index 7d067d1cfc..68aa9137aa 100644 --- a/openair-cn/NAS/UE/API/USER/at_response.c +++ b/openair3/NAS/UE/API/USER/at_response.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/API/USER/at_response.h b/openair3/NAS/UE/API/USER/at_response.h similarity index 99% rename from openair-cn/NAS/UE/API/USER/at_response.h rename to openair3/NAS/UE/API/USER/at_response.h index 17c3ea0d81..2fa30fabeb 100644 --- a/openair-cn/NAS/UE/API/USER/at_response.h +++ b/openair3/NAS/UE/API/USER/at_response.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/API/USER/tst/Makefile b/openair3/NAS/UE/API/USER/tst/Makefile similarity index 97% rename from openair-cn/NAS/UE/API/USER/tst/Makefile rename to openair3/NAS/UE/API/USER/tst/Makefile index 867c3f697e..3ec0f767ca 100644 --- a/openair-cn/NAS/UE/API/USER/tst/Makefile +++ b/openair3/NAS/UE/API/USER/tst/Makefile @@ -21,7 +21,7 @@ # Contact Information # OpenAirInterface Admin: openair_admin@eurecom.fr # OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr +# OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr # # Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. # diff --git a/openair-cn/NAS/UE/API/USER/tst/at_parser.c b/openair3/NAS/UE/API/USER/tst/at_parser.c similarity index 98% rename from openair-cn/NAS/UE/API/USER/tst/at_parser.c rename to openair3/NAS/UE/API/USER/tst/at_parser.c index 7d0ca3f1e1..9700018386 100644 --- a/openair-cn/NAS/UE/API/USER/tst/at_parser.c +++ b/openair3/NAS/UE/API/USER/tst/at_parser.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/API/USER/tst/at_parser.in b/openair3/NAS/UE/API/USER/tst/at_parser.in similarity index 100% rename from openair-cn/NAS/UE/API/USER/tst/at_parser.in rename to openair3/NAS/UE/API/USER/tst/at_parser.in diff --git a/openair-cn/NAS/UE/API/USER/tst/at_parser.in.bis b/openair3/NAS/UE/API/USER/tst/at_parser.in.bis similarity index 100% rename from openair-cn/NAS/UE/API/USER/tst/at_parser.in.bis rename to openair3/NAS/UE/API/USER/tst/at_parser.in.bis diff --git a/openair-cn/NAS/UE/API/USER/tst/at_parser.out b/openair3/NAS/UE/API/USER/tst/at_parser.out similarity index 100% rename from openair-cn/NAS/UE/API/USER/tst/at_parser.out rename to openair3/NAS/UE/API/USER/tst/at_parser.out diff --git a/openair-cn/NAS/UE/API/USER/tst/at_parser.out.bis b/openair3/NAS/UE/API/USER/tst/at_parser.out.bis similarity index 100% rename from openair-cn/NAS/UE/API/USER/tst/at_parser.out.bis rename to openair3/NAS/UE/API/USER/tst/at_parser.out.bis diff --git a/openair-cn/NAS/UE/API/USER/tst/smartcom.txt b/openair3/NAS/UE/API/USER/tst/smartcom.txt similarity index 100% rename from openair-cn/NAS/UE/API/USER/tst/smartcom.txt rename to openair3/NAS/UE/API/USER/tst/smartcom.txt diff --git a/openair-cn/NAS/UE/API/USER/user_api.c b/openair3/NAS/UE/API/USER/user_api.c similarity index 99% rename from openair-cn/NAS/UE/API/USER/user_api.c rename to openair3/NAS/UE/API/USER/user_api.c index 42e7cb1538..6762877ad0 100644 --- a/openair-cn/NAS/UE/API/USER/user_api.c +++ b/openair3/NAS/UE/API/USER/user_api.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/API/USER/user_api.h b/openair3/NAS/UE/API/USER/user_api.h similarity index 98% rename from openair-cn/NAS/UE/API/USER/user_api.h rename to openair3/NAS/UE/API/USER/user_api.h index d58b59577d..a71ab458d4 100644 --- a/openair-cn/NAS/UE/API/USER/user_api.h +++ b/openair3/NAS/UE/API/USER/user_api.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/API/USER/user_indication.c b/openair3/NAS/UE/API/USER/user_indication.c similarity index 99% rename from openair-cn/NAS/UE/API/USER/user_indication.c rename to openair3/NAS/UE/API/USER/user_indication.c index 79759a3253..a4e1b7cd93 100644 --- a/openair-cn/NAS/UE/API/USER/user_indication.c +++ b/openair3/NAS/UE/API/USER/user_indication.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/API/USER/user_indication.h b/openair3/NAS/UE/API/USER/user_indication.h similarity index 98% rename from openair-cn/NAS/UE/API/USER/user_indication.h rename to openair3/NAS/UE/API/USER/user_indication.h index 4cf762b609..74679fb52a 100644 --- a/openair-cn/NAS/UE/API/USER/user_indication.h +++ b/openair3/NAS/UE/API/USER/user_indication.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/COMMON/UTIL/COPYING b/openair3/NAS/UE/API/USIM/COPYING similarity index 100% rename from openair-cn/NAS/COMMON/UTIL/COPYING rename to openair3/NAS/UE/API/USIM/COPYING diff --git a/openair-cn/NAS/UE/API/USER/Makefile b/openair3/NAS/UE/API/USIM/Makefile similarity index 96% rename from openair-cn/NAS/UE/API/USER/Makefile rename to openair3/NAS/UE/API/USIM/Makefile index 8e7c24a4c4..d4981975fc 100644 --- a/openair-cn/NAS/UE/API/USER/Makefile +++ b/openair3/NAS/UE/API/USIM/Makefile @@ -21,7 +21,7 @@ # Contact Information # OpenAirInterface Admin: openair_admin@eurecom.fr # OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr +# OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr # # Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. # diff --git a/openair-cn/NAS/UE/API/USIM/aka_functions.c b/openair3/NAS/UE/API/USIM/aka_functions.c similarity index 100% rename from openair-cn/NAS/UE/API/USIM/aka_functions.c rename to openair3/NAS/UE/API/USIM/aka_functions.c diff --git a/openair-cn/NAS/UE/API/USIM/aka_functions.h b/openair3/NAS/UE/API/USIM/aka_functions.h similarity index 96% rename from openair-cn/NAS/UE/API/USIM/aka_functions.h rename to openair3/NAS/UE/API/USIM/aka_functions.h index 1bb4bbf021..0d1a6fe1df 100644 --- a/openair-cn/NAS/UE/API/USIM/aka_functions.h +++ b/openair3/NAS/UE/API/USIM/aka_functions.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/API/USIM/usim_api.c b/openair3/NAS/UE/API/USIM/usim_api.c similarity index 99% rename from openair-cn/NAS/UE/API/USIM/usim_api.c rename to openair3/NAS/UE/API/USIM/usim_api.c index e69e78ddec..64bc05d0c3 100644 --- a/openair-cn/NAS/UE/API/USIM/usim_api.c +++ b/openair3/NAS/UE/API/USIM/usim_api.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/API/USIM/usim_api.h b/openair3/NAS/UE/API/USIM/usim_api.h similarity index 99% rename from openair-cn/NAS/UE/API/USIM/usim_api.h rename to openair3/NAS/UE/API/USIM/usim_api.h index 7b5a767d98..f7e85f95e7 100644 --- a/openair-cn/NAS/UE/API/USIM/usim_api.h +++ b/openair3/NAS/UE/API/USIM/usim_api.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/EMM/Attach.c b/openair3/NAS/UE/EMM/Attach.c similarity index 99% rename from openair-cn/NAS/UE/EMM/Attach.c rename to openair3/NAS/UE/EMM/Attach.c index 3a0c079685..d7bdeb9120 100755 --- a/openair-cn/NAS/UE/EMM/Attach.c +++ b/openair3/NAS/UE/EMM/Attach.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/EMM/Authentication.c b/openair3/NAS/UE/EMM/Authentication.c similarity index 99% rename from openair-cn/NAS/UE/EMM/Authentication.c rename to openair3/NAS/UE/EMM/Authentication.c index e0acb302ac..6285534450 100755 --- a/openair-cn/NAS/UE/EMM/Authentication.c +++ b/openair3/NAS/UE/EMM/Authentication.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/EMM/Detach.c b/openair3/NAS/UE/EMM/Detach.c similarity index 99% rename from openair-cn/NAS/UE/EMM/Detach.c rename to openair3/NAS/UE/EMM/Detach.c index d494515107..7ec7a3d74d 100755 --- a/openair-cn/NAS/UE/EMM/Detach.c +++ b/openair3/NAS/UE/EMM/Detach.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/EMM/EmmStatusHdl.c b/openair3/NAS/UE/EMM/EmmStatusHdl.c similarity index 99% rename from openair-cn/NAS/UE/EMM/EmmStatusHdl.c rename to openair3/NAS/UE/EMM/EmmStatusHdl.c index b81f7d5051..85d423fd23 100755 --- a/openair-cn/NAS/UE/EMM/EmmStatusHdl.c +++ b/openair3/NAS/UE/EMM/EmmStatusHdl.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/EMM/Identification.c b/openair3/NAS/UE/EMM/Identification.c similarity index 99% rename from openair-cn/NAS/UE/EMM/Identification.c rename to openair3/NAS/UE/EMM/Identification.c index b9d75f1917..80eede61be 100755 --- a/openair-cn/NAS/UE/EMM/Identification.c +++ b/openair3/NAS/UE/EMM/Identification.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/EMM/IdleMode.c b/openair3/NAS/UE/EMM/IdleMode.c similarity index 99% rename from openair-cn/NAS/UE/EMM/IdleMode.c rename to openair3/NAS/UE/EMM/IdleMode.c index 78c21205e3..b04670819b 100755 --- a/openair-cn/NAS/UE/EMM/IdleMode.c +++ b/openair3/NAS/UE/EMM/IdleMode.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/EMM/IdleMode.h b/openair3/NAS/UE/EMM/IdleMode.h similarity index 98% rename from openair-cn/NAS/UE/EMM/IdleMode.h rename to openair3/NAS/UE/EMM/IdleMode.h index 7f23bb1bf4..c0e13c9a7d 100755 --- a/openair-cn/NAS/UE/EMM/IdleMode.h +++ b/openair3/NAS/UE/EMM/IdleMode.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/EMM/LowerLayer.c b/openair3/NAS/UE/EMM/LowerLayer.c similarity index 99% rename from openair-cn/NAS/UE/EMM/LowerLayer.c rename to openair3/NAS/UE/EMM/LowerLayer.c index 10f7c4ccc9..130fe1bb5d 100755 --- a/openair-cn/NAS/UE/EMM/LowerLayer.c +++ b/openair3/NAS/UE/EMM/LowerLayer.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/EMM/LowerLayer.h b/openair3/NAS/UE/EMM/LowerLayer.h similarity index 98% rename from openair-cn/NAS/UE/EMM/LowerLayer.h rename to openair3/NAS/UE/EMM/LowerLayer.h index 4d9b4c5d39..80ee4acb2a 100755 --- a/openair-cn/NAS/UE/EMM/LowerLayer.h +++ b/openair3/NAS/UE/EMM/LowerLayer.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/COPYING b/openair3/NAS/UE/EMM/SAP/COPYING old mode 100644 new mode 100755 similarity index 100% rename from openair-cn/NAS/COPYING rename to openair3/NAS/UE/EMM/SAP/COPYING diff --git a/openair-cn/NAS/UE/EMM/SAP/EmmDeregistered.c b/openair3/NAS/UE/EMM/SAP/EmmDeregistered.c similarity index 99% rename from openair-cn/NAS/UE/EMM/SAP/EmmDeregistered.c rename to openair3/NAS/UE/EMM/SAP/EmmDeregistered.c index 83ae79f428..13a55b3846 100755 --- a/openair-cn/NAS/UE/EMM/SAP/EmmDeregistered.c +++ b/openair3/NAS/UE/EMM/SAP/EmmDeregistered.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/EMM/SAP/EmmDeregisteredAttachNeeded.c b/openair3/NAS/UE/EMM/SAP/EmmDeregisteredAttachNeeded.c similarity index 98% rename from openair-cn/NAS/UE/EMM/SAP/EmmDeregisteredAttachNeeded.c rename to openair3/NAS/UE/EMM/SAP/EmmDeregisteredAttachNeeded.c index b2def20a57..0d0301c392 100755 --- a/openair-cn/NAS/UE/EMM/SAP/EmmDeregisteredAttachNeeded.c +++ b/openair3/NAS/UE/EMM/SAP/EmmDeregisteredAttachNeeded.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/EMM/SAP/EmmDeregisteredAttemptingToAttach.c b/openair3/NAS/UE/EMM/SAP/EmmDeregisteredAttemptingToAttach.c similarity index 98% rename from openair-cn/NAS/UE/EMM/SAP/EmmDeregisteredAttemptingToAttach.c rename to openair3/NAS/UE/EMM/SAP/EmmDeregisteredAttemptingToAttach.c index 51053ab925..40911608bf 100755 --- a/openair-cn/NAS/UE/EMM/SAP/EmmDeregisteredAttemptingToAttach.c +++ b/openair3/NAS/UE/EMM/SAP/EmmDeregisteredAttemptingToAttach.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/EMM/SAP/EmmDeregisteredInitiated.c b/openair3/NAS/UE/EMM/SAP/EmmDeregisteredInitiated.c similarity index 98% rename from openair-cn/NAS/UE/EMM/SAP/EmmDeregisteredInitiated.c rename to openair3/NAS/UE/EMM/SAP/EmmDeregisteredInitiated.c index fc0e0524be..060329f2e5 100755 --- a/openair-cn/NAS/UE/EMM/SAP/EmmDeregisteredInitiated.c +++ b/openair3/NAS/UE/EMM/SAP/EmmDeregisteredInitiated.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/EMM/SAP/EmmDeregisteredLimitedService.c b/openair3/NAS/UE/EMM/SAP/EmmDeregisteredLimitedService.c similarity index 99% rename from openair-cn/NAS/UE/EMM/SAP/EmmDeregisteredLimitedService.c rename to openair3/NAS/UE/EMM/SAP/EmmDeregisteredLimitedService.c index 6af83fd855..92df829b8d 100755 --- a/openair-cn/NAS/UE/EMM/SAP/EmmDeregisteredLimitedService.c +++ b/openair3/NAS/UE/EMM/SAP/EmmDeregisteredLimitedService.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/EMM/SAP/EmmDeregisteredNoCellAvailable.c b/openair3/NAS/UE/EMM/SAP/EmmDeregisteredNoCellAvailable.c similarity index 98% rename from openair-cn/NAS/UE/EMM/SAP/EmmDeregisteredNoCellAvailable.c rename to openair3/NAS/UE/EMM/SAP/EmmDeregisteredNoCellAvailable.c index 9708f3a6be..65154d4d97 100755 --- a/openair-cn/NAS/UE/EMM/SAP/EmmDeregisteredNoCellAvailable.c +++ b/openair3/NAS/UE/EMM/SAP/EmmDeregisteredNoCellAvailable.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/EMM/SAP/EmmDeregisteredNoImsi.c b/openair3/NAS/UE/EMM/SAP/EmmDeregisteredNoImsi.c similarity index 98% rename from openair-cn/NAS/UE/EMM/SAP/EmmDeregisteredNoImsi.c rename to openair3/NAS/UE/EMM/SAP/EmmDeregisteredNoImsi.c index 315ce0f8ff..7740b22e9b 100755 --- a/openair-cn/NAS/UE/EMM/SAP/EmmDeregisteredNoImsi.c +++ b/openair3/NAS/UE/EMM/SAP/EmmDeregisteredNoImsi.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/EMM/SAP/EmmDeregisteredNormalService.c b/openair3/NAS/UE/EMM/SAP/EmmDeregisteredNormalService.c similarity index 99% rename from openair-cn/NAS/UE/EMM/SAP/EmmDeregisteredNormalService.c rename to openair3/NAS/UE/EMM/SAP/EmmDeregisteredNormalService.c index 386a4fd4b4..25924fd9f2 100755 --- a/openair-cn/NAS/UE/EMM/SAP/EmmDeregisteredNormalService.c +++ b/openair3/NAS/UE/EMM/SAP/EmmDeregisteredNormalService.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/EMM/SAP/EmmDeregisteredPlmnSearch.c b/openair3/NAS/UE/EMM/SAP/EmmDeregisteredPlmnSearch.c similarity index 99% rename from openair-cn/NAS/UE/EMM/SAP/EmmDeregisteredPlmnSearch.c rename to openair3/NAS/UE/EMM/SAP/EmmDeregisteredPlmnSearch.c index 071b9a576c..08c3ff5ea1 100755 --- a/openair-cn/NAS/UE/EMM/SAP/EmmDeregisteredPlmnSearch.c +++ b/openair3/NAS/UE/EMM/SAP/EmmDeregisteredPlmnSearch.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/EMM/SAP/EmmNull.c b/openair3/NAS/UE/EMM/SAP/EmmNull.c similarity index 98% rename from openair-cn/NAS/UE/EMM/SAP/EmmNull.c rename to openair3/NAS/UE/EMM/SAP/EmmNull.c index c1583d56e1..f36d579e5c 100755 --- a/openair-cn/NAS/UE/EMM/SAP/EmmNull.c +++ b/openair3/NAS/UE/EMM/SAP/EmmNull.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/EMM/SAP/EmmRegistered.c b/openair3/NAS/UE/EMM/SAP/EmmRegistered.c similarity index 99% rename from openair-cn/NAS/UE/EMM/SAP/EmmRegistered.c rename to openair3/NAS/UE/EMM/SAP/EmmRegistered.c index 7db6e86b74..889d22663c 100755 --- a/openair-cn/NAS/UE/EMM/SAP/EmmRegistered.c +++ b/openair3/NAS/UE/EMM/SAP/EmmRegistered.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/EMM/SAP/EmmRegisteredAttemptingToUpdate.c b/openair3/NAS/UE/EMM/SAP/EmmRegisteredAttemptingToUpdate.c similarity index 98% rename from openair-cn/NAS/UE/EMM/SAP/EmmRegisteredAttemptingToUpdate.c rename to openair3/NAS/UE/EMM/SAP/EmmRegisteredAttemptingToUpdate.c index 6b15df4a54..0dcaec5868 100755 --- a/openair-cn/NAS/UE/EMM/SAP/EmmRegisteredAttemptingToUpdate.c +++ b/openair3/NAS/UE/EMM/SAP/EmmRegisteredAttemptingToUpdate.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/EMM/SAP/EmmRegisteredImsiDetachInitiated.c b/openair3/NAS/UE/EMM/SAP/EmmRegisteredImsiDetachInitiated.c similarity index 98% rename from openair-cn/NAS/UE/EMM/SAP/EmmRegisteredImsiDetachInitiated.c rename to openair3/NAS/UE/EMM/SAP/EmmRegisteredImsiDetachInitiated.c index ba40a549d8..24de58db86 100755 --- a/openair-cn/NAS/UE/EMM/SAP/EmmRegisteredImsiDetachInitiated.c +++ b/openair3/NAS/UE/EMM/SAP/EmmRegisteredImsiDetachInitiated.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/EMM/SAP/EmmRegisteredInitiated.c b/openair3/NAS/UE/EMM/SAP/EmmRegisteredInitiated.c similarity index 99% rename from openair-cn/NAS/UE/EMM/SAP/EmmRegisteredInitiated.c rename to openair3/NAS/UE/EMM/SAP/EmmRegisteredInitiated.c index 2ee8b8dea6..18c41c8ad4 100755 --- a/openair-cn/NAS/UE/EMM/SAP/EmmRegisteredInitiated.c +++ b/openair3/NAS/UE/EMM/SAP/EmmRegisteredInitiated.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/EMM/SAP/EmmRegisteredLimitedService.c b/openair3/NAS/UE/EMM/SAP/EmmRegisteredLimitedService.c similarity index 98% rename from openair-cn/NAS/UE/EMM/SAP/EmmRegisteredLimitedService.c rename to openair3/NAS/UE/EMM/SAP/EmmRegisteredLimitedService.c index 799914d119..1d78a97509 100755 --- a/openair-cn/NAS/UE/EMM/SAP/EmmRegisteredLimitedService.c +++ b/openair3/NAS/UE/EMM/SAP/EmmRegisteredLimitedService.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/EMM/SAP/EmmRegisteredNoCellAvailable.c b/openair3/NAS/UE/EMM/SAP/EmmRegisteredNoCellAvailable.c similarity index 98% rename from openair-cn/NAS/UE/EMM/SAP/EmmRegisteredNoCellAvailable.c rename to openair3/NAS/UE/EMM/SAP/EmmRegisteredNoCellAvailable.c index 0578d8acfd..8385f4359f 100755 --- a/openair-cn/NAS/UE/EMM/SAP/EmmRegisteredNoCellAvailable.c +++ b/openair3/NAS/UE/EMM/SAP/EmmRegisteredNoCellAvailable.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/EMM/SAP/EmmRegisteredNormalService.c b/openair3/NAS/UE/EMM/SAP/EmmRegisteredNormalService.c similarity index 98% rename from openair-cn/NAS/UE/EMM/SAP/EmmRegisteredNormalService.c rename to openair3/NAS/UE/EMM/SAP/EmmRegisteredNormalService.c index 51e28d2068..4f3dc54f46 100755 --- a/openair-cn/NAS/UE/EMM/SAP/EmmRegisteredNormalService.c +++ b/openair3/NAS/UE/EMM/SAP/EmmRegisteredNormalService.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/EMM/SAP/EmmRegisteredPlmnSearch.c b/openair3/NAS/UE/EMM/SAP/EmmRegisteredPlmnSearch.c similarity index 98% rename from openair-cn/NAS/UE/EMM/SAP/EmmRegisteredPlmnSearch.c rename to openair3/NAS/UE/EMM/SAP/EmmRegisteredPlmnSearch.c index c4c053515d..a5b28bed43 100755 --- a/openair-cn/NAS/UE/EMM/SAP/EmmRegisteredPlmnSearch.c +++ b/openair3/NAS/UE/EMM/SAP/EmmRegisteredPlmnSearch.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/EMM/SAP/EmmRegisteredUpdateNeeded.c b/openair3/NAS/UE/EMM/SAP/EmmRegisteredUpdateNeeded.c similarity index 98% rename from openair-cn/NAS/UE/EMM/SAP/EmmRegisteredUpdateNeeded.c rename to openair3/NAS/UE/EMM/SAP/EmmRegisteredUpdateNeeded.c index ead9ce7aa8..9f960082f0 100755 --- a/openair-cn/NAS/UE/EMM/SAP/EmmRegisteredUpdateNeeded.c +++ b/openair3/NAS/UE/EMM/SAP/EmmRegisteredUpdateNeeded.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/EMM/SAP/EmmServiceRequestInitiated.c b/openair3/NAS/UE/EMM/SAP/EmmServiceRequestInitiated.c similarity index 98% rename from openair-cn/NAS/UE/EMM/SAP/EmmServiceRequestInitiated.c rename to openair3/NAS/UE/EMM/SAP/EmmServiceRequestInitiated.c index 3d9b593dbc..47744d8db9 100755 --- a/openair-cn/NAS/UE/EMM/SAP/EmmServiceRequestInitiated.c +++ b/openair3/NAS/UE/EMM/SAP/EmmServiceRequestInitiated.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/EMM/SAP/EmmTrackingAreaUpdatingInitiated.c b/openair3/NAS/UE/EMM/SAP/EmmTrackingAreaUpdatingInitiated.c similarity index 98% rename from openair-cn/NAS/UE/EMM/SAP/EmmTrackingAreaUpdatingInitiated.c rename to openair3/NAS/UE/EMM/SAP/EmmTrackingAreaUpdatingInitiated.c index 7adb4e12fa..4539c63a93 100755 --- a/openair-cn/NAS/UE/EMM/SAP/EmmTrackingAreaUpdatingInitiated.c +++ b/openair3/NAS/UE/EMM/SAP/EmmTrackingAreaUpdatingInitiated.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/EMM/SAP/emm_as.c b/openair3/NAS/UE/EMM/SAP/emm_as.c similarity index 99% rename from openair-cn/NAS/UE/EMM/SAP/emm_as.c rename to openair3/NAS/UE/EMM/SAP/emm_as.c index 433b4e5304..daf2d50c33 100755 --- a/openair-cn/NAS/UE/EMM/SAP/emm_as.c +++ b/openair3/NAS/UE/EMM/SAP/emm_as.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/MME/EMM/SAP/emm_as.h b/openair3/NAS/UE/EMM/SAP/emm_as.h old mode 100644 new mode 100755 similarity index 97% rename from openair-cn/NAS/MME/EMM/SAP/emm_as.h rename to openair3/NAS/UE/EMM/SAP/emm_as.h index ca4fc449b7..1e46431a56 --- a/openair-cn/NAS/MME/EMM/SAP/emm_as.h +++ b/openair3/NAS/UE/EMM/SAP/emm_as.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/EMM/SAP/emm_asDef.h b/openair3/NAS/UE/EMM/SAP/emm_asDef.h similarity index 99% rename from openair-cn/NAS/UE/EMM/SAP/emm_asDef.h rename to openair3/NAS/UE/EMM/SAP/emm_asDef.h index fbd2a6b38e..f7b9fa23f8 100755 --- a/openair-cn/NAS/UE/EMM/SAP/emm_asDef.h +++ b/openair3/NAS/UE/EMM/SAP/emm_asDef.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/EMM/SAP/emm_esm.c b/openair3/NAS/UE/EMM/SAP/emm_esm.c similarity index 99% rename from openair-cn/NAS/UE/EMM/SAP/emm_esm.c rename to openair3/NAS/UE/EMM/SAP/emm_esm.c index 4a5400e0c1..b4baca66af 100755 --- a/openair-cn/NAS/UE/EMM/SAP/emm_esm.c +++ b/openair3/NAS/UE/EMM/SAP/emm_esm.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/MME/EMM/SAP/emm_esm.h b/openair3/NAS/UE/EMM/SAP/emm_esm.h old mode 100644 new mode 100755 similarity index 97% rename from openair-cn/NAS/MME/EMM/SAP/emm_esm.h rename to openair3/NAS/UE/EMM/SAP/emm_esm.h index 6967b97ca1..55c3b361a9 --- a/openair-cn/NAS/MME/EMM/SAP/emm_esm.h +++ b/openair3/NAS/UE/EMM/SAP/emm_esm.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/EMM/SAP/emm_esmDef.h b/openair3/NAS/UE/EMM/SAP/emm_esmDef.h similarity index 98% rename from openair-cn/NAS/UE/EMM/SAP/emm_esmDef.h rename to openair3/NAS/UE/EMM/SAP/emm_esmDef.h index 215be4fa6d..8251ee57b9 100755 --- a/openair-cn/NAS/UE/EMM/SAP/emm_esmDef.h +++ b/openair3/NAS/UE/EMM/SAP/emm_esmDef.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/EMM/SAP/emm_fsm.c b/openair3/NAS/UE/EMM/SAP/emm_fsm.c similarity index 99% rename from openair-cn/NAS/UE/EMM/SAP/emm_fsm.c rename to openair3/NAS/UE/EMM/SAP/emm_fsm.c index 59c78be3e2..83c5e5f1db 100755 --- a/openair-cn/NAS/UE/EMM/SAP/emm_fsm.c +++ b/openair3/NAS/UE/EMM/SAP/emm_fsm.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/EMM/SAP/emm_fsm.h b/openair3/NAS/UE/EMM/SAP/emm_fsm.h similarity index 98% rename from openair-cn/NAS/UE/EMM/SAP/emm_fsm.h rename to openair3/NAS/UE/EMM/SAP/emm_fsm.h index e554f0f9e2..c929890e05 100755 --- a/openair-cn/NAS/UE/EMM/SAP/emm_fsm.h +++ b/openair3/NAS/UE/EMM/SAP/emm_fsm.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/EMM/SAP/emm_recv.c b/openair3/NAS/UE/EMM/SAP/emm_recv.c similarity index 99% rename from openair-cn/NAS/UE/EMM/SAP/emm_recv.c rename to openair3/NAS/UE/EMM/SAP/emm_recv.c index de9347fcff..12efa89f86 100755 --- a/openair-cn/NAS/UE/EMM/SAP/emm_recv.c +++ b/openair3/NAS/UE/EMM/SAP/emm_recv.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/EMM/SAP/emm_recv.h b/openair3/NAS/UE/EMM/SAP/emm_recv.h similarity index 98% rename from openair-cn/NAS/UE/EMM/SAP/emm_recv.h rename to openair3/NAS/UE/EMM/SAP/emm_recv.h index a096eef376..71398f98d0 100755 --- a/openair-cn/NAS/UE/EMM/SAP/emm_recv.h +++ b/openair3/NAS/UE/EMM/SAP/emm_recv.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/MME/EMM/SAP/emm_reg.c b/openair3/NAS/UE/EMM/SAP/emm_reg.c old mode 100644 new mode 100755 similarity index 98% rename from openair-cn/NAS/MME/EMM/SAP/emm_reg.c rename to openair3/NAS/UE/EMM/SAP/emm_reg.c index ca19566cb9..7f20b25151 --- a/openair-cn/NAS/MME/EMM/SAP/emm_reg.c +++ b/openair3/NAS/UE/EMM/SAP/emm_reg.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/EMM/SAP/emm_reg.h b/openair3/NAS/UE/EMM/SAP/emm_reg.h similarity index 97% rename from openair-cn/NAS/UE/EMM/SAP/emm_reg.h rename to openair3/NAS/UE/EMM/SAP/emm_reg.h index 62d333395c..9660f641c1 100755 --- a/openair-cn/NAS/UE/EMM/SAP/emm_reg.h +++ b/openair3/NAS/UE/EMM/SAP/emm_reg.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/EMM/SAP/emm_regDef.h b/openair3/NAS/UE/EMM/SAP/emm_regDef.h similarity index 98% rename from openair-cn/NAS/UE/EMM/SAP/emm_regDef.h rename to openair3/NAS/UE/EMM/SAP/emm_regDef.h index 6a85d8923d..7f96326ffb 100755 --- a/openair-cn/NAS/UE/EMM/SAP/emm_regDef.h +++ b/openair3/NAS/UE/EMM/SAP/emm_regDef.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/EMM/SAP/emm_sap.c b/openair3/NAS/UE/EMM/SAP/emm_sap.c similarity index 99% rename from openair-cn/NAS/UE/EMM/SAP/emm_sap.c rename to openair3/NAS/UE/EMM/SAP/emm_sap.c index 84184f4f76..2da5da75ce 100755 --- a/openair-cn/NAS/UE/EMM/SAP/emm_sap.c +++ b/openair3/NAS/UE/EMM/SAP/emm_sap.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/EMM/SAP/emm_sap.h b/openair3/NAS/UE/EMM/SAP/emm_sap.h similarity index 99% rename from openair-cn/NAS/UE/EMM/SAP/emm_sap.h rename to openair3/NAS/UE/EMM/SAP/emm_sap.h index c0c38d13a6..eda2bde514 100755 --- a/openair-cn/NAS/UE/EMM/SAP/emm_sap.h +++ b/openair3/NAS/UE/EMM/SAP/emm_sap.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/EMM/SAP/emm_send.c b/openair3/NAS/UE/EMM/SAP/emm_send.c similarity index 99% rename from openair-cn/NAS/UE/EMM/SAP/emm_send.c rename to openair3/NAS/UE/EMM/SAP/emm_send.c index 75431ae388..d8e434f5a2 100755 --- a/openair-cn/NAS/UE/EMM/SAP/emm_send.c +++ b/openair3/NAS/UE/EMM/SAP/emm_send.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/EMM/SAP/emm_send.h b/openair3/NAS/UE/EMM/SAP/emm_send.h similarity index 98% rename from openair-cn/NAS/UE/EMM/SAP/emm_send.h rename to openair3/NAS/UE/EMM/SAP/emm_send.h index ea90bd1775..18c8eb37f0 100755 --- a/openair-cn/NAS/UE/EMM/SAP/emm_send.h +++ b/openair3/NAS/UE/EMM/SAP/emm_send.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/EMM/SecurityModeControl.c b/openair3/NAS/UE/EMM/SecurityModeControl.c similarity index 99% rename from openair-cn/NAS/UE/EMM/SecurityModeControl.c rename to openair3/NAS/UE/EMM/SecurityModeControl.c index 359ce1ea2f..fd7e4c3991 100755 --- a/openair-cn/NAS/UE/EMM/SecurityModeControl.c +++ b/openair3/NAS/UE/EMM/SecurityModeControl.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/EMM/ServiceRequestHdl.c b/openair3/NAS/UE/EMM/ServiceRequestHdl.c similarity index 98% rename from openair-cn/NAS/UE/EMM/ServiceRequestHdl.c rename to openair3/NAS/UE/EMM/ServiceRequestHdl.c index 6f74b4fbbe..d34e1f9f88 100755 --- a/openair-cn/NAS/UE/EMM/ServiceRequestHdl.c +++ b/openair3/NAS/UE/EMM/ServiceRequestHdl.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/EMM/TrackingAreaUpdate.c b/openair3/NAS/UE/EMM/TrackingAreaUpdate.c similarity index 98% rename from openair-cn/NAS/UE/EMM/TrackingAreaUpdate.c rename to openair3/NAS/UE/EMM/TrackingAreaUpdate.c index fbec3f7060..ac7944d18b 100755 --- a/openair-cn/NAS/UE/EMM/TrackingAreaUpdate.c +++ b/openair3/NAS/UE/EMM/TrackingAreaUpdate.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/EMM/emmData.h b/openair3/NAS/UE/EMM/emmData.h similarity index 99% rename from openair-cn/NAS/UE/EMM/emmData.h rename to openair3/NAS/UE/EMM/emmData.h index 7a81600871..d3e720eab0 100755 --- a/openair-cn/NAS/UE/EMM/emmData.h +++ b/openair3/NAS/UE/EMM/emmData.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/EMM/emm_main.c b/openair3/NAS/UE/EMM/emm_main.c similarity index 99% rename from openair-cn/NAS/UE/EMM/emm_main.c rename to openair3/NAS/UE/EMM/emm_main.c index 51b6b693fb..dbeacaa149 100755 --- a/openair-cn/NAS/UE/EMM/emm_main.c +++ b/openair3/NAS/UE/EMM/emm_main.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/EMM/emm_main.h b/openair3/NAS/UE/EMM/emm_main.h similarity index 98% rename from openair-cn/NAS/UE/EMM/emm_main.h rename to openair3/NAS/UE/EMM/emm_main.h index 3d3d441843..b985f806a5 100755 --- a/openair-cn/NAS/UE/EMM/emm_main.h +++ b/openair3/NAS/UE/EMM/emm_main.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/EMM/emm_proc.h b/openair3/NAS/UE/EMM/emm_proc.h similarity index 99% rename from openair-cn/NAS/UE/EMM/emm_proc.h rename to openair3/NAS/UE/EMM/emm_proc.h index 267a64fcef..65ebe4e8e2 100755 --- a/openair-cn/NAS/UE/EMM/emm_proc.h +++ b/openair3/NAS/UE/EMM/emm_proc.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/ESM/DedicatedEpsBearerContextActivation.c b/openair3/NAS/UE/ESM/DedicatedEpsBearerContextActivation.c similarity index 99% rename from openair-cn/NAS/UE/ESM/DedicatedEpsBearerContextActivation.c rename to openair3/NAS/UE/ESM/DedicatedEpsBearerContextActivation.c index 65fdaf4b3e..6a9e140ad4 100755 --- a/openair-cn/NAS/UE/ESM/DedicatedEpsBearerContextActivation.c +++ b/openair3/NAS/UE/ESM/DedicatedEpsBearerContextActivation.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/ESM/DefaultEpsBearerContextActivation.c b/openair3/NAS/UE/ESM/DefaultEpsBearerContextActivation.c similarity index 99% rename from openair-cn/NAS/UE/ESM/DefaultEpsBearerContextActivation.c rename to openair3/NAS/UE/ESM/DefaultEpsBearerContextActivation.c index b6b7fb13fa..1884590437 100755 --- a/openair-cn/NAS/UE/ESM/DefaultEpsBearerContextActivation.c +++ b/openair3/NAS/UE/ESM/DefaultEpsBearerContextActivation.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/ESM/EpsBearerContextDeactivation.c b/openair3/NAS/UE/ESM/EpsBearerContextDeactivation.c similarity index 99% rename from openair-cn/NAS/UE/ESM/EpsBearerContextDeactivation.c rename to openair3/NAS/UE/ESM/EpsBearerContextDeactivation.c index a8a5a4c952..bceeebeff1 100755 --- a/openair-cn/NAS/UE/ESM/EpsBearerContextDeactivation.c +++ b/openair3/NAS/UE/ESM/EpsBearerContextDeactivation.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/ESM/EsmStatusHdl.c b/openair3/NAS/UE/ESM/EsmStatusHdl.c similarity index 99% rename from openair-cn/NAS/UE/ESM/EsmStatusHdl.c rename to openair3/NAS/UE/ESM/EsmStatusHdl.c index 8ff3a21b0b..9aafc271dd 100755 --- a/openair-cn/NAS/UE/ESM/EsmStatusHdl.c +++ b/openair3/NAS/UE/ESM/EsmStatusHdl.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/ESM/PdnConnectivity.c b/openair3/NAS/UE/ESM/PdnConnectivity.c similarity index 99% rename from openair-cn/NAS/UE/ESM/PdnConnectivity.c rename to openair3/NAS/UE/ESM/PdnConnectivity.c index 2cfc2f58f0..8c9d123209 100755 --- a/openair-cn/NAS/UE/ESM/PdnConnectivity.c +++ b/openair3/NAS/UE/ESM/PdnConnectivity.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/ESM/PdnDisconnect.c b/openair3/NAS/UE/ESM/PdnDisconnect.c similarity index 99% rename from openair-cn/NAS/UE/ESM/PdnDisconnect.c rename to openair3/NAS/UE/ESM/PdnDisconnect.c index 54105a1c3b..e9ab748f8d 100755 --- a/openair-cn/NAS/UE/ESM/PdnDisconnect.c +++ b/openair3/NAS/UE/ESM/PdnDisconnect.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/MME/API/MME/COPYING b/openair3/NAS/UE/ESM/SAP/COPYING old mode 100644 new mode 100755 similarity index 100% rename from openair-cn/NAS/MME/API/MME/COPYING rename to openair3/NAS/UE/ESM/SAP/COPYING diff --git a/openair-cn/NAS/UE/ESM/SAP/esm_recv.c b/openair3/NAS/UE/ESM/SAP/esm_recv.c similarity index 99% rename from openair-cn/NAS/UE/ESM/SAP/esm_recv.c rename to openair3/NAS/UE/ESM/SAP/esm_recv.c index 77805030a7..72b322e966 100755 --- a/openair-cn/NAS/UE/ESM/SAP/esm_recv.c +++ b/openair3/NAS/UE/ESM/SAP/esm_recv.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/ESM/SAP/esm_recv.h b/openair3/NAS/UE/ESM/SAP/esm_recv.h similarity index 98% rename from openair-cn/NAS/UE/ESM/SAP/esm_recv.h rename to openair3/NAS/UE/ESM/SAP/esm_recv.h index f3c6a174d0..35e3ee49ce 100755 --- a/openair-cn/NAS/UE/ESM/SAP/esm_recv.h +++ b/openair3/NAS/UE/ESM/SAP/esm_recv.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/ESM/SAP/esm_sap.c b/openair3/NAS/UE/ESM/SAP/esm_sap.c similarity index 99% rename from openair-cn/NAS/UE/ESM/SAP/esm_sap.c rename to openair3/NAS/UE/ESM/SAP/esm_sap.c index dd0c0114a9..d23aa07390 100755 --- a/openair-cn/NAS/UE/ESM/SAP/esm_sap.c +++ b/openair3/NAS/UE/ESM/SAP/esm_sap.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/ESM/SAP/esm_sap.h b/openair3/NAS/UE/ESM/SAP/esm_sap.h similarity index 97% rename from openair-cn/NAS/UE/ESM/SAP/esm_sap.h rename to openair3/NAS/UE/ESM/SAP/esm_sap.h index c2d900a4ae..693185c473 100755 --- a/openair-cn/NAS/UE/ESM/SAP/esm_sap.h +++ b/openair3/NAS/UE/ESM/SAP/esm_sap.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/ESM/SAP/esm_sapDef.h b/openair3/NAS/UE/ESM/SAP/esm_sapDef.h similarity index 99% rename from openair-cn/NAS/UE/ESM/SAP/esm_sapDef.h rename to openair3/NAS/UE/ESM/SAP/esm_sapDef.h index e36d1faed5..2430696319 100755 --- a/openair-cn/NAS/UE/ESM/SAP/esm_sapDef.h +++ b/openair3/NAS/UE/ESM/SAP/esm_sapDef.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/ESM/SAP/esm_send.c b/openair3/NAS/UE/ESM/SAP/esm_send.c similarity index 99% rename from openair-cn/NAS/UE/ESM/SAP/esm_send.c rename to openair3/NAS/UE/ESM/SAP/esm_send.c index c5de9958ca..ab5341062a 100755 --- a/openair-cn/NAS/UE/ESM/SAP/esm_send.c +++ b/openair3/NAS/UE/ESM/SAP/esm_send.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/ESM/SAP/esm_send.h b/openair3/NAS/UE/ESM/SAP/esm_send.h similarity index 98% rename from openair-cn/NAS/UE/ESM/SAP/esm_send.h rename to openair3/NAS/UE/ESM/SAP/esm_send.h index 4e261300c5..8f4056df6f 100755 --- a/openair-cn/NAS/UE/ESM/SAP/esm_send.h +++ b/openair3/NAS/UE/ESM/SAP/esm_send.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/ESM/esmData.h b/openair3/NAS/UE/ESM/esmData.h similarity index 99% rename from openair-cn/NAS/UE/ESM/esmData.h rename to openair3/NAS/UE/ESM/esmData.h index 9726e83e8a..7571e25e64 100755 --- a/openair-cn/NAS/UE/ESM/esmData.h +++ b/openair3/NAS/UE/ESM/esmData.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/ESM/esm_ebr.c b/openair3/NAS/UE/ESM/esm_ebr.c similarity index 99% rename from openair-cn/NAS/UE/ESM/esm_ebr.c rename to openair3/NAS/UE/ESM/esm_ebr.c index d7a36cc6db..b305dc778b 100755 --- a/openair-cn/NAS/UE/ESM/esm_ebr.c +++ b/openair3/NAS/UE/ESM/esm_ebr.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/ESM/esm_ebr.h b/openair3/NAS/UE/ESM/esm_ebr.h similarity index 98% rename from openair-cn/NAS/UE/ESM/esm_ebr.h rename to openair3/NAS/UE/ESM/esm_ebr.h index 163983f8c0..1298aa1243 100755 --- a/openair-cn/NAS/UE/ESM/esm_ebr.h +++ b/openair3/NAS/UE/ESM/esm_ebr.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/ESM/esm_ebr_context.c b/openair3/NAS/UE/ESM/esm_ebr_context.c similarity index 99% rename from openair-cn/NAS/UE/ESM/esm_ebr_context.c rename to openair3/NAS/UE/ESM/esm_ebr_context.c index cbc46a9461..fcf278a2e4 100755 --- a/openair-cn/NAS/UE/ESM/esm_ebr_context.c +++ b/openair3/NAS/UE/ESM/esm_ebr_context.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/ESM/esm_ebr_context.h b/openair3/NAS/UE/ESM/esm_ebr_context.h similarity index 98% rename from openair-cn/NAS/UE/ESM/esm_ebr_context.h rename to openair3/NAS/UE/ESM/esm_ebr_context.h index 2a9d55a197..a93fb94eb1 100755 --- a/openair-cn/NAS/UE/ESM/esm_ebr_context.h +++ b/openair3/NAS/UE/ESM/esm_ebr_context.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/MME/ESM/esm_ip.c b/openair3/NAS/UE/ESM/esm_ip.c old mode 100644 new mode 100755 similarity index 97% rename from openair-cn/NAS/MME/ESM/esm_ip.c rename to openair3/NAS/UE/ESM/esm_ip.c index b2fb84b970..041d186b8d --- a/openair-cn/NAS/MME/ESM/esm_ip.c +++ b/openair3/NAS/UE/ESM/esm_ip.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/ESM/esm_main.c b/openair3/NAS/UE/ESM/esm_main.c similarity index 99% rename from openair-cn/NAS/UE/ESM/esm_main.c rename to openair3/NAS/UE/ESM/esm_main.c index 2d2124e495..f507b0a53f 100755 --- a/openair-cn/NAS/UE/ESM/esm_main.c +++ b/openair3/NAS/UE/ESM/esm_main.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/ESM/esm_main.h b/openair3/NAS/UE/ESM/esm_main.h similarity index 98% rename from openair-cn/NAS/UE/ESM/esm_main.h rename to openair3/NAS/UE/ESM/esm_main.h index 2fd2e58939..de95ba26f9 100755 --- a/openair-cn/NAS/UE/ESM/esm_main.h +++ b/openair3/NAS/UE/ESM/esm_main.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/ESM/esm_proc.h b/openair3/NAS/UE/ESM/esm_proc.h similarity index 99% rename from openair-cn/NAS/UE/ESM/esm_proc.h rename to openair3/NAS/UE/ESM/esm_proc.h index f4721aa00c..094907257b 100755 --- a/openair-cn/NAS/UE/ESM/esm_proc.h +++ b/openair3/NAS/UE/ESM/esm_proc.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/ESM/esm_pt.c b/openair3/NAS/UE/ESM/esm_pt.c similarity index 99% rename from openair-cn/NAS/UE/ESM/esm_pt.c rename to openair3/NAS/UE/ESM/esm_pt.c index 954049203c..9b2f4f7451 100755 --- a/openair-cn/NAS/UE/ESM/esm_pt.c +++ b/openair3/NAS/UE/ESM/esm_pt.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/ESM/esm_pt.h b/openair3/NAS/UE/ESM/esm_pt.h similarity index 98% rename from openair-cn/NAS/UE/ESM/esm_pt.h rename to openair3/NAS/UE/ESM/esm_pt.h index 0abe6ea558..8821b3be91 100755 --- a/openair-cn/NAS/UE/ESM/esm_pt.h +++ b/openair3/NAS/UE/ESM/esm_pt.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/UEprocess.c b/openair3/NAS/UE/UEprocess.c similarity index 99% rename from openair-cn/NAS/UE/UEprocess.c rename to openair3/NAS/UE/UEprocess.c index d42699eddb..0f45697f18 100644 --- a/openair-cn/NAS/UE/UEprocess.c +++ b/openair3/NAS/UE/UEprocess.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/nas_itti_messaging.c b/openair3/NAS/UE/nas_itti_messaging.c similarity index 99% rename from openair-cn/NAS/UE/nas_itti_messaging.c rename to openair3/NAS/UE/nas_itti_messaging.c index d832585ebd..7b8f630b89 100755 --- a/openair-cn/NAS/UE/nas_itti_messaging.c +++ b/openair3/NAS/UE/nas_itti_messaging.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/nas_itti_messaging.h b/openair3/NAS/UE/nas_itti_messaging.h similarity index 97% rename from openair-cn/NAS/UE/nas_itti_messaging.h rename to openair3/NAS/UE/nas_itti_messaging.h index 4165119570..9ea80f63c0 100755 --- a/openair-cn/NAS/UE/nas_itti_messaging.h +++ b/openair3/NAS/UE/nas_itti_messaging.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/nas_network.c b/openair3/NAS/UE/nas_network.c similarity index 99% rename from openair-cn/NAS/UE/nas_network.c rename to openair3/NAS/UE/nas_network.c index 5c63d56067..d6aa625b36 100755 --- a/openair-cn/NAS/UE/nas_network.c +++ b/openair3/NAS/UE/nas_network.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/nas_network.h b/openair3/NAS/UE/nas_network.h similarity index 97% rename from openair-cn/NAS/UE/nas_network.h rename to openair3/NAS/UE/nas_network.h index 25a8729eac..d56542ba42 100755 --- a/openair-cn/NAS/UE/nas_network.h +++ b/openair3/NAS/UE/nas_network.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/nas_parser.c b/openair3/NAS/UE/nas_parser.c similarity index 99% rename from openair-cn/NAS/UE/nas_parser.c rename to openair3/NAS/UE/nas_parser.c index aae894b783..40ba7152b3 100755 --- a/openair-cn/NAS/UE/nas_parser.c +++ b/openair3/NAS/UE/nas_parser.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/nas_parser.h b/openair3/NAS/UE/nas_parser.h similarity index 98% rename from openair-cn/NAS/UE/nas_parser.h rename to openair3/NAS/UE/nas_parser.h index 4e9be0aa28..003dd0895e 100755 --- a/openair-cn/NAS/UE/nas_parser.h +++ b/openair3/NAS/UE/nas_parser.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/nas_proc.c b/openair3/NAS/UE/nas_proc.c similarity index 99% rename from openair-cn/NAS/UE/nas_proc.c rename to openair3/NAS/UE/nas_proc.c index f6327fd627..e9f61b9d8b 100755 --- a/openair-cn/NAS/UE/nas_proc.c +++ b/openair3/NAS/UE/nas_proc.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/nas_proc.h b/openair3/NAS/UE/nas_proc.h similarity index 98% rename from openair-cn/NAS/UE/nas_proc.h rename to openair3/NAS/UE/nas_proc.h index 8d4897eddb..666c97f6dc 100755 --- a/openair-cn/NAS/UE/nas_proc.h +++ b/openair3/NAS/UE/nas_proc.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/nas_ue_task.c b/openair3/NAS/UE/nas_ue_task.c similarity index 99% rename from openair-cn/NAS/UE/nas_ue_task.c rename to openair3/NAS/UE/nas_ue_task.c index 48c15a4835..ff57901970 100644 --- a/openair-cn/NAS/UE/nas_ue_task.c +++ b/openair3/NAS/UE/nas_ue_task.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/nas_user.c b/openair3/NAS/UE/nas_user.c similarity index 99% rename from openair-cn/NAS/UE/nas_user.c rename to openair3/NAS/UE/nas_user.c index 4abb2f4040..447198b897 100644 --- a/openair-cn/NAS/UE/nas_user.c +++ b/openair3/NAS/UE/nas_user.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/UE/nas_user.h b/openair3/NAS/UE/nas_user.h similarity index 98% rename from openair-cn/NAS/UE/nas_user.h rename to openair3/NAS/UE/nas_user.h index 21f6680260..24603f3160 100644 --- a/openair-cn/NAS/UE/nas_user.h +++ b/openair3/NAS/UE/nas_user.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/MME/EMM/COPYING b/openair3/S1AP/COPYING similarity index 100% rename from openair-cn/NAS/MME/EMM/COPYING rename to openair3/S1AP/COPYING diff --git a/openair-cn/NAS/MME/EMM/SAP/COPYING b/openair3/S1AP/MESSAGES/ASN1/COPYING similarity index 100% rename from openair-cn/NAS/MME/EMM/SAP/COPYING rename to openair3/S1AP/MESSAGES/ASN1/COPYING diff --git a/openair-cn/NAS/MME/ESM/COPYING b/openair3/S1AP/MESSAGES/ASN1/R10.5/COPYING similarity index 100% rename from openair-cn/NAS/MME/ESM/COPYING rename to openair3/S1AP/MESSAGES/ASN1/R10.5/COPYING diff --git a/openair-cn/S1AP/MESSAGES/ASN1/R10.5/S1AP-CommonDataTypes.asn b/openair3/S1AP/MESSAGES/ASN1/R10.5/S1AP-CommonDataTypes.asn similarity index 100% rename from openair-cn/S1AP/MESSAGES/ASN1/R10.5/S1AP-CommonDataTypes.asn rename to openair3/S1AP/MESSAGES/ASN1/R10.5/S1AP-CommonDataTypes.asn diff --git a/openair-cn/S1AP/MESSAGES/ASN1/R10.5/S1AP-Constants.asn b/openair3/S1AP/MESSAGES/ASN1/R10.5/S1AP-Constants.asn similarity index 100% rename from openair-cn/S1AP/MESSAGES/ASN1/R10.5/S1AP-Constants.asn rename to openair3/S1AP/MESSAGES/ASN1/R10.5/S1AP-Constants.asn diff --git a/openair-cn/S1AP/MESSAGES/ASN1/R10.5/S1AP-Containers.asn b/openair3/S1AP/MESSAGES/ASN1/R10.5/S1AP-Containers.asn similarity index 100% rename from openair-cn/S1AP/MESSAGES/ASN1/R10.5/S1AP-Containers.asn rename to openair3/S1AP/MESSAGES/ASN1/R10.5/S1AP-Containers.asn diff --git a/openair-cn/S1AP/MESSAGES/ASN1/R10.5/S1AP-IEs.asn b/openair3/S1AP/MESSAGES/ASN1/R10.5/S1AP-IEs.asn similarity index 100% rename from openair-cn/S1AP/MESSAGES/ASN1/R10.5/S1AP-IEs.asn rename to openair3/S1AP/MESSAGES/ASN1/R10.5/S1AP-IEs.asn diff --git a/openair-cn/S1AP/MESSAGES/ASN1/R10.5/S1AP-PDU-Contents.asn b/openair3/S1AP/MESSAGES/ASN1/R10.5/S1AP-PDU-Contents.asn similarity index 100% rename from openair-cn/S1AP/MESSAGES/ASN1/R10.5/S1AP-PDU-Contents.asn rename to openair3/S1AP/MESSAGES/ASN1/R10.5/S1AP-PDU-Contents.asn diff --git a/openair-cn/S1AP/MESSAGES/ASN1/R10.5/S1AP-PDU-Descriptions.asn b/openair3/S1AP/MESSAGES/ASN1/R10.5/S1AP-PDU-Descriptions.asn similarity index 100% rename from openair-cn/S1AP/MESSAGES/ASN1/R10.5/S1AP-PDU-Descriptions.asn rename to openair3/S1AP/MESSAGES/ASN1/R10.5/S1AP-PDU-Descriptions.asn diff --git a/openair-cn/S1AP/MESSAGES/ASN1/R10.5/S1AP-PDU.asn b/openair3/S1AP/MESSAGES/ASN1/R10.5/S1AP-PDU.asn similarity index 100% rename from openair-cn/S1AP/MESSAGES/ASN1/R10.5/S1AP-PDU.asn rename to openair3/S1AP/MESSAGES/ASN1/R10.5/S1AP-PDU.asn diff --git a/openair-cn/NAS/MME/ESM/SAP/COPYING b/openair3/S1AP/MESSAGES/ASN1/R8.10/COPYING similarity index 100% rename from openair-cn/NAS/MME/ESM/SAP/COPYING rename to openair3/S1AP/MESSAGES/ASN1/R8.10/COPYING diff --git a/openair-cn/S1AP/MESSAGES/ASN1/R8.10/S1AP-CommonDataTypes.asn b/openair3/S1AP/MESSAGES/ASN1/R8.10/S1AP-CommonDataTypes.asn similarity index 100% rename from openair-cn/S1AP/MESSAGES/ASN1/R8.10/S1AP-CommonDataTypes.asn rename to openair3/S1AP/MESSAGES/ASN1/R8.10/S1AP-CommonDataTypes.asn diff --git a/openair-cn/S1AP/MESSAGES/ASN1/R8.10/S1AP-Constants.asn b/openair3/S1AP/MESSAGES/ASN1/R8.10/S1AP-Constants.asn similarity index 100% rename from openair-cn/S1AP/MESSAGES/ASN1/R8.10/S1AP-Constants.asn rename to openair3/S1AP/MESSAGES/ASN1/R8.10/S1AP-Constants.asn diff --git a/openair-cn/S1AP/MESSAGES/ASN1/R8.10/S1AP-IEs.asn b/openair3/S1AP/MESSAGES/ASN1/R8.10/S1AP-IEs.asn similarity index 100% rename from openair-cn/S1AP/MESSAGES/ASN1/R8.10/S1AP-IEs.asn rename to openair3/S1AP/MESSAGES/ASN1/R8.10/S1AP-IEs.asn diff --git a/openair-cn/S1AP/MESSAGES/ASN1/R8.10/S1AP-PDU-Contents.asn b/openair3/S1AP/MESSAGES/ASN1/R8.10/S1AP-PDU-Contents.asn similarity index 100% rename from openair-cn/S1AP/MESSAGES/ASN1/R8.10/S1AP-PDU-Contents.asn rename to openair3/S1AP/MESSAGES/ASN1/R8.10/S1AP-PDU-Contents.asn diff --git a/openair-cn/S1AP/MESSAGES/ASN1/R8.10/S1AP-PDU.asn b/openair3/S1AP/MESSAGES/ASN1/R8.10/S1AP-PDU.asn similarity index 100% rename from openair-cn/S1AP/MESSAGES/ASN1/R8.10/S1AP-PDU.asn rename to openair3/S1AP/MESSAGES/ASN1/R8.10/S1AP-PDU.asn diff --git a/openair-cn/NAS/TEST/AS_SIMULATOR/COPYING b/openair3/S1AP/MESSAGES/ASN1/R9.8/COPYING similarity index 100% rename from openair-cn/NAS/TEST/AS_SIMULATOR/COPYING rename to openair3/S1AP/MESSAGES/ASN1/R9.8/COPYING diff --git a/openair-cn/S1AP/MESSAGES/ASN1/R9.8/S1AP-CommonDataTypes.asn b/openair3/S1AP/MESSAGES/ASN1/R9.8/S1AP-CommonDataTypes.asn similarity index 100% rename from openair-cn/S1AP/MESSAGES/ASN1/R9.8/S1AP-CommonDataTypes.asn rename to openair3/S1AP/MESSAGES/ASN1/R9.8/S1AP-CommonDataTypes.asn diff --git a/openair-cn/S1AP/MESSAGES/ASN1/R9.8/S1AP-Constants.asn b/openair3/S1AP/MESSAGES/ASN1/R9.8/S1AP-Constants.asn similarity index 100% rename from openair-cn/S1AP/MESSAGES/ASN1/R9.8/S1AP-Constants.asn rename to openair3/S1AP/MESSAGES/ASN1/R9.8/S1AP-Constants.asn diff --git a/openair-cn/S1AP/MESSAGES/ASN1/R9.8/S1AP-Containers.asn b/openair3/S1AP/MESSAGES/ASN1/R9.8/S1AP-Containers.asn similarity index 100% rename from openair-cn/S1AP/MESSAGES/ASN1/R9.8/S1AP-Containers.asn rename to openair3/S1AP/MESSAGES/ASN1/R9.8/S1AP-Containers.asn diff --git a/openair-cn/S1AP/MESSAGES/ASN1/R9.8/S1AP-IEs.asn b/openair3/S1AP/MESSAGES/ASN1/R9.8/S1AP-IEs.asn similarity index 100% rename from openair-cn/S1AP/MESSAGES/ASN1/R9.8/S1AP-IEs.asn rename to openair3/S1AP/MESSAGES/ASN1/R9.8/S1AP-IEs.asn diff --git a/openair-cn/S1AP/MESSAGES/ASN1/R9.8/S1AP-PDU-Contents.asn b/openair3/S1AP/MESSAGES/ASN1/R9.8/S1AP-PDU-Contents.asn similarity index 100% rename from openair-cn/S1AP/MESSAGES/ASN1/R9.8/S1AP-PDU-Contents.asn rename to openair3/S1AP/MESSAGES/ASN1/R9.8/S1AP-PDU-Contents.asn diff --git a/openair-cn/S1AP/MESSAGES/ASN1/R9.8/S1AP-PDU-Descriptions.asn b/openair3/S1AP/MESSAGES/ASN1/R9.8/S1AP-PDU-Descriptions.asn similarity index 100% rename from openair-cn/S1AP/MESSAGES/ASN1/R9.8/S1AP-PDU-Descriptions.asn rename to openair3/S1AP/MESSAGES/ASN1/R9.8/S1AP-PDU-Descriptions.asn diff --git a/openair-cn/S1AP/MESSAGES/ASN1/R9.8/S1AP-PDU.asn b/openair3/S1AP/MESSAGES/ASN1/R9.8/S1AP-PDU.asn similarity index 100% rename from openair-cn/S1AP/MESSAGES/ASN1/R9.8/S1AP-PDU.asn rename to openair3/S1AP/MESSAGES/ASN1/R9.8/S1AP-PDU.asn diff --git a/openair-cn/S1AP/MESSAGES/ASN1/README b/openair3/S1AP/MESSAGES/ASN1/README similarity index 100% rename from openair-cn/S1AP/MESSAGES/ASN1/README rename to openair3/S1AP/MESSAGES/ASN1/README diff --git a/openair-cn/S1AP/MESSAGES/ASN1/asn1cpatch.p0 b/openair3/S1AP/MESSAGES/ASN1/asn1cpatch.p0 similarity index 100% rename from openair-cn/S1AP/MESSAGES/ASN1/asn1cpatch.p0 rename to openair3/S1AP/MESSAGES/ASN1/asn1cpatch.p0 diff --git a/openair-cn/S1AP/MESSAGES/ASN1/asn1cpatch_2.p0 b/openair3/S1AP/MESSAGES/ASN1/asn1cpatch_2.p0 similarity index 100% rename from openair-cn/S1AP/MESSAGES/ASN1/asn1cpatch_2.p0 rename to openair3/S1AP/MESSAGES/ASN1/asn1cpatch_2.p0 diff --git a/openair-cn/S1AP/MESSAGES/ASN1/asn1tostruct.py b/openair3/S1AP/MESSAGES/ASN1/asn1tostruct.py similarity index 100% rename from openair-cn/S1AP/MESSAGES/ASN1/asn1tostruct.py rename to openair3/S1AP/MESSAGES/ASN1/asn1tostruct.py diff --git a/openair-cn/NAS/TEST/COPYING b/openair3/S1AP/MESSAGES/COPYING similarity index 100% rename from openair-cn/NAS/TEST/COPYING rename to openair3/S1AP/MESSAGES/COPYING diff --git a/openair-cn/S1AP/s1ap_common.c b/openair3/S1AP/s1ap_common.c similarity index 72% rename from openair-cn/S1AP/s1ap_common.c rename to openair3/S1AP/s1ap_common.c index 948f199c0c..055641d12e 100644 --- a/openair-cn/S1AP/s1ap_common.c +++ b/openair3/S1AP/s1ap_common.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ /*! \file s1ap_common.c * \brief s1ap procedures for both eNB and MME diff --git a/openair-cn/S1AP/s1ap_common.h b/openair3/S1AP/s1ap_common.h similarity index 91% rename from openair-cn/S1AP/s1ap_common.h rename to openair3/S1AP/s1ap_common.h index 0024812fd2..3631535903 100644 --- a/openair-cn/S1AP/s1ap_common.h +++ b/openair3/S1AP/s1ap_common.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ /** @defgroup _s1ap_impl_ S1AP Layer Reference Implementation * @ingroup _ref_implementation_ diff --git a/openair-cn/S1AP/s1ap_eNB.c b/openair3/S1AP/s1ap_eNB.c similarity index 99% rename from openair-cn/S1AP/s1ap_eNB.c rename to openair3/S1AP/s1ap_eNB.c index da11f2893f..c880c3f3b4 100644 --- a/openair-cn/S1AP/s1ap_eNB.c +++ b/openair3/S1AP/s1ap_eNB.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/S1AP/s1ap_eNB.h b/openair3/S1AP/s1ap_eNB.h similarity index 96% rename from openair-cn/S1AP/s1ap_eNB.h rename to openair3/S1AP/s1ap_eNB.h index ac454be1ad..9c372493e9 100644 --- a/openair-cn/S1AP/s1ap_eNB.h +++ b/openair3/S1AP/s1ap_eNB.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/S1AP/s1ap_eNB_context_management_procedures.c b/openair3/S1AP/s1ap_eNB_context_management_procedures.c similarity index 99% rename from openair-cn/S1AP/s1ap_eNB_context_management_procedures.c rename to openair3/S1AP/s1ap_eNB_context_management_procedures.c index 0e6de0b0f2..801dfd8780 100755 --- a/openair-cn/S1AP/s1ap_eNB_context_management_procedures.c +++ b/openair3/S1AP/s1ap_eNB_context_management_procedures.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/S1AP/s1ap_eNB_context_management_procedures.h b/openair3/S1AP/s1ap_eNB_context_management_procedures.h similarity index 96% rename from openair-cn/S1AP/s1ap_eNB_context_management_procedures.h rename to openair3/S1AP/s1ap_eNB_context_management_procedures.h index 96b0938609..be9e0b24b4 100755 --- a/openair-cn/S1AP/s1ap_eNB_context_management_procedures.h +++ b/openair3/S1AP/s1ap_eNB_context_management_procedures.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/S1AP/s1ap_eNB_decoder.c b/openair3/S1AP/s1ap_eNB_decoder.c similarity index 99% rename from openair-cn/S1AP/s1ap_eNB_decoder.c rename to openair3/S1AP/s1ap_eNB_decoder.c index 70d4eece32..f8230520ce 100644 --- a/openair-cn/S1AP/s1ap_eNB_decoder.c +++ b/openair3/S1AP/s1ap_eNB_decoder.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/S1AP/s1ap_eNB_decoder.h b/openair3/S1AP/s1ap_eNB_decoder.h similarity index 96% rename from openair-cn/S1AP/s1ap_eNB_decoder.h rename to openair3/S1AP/s1ap_eNB_decoder.h index 76c47b0de7..4c3f5f4327 100644 --- a/openair-cn/S1AP/s1ap_eNB_decoder.h +++ b/openair3/S1AP/s1ap_eNB_decoder.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/S1AP/s1ap_eNB_default_values.h b/openair3/S1AP/s1ap_eNB_default_values.h similarity index 96% rename from openair-cn/S1AP/s1ap_eNB_default_values.h rename to openair3/S1AP/s1ap_eNB_default_values.h index 42731cf5a6..c0fde9f6eb 100644 --- a/openair-cn/S1AP/s1ap_eNB_default_values.h +++ b/openair3/S1AP/s1ap_eNB_default_values.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/S1AP/s1ap_eNB_defs.h b/openair3/S1AP/s1ap_eNB_defs.h similarity index 99% rename from openair-cn/S1AP/s1ap_eNB_defs.h rename to openair3/S1AP/s1ap_eNB_defs.h index 3474f9e7f6..2bf2758b89 100644 --- a/openair-cn/S1AP/s1ap_eNB_defs.h +++ b/openair3/S1AP/s1ap_eNB_defs.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/S1AP/s1ap_eNB_encoder.c b/openair3/S1AP/s1ap_eNB_encoder.c similarity index 99% rename from openair-cn/S1AP/s1ap_eNB_encoder.c rename to openair3/S1AP/s1ap_eNB_encoder.c index 5ec2f21613..a93bdc68f2 100644 --- a/openair-cn/S1AP/s1ap_eNB_encoder.c +++ b/openair3/S1AP/s1ap_eNB_encoder.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/S1AP/s1ap_eNB_encoder.h b/openair3/S1AP/s1ap_eNB_encoder.h similarity index 95% rename from openair-cn/S1AP/s1ap_eNB_encoder.h rename to openair3/S1AP/s1ap_eNB_encoder.h index a1ffc57e3a..b55cf2c261 100644 --- a/openair-cn/S1AP/s1ap_eNB_encoder.h +++ b/openair3/S1AP/s1ap_eNB_encoder.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/S1AP/s1ap_eNB_handlers.c b/openair3/S1AP/s1ap_eNB_handlers.c similarity index 99% rename from openair-cn/S1AP/s1ap_eNB_handlers.c rename to openair3/S1AP/s1ap_eNB_handlers.c index 7469e83ac2..6f0d4128c7 100644 --- a/openair-cn/S1AP/s1ap_eNB_handlers.c +++ b/openair3/S1AP/s1ap_eNB_handlers.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/S1AP/s1ap_eNB_handlers.h b/openair3/S1AP/s1ap_eNB_handlers.h similarity index 96% rename from openair-cn/S1AP/s1ap_eNB_handlers.h rename to openair3/S1AP/s1ap_eNB_handlers.h index db0b2115ce..145fd04721 100644 --- a/openair-cn/S1AP/s1ap_eNB_handlers.h +++ b/openair3/S1AP/s1ap_eNB_handlers.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/S1AP/s1ap_eNB_itti_messaging.c b/openair3/S1AP/s1ap_eNB_itti_messaging.c similarity index 58% rename from openair-cn/S1AP/s1ap_eNB_itti_messaging.c rename to openair3/S1AP/s1ap_eNB_itti_messaging.c index 849bd09ab2..b6cdf368f4 100644 --- a/openair-cn/S1AP/s1ap_eNB_itti_messaging.c +++ b/openair3/S1AP/s1ap_eNB_itti_messaging.c @@ -1,3 +1,31 @@ +/******************************************************************************* + OpenAirInterface + Copyright(c) 1999 - 2014 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 . + + Contact Information + OpenAirInterface Admin: openair_admin@eurecom.fr + OpenAirInterface Tech : openair_tech@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr + + Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. + + *******************************************************************************/ #include "intertask_interface.h" #include "s1ap_eNB_itti_messaging.h" diff --git a/openair-cn/S1AP/s1ap_eNB_itti_messaging.h b/openair3/S1AP/s1ap_eNB_itti_messaging.h similarity index 96% rename from openair-cn/S1AP/s1ap_eNB_itti_messaging.h rename to openair3/S1AP/s1ap_eNB_itti_messaging.h index d294a7d6ac..4021d623c4 100644 --- a/openair-cn/S1AP/s1ap_eNB_itti_messaging.h +++ b/openair3/S1AP/s1ap_eNB_itti_messaging.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/S1AP/s1ap_eNB_management_procedures.c b/openair3/S1AP/s1ap_eNB_management_procedures.c similarity index 98% rename from openair-cn/S1AP/s1ap_eNB_management_procedures.c rename to openair3/S1AP/s1ap_eNB_management_procedures.c index d14ccc107b..eb30a8dada 100644 --- a/openair-cn/S1AP/s1ap_eNB_management_procedures.c +++ b/openair3/S1AP/s1ap_eNB_management_procedures.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/S1AP/s1ap_eNB_management_procedures.h b/openair3/S1AP/s1ap_eNB_management_procedures.h similarity index 96% rename from openair-cn/S1AP/s1ap_eNB_management_procedures.h rename to openair3/S1AP/s1ap_eNB_management_procedures.h index 2709765df0..2e00add882 100644 --- a/openair-cn/S1AP/s1ap_eNB_management_procedures.h +++ b/openair3/S1AP/s1ap_eNB_management_procedures.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/S1AP/s1ap_eNB_nas_procedures.c b/openair3/S1AP/s1ap_eNB_nas_procedures.c similarity index 99% rename from openair-cn/S1AP/s1ap_eNB_nas_procedures.c rename to openair3/S1AP/s1ap_eNB_nas_procedures.c index 612d6dfc7e..0cd4c08cb1 100644 --- a/openair-cn/S1AP/s1ap_eNB_nas_procedures.c +++ b/openair3/S1AP/s1ap_eNB_nas_procedures.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/S1AP/s1ap_eNB_nas_procedures.h b/openair3/S1AP/s1ap_eNB_nas_procedures.h similarity index 97% rename from openair-cn/S1AP/s1ap_eNB_nas_procedures.h rename to openair3/S1AP/s1ap_eNB_nas_procedures.h index 8085cce35a..552726e8ed 100644 --- a/openair-cn/S1AP/s1ap_eNB_nas_procedures.h +++ b/openair3/S1AP/s1ap_eNB_nas_procedures.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/S1AP/s1ap_eNB_nnsf.c b/openair3/S1AP/s1ap_eNB_nnsf.c similarity index 99% rename from openair-cn/S1AP/s1ap_eNB_nnsf.c rename to openair3/S1AP/s1ap_eNB_nnsf.c index afb39a8a44..cf3d4436ed 100644 --- a/openair-cn/S1AP/s1ap_eNB_nnsf.c +++ b/openair3/S1AP/s1ap_eNB_nnsf.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/S1AP/s1ap_eNB_nnsf.h b/openair3/S1AP/s1ap_eNB_nnsf.h similarity index 97% rename from openair-cn/S1AP/s1ap_eNB_nnsf.h rename to openair3/S1AP/s1ap_eNB_nnsf.h index fd51f4a323..687f40dd1d 100644 --- a/openair-cn/S1AP/s1ap_eNB_nnsf.h +++ b/openair3/S1AP/s1ap_eNB_nnsf.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/S1AP/s1ap_eNB_overload.c b/openair3/S1AP/s1ap_eNB_overload.c similarity index 98% rename from openair-cn/S1AP/s1ap_eNB_overload.c rename to openair3/S1AP/s1ap_eNB_overload.c index 7ecc8f42c7..2c32f4f9de 100644 --- a/openair-cn/S1AP/s1ap_eNB_overload.c +++ b/openair3/S1AP/s1ap_eNB_overload.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/S1AP/s1ap_eNB_overload.h b/openair3/S1AP/s1ap_eNB_overload.h similarity index 97% rename from openair-cn/S1AP/s1ap_eNB_overload.h rename to openair3/S1AP/s1ap_eNB_overload.h index ed6e59bc90..baa1ad1232 100644 --- a/openair-cn/S1AP/s1ap_eNB_overload.h +++ b/openair3/S1AP/s1ap_eNB_overload.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/S1AP/s1ap_eNB_trace.c b/openair3/S1AP/s1ap_eNB_trace.c similarity index 98% rename from openair-cn/S1AP/s1ap_eNB_trace.c rename to openair3/S1AP/s1ap_eNB_trace.c index e792c81120..fd192d7320 100644 --- a/openair-cn/S1AP/s1ap_eNB_trace.c +++ b/openair3/S1AP/s1ap_eNB_trace.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/S1AP/s1ap_eNB_trace.h b/openair3/S1AP/s1ap_eNB_trace.h similarity index 100% rename from openair-cn/S1AP/s1ap_eNB_trace.h rename to openair3/S1AP/s1ap_eNB_trace.h diff --git a/openair-cn/S1AP/s1ap_eNB_ue_context.c b/openair3/S1AP/s1ap_eNB_ue_context.c similarity index 98% rename from openair-cn/S1AP/s1ap_eNB_ue_context.c rename to openair3/S1AP/s1ap_eNB_ue_context.c index 4588c4ade2..50df294dce 100644 --- a/openair-cn/S1AP/s1ap_eNB_ue_context.c +++ b/openair3/S1AP/s1ap_eNB_ue_context.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/S1AP/s1ap_eNB_ue_context.h b/openair3/S1AP/s1ap_eNB_ue_context.h similarity index 98% rename from openair-cn/S1AP/s1ap_eNB_ue_context.h rename to openair3/S1AP/s1ap_eNB_ue_context.h index a153fa1952..43c9d0e2c2 100644 --- a/openair-cn/S1AP/s1ap_eNB_ue_context.h +++ b/openair3/S1AP/s1ap_eNB_ue_context.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/TEST/MSC/COPYING b/openair3/SCTP/COPYING similarity index 100% rename from openair-cn/NAS/TEST/MSC/COPYING rename to openair3/SCTP/COPYING diff --git a/openair-cn/SCTP/sctp_common.c b/openair3/SCTP/sctp_common.c similarity index 78% rename from openair-cn/SCTP/sctp_common.c rename to openair3/SCTP/sctp_common.c index 5f29ef5c37..8e26679e6a 100644 --- a/openair-cn/SCTP/sctp_common.c +++ b/openair3/SCTP/sctp_common.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ /*! \file sctp_common.c * \brief eNB/MME SCTP related common procedures diff --git a/openair3/SCTP/sctp_common.h b/openair3/SCTP/sctp_common.h new file mode 100644 index 0000000000..bffc61a919 --- /dev/null +++ b/openair3/SCTP/sctp_common.h @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ + +/*! \file sctp_common.h + * \brief eNB/MME SCTP related common procedures + * \author Sebastien ROUX + * \date 2013 + * \version 1.0 + * @ingroup _sctp + */ + +#ifndef SCTP_COMMON_H_ +#define SCTP_COMMON_H_ + +#include +#include +#include + +#if defined(ENB_MODE) +# include "UTIL/LOG/log.h" +# define SCTP_ERROR(x, args...) LOG_E(SCTP, x, ##args) +# define SCTP_WARN(x, args...) LOG_W(SCTP, x, ##args) +# define SCTP_DEBUG(x, args...) LOG_I(SCTP, x, ##args) +#else +# define SCTP_ERROR(x, args...) do { fprintf(stderr, "[SCTP][E]"x, ##args); } while(0) +# define SCTP_DEBUG(x, args...) do { fprintf(stdout, "[SCTP][D]"x, ##args); } while(0) +# define SCTP_WARN(x, args...) do { fprintf(stdout, "[SCTP][W]"x, ##args); } while(0) +#endif + +int sctp_set_init_opt(int sd, uint16_t instreams, uint16_t outstreams, + uint16_t max_attempts, uint16_t init_timeout); + +int sctp_get_sockinfo(int sock, uint16_t *instream, uint16_t *outstream, + int32_t *assoc_id); + +int sctp_get_peeraddresses(int sock, struct sockaddr **remote_addr, + int *nb_remote_addresses); + +int sctp_get_localaddresses(int sock, struct sockaddr **local_addr, + int *nb_local_addresses); + +#endif /* SCTP_COMMON_H_ */ diff --git a/openair3/SCTP/sctp_default_values.h b/openair3/SCTP/sctp_default_values.h new file mode 100644 index 0000000000..4eaa4e88c2 --- /dev/null +++ b/openair3/SCTP/sctp_default_values.h @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#ifndef SCTP_DEFAULT_VALUES_H_ +#define SCTP_DEFAULT_VALUES_H_ + +#define SCTP_OUT_STREAMS (16) +#define SCTP_IN_STREAMS (16) +#define SCTP_MAX_ATTEMPTS (2) +#define SCTP_TIMEOUT (5) +#define SCTP_RECV_BUFFER_SIZE (1024) + +#endif /* SCTP_DEFAULT_VALUES_H_ */ diff --git a/openair-cn/SCTP/sctp_eNB_defs.h b/openair3/SCTP/sctp_eNB_defs.h similarity index 98% rename from openair-cn/SCTP/sctp_eNB_defs.h rename to openair3/SCTP/sctp_eNB_defs.h index 8f79d7f15f..6844b1be31 100644 --- a/openair-cn/SCTP/sctp_eNB_defs.h +++ b/openair3/SCTP/sctp_eNB_defs.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/SCTP/sctp_eNB_itti_messaging.c b/openair3/SCTP/sctp_eNB_itti_messaging.c similarity index 98% rename from openair-cn/SCTP/sctp_eNB_itti_messaging.c rename to openair3/SCTP/sctp_eNB_itti_messaging.c index 5f27f88759..6e26b2c56d 100644 --- a/openair-cn/SCTP/sctp_eNB_itti_messaging.c +++ b/openair3/SCTP/sctp_eNB_itti_messaging.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/SCTP/sctp_eNB_itti_messaging.h b/openair3/SCTP/sctp_eNB_itti_messaging.h similarity index 97% rename from openair-cn/SCTP/sctp_eNB_itti_messaging.h rename to openair3/SCTP/sctp_eNB_itti_messaging.h index 184c1b0095..37af2a9b19 100644 --- a/openair-cn/SCTP/sctp_eNB_itti_messaging.h +++ b/openair3/SCTP/sctp_eNB_itti_messaging.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/SCTP/sctp_eNB_task.c b/openair3/SCTP/sctp_eNB_task.c similarity index 99% rename from openair-cn/SCTP/sctp_eNB_task.c rename to openair3/SCTP/sctp_eNB_task.c index c9039f714d..c1e7d989e9 100644 --- a/openair-cn/SCTP/sctp_eNB_task.c +++ b/openair3/SCTP/sctp_eNB_task.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/SCTP/sctp_eNB_task.h b/openair3/SCTP/sctp_eNB_task.h similarity index 95% rename from openair-cn/SCTP/sctp_eNB_task.h rename to openair3/SCTP/sctp_eNB_task.h index 4397f7e42b..0953b63826 100644 --- a/openair-cn/SCTP/sctp_eNB_task.h +++ b/openair3/SCTP/sctp_eNB_task.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/SCTP/sctp_primitives_client.c b/openair3/SCTP/sctp_primitives_client.c similarity index 99% rename from openair-cn/SCTP/sctp_primitives_client.c rename to openair3/SCTP/sctp_primitives_client.c index b10848898d..762629d405 100644 --- a/openair-cn/SCTP/sctp_primitives_client.c +++ b/openair3/SCTP/sctp_primitives_client.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/SCTP/sctp_primitives_client.h b/openair3/SCTP/sctp_primitives_client.h similarity index 98% rename from openair-cn/SCTP/sctp_primitives_client.h rename to openair3/SCTP/sctp_primitives_client.h index 37d55ecb9f..89cf9f1db2 100644 --- a/openair-cn/SCTP/sctp_primitives_client.h +++ b/openair3/SCTP/sctp_primitives_client.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/TEST/NETWORK/COPYING b/openair3/SECU/COPYING similarity index 100% rename from openair-cn/NAS/TEST/NETWORK/COPYING rename to openair3/SECU/COPYING diff --git a/openair-cn/SECU/kdf.c b/openair3/SECU/kdf.c similarity index 97% rename from openair-cn/SECU/kdf.c rename to openair3/SECU/kdf.c index 35066d0b60..13bd680ccb 100644 --- a/openair-cn/SECU/kdf.c +++ b/openair3/SECU/kdf.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/SECU/key_nas_deriver.c b/openair3/SECU/key_nas_deriver.c similarity index 97% rename from openair-cn/SECU/key_nas_deriver.c rename to openair3/SECU/key_nas_deriver.c index c5c9d28266..6653d05ee7 100644 --- a/openair-cn/SECU/key_nas_deriver.c +++ b/openair3/SECU/key_nas_deriver.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/SECU/key_nas_encryption.c b/openair3/SECU/key_nas_encryption.c similarity index 97% rename from openair-cn/SECU/key_nas_encryption.c rename to openair3/SECU/key_nas_encryption.c index 4aeba21dec..70e6ed6895 100644 --- a/openair-cn/SECU/key_nas_encryption.c +++ b/openair3/SECU/key_nas_encryption.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/SECU/nas_stream_eea1.c b/openair3/SECU/nas_stream_eea1.c similarity index 98% rename from openair-cn/SECU/nas_stream_eea1.c rename to openair3/SECU/nas_stream_eea1.c index d658f6ecc7..4b69ae8231 100755 --- a/openair-cn/SECU/nas_stream_eea1.c +++ b/openair3/SECU/nas_stream_eea1.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/SECU/nas_stream_eea2.c b/openair3/SECU/nas_stream_eea2.c similarity index 97% rename from openair-cn/SECU/nas_stream_eea2.c rename to openair3/SECU/nas_stream_eea2.c index 6a98beb011..25ef340f4e 100644 --- a/openair-cn/SECU/nas_stream_eea2.c +++ b/openair3/SECU/nas_stream_eea2.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/SECU/nas_stream_eia1.c b/openair3/SECU/nas_stream_eia1.c similarity index 99% rename from openair-cn/SECU/nas_stream_eia1.c rename to openair3/SECU/nas_stream_eia1.c index 4442670e48..a0712754f6 100755 --- a/openair-cn/SECU/nas_stream_eia1.c +++ b/openair3/SECU/nas_stream_eia1.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/SECU/nas_stream_eia2.c b/openair3/SECU/nas_stream_eia2.c similarity index 98% rename from openair-cn/SECU/nas_stream_eia2.c rename to openair3/SECU/nas_stream_eia2.c index 8300bb3a68..f1f64dd90a 100644 --- a/openair-cn/SECU/nas_stream_eia2.c +++ b/openair3/SECU/nas_stream_eia2.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/SECU/rijndael.c b/openair3/SECU/rijndael.c similarity index 100% rename from openair-cn/SECU/rijndael.c rename to openair3/SECU/rijndael.c diff --git a/openair-cn/SECU/rijndael.h b/openair3/SECU/rijndael.h similarity index 95% rename from openair-cn/SECU/rijndael.h rename to openair3/SECU/rijndael.h index 23c06b2b50..8014e828ef 100644 --- a/openair-cn/SECU/rijndael.h +++ b/openair3/SECU/rijndael.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/SECU/secu_defs.h b/openair3/SECU/secu_defs.h similarity index 98% rename from openair-cn/SECU/secu_defs.h rename to openair3/SECU/secu_defs.h index 50fcfc7a0e..0f27d8d309 100644 --- a/openair-cn/SECU/secu_defs.h +++ b/openair3/SECU/secu_defs.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/SECU/snow3g.c b/openair3/SECU/snow3g.c similarity index 99% rename from openair-cn/SECU/snow3g.c rename to openair3/SECU/snow3g.c index 6983f98ee0..78184af9c1 100644 --- a/openair-cn/SECU/snow3g.c +++ b/openair3/SECU/snow3g.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/SECU/snow3g.h b/openair3/SECU/snow3g.h similarity index 97% rename from openair-cn/SECU/snow3g.h rename to openair3/SECU/snow3g.h index 71a86e1784..d278db2dcf 100644 --- a/openair-cn/SECU/snow3g.h +++ b/openair3/SECU/snow3g.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/NAS/TEST/USER/COPYING b/openair3/TEST/COPYING similarity index 100% rename from openair-cn/NAS/TEST/USER/COPYING rename to openair3/TEST/COPYING diff --git a/openair3/TEST/EPC_TEST/TEST_1MME_1ENB_1UE_ATTACH_GUTI/enb1.conf b/openair3/TEST/EPC_TEST/TEST_1MME_1ENB_1UE_ATTACH_GUTI/enb1.conf new file mode 100755 index 0000000000..bd9014670e --- /dev/null +++ b/openair3/TEST/EPC_TEST/TEST_1MME_1ENB_1UE_ATTACH_GUTI/enb1.conf @@ -0,0 +1,169 @@ +Active_eNBs = ( "eNB_Eurecom_LTEBox"); +# Asn1_verbosity, choice in: none, info, annoying +Asn1_verbosity = "none"; + +eNBs = +( + { + ////////// Identification parameters: + eNB_ID = 0xe00; + + cell_type = "CELL_MACRO_ENB"; + + eNB_name = "eNB_Eurecom_LTEBox"; + + // Tracking area code, 0x0000 and 0xfffe are reserved values + tracking_area_code = "1"; + + mobile_country_code = "208"; + mobile_network_code = "95"; + + ////////// Physical parameters: + + component_carriers = ( + { + frame_type = "FDD"; + tdd_config = 3; + tdd_config_s = 0; + prefix_type = "NORMAL"; + eutra_band = 7; + downlink_frequency = 2660000000L; + uplink_frequency_offset = -120000000; + Nid_cell = 0; + N_RB_DL = 25; + Nid_cell_mbsfn = 0; + nb_antennas_tx = 1; + nb_antennas_rx = 1; + tx_gain = 90; + rx_gain = 120; + prach_root = 0; + prach_config_index = 0; + prach_high_speed = "DISABLE"; + prach_zero_correlation = 1; + prach_freq_offset = 2; + pucch_delta_shift = 1; + pucch_nRB_CQI = 1; + pucch_nCS_AN = 0; + pucch_n1_AN = 32; + pdsch_referenceSignalPower = -26; + pdsch_p_b = 0; + pusch_n_SB = 1; + pusch_enable64QAM = "DISABLE"; + pusch_hoppingMode = "interSubFrame"; + pusch_hoppingOffset = 0; + pusch_groupHoppingEnabled = "ENABLE"; + pusch_groupAssignment = 0; + pusch_sequenceHoppingEnabled = "DISABLE"; + pusch_nDMRS1 = 1; + phich_duration = "NORMAL"; + phich_resource = "ONESIXTH"; + srs_enable = "DISABLE"; + /* srs_BandwidthConfig =; + srs_SubframeConfig =; + srs_ackNackST =; + srs_MaxUpPts =;*/ + + pusch_p0_Nominal = -90; + pusch_alpha = "AL1"; + pucch_p0_Nominal = -108; + msg3_delta_Preamble = 6; + pucch_deltaF_Format1 = "deltaF2"; + pucch_deltaF_Format1b = "deltaF3"; + pucch_deltaF_Format2 = "deltaF0"; + pucch_deltaF_Format2a = "deltaF0"; + pucch_deltaF_Format2b = "deltaF0"; + + rach_numberOfRA_Preambles = 64; + rach_preamblesGroupAConfig = "DISABLE"; + /* + rach_sizeOfRA_PreamblesGroupA = ; + rach_messageSizeGroupA = ; + rach_messagePowerOffsetGroupB = ; + */ + rach_powerRampingStep = 4; + rach_preambleInitialReceivedTargetPower = -108; + rach_preambleTransMax = 10; + rach_raResponseWindowSize = 10; + rach_macContentionResolutionTimer = 48; + rach_maxHARQ_Msg3Tx = 4; + + pcch_default_PagingCycle = 128; + pcch_nB = "oneT"; + bcch_modificationPeriodCoeff = 2; + ue_TimersAndConstants_t300 = 1000; + ue_TimersAndConstants_t301 = 1000; + ue_TimersAndConstants_t310 = 1000; + ue_TimersAndConstants_t311 = 10000; + ue_TimersAndConstants_n310 = 20; + ue_TimersAndConstants_n311 = 1; + } + ); + + + srb1_parameters : + { + # timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500] + timer_poll_retransmit = 80; + + # timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200] + timer_reordering = 35; + + # timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500] + timer_status_prohibit = 0; + + # poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)] + poll_pdu = 4; + + # poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)] + poll_byte = 99999; + + # max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32] + max_retx_threshold = 4; + } + + # ------- SCTP definitions + SCTP : + { + # Number of streams to use in input/output + SCTP_INSTREAMS = 2; + SCTP_OUTSTREAMS = 2; + }; + + ////////// MME parameters: + mme_ip_address = ( { ipv4 = "192.168.12.17"; + ipv6 = "192:168:30::17"; + active = "yes"; + preference = "ipv4"; + } + ); + + NETWORK_INTERFACES : + { + ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; + ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.213/24"; + + ENB_INTERFACE_NAME_FOR_S1U = "eth0"; + ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.213/24"; + ENB_PORT_FOR_S1U = 2152; # Spec 2152 + }; + + log_config : + { + global_log_level ="debug"; + global_log_verbosity ="medium"; + hw_log_level ="info"; + hw_log_verbosity ="medium"; + phy_log_level ="info"; + phy_log_verbosity ="medium"; + mac_log_level ="info"; + mac_log_verbosity ="high"; + rlc_log_level ="info"; + rlc_log_verbosity ="medium"; + pdcp_log_level ="info"; + pdcp_log_verbosity ="medium"; + rrc_log_level ="info"; + rrc_log_verbosity ="medium"; + }; + + } +); diff --git a/openair3/TEST/EPC_TEST/TEST_1MME_1ENB_1UE_ATTACH_GUTI/trace.pdml b/openair3/TEST/EPC_TEST/TEST_1MME_1ENB_1UE_ATTACH_GUTI/trace.pdml new file mode 100644 index 0000000000..d2d2598de6 --- /dev/null +++ b/openair3/TEST/EPC_TEST/TEST_1MME_1ENB_1UE_ATTACH_GUTI/trace.pdml @@ -0,0 +1,4411 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/openair3/TEST/EPC_TEST/generate_scenario.c b/openair3/TEST/EPC_TEST/generate_scenario.c new file mode 100644 index 0000000000..bd181ce878 --- /dev/null +++ b/openair3/TEST/EPC_TEST/generate_scenario.c @@ -0,0 +1,451 @@ +/******************************************************************************* + OpenAirInterface + Copyright(c) 1999 - 2014 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 . + + Contact Information + OpenAirInterface Admin: openair_admin@eurecom.fr + OpenAirInterface Tech : openair_tech@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr + + Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE + + *******************************************************************************/ + +/* + generate_scenario.c + ------------------- + AUTHOR : Lionel GAUTHIER + COMPANY : EURECOM + EMAIL : Lionel.Gauthier@eurecom.fr + */ + +#include +#include +#include +#include + +#include "assertions.h" +#include "enb_config.h" +#include "s1ap_eNB.h" +#if defined(ENABLE_ITTI) +# include "intertask_interface.h" +#endif + +#define EPC_TEST_SCENARIO_MAX_ENB 2 + +#define ENB_CONFIG_STRING_ACTIVE_ENBS "Active_eNBs" + +#define ENB_CONFIG_STRING_ENB_LIST "eNBs" +#define ENB_CONFIG_STRING_ENB_ID "eNB_ID" +#define ENB_CONFIG_STRING_CELL_TYPE "cell_type" +#define ENB_CONFIG_STRING_ENB_NAME "eNB_name" + +#define ENB_CONFIG_STRING_TRACKING_AREA_CODE "tracking_area_code" +#define ENB_CONFIG_STRING_MOBILE_COUNTRY_CODE "mobile_country_code" +#define ENB_CONFIG_STRING_MOBILE_NETWORK_CODE "mobile_network_code" + + +#define ENB_CONFIG_STRING_MME_IP_ADDRESS "mme_ip_address" +#define ENB_CONFIG_STRING_MME_IPV4_ADDRESS "ipv4" +#define ENB_CONFIG_STRING_MME_IPV6_ADDRESS "ipv6" +#define ENB_CONFIG_STRING_MME_IP_ADDRESS_ACTIVE "active" +#define ENB_CONFIG_STRING_MME_IP_ADDRESS_PREFERENCE "preference" + +#define ENB_CONFIG_STRING_SCTP_CONFIG "SCTP" +#define ENB_CONFIG_STRING_SCTP_INSTREAMS "SCTP_INSTREAMS" +#define ENB_CONFIG_STRING_SCTP_OUTSTREAMS "SCTP_OUTSTREAMS" + +#define ENB_CONFIG_STRING_NETWORK_INTERFACES_CONFIG "NETWORK_INTERFACES" +#define ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1_MME "ENB_INTERFACE_NAME_FOR_S1_MME" +#define ENB_CONFIG_STRING_ENB_IPV4_ADDRESS_FOR_S1_MME "ENB_IPV4_ADDRESS_FOR_S1_MME" +#define ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1U "ENB_INTERFACE_NAME_FOR_S1U" +#define ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_S1U "ENB_IPV4_ADDRESS_FOR_S1U" +#define ENB_CONFIG_STRING_ENB_PORT_FOR_S1U "ENB_PORT_FOR_S1U" + + +Enb_properties_array_t g_enb_properties; + +//------------------------------------------------------------------------------ +static void enb_config_display(void) +//------------------------------------------------------------------------------ +{ + int i,j; + + printf( "\n----------------------------------------------------------------------\n"); + printf( " ENB CONFIG FILE CONTENT LOADED (TBC):\n"); + printf( "----------------------------------------------------------------------\n"); + for (i = 0; i < g_enb_properties.number; i++) { + printf( "ENB CONFIG for instance %u:\n\n", i); + printf( "\teNB name: \t%s:\n",g_enb_properties.properties[i]->eNB_name); + printf( "\teNB ID: \t%"PRIu32":\n",g_enb_properties.properties[i]->eNB_id); + printf( "\tCell type: \t%s:\n",g_enb_properties.properties[i]->cell_type == CELL_MACRO_ENB ? "CELL_MACRO_ENB":"CELL_HOME_ENB"); + printf( "\tTAC: \t%"PRIu16":\n",g_enb_properties.properties[i]->tac); + printf( "\tMCC: \t%"PRIu16":\n",g_enb_properties.properties[i]->mcc); + + if (g_enb_properties.properties[i]->mnc_digit_length == 3) { + printf( "\tMNC: \t%03"PRIu16":\n",g_enb_properties.properties[i]->mnc); + } else { + printf( "\tMNC: \t%02"PRIu16":\n",g_enb_properties.properties[i]->mnc); + } + printf( "\n--------------------------------------------------------\n"); + } +} + + +#ifdef LIBCONFIG_LONG +#define libconfig_int long +#else +#define libconfig_int int +#endif +//------------------------------------------------------------------------------ +const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) +//------------------------------------------------------------------------------ +{ + config_t cfg; + config_setting_t *setting = NULL; + config_setting_t *subsetting = NULL; + config_setting_t *setting_srb1 = NULL; + config_setting_t *setting_mme_addresses = NULL; + config_setting_t *setting_mme_address = NULL; + config_setting_t *setting_enb = NULL; + int num_enb_properties = 0; + int enb_properties_index = 0; + int num_enbs = 0; + int num_mme_address = 0; + int num_otg_elements =0; + int num_component_carriers =0; + int i = 0; + int j = 0; + int parse_errors = 0; + libconfig_int enb_id = 0; + const char* cell_type = NULL; + const char* tac = 0; + const char* enb_name = NULL; + const char* mcc = 0; + const char* mnc = 0; + const char* frame_type = NULL; + const char* prefix_type = NULL; + libconfig_int Nid_cell = 0; + + libconfig_int my_int; + + char* ipv4 = NULL; + char* ipv6 = NULL; + char* active = NULL; + char* preference = NULL; + const char* active_enb[EPC_TEST_SCENARIO_MAX_ENB]; + char* enb_interface_name_for_S1U = NULL; + char* enb_ipv4_address_for_S1U = NULL; + libconfig_int enb_port_for_S1U = 0; + char* enb_interface_name_for_S1_MME = NULL; + char* enb_ipv4_address_for_S1_MME = NULL; + char *address = NULL; + char *cidr = NULL; + char *astring = NULL; + + memset((char*)active_enb, 0 , EPC_TEST_SCENARIO_MAX_ENB * sizeof(char*)); + + config_init(&cfg); + + if (lib_config_file_name_pP != NULL) { + /* Read the file. If there is an error, report it and exit. */ + if (! config_read_file(&cfg, lib_config_file_name_pP)) { + config_destroy(&cfg); + AssertFatal (0, "Failed to parse eNB configuration file %s!\n", lib_config_file_name_pP); + } + } else { + config_destroy(&cfg); + AssertFatal (0, "No eNB configuration file provided!\n"); + } + + // Get list of active eNBs, (only these will be configured) + setting = config_lookup(&cfg, ENB_CONFIG_STRING_ACTIVE_ENBS); + + if (setting != NULL) { + num_enbs = config_setting_length(setting); + + for (i = 0; i < num_enbs; i++) { + setting_enb = config_setting_get_elem(setting, i); + active_enb[i] = config_setting_get_string (setting_enb); + AssertFatal (active_enb[i] != NULL, + "Failed to parse config file %s, %uth attribute %s \n", + lib_config_file_name_pP, i, ENB_CONFIG_STRING_ACTIVE_ENBS); + active_enb[i] = strdup(active_enb[i]); + num_enb_properties += 1; + } + } + + /* Output a list of all eNBs. */ + setting = config_lookup(&cfg, ENB_CONFIG_STRING_ENB_LIST); + + if (setting != NULL) { + enb_properties_index = 0; + parse_errors = 0; + num_enbs = config_setting_length(setting); + + for (i = 0; i < num_enbs; i++) { + setting_enb = config_setting_get_elem(setting, i); + + if (! config_setting_lookup_int(setting_enb, ENB_CONFIG_STRING_ENB_ID, &enb_id)) { + /* Calculate a default eNB ID */ +# if defined(ENABLE_USE_MME) + uint32_t hash; + + hash = s1ap_generate_eNB_id (); + enb_id = i + (hash & 0xFFFF8); +# else + enb_id = i; +# endif + } + + if ( !( config_setting_lookup_string(setting_enb, ENB_CONFIG_STRING_CELL_TYPE, &cell_type) + && config_setting_lookup_string(setting_enb, ENB_CONFIG_STRING_ENB_NAME, &enb_name) + && config_setting_lookup_string(setting_enb, ENB_CONFIG_STRING_TRACKING_AREA_CODE, &tac) + && config_setting_lookup_string(setting_enb, ENB_CONFIG_STRING_MOBILE_COUNTRY_CODE, &mcc) + && config_setting_lookup_string(setting_enb, ENB_CONFIG_STRING_MOBILE_NETWORK_CODE, &mnc) + + + ) + ) { + AssertError (0, parse_errors ++, + "Failed to parse eNB configuration file %s, %u th enb\n", + lib_config_file_name_pP, i); + continue; // FIXME this prevents segfaults below, not sure what happens after function exit + } + + // search if in active list + for (j=0; j < num_enb_properties; j++) { + if (strcmp(active_enb[j], enb_name) == 0) { + g_enb_properties.properties[enb_properties_index] = calloc(1, sizeof(Enb_properties_t)); + + g_enb_properties.properties[enb_properties_index]->eNB_id = enb_id; + + if (strcmp(cell_type, "CELL_MACRO_ENB") == 0) { + g_enb_properties.properties[enb_properties_index]->cell_type = CELL_MACRO_ENB; + } else if (strcmp(cell_type, "CELL_HOME_ENB") == 0) { + g_enb_properties.properties[enb_properties_index]->cell_type = CELL_HOME_ENB; + } else { + AssertError (0, parse_errors ++, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for cell_type choice: CELL_MACRO_ENB or CELL_HOME_ENB !\n", + lib_config_file_name_pP, i, cell_type); + } + + g_enb_properties.properties[enb_properties_index]->eNB_name = strdup(enb_name); + g_enb_properties.properties[enb_properties_index]->tac = (uint16_t)atoi(tac); + g_enb_properties.properties[enb_properties_index]->mcc = (uint16_t)atoi(mcc); + g_enb_properties.properties[enb_properties_index]->mnc = (uint16_t)atoi(mnc); + g_enb_properties.properties[enb_properties_index]->mnc_digit_length = strlen(mnc); + AssertFatal((g_enb_properties.properties[enb_properties_index]->mnc_digit_length == 2) || + (g_enb_properties.properties[enb_properties_index]->mnc_digit_length == 3), + "BAD MNC DIGIT LENGTH %d", + g_enb_properties.properties[i]->mnc_digit_length); + + + setting_mme_addresses = config_setting_get_member (setting_enb, ENB_CONFIG_STRING_MME_IP_ADDRESS); + num_mme_address = config_setting_length(setting_mme_addresses); + g_enb_properties.properties[enb_properties_index]->nb_mme = 0; + + for (j = 0; j < num_mme_address; j++) { + setting_mme_address = config_setting_get_elem(setting_mme_addresses, j); + + if ( !( + config_setting_lookup_string(setting_mme_address, ENB_CONFIG_STRING_MME_IPV4_ADDRESS, (const char **)&ipv4) + && config_setting_lookup_string(setting_mme_address, ENB_CONFIG_STRING_MME_IPV6_ADDRESS, (const char **)&ipv6) + && config_setting_lookup_string(setting_mme_address, ENB_CONFIG_STRING_MME_IP_ADDRESS_ACTIVE, (const char **)&active) + && config_setting_lookup_string(setting_mme_address, ENB_CONFIG_STRING_MME_IP_ADDRESS_PREFERENCE, (const char **)&preference) + ) + ) { + AssertError (0, parse_errors ++, + "Failed to parse eNB configuration file %s, %u th enb %u th mme address !\n", + lib_config_file_name_pP, i, j); + continue; // FIXME will prevent segfaults below, not sure what happens at function exit... + } + + g_enb_properties.properties[enb_properties_index]->nb_mme += 1; + + g_enb_properties.properties[enb_properties_index]->mme_ip_address[j].ipv4_address = strdup(ipv4); + g_enb_properties.properties[enb_properties_index]->mme_ip_address[j].ipv6_address = strdup(ipv6); + + if (strcmp(active, "yes") == 0) { + g_enb_properties.properties[enb_properties_index]->mme_ip_address[j].active = 1; + } // else { (calloc) + + if (strcmp(preference, "ipv4") == 0) { + g_enb_properties.properties[enb_properties_index]->mme_ip_address[j].ipv4 = 1; + } else if (strcmp(preference, "ipv6") == 0) { + g_enb_properties.properties[enb_properties_index]->mme_ip_address[j].ipv6 = 1; + } else if (strcmp(preference, "no") == 0) { + g_enb_properties.properties[enb_properties_index]->mme_ip_address[j].ipv4 = 1; + g_enb_properties.properties[enb_properties_index]->mme_ip_address[j].ipv6 = 1; + } + } + + + // NETWORK_INTERFACES + subsetting = config_setting_get_member (setting_enb, ENB_CONFIG_STRING_NETWORK_INTERFACES_CONFIG); + + if (subsetting != NULL) { + if ( ( + config_setting_lookup_string( subsetting, ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1_MME, + (const char **)&enb_interface_name_for_S1_MME) + && config_setting_lookup_string( subsetting, ENB_CONFIG_STRING_ENB_IPV4_ADDRESS_FOR_S1_MME, + (const char **)&enb_ipv4_address_for_S1_MME) + && config_setting_lookup_string( subsetting, ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1U, + (const char **)&enb_interface_name_for_S1U) + && config_setting_lookup_string( subsetting, ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_S1U, + (const char **)&enb_ipv4_address_for_S1U) + && config_setting_lookup_int(subsetting, ENB_CONFIG_STRING_ENB_PORT_FOR_S1U, + &enb_port_for_S1U) + ) + ) { + g_enb_properties.properties[enb_properties_index]->enb_interface_name_for_S1U = strdup(enb_interface_name_for_S1U); + cidr = enb_ipv4_address_for_S1U; + address = strtok(cidr, "/"); + + if (address) { + IPV4_STR_ADDR_TO_INT_NWBO ( address, g_enb_properties.properties[enb_properties_index]->enb_ipv4_address_for_S1U, "BAD IP ADDRESS FORMAT FOR eNB S1_U !\n" ); + } + + g_enb_properties.properties[enb_properties_index]->enb_port_for_S1U = enb_port_for_S1U; + + g_enb_properties.properties[enb_properties_index]->enb_interface_name_for_S1_MME = strdup(enb_interface_name_for_S1_MME); + cidr = enb_ipv4_address_for_S1_MME; + address = strtok(cidr, "/"); + + if (address) { + IPV4_STR_ADDR_TO_INT_NWBO ( address, g_enb_properties.properties[enb_properties_index]->enb_ipv4_address_for_S1_MME, "BAD IP ADDRESS FORMAT FOR eNB S1_MME !\n" ); + } + } + } + } + } + } + } + + g_enb_properties.number = num_enb_properties; + + AssertError (enb_properties_index == num_enb_properties, parse_errors ++, + "Failed to parse eNB configuration file %s, mismatch between %u active eNBs and %u corresponding defined eNBs !\n", + lib_config_file_name_pP, num_enb_properties, enb_properties_index); + + AssertFatal (parse_errors == 0, + "Failed to parse eNB configuration file %s, found %d error%s !\n", + lib_config_file_name_pP, parse_errors, parse_errors > 1 ? "s" : ""); + enb_config_display(); + return &g_enb_properties; + +} + +//------------------------------------------------------------------------------ +const Enb_properties_array_t *enb_config_get(void) +//------------------------------------------------------------------------------ +{ + return &g_enb_properties; +} + + +//------------------------------------------------------------------------------ +static void usage ( + int argc, + char *argv[]) +//------------------------------------------------------------------------------ +{ + fprintf (stdout, "Please report any bug to: openair4g-devel@lists.eurecom.fr\n\n"); + fprintf (stdout, "Usage: %s [options]\n\n", argv[0]); + fprintf (stdout, "Available options:\n"); + fprintf (stdout, "\t--help, -h Print this help and return\n"); + fprintf (stdout, "\t--test-dir \n"); + fprintf (stdout, " Set the test directory where pdml and original enb(s) config files are located\n"); + fprintf (stdout, " See README in openair3/TEST/EPC_TEST\n"); + fprintf (stdout, "\t--new-enb-conf-file \n"); + fprintf (stdout, " Provide an updated eNB config file for generating a copy of the original test\n"); + fprintf (stdout, " This option is set as many times as there are some eNB in the original test\n"); +} + + +//------------------------------------------------------------------------------ +int +config_parse_opt_line ( + int argc, + char *argv[]) +//------------------------------------------------------------------------------ +{ + int option; + char *enb_config_file_name = NULL; + char *test_dir = NULL; + + enum long_option_e { + LONG_OPTION_START = 0x100, /* Start after regular single char options */ + LONG_OPTION_TEST_DIR, + LONG_OPTION_NEW_ENB_CONF_FILE, + LONG_OPTION_HELP, + }; + + static struct option long_options[] = { + {"test-dir", required_argument, 0, LONG_OPTION_TEST_DIR}, + {"new-enb-conf-file", required_argument, 0, LONG_OPTION_NEW_ENB_CONF_FILE}, + {"help", required_argument, 0, LONG_OPTION_HELP}, + {NULL, 0, NULL, 0} + }; + + /* + * Parsing command line + */ + while ((option = getopt_long (argc, argv, "h", long_options, NULL)) != -1) { + switch (option) { + case LONG_OPTION_TEST_DIR: + if (optarg) { + test_dir = strdup(optarg); + printf("TEST DIRECTORY IS %s\n", test_dir); + } + break; + + case LONG_OPTION_NEW_ENB_CONF_FILE: + if (optarg) { + enb_config_file_name = strdup(optarg); + printf("eNB config file name is %s\n", enb_config_file_name); + enb_config_init(enb_config_file_name); + } + break; + + if (optarg) { + test_dir = strdup(optarg); + printf("TEST DIRECTORY IS %s\n", test_dir); + } + break; + + case LONG_OPTION_HELP: + case 'h': /* Fall through */ + default: + usage (argc, argv); + exit (0); + } + } + return 0; +} + +//------------------------------------------------------------------------------ +int main( int argc, char **argv ) +//------------------------------------------------------------------------------ +{ + memset((char*) &g_enb_properties, 0 , sizeof(g_enb_properties)); + config_parse_opt_line (argc, argv); //Command-line options + + return 0; +} diff --git a/openair-cn/TEST/mme_test_s1_generate_scenario_from_pcap b/openair3/TEST/EPC_TEST/mme_test_s1_pcap2pdml similarity index 71% rename from openair-cn/TEST/mme_test_s1_generate_scenario_from_pcap rename to openair3/TEST/EPC_TEST/mme_test_s1_pcap2pdml index 247814f553..b0a77e60f5 100755 --- a/openair-cn/TEST/mme_test_s1_generate_scenario_from_pcap +++ b/openair3/TEST/EPC_TEST/mme_test_s1_pcap2pdml @@ -9,8 +9,8 @@ from datetime import date import os, errno import argparse import tempfile +from lxml import etree from xml.dom.minidom import parse, parseString -#from xml.etree.ElementTree import ElementTree ##################### # program arguments @@ -26,8 +26,6 @@ orig_pcap_file_name = args.pcap_file.strip() orig_pdml_string = subprocess.check_output(["tshark", '-T', 'pdml', '-r', orig_pcap_file_name]) orig_dom = parseString(orig_pdml_string) -#orig_etree = ElementTree() -#orig_etree.parse(orig_pcap_pdml_file.name) ##################### # filtering unwanted packets @@ -49,7 +47,7 @@ for packet in packets: packet.removeChild(proto) elif urlnode.nodeValue == 'eth': packet.removeChild(proto) - if found_s1ap == False: + if found_sctp == False: # hopefully it seems to work (remove iterated packet) packet.parentNode.removeChild(packet) @@ -67,10 +65,28 @@ for line in lines: cleaned_pdml_string += line + '\r\n' #print "'%s'" % cleaned_pdml_string ##################### -# write xml string to pdml file +# write pdml string to pdml file ##################### out_pdml_file_name = os.path.dirname(orig_pcap_file_name) + os.path.splitext(os.path.basename(orig_pcap_file_name))[0] + '.pdml' out_file = open(out_pdml_file_name, "w") out_file.write(cleaned_pdml_string) out_file.close() +############################################################ +# DECEIVING HTML BONUS: DO NOT SEEM TO WORK CORRECTLY IN FIREFOX +# DID NOT INVESTIGATE +##################### +# write xml string to html file +##################### +xsl_root = etree.fromstring(open('/usr/share/wireshark/pdml2html.xsl').read()) +transform = etree.XSLT(xsl_root) +xml_root = etree.fromstring(cleaned_pdml_string) +trans_root = transform(xml_root) +filtered_html_string = etree.tostring(trans_root) +##################### +# write html string to html file +##################### +out_html_file_name = os.path.dirname(orig_pcap_file_name) + os.path.splitext(os.path.basename(orig_pcap_file_name))[0] + '.html' +out_file = open(out_html_file_name, "w") +out_file.write(filtered_html_string) +out_file.close() diff --git a/openair-cn/TEST/Makefile.am b/openair3/TEST/Makefile.am similarity index 98% rename from openair-cn/TEST/Makefile.am rename to openair3/TEST/Makefile.am index 29aca6ce15..7bc55fe600 100644 --- a/openair-cn/TEST/Makefile.am +++ b/openair3/TEST/Makefile.am @@ -21,7 +21,7 @@ # Contact Information # OpenAirInterface Admin: openair_admin@eurecom.fr # OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr +# OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr # # Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. # diff --git a/openair-cn/TEST/oaisim_mme_client_test.c b/openair3/TEST/oaisim_mme_client_test.c similarity index 98% rename from openair-cn/TEST/oaisim_mme_client_test.c rename to openair3/TEST/oaisim_mme_client_test.c index 6fe0329d8f..b2eea62424 100644 --- a/openair-cn/TEST/oaisim_mme_client_test.c +++ b/openair3/TEST/oaisim_mme_client_test.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/TEST/oaisim_mme_itti_test.c b/openair3/TEST/oaisim_mme_itti_test.c similarity index 98% rename from openair-cn/TEST/oaisim_mme_itti_test.c rename to openair3/TEST/oaisim_mme_itti_test.c index 599a089d8c..06fb3e191c 100644 --- a/openair-cn/TEST/oaisim_mme_itti_test.c +++ b/openair3/TEST/oaisim_mme_itti_test.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/TEST/oaisim_mme_list_benchmark.c b/openair3/TEST/oaisim_mme_list_benchmark.c similarity index 99% rename from openair-cn/TEST/oaisim_mme_list_benchmark.c rename to openair3/TEST/oaisim_mme_list_benchmark.c index 5396a151bc..8aaf8d1ddd 100644 --- a/openair-cn/TEST/oaisim_mme_list_benchmark.c +++ b/openair3/TEST/oaisim_mme_list_benchmark.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/TEST/oaisim_mme_s1ap_test.c b/openair3/TEST/oaisim_mme_s1ap_test.c similarity index 99% rename from openair-cn/TEST/oaisim_mme_s1ap_test.c rename to openair3/TEST/oaisim_mme_s1ap_test.c index d03e1bbed6..af3585ded0 100644 --- a/openair-cn/TEST/oaisim_mme_s1ap_test.c +++ b/openair3/TEST/oaisim_mme_s1ap_test.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/TEST/oaisim_mme_sctp_test.c b/openair3/TEST/oaisim_mme_sctp_test.c similarity index 97% rename from openair-cn/TEST/oaisim_mme_sctp_test.c rename to openair3/TEST/oaisim_mme_sctp_test.c index 8dd5b192b8..4c433c8bf3 100644 --- a/openair-cn/TEST/oaisim_mme_sctp_test.c +++ b/openair3/TEST/oaisim_mme_sctp_test.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/TEST/oaisim_mme_test_s1c.c b/openair3/TEST/oaisim_mme_test_s1c.c similarity index 99% rename from openair-cn/TEST/oaisim_mme_test_s1c.c rename to openair3/TEST/oaisim_mme_test_s1c.c index 0f1d1e6428..d7af00086b 100644 --- a/openair-cn/TEST/oaisim_mme_test_s1c.c +++ b/openair3/TEST/oaisim_mme_test_s1c.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair-cn/TEST/oaisim_mme_test_s1c.h b/openair3/TEST/oaisim_mme_test_s1c.h similarity index 96% rename from openair-cn/TEST/oaisim_mme_test_s1c.h rename to openair3/TEST/oaisim_mme_test_s1c.h index af59dd1a23..0927ab6ad6 100644 --- a/openair-cn/TEST/oaisim_mme_test_s1c.h +++ b/openair3/TEST/oaisim_mme_test_s1c.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair-cn/TEST/oaisim_mme_test_s1c_s1ap.c b/openair3/TEST/oaisim_mme_test_s1c_s1ap.c similarity index 99% rename from openair-cn/TEST/oaisim_mme_test_s1c_s1ap.c rename to openair3/TEST/oaisim_mme_test_s1c_s1ap.c index a46c8fa6b4..836a54b42f 100755 --- a/openair-cn/TEST/oaisim_mme_test_s1c_s1ap.c +++ b/openair3/TEST/oaisim_mme_test_s1c_s1ap.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair-cn/TEST/oaisim_mme_test_s1c_s1ap.h b/openair3/TEST/oaisim_mme_test_s1c_s1ap.h similarity index 97% rename from openair-cn/TEST/oaisim_mme_test_s1c_s1ap.h rename to openair3/TEST/oaisim_mme_test_s1c_s1ap.h index 3e3c186d19..a4570b97bc 100755 --- a/openair-cn/TEST/oaisim_mme_test_s1c_s1ap.h +++ b/openair3/TEST/oaisim_mme_test_s1c_s1ap.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair-cn/TEST/oaisim_mme_test_s1c_scenario.c b/openair3/TEST/oaisim_mme_test_s1c_scenario.c similarity index 99% rename from openair-cn/TEST/oaisim_mme_test_s1c_scenario.c rename to openair3/TEST/oaisim_mme_test_s1c_scenario.c index 416ac99904..1cf9208870 100755 --- a/openair-cn/TEST/oaisim_mme_test_s1c_scenario.c +++ b/openair3/TEST/oaisim_mme_test_s1c_scenario.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair-cn/TEST/oaisim_mme_test_s1c_scenario.h b/openair3/TEST/oaisim_mme_test_s1c_scenario.h similarity index 97% rename from openair-cn/TEST/oaisim_mme_test_s1c_scenario.h rename to openair3/TEST/oaisim_mme_test_s1c_scenario.h index 25bbdb9c87..6187f02d7f 100644 --- a/openair-cn/TEST/oaisim_mme_test_s1c_scenario.h +++ b/openair3/TEST/oaisim_mme_test_s1c_scenario.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair-cn/TEST/oaisim_mme_test_s1c_scenario1.c b/openair3/TEST/oaisim_mme_test_s1c_scenario1.c similarity index 99% rename from openair-cn/TEST/oaisim_mme_test_s1c_scenario1.c rename to openair3/TEST/oaisim_mme_test_s1c_scenario1.c index 93d7e5fedf..3fc1fbad7b 100644 --- a/openair-cn/TEST/oaisim_mme_test_s1c_scenario1.c +++ b/openair3/TEST/oaisim_mme_test_s1c_scenario1.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/openair-cn/TEST/test_aes128_cmac_encrypt.c b/openair3/TEST/test_aes128_cmac_encrypt.c similarity index 97% rename from openair-cn/TEST/test_aes128_cmac_encrypt.c rename to openair3/TEST/test_aes128_cmac_encrypt.c index af5b864f67..22eb244579 100644 --- a/openair-cn/TEST/test_aes128_cmac_encrypt.c +++ b/openair3/TEST/test_aes128_cmac_encrypt.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/TEST/test_aes128_ctr_decrypt.c b/openair3/TEST/test_aes128_ctr_decrypt.c similarity index 98% rename from openair-cn/TEST/test_aes128_ctr_decrypt.c rename to openair3/TEST/test_aes128_ctr_decrypt.c index c33fc36241..f3740b48ff 100644 --- a/openair-cn/TEST/test_aes128_ctr_decrypt.c +++ b/openair3/TEST/test_aes128_ctr_decrypt.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/TEST/test_aes128_ctr_encrypt.c b/openair3/TEST/test_aes128_ctr_encrypt.c similarity index 98% rename from openair-cn/TEST/test_aes128_ctr_encrypt.c rename to openair3/TEST/test_aes128_ctr_encrypt.c index 6558e49792..a089ac549d 100644 --- a/openair-cn/TEST/test_aes128_ctr_encrypt.c +++ b/openair3/TEST/test_aes128_ctr_encrypt.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/TEST/test_kdf.c b/openair3/TEST/test_kdf.c similarity index 98% rename from openair-cn/TEST/test_kdf.c rename to openair3/TEST/test_kdf.c index 414520b651..2a66527773 100644 --- a/openair-cn/TEST/test_kdf.c +++ b/openair3/TEST/test_kdf.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/TEST/test_s1ap.c b/openair3/TEST/test_s1ap.c similarity index 99% rename from openair-cn/TEST/test_s1ap.c rename to openair3/TEST/test_s1ap.c index d6413f1341..e070e7018d 100644 --- a/openair-cn/TEST/test_s1ap.c +++ b/openair3/TEST/test_s1ap.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/TEST/test_secu.c b/openair3/TEST/test_secu.c similarity index 97% rename from openair-cn/TEST/test_secu.c rename to openair3/TEST/test_secu.c index 316d90c825..ac3788eebd 100644 --- a/openair-cn/TEST/test_secu.c +++ b/openair3/TEST/test_secu.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/TEST/test_secu_kenb.c b/openair3/TEST/test_secu_kenb.c similarity index 98% rename from openair-cn/TEST/test_secu_kenb.c rename to openair3/TEST/test_secu_kenb.c index 3ba2cdc937..16f6a8eadc 100644 --- a/openair-cn/TEST/test_secu_kenb.c +++ b/openair3/TEST/test_secu_kenb.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/TEST/test_secu_knas.c b/openair3/TEST/test_secu_knas.c similarity index 98% rename from openair-cn/TEST/test_secu_knas.c rename to openair3/TEST/test_secu_knas.c index 92d3743788..ecf213f7b3 100644 --- a/openair-cn/TEST/test_secu_knas.c +++ b/openair3/TEST/test_secu_knas.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/TEST/test_secu_knas_encrypt_eea1.c b/openair3/TEST/test_secu_knas_encrypt_eea1.c similarity index 98% rename from openair-cn/TEST/test_secu_knas_encrypt_eea1.c rename to openair3/TEST/test_secu_knas_encrypt_eea1.c index 6a110a63cb..9c54828ff4 100755 --- a/openair-cn/TEST/test_secu_knas_encrypt_eea1.c +++ b/openair3/TEST/test_secu_knas_encrypt_eea1.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/TEST/test_secu_knas_encrypt_eea2.c b/openair3/TEST/test_secu_knas_encrypt_eea2.c similarity index 99% rename from openair-cn/TEST/test_secu_knas_encrypt_eea2.c rename to openair3/TEST/test_secu_knas_encrypt_eea2.c index bb26ce5a88..712da6d947 100644 --- a/openair-cn/TEST/test_secu_knas_encrypt_eea2.c +++ b/openair3/TEST/test_secu_knas_encrypt_eea2.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/TEST/test_secu_knas_encrypt_eia1.c b/openair3/TEST/test_secu_knas_encrypt_eia1.c similarity index 99% rename from openair-cn/TEST/test_secu_knas_encrypt_eia1.c rename to openair3/TEST/test_secu_knas_encrypt_eia1.c index b634a2ea49..9a53079098 100755 --- a/openair-cn/TEST/test_secu_knas_encrypt_eia1.c +++ b/openair3/TEST/test_secu_knas_encrypt_eia1.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/TEST/test_secu_knas_encrypt_eia2.c b/openair3/TEST/test_secu_knas_encrypt_eia2.c similarity index 99% rename from openair-cn/TEST/test_secu_knas_encrypt_eia2.c rename to openair3/TEST/test_secu_knas_encrypt_eia2.c index 03a510c146..f85ddc0fea 100644 --- a/openair-cn/TEST/test_secu_knas_encrypt_eia2.c +++ b/openair3/TEST/test_secu_knas_encrypt_eia2.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/TEST/test_secu_knas_stream_int.c b/openair3/TEST/test_secu_knas_stream_int.c similarity index 99% rename from openair-cn/TEST/test_secu_knas_stream_int.c rename to openair3/TEST/test_secu_knas_stream_int.c index 7f1ba2df1c..731af2df8a 100644 --- a/openair-cn/TEST/test_secu_knas_stream_int.c +++ b/openair3/TEST/test_secu_knas_stream_int.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/TEST/test_util.c b/openair3/TEST/test_util.c similarity index 100% rename from openair-cn/TEST/test_util.c rename to openair3/TEST/test_util.c diff --git a/openair-cn/TEST/test_util.h b/openair3/TEST/test_util.h similarity index 100% rename from openair-cn/TEST/test_util.h rename to openair3/TEST/test_util.h diff --git a/openair-cn/NAS/TOOLS/COPYING b/openair3/UDP/COPYING similarity index 100% rename from openair-cn/NAS/TOOLS/COPYING rename to openair3/UDP/COPYING diff --git a/openair-cn/UDP/udp_eNB_task.c b/openair3/UDP/udp_eNB_task.c similarity index 99% rename from openair-cn/UDP/udp_eNB_task.c rename to openair3/UDP/udp_eNB_task.c index 32b3317fcf..3e53f9f62f 100644 --- a/openair-cn/UDP/udp_eNB_task.c +++ b/openair3/UDP/udp_eNB_task.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/UDP/udp_eNB_task.h b/openair3/UDP/udp_eNB_task.h similarity index 98% rename from openair-cn/UDP/udp_eNB_task.h rename to openair3/UDP/udp_eNB_task.h index 89a79e57a4..37ff413bf7 100644 --- a/openair-cn/UDP/udp_eNB_task.h +++ b/openair3/UDP/udp_eNB_task.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/openair-cn/GTPV2-C/nwgtpv2c-0.11/ChangeLog b/openair3/UTILS/CONF/COPYING similarity index 100% rename from openair-cn/GTPV2-C/nwgtpv2c-0.11/ChangeLog rename to openair3/UTILS/CONF/COPYING diff --git a/openair3/UTILS/COPYING b/openair3/UTILS/COPYING index 94a9ed024d..c888423064 100644 --- a/openair3/UTILS/COPYING +++ b/openair3/UTILS/COPYING @@ -1,674 +1,28 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program 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. - - This program 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 this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ \ No newline at end of file diff --git a/openair3/UTILS/GPSDRIVE/README.txt b/openair3/UTILS/GPSDRIVE/README.txt deleted file mode 100644 index 2cdb69918c..0000000000 --- a/openair3/UTILS/GPSDRIVE/README.txt +++ /dev/null @@ -1,8 +0,0 @@ -File: Readme.txt -Author: Florian Kaltenberger -Date: 11.2.09 - -This directory contains configuration files and maps for gpsdrive. gpsdrive displays your position and position of others (which are connected to the friends server) on a map. see man gpsdrive and man friendsd2 for details. - -Copy the maps directory to your ~/.gpsdrive directory or merge it with the existing directory iff you have already created other maps. - diff --git a/openair3/UTILS/GPSDRIVE/maps/expedia/map_27650000_43.847_7.448.gif b/openair3/UTILS/GPSDRIVE/maps/expedia/map_27650000_43.847_7.448.gif deleted file mode 100644 index a16cfbd86f..0000000000 Binary files a/openair3/UTILS/GPSDRIVE/maps/expedia/map_27650000_43.847_7.448.gif and /dev/null differ diff --git a/openair3/UTILS/GPSDRIVE/maps/expedia/map_3950_41.282_1.989.gif b/openair3/UTILS/GPSDRIVE/maps/expedia/map_3950_41.282_1.989.gif deleted file mode 100644 index e62bdfeadf..0000000000 Binary files a/openair3/UTILS/GPSDRIVE/maps/expedia/map_3950_41.282_1.989.gif and /dev/null differ diff --git a/openair3/UTILS/GPSDRIVE/maps/expedia/map_3950_41.501_2.111.gif b/openair3/UTILS/GPSDRIVE/maps/expedia/map_3950_41.501_2.111.gif deleted file mode 100644 index 7d6d7d9d6d..0000000000 Binary files a/openair3/UTILS/GPSDRIVE/maps/expedia/map_3950_41.501_2.111.gif and /dev/null differ diff --git a/openair3/UTILS/GPSDRIVE/maps/expedia/map_3950_41.502_2.113.gif b/openair3/UTILS/GPSDRIVE/maps/expedia/map_3950_41.502_2.113.gif deleted file mode 100644 index 92e037a231..0000000000 Binary files a/openair3/UTILS/GPSDRIVE/maps/expedia/map_3950_41.502_2.113.gif and /dev/null differ diff --git a/openair3/UTILS/GPSDRIVE/maps/expedia/map_3950_41.516_2.087.gif b/openair3/UTILS/GPSDRIVE/maps/expedia/map_3950_41.516_2.087.gif deleted file mode 100644 index 663bd7eb03..0000000000 Binary files a/openair3/UTILS/GPSDRIVE/maps/expedia/map_3950_41.516_2.087.gif and /dev/null differ diff --git a/openair3/UTILS/GPSDRIVE/maps/expedia/map_3950_43.735_7.421.gif b/openair3/UTILS/GPSDRIVE/maps/expedia/map_3950_43.735_7.421.gif deleted file mode 100644 index e1b46bbafd..0000000000 Binary files a/openair3/UTILS/GPSDRIVE/maps/expedia/map_3950_43.735_7.421.gif and /dev/null differ diff --git a/openair3/UTILS/GPSDRIVE/maps/expedia/map_3950_43.883_7.355.gif b/openair3/UTILS/GPSDRIVE/maps/expedia/map_3950_43.883_7.355.gif deleted file mode 100644 index 9f613284ee..0000000000 Binary files a/openair3/UTILS/GPSDRIVE/maps/expedia/map_3950_43.883_7.355.gif and /dev/null differ diff --git a/openair3/UTILS/GPSDRIVE/maps/expedia/map_3950_43.912_7.516.gif b/openair3/UTILS/GPSDRIVE/maps/expedia/map_3950_43.912_7.516.gif deleted file mode 100644 index 061596307b..0000000000 Binary files a/openair3/UTILS/GPSDRIVE/maps/expedia/map_3950_43.912_7.516.gif and /dev/null differ diff --git a/openair3/UTILS/GPSDRIVE/maps/expedia/map_3950_43.923_7.527.gif b/openair3/UTILS/GPSDRIVE/maps/expedia/map_3950_43.923_7.527.gif deleted file mode 100644 index 9967a44747..0000000000 Binary files a/openair3/UTILS/GPSDRIVE/maps/expedia/map_3950_43.923_7.527.gif and /dev/null differ diff --git a/openair3/UTILS/GPSDRIVE/maps/expedia/map_47400_41.282_1.989.gif b/openair3/UTILS/GPSDRIVE/maps/expedia/map_47400_41.282_1.989.gif deleted file mode 100644 index 7f9e2e7f32..0000000000 Binary files a/openair3/UTILS/GPSDRIVE/maps/expedia/map_47400_41.282_1.989.gif and /dev/null differ diff --git a/openair3/UTILS/GPSDRIVE/maps/expedia/map_98750_41.516_2.088.gif b/openair3/UTILS/GPSDRIVE/maps/expedia/map_98750_41.516_2.088.gif deleted file mode 100644 index 603cea4f28..0000000000 Binary files a/openair3/UTILS/GPSDRIVE/maps/expedia/map_98750_41.516_2.088.gif and /dev/null differ diff --git a/openair3/UTILS/GPSDRIVE/maps/map_koord.txt b/openair3/UTILS/GPSDRIVE/maps/map_koord.txt deleted file mode 100644 index 77203b7a67..0000000000 --- a/openair3/UTILS/GPSDRIVE/maps/map_koord.txt +++ /dev/null @@ -1,29 +0,0 @@ -top_Africa.jpg 1.82500 26.57917 24167707 -top_Americas.jpg 4.25000 -91.50000 38529708 -top_AsiaMiddleEast.jpg 34.33333 54.87500 17638272 -top_AsiaEast.jpg 32.78333 139.37500 24646780 -top_Australia.jpg -26.96667 134.12500 10990784 -top_BritishIsles.jpg 54.54167 -4.20833 3135892 -top_Europe.jpg 52.91667 12.41667 11823932 -top_Germany.jpg 51.50833 11.05000 3909032 -top_GPSWORLD.jpg 0.00000 0.00000 88067900 -top_JapanKorea.jpg 38.45833 135.15833 5379458 -top_NewZealand.jpg -40.85000 172.50000 4240306 -top_NorthAmerica.jpg 39.96667 -95.52500 20982408 -top_SouthAmerica.jpg -21.58333 -63.14583 21456356 -top_WorldEast.jpg 12.40000 68.00000 43055416 -expedia/map_98750_41.516_2.088.gif 41.51642 2.08774 98750 -expedia/map_3950_41.516_2.087.gif 41.51642 2.08732 3950 -expedia/map_47400_41.282_1.989.gif 41.28168 1.98933 47400 -expedia/map_3950_41.282_1.989.gif 41.28160 1.98929 3950 -expedia/map_98750_41.516_2.088.gif 41.51600 2.08802 98750 -expedia/map_98750_41.516_2.088.gif 41.51597 2.08801 98750 -expedia/map_3950_41.502_2.113.gif 41.50223 2.11301 3950 -expedia/map_3950_41.501_2.111.gif 41.50111 2.11116 3950 -expedia/map_3950_43.735_7.421.gif 43.73466 7.42114 3950 -expedia/map_3950_43.883_7.355.gif 43.88309 7.35546 3950 -expedia/map_27650000_43.847_7.448.gif 43.84667 7.44823 27650000 -expedia/map_3950_43.912_7.516.gif 43.91186 7.51550 3950 -expedia/map_3950_43.923_7.527.gif 43.92305 7.52726 3950 -expedia/map_3950_43.735_7.421.gif 43.73466 7.42114 3950 -expedia/map_3950_43.735_7.421.gif 43.73466 7.42114 3950 diff --git a/openair-cn/GTPV2-C/nwgtpv2c-0.11/NEWS b/openair3/UTILS/HASHTABLE/COPYING similarity index 100% rename from openair-cn/GTPV2-C/nwgtpv2c-0.11/NEWS rename to openair3/UTILS/HASHTABLE/COPYING diff --git a/openair3/UTILS/HASHTABLE/Makefile.am b/openair3/UTILS/HASHTABLE/Makefile.am new file mode 100755 index 0000000000..d6bdbbc3c8 --- /dev/null +++ b/openair3/UTILS/HASHTABLE/Makefile.am @@ -0,0 +1,10 @@ + +AM_CFLAGS = @ADD_CFLAGS@ \ + -I$(top_srcdir)/COMMON + +noinst_LTLIBRARIES = libhashtable.la +libhashtable_la_LDFLAGS = -all-static +libhashtable_la_SOURCES = \ + hashtable.c hashtable.h \ + obj_hashtable.c obj_hashtable.h + \ No newline at end of file diff --git a/openair3/UTILS/HASHTABLE/Makefile.eNB b/openair3/UTILS/HASHTABLE/Makefile.eNB new file mode 100755 index 0000000000..2cde7da837 --- /dev/null +++ b/openair3/UTILS/HASHTABLE/Makefile.eNB @@ -0,0 +1,35 @@ + +all: libhashtable.a + +libhashtable_OBJECTS = \ + hashtable.o \ + obj_hashtable.o \ + + +CFLAGS = \ + -DUSER_MODE \ + -DENABLE_USE_MME \ + -g \ + -O2 \ + -Wall \ + -Werror=implicit-function-declaration + +-include .deps/*.d + +$(libhashtable_OBJECTS): %.o : %.c + $(CC) -c $(CFLAGS) -o $@ $< + @if ! test -d ".deps" ; then mkdir -p .deps/; fi + @$(CC) -MM $(CFLAGS) $*.c > .deps/$*.d + @mv -f .deps/$*.d .deps/$*.d.tmp + @sed -e 's|.*:|$*.o:|' < .deps/$*.d.tmp > .deps/$*.d + @sed -e 's/.*://' -e 's/\\$$//' < .deps/$*.d.tmp | fmt -1 | \ + sed -e 's/^ *//' -e 's/$$/:/' >> .deps/$*.d + @rm -f .deps/$*.d.tmp + +libhashtable.a: $(libhashtable_OBJECTS) + $(AR) rcvs $@ $(libhashtable_OBJECTS) + +clean: + rm -f libhashtable.a + rm -rf .deps/ + rm -f $(libhashtable_OBJECTS) \ No newline at end of file diff --git a/openair-cn/UTILS/HASHTABLE/hashtable.c b/openair3/UTILS/HASHTABLE/hashtable.c similarity index 85% rename from openair-cn/UTILS/HASHTABLE/hashtable.c rename to openair3/UTILS/HASHTABLE/hashtable.c index 48d806cd0f..a557211b23 100755 --- a/openair-cn/UTILS/HASHTABLE/hashtable.c +++ b/openair3/UTILS/HASHTABLE/hashtable.c @@ -1,5 +1,33 @@ /* from: http://en.literateprograms.org/Hash_table_%28C%29#chunk%20def:node + * Original licence Creative Commons CC0 1.0 Waiver. + */ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. */ #include #include diff --git a/openair3/UTILS/HASHTABLE/hashtable.h b/openair3/UTILS/HASHTABLE/hashtable.h new file mode 100755 index 0000000000..051a2929b0 --- /dev/null +++ b/openair3/UTILS/HASHTABLE/hashtable.h @@ -0,0 +1,79 @@ +/* from: http://en.literateprograms.org/Hash_table_%28C%29#chunk%20def:node + * Original licence Creative Commons CC0 1.0 Waiver.(http://creativecommons.org/publicdomain/zero/1.0/) + */ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#ifndef _UTILS_COLLECTION_HASH_TABLE_H_ +#define _UTILS_COLLECTION_HASH_TABLE_H_ +#include +#include +#include + +typedef size_t hash_size_t; + +typedef enum hashtable_return_code_e { + HASH_TABLE_OK = 0, + HASH_TABLE_INSERT_OVERWRITTEN_DATA = 1, + HASH_TABLE_KEY_NOT_EXISTS = 2, + HASH_TABLE_KEY_ALREADY_EXISTS = 3, + HASH_TABLE_BAD_PARAMETER_HASHTABLE = 4, + HASH_TABLE_SYSTEM_ERROR = 5, + HASH_TABLE_CODE_MAX +} hashtable_rc_t; + + +typedef struct hash_node_s { + uint64_t key; + void *data; + struct hash_node_s *next; +} hash_node_t; + +typedef struct hash_table_s { + hash_size_t size; + hash_size_t num_elements; + struct hash_node_s **nodes; + hash_size_t (*hashfunc)(const uint64_t); + void (*freefunc)(void*); +} hash_table_t; + +char* hashtable_rc_code2string(hashtable_rc_t rcP); +void hash_free_int_func(void* memoryP); +hash_table_t *hashtable_create (hash_size_t size, hash_size_t (*hashfunc)(const uint64_t ), void (*freefunc)(void*)); +hashtable_rc_t hashtable_destroy(hash_table_t *hashtbl); +hashtable_rc_t hashtable_is_key_exists (hash_table_t *hashtbl, const uint64_t key); +hashtable_rc_t hashtable_apply_funct_on_elements (hash_table_t *hashtblP, void funct(uint64_t keyP, void* dataP, void* parameterP), void* parameterP); +hashtable_rc_t hashtable_insert (hash_table_t *hashtbl, const uint64_t key, void *data); +hashtable_rc_t hashtable_remove (hash_table_t *hashtbl, const uint64_t key); +hashtable_rc_t hashtable_get (hash_table_t *hashtbl, const uint64_t key, void **dataP); +hashtable_rc_t hashtable_resize (hash_table_t *hashtbl, hash_size_t size); + + + +#endif + diff --git a/openair-cn/UTILS/HASHTABLE/obj_hashtable.c b/openair3/UTILS/HASHTABLE/obj_hashtable.c similarity index 85% rename from openair-cn/UTILS/HASHTABLE/obj_hashtable.c rename to openair3/UTILS/HASHTABLE/obj_hashtable.c index 12b49577c4..55e86cd8f3 100755 --- a/openair-cn/UTILS/HASHTABLE/obj_hashtable.c +++ b/openair3/UTILS/HASHTABLE/obj_hashtable.c @@ -1,5 +1,30 @@ -/* from: http://en.literateprograms.org/Hash_table_%28C%29#chunk%20def:node +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. */ #include #include diff --git a/openair3/UTILS/HASHTABLE/obj_hashtable.h b/openair3/UTILS/HASHTABLE/obj_hashtable.h new file mode 100755 index 0000000000..d74e1e97d4 --- /dev/null +++ b/openair3/UTILS/HASHTABLE/obj_hashtable.h @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#ifndef _OBJ_HASH_TABLE_H_ +#define _OBJ_HASH_TABLE_H_ +#include +#include +#include + +#include "hashtable.h" + +typedef size_t hash_size_t; + + +typedef struct obj_hash_node_s { + int key_size; + void *key; + void *data; + struct obj_hash_node_s *next; +} obj_hash_node_t; + +typedef struct obj_hash_table_s { + hash_size_t size; + hash_size_t num_elements; + struct obj_hash_node_s **nodes; + hash_size_t (*hashfunc)(const void*, int); + void (*freekeyfunc)(void*); + void (*freedatafunc)(void*); +} obj_hash_table_t; + +obj_hash_table_t *obj_hashtable_create (hash_size_t size, hash_size_t (*hashfunc)(const void*, int ), void (*freekeyfunc)(void*), void (*freedatafunc)(void*)); +hashtable_rc_t obj_hashtable_destroy (obj_hash_table_t *hashtblP); +hashtable_rc_t obj_hashtable_is_key_exists (obj_hash_table_t *hashtblP, void* keyP, int key_sizeP); +hashtable_rc_t obj_hashtable_insert (obj_hash_table_t *hashtblP, void* keyP, int key_sizeP, void *dataP); +hashtable_rc_t obj_hashtable_remove (obj_hash_table_t *hashtblP, const void* keyP, int key_sizeP); +hashtable_rc_t obj_hashtable_get (obj_hash_table_t *hashtblP, const void* keyP, int key_sizeP, void ** dataP); +hashtable_rc_t obj_hashtable_get_keys(obj_hash_table_t *hashtblP, void ** keysP, unsigned int *sizeP); +hashtable_rc_t obj_hashtable_resize (obj_hash_table_t *hashtblP, hash_size_t sizeP); + + + +#endif + diff --git a/openair3/UTILS/Makefile.am b/openair3/UTILS/Makefile.am new file mode 100644 index 0000000000..2e0e686086 --- /dev/null +++ b/openair3/UTILS/Makefile.am @@ -0,0 +1,22 @@ + +SUBDIRS = . HASHTABLE + +AM_CFLAGS = @ADD_CFLAGS@ \ + -I$(top_srcdir)/COMMON \ + -I$(top_srcdir)/NAS/EURECOM-NAS/src/api/network \ + -I$(top_srcdir)/NAS/EURECOM-NAS/src/include \ + -I$(top_srcdir)/SGW-LITE \ + -I$(top_srcdir)/INTERTASK_INTERFACE + +AM_YFLAGS = -d + +noinst_LTLIBRARIES = libutils.la +libutils_la_LDFLAGS = -all-static +libutils_la_SOURCES = \ + conversions.h conversions.c \ + enum_string.h enum_string.c \ + log.c log.h \ + mme_config.c mme_config.h \ + mcc_mnc_itu.c mcc_mnc_itu.h \ + mme_default_values.h \ + queue.h tree.h diff --git a/openair3/UTILS/REMSERIAL-1.4.UDP/Makefile b/openair3/UTILS/REMSERIAL-1.4.UDP/Makefile deleted file mode 100755 index 99eff32890..0000000000 --- a/openair3/UTILS/REMSERIAL-1.4.UDP/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -all: remserial - -REMOBJ=remserial.o stty.o -remserial: $(REMOBJ) - $(CC) $(LDFLAGS) -o remserial $(REMOBJ) - -clean: - rm -f remserial *.o diff --git a/openair3/UTILS/REMSERIAL-1.4.UDP/README.txt b/openair3/UTILS/REMSERIAL-1.4.UDP/README.txt deleted file mode 100755 index a4c0bb1c0c..0000000000 --- a/openair3/UTILS/REMSERIAL-1.4.UDP/README.txt +++ /dev/null @@ -1,150 +0,0 @@ -Remserial ---------- - -The remserial program acts as a communications bridge between a TCP/IP -network port and a Linux device such as a serial port. Any character-oriented -Linux /dev device will work. - -The program can also use pseudo-ttys as the device. A pseudo-tty is like -a serial port in that it has a /dev entry that can be opened by a program -that expects a serial port device, except that instead of belonging to -a physical serial device, the data can be intercepted by another program. -The remserial program uses this to connect a network port to the -"master" (programming) side of the pseudo-tty allowing the device driver -(slave) side to be used by some program expecting a serial port. See example -3 below for details. - -The program can operate as a server accepting network connections from -other machines, or as a client, connecting to remote machine that -is running the remserial program or some other program that accepts -a raw network connection. The network connection passes data as-is, -there is no control protocol over the network socket. - -Multiple copies of the program can run on the same computer at the same -time assuming each is using a different network port and device. - -Some examples: - -1) Give access to a RS232 device over a network. - -The computer with the serial port connected to the device (such as a -data aquisition device) runs the remserial program: - - remserial -d -p 23000 -s "9600 raw" /dev/ttyS0 & - -This starts the program in daemon mode so that it runs in the background, -it waits for connections on port 23000 and sets up the serial port -/dev/ttyS0 at 9600 baud. Network connections to port 23000 from any -machine can then read and write to the device attached to the serial port. - -This can be started from /etc/rc.local or as an entry in /etc/inittab -or set up as a system service with a file in /etc/rc.init/. - -2) Connect an RS232 device to a specified server. - -The computer with the serial port connected to the device (such as a -data aquisition device) runs the remserial program: - - remserial -d -r server-name -p 23000 -s "9600 raw" /dev/ttyS0 & - -This would be used with case number 1 above creating an end-to-end serial -port connection. What goes in the serial port on one machine would come -out the serial port of the other machine. The ports could be running at -different baud rates or other serial port settings. - -3) Connect a Linux program that needs a serial port to a remote serial port. - -Some programs are written to communicate directly with a serial port such -as some data aquisition programs. The remserial program can use -pseudo-ttys to fool the program into thinking that it is talking to a -real serial port on the local machine: - - remserial -d -r server-name -p 23000 -l /dev/remserial1 /dev/ptmx & - -This creates a file called /dev/remserial1 which can be used by the -data aquisition application as its serial port. Any data sent or received -is passed to the remote server-name on port 23000 where a computer configured -in case number 1 above passes it to a real serial port. - -The remserial program uses the special pseudo-tty master device /dev/ptmx -(see man ptmx) which creates a slave device that looks like a normal -serial port named /dev/pts/something. Unfortunately, the actual device -name created isn't consistent, so the remserial program creates a symbol -link from the device name specified with the -l option to the /dev/pts/ -name that was created allowing the other application to be configured -with a consistent device name. - -4) Server farm console control. - -Assuming multiple Linux servers (such as web servers) are set up to have a -serial port as their console instead of a monitor/keyboard, their serial -ports could be connected to a control server using a multi-port serial board. -On the control server, a copy of remserial is run for each server: - - remserial -d -p 23000 -s "115200 raw" /dev/ttyS0 & - remserial -d -p 23001 -s "115200 raw" /dev/ttyS1 & - remserial -d -p 23002 -s "115200 raw" /dev/ttyS2 & - remserial -d -p 23003 -s "115200 raw" /dev/ttyS3 & - etc. - -From any computer on the local network, use a telnet program to connect -to the control server on the appropriate port: - - telnet control-server-name 23002 - -This would connect through the associated serial port to the desired server's -console. This example would then give the user console access to the 3rd -server. - -Careful scripting such as using the Linux "expect" program could allow -batches of commands to be run on each server. - -Other Linux program useful with remserial ------------------------------------------ - -- nc - The netcat program is similar to remserial except that it creates - connections between network ports and command line standard input and - output. - - For example, with case number 1 above, the following command run on - another computer will send the contents of the named file out the - serial port used by the remserial program: - - nc server-name 23000 file-name - -- telnet - The telnet program is normally used to log into a remote computer, - but when used with network ports other than number 23, it operates in a - raw data mode. - - For example, with case number 1 above, the following command will allow - the user of the telnet program to see incoming serial port data and - type data on the keyboard to send to the serial port: - - telnet server-name 23000 - - This is ideal for controlling the device connected to the serial port - if it has some sort of command line interface usable over the serial port. - - -remserial Usage: ---------------- - -remserial [-r machinename] [-p netport] [-s "stty params"] device - --r machinename The remote machine name to connect to. If not - specified, then this is the server side. --p netport Specifiy IP port# (default 23000) --s "stty params" If serial port, specify stty parameters, see man stty --d Run as daemon programs --x debuglevel Set debug level, 0 is default, 1,2 give more info --l linkname If the device is /dev/ptmx, creates a symbolic link - to the corresponding slave pseudo-tty so that another - application has a static device name to use. --m max-connections Maximum number of simultaneous client connections to allow -device Character oriented device node such as /dev/ttyS0. - diff --git a/openair3/UTILS/REMSERIAL-1.4.UDP/remserial.c b/openair3/UTILS/REMSERIAL-1.4.UDP/remserial.c deleted file mode 100755 index 413fddeee4..0000000000 --- a/openair3/UTILS/REMSERIAL-1.4.UDP/remserial.c +++ /dev/null @@ -1,540 +0,0 @@ -/* -* remserial -* Copyright (C) 2000 Paul Davis, pdavis@lpccomp.bc.ca -* -* This program 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 2 of the License, or -* (at your option) any later version. -* -* This program 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 this program; if not, write to the Free Software -* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -* -* -* This program acts as a bridge either between a socket(2) and a -* serial/parallel port or between a socket and a pseudo-tty. -*/ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -struct sockaddr_in addr,remoteaddr; -int sockfd = -1; -int server_port = 23000; -int client_port = 22999; -int debug = 0; -int devfd; -int *remotefd; -char *machinename = NULL; -char *sttyparms = NULL; -static char *sdevname = NULL; -char *linkname = NULL; -int isdaemon = 0; -fd_set fdsread,fdsreaduse; -struct hostent *remotehost; -extern char* ptsname(int fd); -int curConnects = 0; - -void sighandler (int sig); -int connect_to (struct sockaddr_in *addr); -void usage (char *progname); -void link_slave (int fd); - -int main(int argc, char *argv[]) -{ - int result; - extern char *optarg; - extern int optind; - int maxfd = -1; - char devbuf[512]; - int devbytes; - int remoteaddrlen; - int c; - int waitlogged = 0; - int maxConnects = 1; - int writeonly = 0; - register int i; - - while ( (c=getopt(argc,argv,"dl:m:p:r:s:wx:")) != EOF ) - switch (c) { - case 'd': - isdaemon = 1; - break; - - case 'l': - linkname = optarg; - break; - - case 'x': - debug = atoi(optarg); - break; - - case 'm': - maxConnects = atoi(optarg); - break; - - case 'p': - server_port = atoi(optarg); - break; - - case 'r': - machinename = optarg; - break; - - case 's': - sttyparms = optarg; - break; - - case 'w': - writeonly = 1; - break; - - case '?': - usage(argv[0]); - exit(1); - } - - sdevname = argv[optind]; - remotefd = (int *) malloc (maxConnects * sizeof(int)); - - // struct group *getgrgid(gid_t gid); - - printf("sdevname=%s,server_port=%d,stty=%s\n",sdevname,server_port,sttyparms); - - openlog("remserial", LOG_PID, LOG_USER); - - if (writeonly) - devfd = open(sdevname,O_WRONLY); - else - devfd = open(sdevname,O_RDWR); - - if ( devfd == -1 ) { - syslog(LOG_ERR, "Open of %s failed: %m",sdevname); - printf("Open of %s failed: %m",sdevname); - exit(1); - } - - if (linkname) - link_slave(devfd); - - if ( sttyparms ) { - set_tty(devfd,sttyparms); - } - - signal(SIGINT,sighandler); - signal(SIGHUP,sighandler); - signal(SIGTERM,sighandler); - - if ( machinename ) { - //----------------------------------------------------------------- - // We are the client, Find the IP address for the remote machine - //----------------------------------------------------------------- - - remotehost = gethostbyname(machinename); - - if ( !remotehost ) { - syslog(LOG_ERR, "Couldn't determine address of %s", machinename ); - exit(1); - } - - /* Copy it into the addr structure */ - addr.sin_family = AF_INET; - addr.sin_addr.s_addr = 0; - - //memcpy(&(addr.sin_addr),remotehost->h_addr_list[0], sizeof(struct in_addr)); - //addr.sin_port = htons(server_port); - addr.sin_port = htons(0); - - remotefd[curConnects] = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); - - if ( remotefd[curConnects] == -1 ) { - syslog(LOG_ERR, "Can't open socket: %m"); - exit(1); - } - - - /* Set up to listen on the given port */ - if( bind( remotefd[curConnects], (struct sockaddr*)(&addr), sizeof(struct sockaddr_in)) < 0 ) { - syslog(LOG_ERR, "Couldn't bind port %d, aborting: %m",client_port ); - exit(1); - } - - - addr.sin_family = AF_INET; - memcpy(&(addr.sin_addr),remotehost->h_addr_list[0], sizeof(struct in_addr)); - addr.sin_port = htons(server_port); - - if (connect(remotefd[curConnects], (struct sockaddr*)(&addr), sizeof(struct sockaddr_in)) < 0 ) { - syslog(LOG_ERR, "Couldn't connect client socket to server socket, aborting: %m"); - exit(1); - } - - if ( debug>1 ) - syslog(LOG_NOTICE,"Connected to remote UDP socket"); - - curConnects += 1; - } else { - //------------------------------- - // We are the server - //------------------------------- - - /* Open the initial socket for communications */ - sockfd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); - - if ( sockfd == -1 ) { - syslog(LOG_ERR, "Can't open socket: %m"); - exit(1); - } - - addr.sin_family = AF_INET; - addr.sin_addr.s_addr = 0; - addr.sin_port = htons(server_port); - - /* Set up to listen on the given port */ - if( bind( sockfd, (struct sockaddr*)(&addr), - sizeof(struct sockaddr_in)) < 0 ) { - syslog(LOG_ERR, "Couldn't bind port %d, aborting: %m",server_port ); - exit(1); - } - - if ( debug>1 ) - syslog(LOG_NOTICE,"Bound port"); - } - - - if ( isdaemon ) { - setsid(); - close(0); - close(1); - close(2); - } - - /* Set up the files/sockets for the select() call */ - if ( sockfd != -1 ) { - FD_SET(sockfd,&fdsread); - - if ( sockfd >= maxfd ) - maxfd = sockfd + 1; - } - - for (i=0 ; i= maxfd ) - maxfd = remotefd[i] + 1; - } - - if (!writeonly) { - FD_SET(devfd,&fdsread); - - if ( devfd >= maxfd ) - maxfd = devfd + 1; - } - - while (1) { - - /* Wait for data from the listening socket, the device - or the remote connection */ - fdsreaduse = fdsread; - - if ( select(maxfd,&fdsreaduse,NULL,NULL,NULL) == -1 ) - break; - - /* Activity on the controlling socket, only on server */ - if ( !machinename && FD_ISSET(sockfd,&fdsreaduse) ) { - remoteaddrlen = sizeof(struct sockaddr_in); - devbytes = recvfrom(sockfd, devbuf, 512, 0, (struct sockaddr *) &remoteaddr, &remoteaddrlen); - - - //if ( debug>1 && devbytes>0 ) - if (debug>1) { - syslog(LOG_INFO,"Remote: %d bytes",devbytes); - } - - printf("Socket Remote read: %d bytes\n",devbytes); - - if ( devbytes == 0 ) { - } else if ( devfd != -1 ) { - if (connect(sockfd, (struct sockaddr*)(&remoteaddr), remoteaddrlen) < 0 ) { - syslog(LOG_ERR, "Couldn't connect server socket to client socket, aborting: %m"); - exit(1); - } - - // socket read/write - //remotefd[curConnects] = sockfd; - - /* Write the data to the device */ - result = write(devfd,devbuf,devbytes); - - if (result < 0) { - printf("write(%d,devbuf,%d):%s", devfd, devbytes,strerror(result)); - } else { - printf("Write to device returned %d", result); - } - - fflush(NULL); - } - } - - /* Data to read from the device */ - if ( FD_ISSET(devfd,&fdsreaduse) ) { - devbytes = read(devfd,devbuf,512); - - //if ( debug>1 && devbytes>0 ) - if (debug>1) { - syslog(LOG_INFO,"Device: %d bytes",devbytes); - } - - printf("Device: %d bytes", devbytes); - - if ( devbytes <= 0 ) { - if ( debug>0 ) { - syslog(LOG_INFO,"%s closed",sdevname); - printf("%s closed",sdevname); - } - - close(devfd); - FD_CLR(devfd,&fdsread); - - while (1) { - devfd = open(sdevname,O_RDWR); - - if ( devfd != -1 ) - break; - - syslog(LOG_ERR, "Open of %s failed: %m", sdevname); - - if ( errno != EIO ) - exit(1); - - sleep(1); - } - - if ( debug>0 ) - syslog(LOG_INFO,"%s re-opened",sdevname); - - if ( sttyparms ) - set_tty(devfd,sttyparms); - - if (linkname) - link_slave(devfd); - - FD_SET(devfd,&fdsread); - - if ( devfd >= maxfd ) - maxfd = devfd + 1; - } else { - for (i=0 ; i1 && devbytes>0 ) - if (debug>1) { - syslog(LOG_INFO,"Remote: %d bytes",devbytes); - } - - printf("Remote: %d bytes",devbytes); - - if ( devbytes == 0 ) { - /*register int j; - - syslog(LOG_NOTICE,"Connection closed"); - printf("Connection closed"); - close(remotefd[i]); - FD_CLR(remotefd[i],&fdsread); - curConnects--; - for (j=i ; j= maxfd ) - maxfd = remotefd[curConnects-1] + 1; - }*/ - } else if ( devfd != -1 ) { - /* Write the data to the device */ - result = write(devfd,devbuf,devbytes); - - if (result < 0) { - printf("write(devfd=%d,devbuf,%d):%s", devfd, devbytes, strerror(result)); - } else { - printf("Write to devfd=%d returned %d", devfd, result); - } - - fflush(NULL); - } - } - } - - close(sockfd); - - for (i=0 ; i0 ) { - unsigned long ip = ntohl(addr->sin_addr.s_addr); - syslog(LOG_NOTICE, "Trying to connect to %d.%d.%d.%d", - (int)(ip>>24)&0xff, - (int)(ip>>16)&0xff, - (int)(ip>>8)&0xff, - (int)(ip>>0)&0xff); - } - - while (1) { - /* Open the socket for communications */ - sockfd = socket(AF_INET, SOCK_STREAM, 6); - - if ( sockfd == -1 ) { - syslog(LOG_ERR, "Can't open socket: %m"); - exit(1); - } - - /* Try to connect to the remote server, - if it fails, keep trying */ - - stat = connect(sockfd, (struct sockaddr*)addr, - sizeof(struct sockaddr_in)); - - if ( debug>1 ) - if (stat == -1) - syslog(LOG_NOTICE, "Connect status %d, errno %d: %m\n", stat,errno); - else - syslog(LOG_NOTICE, "Connect status %d\n", stat); - - if ( stat == 0 ) - break; - - /* Write a message to syslog once */ - if ( ! waitlogged ) { - syslog(LOG_NOTICE, "Waiting for server on %s port %d: %m", machinename,server_port ); - waitlogged = 1; - } - - close(sockfd); - sleep(10); - } - - if ( waitlogged || debug>0 ) - syslog(LOG_NOTICE, "Connected to server %s port %d", machinename,server_port ); - - return sockfd; -} - -void usage(char *progname) -{ - printf("Remserial version 1.3. Usage:\n"); - printf("remserial [-r machinename] [-p netport] [-s \"stty params\"] [-m maxconnect] device\n\n"); - - printf("-r machinename The remote machine name to connect to. If not\n"); - printf(" specified, then this is the server side.\n"); - printf("-p netport Specifiy IP port# (default 23000)\n"); - printf("-s \"stty params\" If serial port, specify stty parameters, see man stty\n"); - printf("-m max-connections Maximum number of simultaneous client connections to allow\n"); - printf("-d Run as a daemon program\n"); - printf("-x debuglevel Set debug level, 0 is default, 1,2 give more info\n"); - printf("-l linkname If the device name is a pseudo-tty, create a link to the slave\n"); - printf("-w Only write to the device, no reading\n"); - printf("device I/O device, either serial port or pseudo-tty master\n"); -} diff --git a/openair3/UTILS/REMSERIAL-1.4.UDP/stty.c b/openair3/UTILS/REMSERIAL-1.4.UDP/stty.c deleted file mode 100755 index f7953be063..0000000000 --- a/openair3/UTILS/REMSERIAL-1.4.UDP/stty.c +++ /dev/null @@ -1,268 +0,0 @@ -/* - * remserial - * Copyright (C) 2000 Paul Davis, pdavis@lpccomp.bc.ca - * - * This program 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 2 of the License, or - * (at your option) any later version. - * - * This program 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 this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include -#include -#include -#include - -#define CFLG 0 -#define IFLG 1 -#define OFLG 2 -#define LFLG 3 -#define RFLG 4 -#define BFLG 5 - -extern int errno; - -static struct sttyset { - char *name; - int which; - int mask; - int value; -} sttynames[] = { - { "0", BFLG, 0, B0 }, - { "50", BFLG, 0, B50 }, - { "75", BFLG, 0, B75 }, - { "110", BFLG, 0, B110 }, - { "134", BFLG, 0, B134 }, - { "150", BFLG, 0, B150 }, - { "200", BFLG, 0, B200 }, - { "300", BFLG, 0, B300 }, - { "600", BFLG, 0, B600 }, - { "1200", BFLG, 0, B1200 }, - { "1800", BFLG, 0, B1800 }, - { "2400", BFLG, 0, B2400 }, - { "4800", BFLG, 0, B4800 }, - { "9600", BFLG, 0, B9600 }, - { "19200", BFLG, 0, B19200 }, - { "38400", BFLG, 0, B38400 }, -#ifdef B57600 - { "57600", BFLG, 0, B57600 }, -#endif -#ifdef B115200 - { "115200", BFLG, 0, B115200 }, -#endif -#ifdef B230400 - { "230400", BFLG, 0, B230400 }, -#endif - { "cs7", CFLG, CSIZE, CS7 }, - { "cs8", CFLG, CSIZE, CS8 }, - { "cstopb", CFLG, CSTOPB, CSTOPB }, - { "cread", CFLG, CREAD, CREAD }, - { "parenb", CFLG, PARENB, PARENB }, - { "parodd", CFLG, PARODD, PARODD }, - { "hubcl", CFLG, HUPCL, HUPCL }, - { "clocal", CFLG, CLOCAL, CLOCAL }, -#ifdef CRTSCTS - { "crtscts", CFLG, CRTSCTS, CRTSCTS }, -#endif -#ifdef ORTSFL - { "ortsfl", CFLG, ORTSFL, ORTSFL }, -#endif -#ifdef CTSFLOW - { "ctsflow", CFLG, CTSFLOW, CTSFLOW }, -#endif -#ifdef RTSFLOW - { "rtsflow", CFLG, RTSFLOW, RTSFLOW }, -#endif - { "ignbrk", IFLG, IGNBRK, IGNBRK }, - { "brkint", IFLG, BRKINT, BRKINT }, - { "ignpar", IFLG, IGNPAR, IGNPAR }, - { "parmrk", IFLG, PARMRK, PARMRK }, - { "inpck", IFLG, INPCK, INPCK }, - { "istrip", IFLG, ISTRIP, ISTRIP }, - { "inlcr", IFLG, INLCR, INLCR }, - { "igncr", IFLG, IGNCR, IGNCR }, - { "icrnl", IFLG, ICRNL, ICRNL }, -#ifdef IUCLC // Missing on OSX, FreeBSD - { "iuclc", IFLG, IUCLC, IUCLC }, -#endif - { "ixon", IFLG, IXON, IXON }, - { "ixany", IFLG, IXANY, IXANY }, - { "ixoff", IFLG, IXOFF, IXOFF }, -#ifdef IMAXBEL - { "imaxbel", IFLG, IMAXBEL, IMAXBEL }, -#endif - { "opost", OFLG, OPOST, OPOST }, -#ifdef ILCUC // Missing on OSX, FreeBSD - { "olcuc", OFLG, OLCUC, OLCUC }, -#endif - { "onlcr", OFLG, ONLCR, ONLCR }, - { "ocrnl", OFLG, OCRNL, OCRNL }, - { "onocr", OFLG, ONOCR, ONOCR }, - { "onlret", OFLG, ONLRET, ONLRET }, - { "ofil", OFLG, OFILL, OFILL }, - { "ofdel", OFLG, OFDEL, OFDEL }, - { "nl0", OFLG, NLDLY, NL0 }, - { "nl1", OFLG, NLDLY, NL1 }, - { "cr0", OFLG, CRDLY, CR0 }, - { "cr1", OFLG, CRDLY, CR1 }, - { "cr2", OFLG, CRDLY, CR2 }, - { "cr3", OFLG, CRDLY, CR3 }, - { "tab0", OFLG, TABDLY, TAB0 }, - { "tab1", OFLG, TABDLY, TAB1 }, - { "tab2", OFLG, TABDLY, TAB2 }, - { "tab3", OFLG, TABDLY, TAB3 }, - { "bs0", OFLG, BSDLY, BS0 }, - { "bs1", OFLG, BSDLY, BS1 }, - { "vt0", OFLG, VTDLY, VT0 }, - { "vt1", OFLG, VTDLY, VT1 }, - { "ff0", OFLG, FFDLY, FF0 }, - { "ff1", OFLG, FFDLY, FF1 }, - { "isig", LFLG, ISIG, ISIG }, - { "icanon", LFLG, ICANON, ICANON }, -#ifdef XCASE // Missing on OSX, FreeBSD - { "xcase", LFLG, XCASE, XCASE }, -#endif - { "echo", LFLG, ECHO, ECHO }, - { "echoe", LFLG, ECHOE, ECHOE }, - { "echok", LFLG, ECHOK, ECHOK }, - { "echonl", LFLG, ECHONL, ECHONL }, - { "noflsh", LFLG, NOFLSH, NOFLSH }, - { "tostop", LFLG, TOSTOP, TOSTOP }, -#ifdef ECHOCTL - { "echoctl", LFLG, ECHOCTL, ECHOCTL }, -#endif -#ifdef ECHOPRT - { "echoprt", LFLG, ECHOPRT, ECHOPRT }, -#endif -#ifdef ECHOKE - { "echoke", LFLG, ECHOKE, ECHOKE }, -#endif -#ifdef FLUSHO - { "flusho", LFLG, FLUSHO, FLUSHO }, -#endif -#ifdef PENDIN - { "pendin", LFLG, PENDIN, PENDIN }, -#endif - { "iexten", LFLG, IEXTEN, IEXTEN }, -#ifdef TOSTOP - { "tostop", LFLG, TOSTOP, TOSTOP }, -#endif - { "raw", RFLG, 0, 0 }, - { NULL, 0, 0, 0 } -}; - -static void -set_this_tty(struct termios *term,struct sttyset *p,int turnon) -{ - /* - pdebug(5,"set_this_tty: setting %s on? %d\n",p->name,turnon); - */ - switch ( p->which ) { - case CFLG: - term->c_cflag &= ~(p->mask); - - if ( turnon ) - term->c_cflag |= p->value; - - break; - - case IFLG: - term->c_iflag &= ~(p->mask); - - if ( turnon ) - term->c_iflag |= p->value; - - break; - - case OFLG: - term->c_oflag &= ~(p->mask); - - if ( turnon ) - term->c_oflag |= p->value; - - break; - - case LFLG: - term->c_lflag &= ~(p->mask); - - if ( turnon ) - term->c_lflag |= p->value; - - break; - - case RFLG: - term->c_iflag = 0; - term->c_oflag = 0; - term->c_lflag = 0; - term->c_cc[VMIN] = 1; - term->c_cc[VTIME] = 0; - break; - - case BFLG: - cfsetispeed(term, p->value); - cfsetospeed(term, p->value); - break; - } -} - -int -set_tty(int fd,char *settings) -{ - register char *p; - register char *s; - struct termios term; - register int i; - int mode; - - /* - pdebug(4,"set_tty: fd %d settings %s\n",fd,settings); - */ - if ( tcgetattr(fd,&term) == -1 ) { - /* - pdebug(4,"set_tty: cannot get settings for fd %d, error %d\n", - fd,errno); - */ - return -1; - } - - s = strdup(settings); - p = strtok(s," \t\n"); - - while (p) { - mode = 1; - - if ( *p == '-' ) { - mode = 0; - p++; - } - - for ( i=0 ; sttynames[i].name ; i++ ) { - if ( !strcmp(p,sttynames[i].name) ) { - set_this_tty(&term,&sttynames[i],mode); - break; - } - } - - p = strtok(NULL," \t\n"); - } - - free(s); - - if ( tcsetattr(fd,TCSANOW,&term) == -1 ) { - /* - pdebug(4,"set_tty: cannot get settings for fd %d error %d\n", - fd,errno); - */ - return -1; - } else - return 0; -} diff --git a/openair-cn/UTILS/conversions.c b/openair3/UTILS/conversions.c similarity index 53% rename from openair-cn/UTILS/conversions.c rename to openair3/UTILS/conversions.c index 0cb30f10eb..f2c324568f 100644 --- a/openair-cn/UTILS/conversions.c +++ b/openair3/UTILS/conversions.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair-cn/UTILS/conversions.h b/openair3/UTILS/conversions.h similarity index 88% rename from openair-cn/UTILS/conversions.h rename to openair3/UTILS/conversions.h index 4762f93873..aaa2b9714f 100644 --- a/openair-cn/UTILS/conversions.h +++ b/openair3/UTILS/conversions.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include "assertions.h" diff --git a/openair-cn/UTILS/enum_string.c b/openair3/UTILS/enum_string.c similarity index 51% rename from openair-cn/UTILS/enum_string.c rename to openair3/UTILS/enum_string.c index 29d0774776..cab5b0319e 100644 --- a/openair-cn/UTILS/enum_string.c +++ b/openair3/UTILS/enum_string.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include #include diff --git a/openair3/UTILS/enum_string.h b/openair3/UTILS/enum_string.h new file mode 100644 index 0000000000..c0a921c98e --- /dev/null +++ b/openair3/UTILS/enum_string.h @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#ifndef ENUM_STRING_H_ +#define ENUM_STRING_H_ + +typedef struct { + int enum_value; + char *enum_value_name; +} enum_to_string_t; + +extern enum_to_string_t network_access_mode_to_string[NAM_MAX]; +extern enum_to_string_t rat_to_string[NUMBER_OF_RAT_TYPE]; +extern enum_to_string_t pdn_type_to_string[IP_MAX]; + +char *enum_to_string(int enum_val, enum_to_string_t *string_table, int nb_element); +#define ACCESS_MODE_TO_STRING(vAL) \ + enum_to_string((int)vAL, network_access_mode_to_string, \ + sizeof(network_access_mode_to_string) / sizeof(enum_to_string_t)) +#define PDN_TYPE_TO_STRING(vAL) \ + enum_to_string((int)vAL, pdn_type_to_string, \ + sizeof(pdn_type_to_string) / sizeof(enum_to_string_t)) + +#endif /* ENUM_STRING_H_ */ diff --git a/openair3/UTILS/log.c b/openair3/UTILS/log.c new file mode 100644 index 0000000000..6aebde8280 --- /dev/null +++ b/openair3/UTILS/log.c @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#if HAVE_CONFIG_H +# include "config.h" +#endif + +#include "log.h" + +/* mme log */ +int log_enabled = 0; + +int log_init(const mme_config_t *mme_config_p, + log_specific_init_t specific_init) +{ + if (mme_config_p->verbosity_level == 1) { + log_enabled = 1; + } else if (mme_config_p->verbosity_level == 2) { + log_enabled = 1; + } else { + log_enabled = 0; + } + + return specific_init(mme_config_p->verbosity_level); +} diff --git a/openair3/UTILS/log.h b/openair3/UTILS/log.h new file mode 100644 index 0000000000..34700522af --- /dev/null +++ b/openair3/UTILS/log.h @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +#include "mme_config.h" + +#ifndef LOG_H_ +#define LOG_H_ + +/* asn1c debug */ +extern int asn_debug; +extern int asn1_xer_print; +extern int fd_g_debug_lvl; + +typedef int (*log_specific_init_t)(int log_level); + +int log_init(const mme_config_t *mme_config, + log_specific_init_t specific_init); + +#endif /* LOG_H_ */ diff --git a/openair-cn/UTILS/mcc_mnc_itu.c b/openair3/UTILS/mcc_mnc_itu.c similarity index 94% rename from openair-cn/UTILS/mcc_mnc_itu.c rename to openair3/UTILS/mcc_mnc_itu.c index f842334aee..8c59b8e53a 100755 --- a/openair-cn/UTILS/mcc_mnc_itu.c +++ b/openair3/UTILS/mcc_mnc_itu.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include diff --git a/openair3/UTILS/mcc_mnc_itu.h b/openair3/UTILS/mcc_mnc_itu.h new file mode 100755 index 0000000000..b59db73720 --- /dev/null +++ b/openair3/UTILS/mcc_mnc_itu.h @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ +/***************************************************************************** + +Source mcc_mnc.h + +Version 0.1 + +Date {2014/10/02 + +Product + +Subsystem + +Author Lionel GAUTHIER + +Description Defines the MCC/MNC list delivered by the ITU + +*****************************************************************************/ +#ifndef __MCC_MNC_H__ +#define __MCC_MNC_H__ + + +typedef struct mcc_mnc_list_s { + uint16_t mcc; + char mnc[4]; +} mcc_mnc_list_t; + +int find_mnc_length(const char mcc_digit1P, + const char mcc_digit2P, + const char mcc_digit3P, + const char mnc_digit1P, + const char mnc_digit2P, + const char mnc_digit3P); +#endif diff --git a/openair-cn/UTILS/mme_config.c b/openair3/UTILS/mme_config.c similarity index 94% rename from openair-cn/UTILS/mme_config.c rename to openair3/UTILS/mme_config.c index c162199bb4..bc1a408312 100644 --- a/openair-cn/UTILS/mme_config.c +++ b/openair3/UTILS/mme_config.c @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #if HAVE_CONFIG_H # include "config.h" diff --git a/openair-cn/UTILS/mme_config.h b/openair3/UTILS/mme_config.h similarity index 78% rename from openair-cn/UTILS/mme_config.h rename to openair3/UTILS/mme_config.h index 36ce25b169..5301a9c59d 100644 --- a/openair-cn/UTILS/mme_config.h +++ b/openair3/UTILS/mme_config.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #include #include diff --git a/openair-cn/UTILS/mme_default_values.h b/openair3/UTILS/mme_default_values.h similarity index 76% rename from openair-cn/UTILS/mme_default_values.h rename to openair3/UTILS/mme_default_values.h index 25111aea60..779e5a4661 100644 --- a/openair-cn/UTILS/mme_default_values.h +++ b/openair3/UTILS/mme_default_values.h @@ -1,31 +1,31 @@ -/******************************************************************************* - OpenAirInterface - Copyright(c) 1999 - 2014 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 . - - Contact Information - OpenAirInterface Admin: openair_admin@eurecom.fr - OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr - - Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. - - *******************************************************************************/ +/* + * Copyright (c) 2015, EURECOM (www.eurecom.fr) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those + * of the authors and should not be interpreted as representing official policies, + * either expressed or implied, of the FreeBSD Project. + */ #ifndef MME_DEFAULT_VALUES_H_ #define MME_DEFAULT_VALUES_H_ diff --git a/openair-cn/UTILS/mme_parser.y b/openair3/UTILS/mme_parser.y similarity index 100% rename from openair-cn/UTILS/mme_parser.y rename to openair3/UTILS/mme_parser.y diff --git a/openair-cn/UTILS/mme_scanner.l b/openair3/UTILS/mme_scanner.l similarity index 100% rename from openair-cn/UTILS/mme_scanner.l rename to openair3/UTILS/mme_scanner.l diff --git a/openair-cn/UTILS/queue.h b/openair3/UTILS/queue.h similarity index 100% rename from openair-cn/UTILS/queue.h rename to openair3/UTILS/queue.h diff --git a/openair-cn/GTPV2-C/nwgtpv2c-0.11/include/tree.h b/openair3/UTILS/tree.h similarity index 100% rename from openair-cn/GTPV2-C/nwgtpv2c-0.11/include/tree.h rename to openair3/UTILS/tree.h diff --git a/openair3/history.txt b/openair3/history.txt deleted file mode 100644 index b3523124fe..0000000000 --- a/openair3/history.txt +++ /dev/null @@ -1,7 +0,0 @@ -------------------------- -11 Jun: -Description: 1st Importation. Forgive me if I make some error :-P -Features: (released on 5 may 2008) - PMIPv6 + IPv6-in-IPv6 + IPv6-Movement Detection - Configuration files (radvd for MR1 & MR2 only) - \ No newline at end of file diff --git a/openair-cn/valgrind.sh b/openair3/valgrind.sh similarity index 100% rename from openair-cn/valgrind.sh rename to openair3/valgrind.sh diff --git a/targets/ARCH/BLADERF/USERSPACE/LIB/bladerf_lib.c b/targets/ARCH/BLADERF/USERSPACE/LIB/bladerf_lib.c index 6ebf709ec9..d515a206ae 100644 --- a/targets/ARCH/BLADERF/USERSPACE/LIB/bladerf_lib.c +++ b/targets/ARCH/BLADERF/USERSPACE/LIB/bladerf_lib.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/ARCH/BLADERF/USERSPACE/LIB/bladerf_lib.h b/targets/ARCH/BLADERF/USERSPACE/LIB/bladerf_lib.h index 39518173db..15e1d39da7 100644 --- a/targets/ARCH/BLADERF/USERSPACE/LIB/bladerf_lib.h +++ b/targets/ARCH/BLADERF/USERSPACE/LIB/bladerf_lib.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/ARCH/COMMON/common_lib.c b/targets/ARCH/COMMON/common_lib.c index 63f086ff1d..8b91a74b49 100644 --- a/targets/ARCH/COMMON/common_lib.c +++ b/targets/ARCH/COMMON/common_lib.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/ARCH/COMMON/common_lib.h b/targets/ARCH/COMMON/common_lib.h index a6851b0dbe..8cc7926d45 100644 --- a/targets/ARCH/COMMON/common_lib.h +++ b/targets/ARCH/COMMON/common_lib.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c b/targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c index 6dd457d9b5..ce90d2cff9 100644 --- a/targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c +++ b/targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.h b/targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.h index 628fcb377c..eabec94ebc 100644 --- a/targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.h +++ b/targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/ARCH/EXMIMO/DEFS/openair_device.h b/targets/ARCH/EXMIMO/DEFS/openair_device.h index 3ca2f093f7..2be7b7f088 100755 --- a/targets/ARCH/EXMIMO/DEFS/openair_device.h +++ b/targets/ARCH/EXMIMO/DEFS/openair_device.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/ARCH/EXMIMO/DEFS/pcie_interface.h b/targets/ARCH/EXMIMO/DEFS/pcie_interface.h index 9c47d9b392..925787cabf 100644 --- a/targets/ARCH/EXMIMO/DEFS/pcie_interface.h +++ b/targets/ARCH/EXMIMO/DEFS/pcie_interface.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/ARCH/EXMIMO/DRIVER/eurecom/defs.h b/targets/ARCH/EXMIMO/DRIVER/eurecom/defs.h index 7467bd0357..ffba2d61c4 100755 --- a/targets/ARCH/EXMIMO/DRIVER/eurecom/defs.h +++ b/targets/ARCH/EXMIMO/DRIVER/eurecom/defs.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/ARCH/EXMIMO/DRIVER/eurecom/exmimo_fw.c b/targets/ARCH/EXMIMO/DRIVER/eurecom/exmimo_fw.c index e02173d9d2..eb23d1afb8 100644 --- a/targets/ARCH/EXMIMO/DRIVER/eurecom/exmimo_fw.c +++ b/targets/ARCH/EXMIMO/DRIVER/eurecom/exmimo_fw.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/ARCH/EXMIMO/DRIVER/eurecom/extern.h b/targets/ARCH/EXMIMO/DRIVER/eurecom/extern.h index b0bbd5c89b..90d1eaa64c 100755 --- a/targets/ARCH/EXMIMO/DRIVER/eurecom/extern.h +++ b/targets/ARCH/EXMIMO/DRIVER/eurecom/extern.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/ARCH/EXMIMO/DRIVER/eurecom/fileops.c b/targets/ARCH/EXMIMO/DRIVER/eurecom/fileops.c index 99edddab89..4427f4c8af 100755 --- a/targets/ARCH/EXMIMO/DRIVER/eurecom/fileops.c +++ b/targets/ARCH/EXMIMO/DRIVER/eurecom/fileops.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/ARCH/EXMIMO/DRIVER/eurecom/irq.c b/targets/ARCH/EXMIMO/DRIVER/eurecom/irq.c index 1e48a1f8c1..c8b9217ce3 100644 --- a/targets/ARCH/EXMIMO/DRIVER/eurecom/irq.c +++ b/targets/ARCH/EXMIMO/DRIVER/eurecom/irq.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/ARCH/EXMIMO/DRIVER/eurecom/module_main.c b/targets/ARCH/EXMIMO/DRIVER/eurecom/module_main.c index 988238bea9..4ef187b073 100755 --- a/targets/ARCH/EXMIMO/DRIVER/eurecom/module_main.c +++ b/targets/ARCH/EXMIMO/DRIVER/eurecom/module_main.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/ARCH/EXMIMO/DRIVER/eurecom/vars.h b/targets/ARCH/EXMIMO/DRIVER/eurecom/vars.h index e3a3a7abfc..7220946e6b 100755 --- a/targets/ARCH/EXMIMO/DRIVER/eurecom/vars.h +++ b/targets/ARCH/EXMIMO/DRIVER/eurecom/vars.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/ARCH/EXMIMO/DRIVER/exmimo3/defs.h b/targets/ARCH/EXMIMO/DRIVER/exmimo3/defs.h index 7467bd0357..ffba2d61c4 100755 --- a/targets/ARCH/EXMIMO/DRIVER/exmimo3/defs.h +++ b/targets/ARCH/EXMIMO/DRIVER/exmimo3/defs.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/ARCH/EXMIMO/DRIVER/exmimo3/exmimo_fw.c b/targets/ARCH/EXMIMO/DRIVER/exmimo3/exmimo_fw.c index d0d1a4fa08..1cc6abf9f7 100644 --- a/targets/ARCH/EXMIMO/DRIVER/exmimo3/exmimo_fw.c +++ b/targets/ARCH/EXMIMO/DRIVER/exmimo3/exmimo_fw.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/ARCH/EXMIMO/DRIVER/exmimo3/extern.h b/targets/ARCH/EXMIMO/DRIVER/exmimo3/extern.h index b0bbd5c89b..90d1eaa64c 100755 --- a/targets/ARCH/EXMIMO/DRIVER/exmimo3/extern.h +++ b/targets/ARCH/EXMIMO/DRIVER/exmimo3/extern.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/ARCH/EXMIMO/DRIVER/exmimo3/fileops.c b/targets/ARCH/EXMIMO/DRIVER/exmimo3/fileops.c index 99edddab89..4427f4c8af 100755 --- a/targets/ARCH/EXMIMO/DRIVER/exmimo3/fileops.c +++ b/targets/ARCH/EXMIMO/DRIVER/exmimo3/fileops.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/ARCH/EXMIMO/DRIVER/exmimo3/irq.c b/targets/ARCH/EXMIMO/DRIVER/exmimo3/irq.c index 1e48a1f8c1..c8b9217ce3 100644 --- a/targets/ARCH/EXMIMO/DRIVER/exmimo3/irq.c +++ b/targets/ARCH/EXMIMO/DRIVER/exmimo3/irq.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/ARCH/EXMIMO/DRIVER/exmimo3/module_main.c b/targets/ARCH/EXMIMO/DRIVER/exmimo3/module_main.c index 679f83d426..b25ff1cfa8 100755 --- a/targets/ARCH/EXMIMO/DRIVER/exmimo3/module_main.c +++ b/targets/ARCH/EXMIMO/DRIVER/exmimo3/module_main.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/ARCH/EXMIMO/DRIVER/exmimo3/vars.h b/targets/ARCH/EXMIMO/DRIVER/exmimo3/vars.h index e3a3a7abfc..7220946e6b 100755 --- a/targets/ARCH/EXMIMO/DRIVER/exmimo3/vars.h +++ b/targets/ARCH/EXMIMO/DRIVER/exmimo3/vars.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/ARCH/EXMIMO/DRIVER/telecomparistech/em1_dev.c b/targets/ARCH/EXMIMO/DRIVER/telecomparistech/em1_dev.c index 2e1a8f2587..2a25dd39fe 100644 --- a/targets/ARCH/EXMIMO/DRIVER/telecomparistech/em1_dev.c +++ b/targets/ARCH/EXMIMO/DRIVER/telecomparistech/em1_dev.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/ARCH/EXMIMO/DRIVER/telecomparistech/em1_drv.c b/targets/ARCH/EXMIMO/DRIVER/telecomparistech/em1_drv.c index 060db51b2b..b22b224e04 100644 --- a/targets/ARCH/EXMIMO/DRIVER/telecomparistech/em1_drv.c +++ b/targets/ARCH/EXMIMO/DRIVER/telecomparistech/em1_drv.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/ARCH/EXMIMO/DRIVER/telecomparistech/em1_drv.h b/targets/ARCH/EXMIMO/DRIVER/telecomparistech/em1_drv.h index ab81f78f8a..f19f0cfc42 100644 --- a/targets/ARCH/EXMIMO/DRIVER/telecomparistech/em1_drv.h +++ b/targets/ARCH/EXMIMO/DRIVER/telecomparistech/em1_drv.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/ARCH/EXMIMO/DRIVER/telecomparistech/em1_fifos.c b/targets/ARCH/EXMIMO/DRIVER/telecomparistech/em1_fifos.c index 4eb0ed7058..15f4deacd2 100644 --- a/targets/ARCH/EXMIMO/DRIVER/telecomparistech/em1_fifos.c +++ b/targets/ARCH/EXMIMO/DRIVER/telecomparistech/em1_fifos.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/ARCH/EXMIMO/DRIVER/telecomparistech/em1_ioctl.c b/targets/ARCH/EXMIMO/DRIVER/telecomparistech/em1_ioctl.c index 30ecf2a56a..8ade1d69a0 100644 --- a/targets/ARCH/EXMIMO/DRIVER/telecomparistech/em1_ioctl.c +++ b/targets/ARCH/EXMIMO/DRIVER/telecomparistech/em1_ioctl.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/ARCH/EXMIMO/DRIVER/telecomparistech/em1_mmap.c b/targets/ARCH/EXMIMO/DRIVER/telecomparistech/em1_mmap.c index a4af653862..c2860f0b18 100644 --- a/targets/ARCH/EXMIMO/DRIVER/telecomparistech/em1_mmap.c +++ b/targets/ARCH/EXMIMO/DRIVER/telecomparistech/em1_mmap.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/ARCH/EXMIMO/DRIVER/telecomparistech/em1_rw.c b/targets/ARCH/EXMIMO/DRIVER/telecomparistech/em1_rw.c index a07194f770..478f8bb363 100644 --- a/targets/ARCH/EXMIMO/DRIVER/telecomparistech/em1_rw.c +++ b/targets/ARCH/EXMIMO/DRIVER/telecomparistech/em1_rw.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/ARCH/EXMIMO/USERSPACE/LIB/example.c b/targets/ARCH/EXMIMO/USERSPACE/LIB/example.c index 87d006dbbf..5fbe19eacd 100644 --- a/targets/ARCH/EXMIMO/USERSPACE/LIB/example.c +++ b/targets/ARCH/EXMIMO/USERSPACE/LIB/example.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/ARCH/EXMIMO/USERSPACE/LIB/gain_control.c b/targets/ARCH/EXMIMO/USERSPACE/LIB/gain_control.c index 9413295d46..84b2d8e8e2 100644 --- a/targets/ARCH/EXMIMO/USERSPACE/LIB/gain_control.c +++ b/targets/ARCH/EXMIMO/USERSPACE/LIB/gain_control.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/ARCH/EXMIMO/USERSPACE/LIB/gain_control.h b/targets/ARCH/EXMIMO/USERSPACE/LIB/gain_control.h index bad05ca1c5..dd48683ad0 100644 --- a/targets/ARCH/EXMIMO/USERSPACE/LIB/gain_control.h +++ b/targets/ARCH/EXMIMO/USERSPACE/LIB/gain_control.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/ARCH/EXMIMO/USERSPACE/LIB/openair0_lib.c b/targets/ARCH/EXMIMO/USERSPACE/LIB/openair0_lib.c index 71c1009039..df9900d3bc 100644 --- a/targets/ARCH/EXMIMO/USERSPACE/LIB/openair0_lib.c +++ b/targets/ARCH/EXMIMO/USERSPACE/LIB/openair0_lib.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/ARCH/EXMIMO/USERSPACE/LIB/openair0_lib.h b/targets/ARCH/EXMIMO/USERSPACE/LIB/openair0_lib.h index f40b7ae88c..ae2ff8a36b 100644 --- a/targets/ARCH/EXMIMO/USERSPACE/LIB/openair0_lib.h +++ b/targets/ARCH/EXMIMO/USERSPACE/LIB/openair0_lib.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/ARCH/EXMIMO/USERSPACE/OAI_FW_INIT/elf.h b/targets/ARCH/EXMIMO/USERSPACE/OAI_FW_INIT/elf.h index 793f585ae4..238c4ee606 100644 --- a/targets/ARCH/EXMIMO/USERSPACE/OAI_FW_INIT/elf.h +++ b/targets/ARCH/EXMIMO/USERSPACE/OAI_FW_INIT/elf.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/ARCH/EXMIMO/USERSPACE/OAI_FW_INIT/elftypes.h b/targets/ARCH/EXMIMO/USERSPACE/OAI_FW_INIT/elftypes.h index a83f89c794..dfd16118c6 100644 --- a/targets/ARCH/EXMIMO/USERSPACE/OAI_FW_INIT/elftypes.h +++ b/targets/ARCH/EXMIMO/USERSPACE/OAI_FW_INIT/elftypes.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/ARCH/EXMIMO/USERSPACE/OAI_FW_INIT/updatefw.c b/targets/ARCH/EXMIMO/USERSPACE/OAI_FW_INIT/updatefw.c index 17cca70a8a..692742c7cf 100644 --- a/targets/ARCH/EXMIMO/USERSPACE/OAI_FW_INIT/updatefw.c +++ b/targets/ARCH/EXMIMO/USERSPACE/OAI_FW_INIT/updatefw.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/ARCH/EXMIMO/USERSPACE/OAI_FW_INIT/updatefw.h b/targets/ARCH/EXMIMO/USERSPACE/OAI_FW_INIT/updatefw.h index c44570d8a1..ea2abec216 100644 --- a/targets/ARCH/EXMIMO/USERSPACE/OAI_FW_INIT/updatefw.h +++ b/targets/ARCH/EXMIMO/USERSPACE/OAI_FW_INIT/updatefw.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/ARCH/EXMIMO/USERSPACE/OCTAVE/gpib_send.cc b/targets/ARCH/EXMIMO/USERSPACE/OCTAVE/gpib_send.cc index c451647f49..a007618e43 100644 --- a/targets/ARCH/EXMIMO/USERSPACE/OCTAVE/gpib_send.cc +++ b/targets/ARCH/EXMIMO/USERSPACE/OCTAVE/gpib_send.cc @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/ARCH/EXMIMO/USERSPACE/OCTAVE/oarf_config_exmimo.cc b/targets/ARCH/EXMIMO/USERSPACE/OCTAVE/oarf_config_exmimo.cc index 4618128401..4d0eef921b 100644 --- a/targets/ARCH/EXMIMO/USERSPACE/OCTAVE/oarf_config_exmimo.cc +++ b/targets/ARCH/EXMIMO/USERSPACE/OCTAVE/oarf_config_exmimo.cc @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/ARCH/EXMIMO/USERSPACE/OCTAVE/oarf_get_frame.cc b/targets/ARCH/EXMIMO/USERSPACE/OCTAVE/oarf_get_frame.cc index bdf50e1459..708910b4f7 100644 --- a/targets/ARCH/EXMIMO/USERSPACE/OCTAVE/oarf_get_frame.cc +++ b/targets/ARCH/EXMIMO/USERSPACE/OCTAVE/oarf_get_frame.cc @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/ARCH/EXMIMO/USERSPACE/OCTAVE/oarf_get_num_detected_cards.cc b/targets/ARCH/EXMIMO/USERSPACE/OCTAVE/oarf_get_num_detected_cards.cc index ec10e5d893..a26b6a0a67 100644 --- a/targets/ARCH/EXMIMO/USERSPACE/OCTAVE/oarf_get_num_detected_cards.cc +++ b/targets/ARCH/EXMIMO/USERSPACE/OCTAVE/oarf_get_num_detected_cards.cc @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/ARCH/EXMIMO/USERSPACE/OCTAVE/oarf_send_frame.cc b/targets/ARCH/EXMIMO/USERSPACE/OCTAVE/oarf_send_frame.cc index 4066cef7c9..75cdef67b2 100644 --- a/targets/ARCH/EXMIMO/USERSPACE/OCTAVE/oarf_send_frame.cc +++ b/targets/ARCH/EXMIMO/USERSPACE/OCTAVE/oarf_send_frame.cc @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/ARCH/EXMIMO/USERSPACE/OCTAVE/oarf_stop.cc b/targets/ARCH/EXMIMO/USERSPACE/OCTAVE/oarf_stop.cc index 5a0eb8c716..03b4b5324d 100644 --- a/targets/ARCH/EXMIMO/USERSPACE/OCTAVE/oarf_stop.cc +++ b/targets/ARCH/EXMIMO/USERSPACE/OCTAVE/oarf_stop.cc @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/ARCH/EXMIMO/USERSPACE/OCTAVE/oarf_stop_without_reset.cc b/targets/ARCH/EXMIMO/USERSPACE/OCTAVE/oarf_stop_without_reset.cc index 98dcb6f2f3..058a8bba3e 100644 --- a/targets/ARCH/EXMIMO/USERSPACE/OCTAVE/oarf_stop_without_reset.cc +++ b/targets/ARCH/EXMIMO/USERSPACE/OCTAVE/oarf_stop_without_reset.cc @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp index 192ed503e2..e57f55720b 100644 --- a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp +++ b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/COMMON/create_tasks.c b/targets/COMMON/create_tasks.c index 537dbd91f6..148843dbbc 100644 --- a/targets/COMMON/create_tasks.c +++ b/targets/COMMON/create_tasks.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/COMMON/create_tasks.h b/targets/COMMON/create_tasks.h index 5d27c64abe..4e6f5817d8 100644 --- a/targets/COMMON/create_tasks.h +++ b/targets/COMMON/create_tasks.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/Makefile.common b/targets/Makefile.common index 7c7698edaa..042a36bf45 100644 --- a/targets/Makefile.common +++ b/targets/Makefile.common @@ -1,12 +1,12 @@ # This file gathers compilation directive shared between lte-softmodem and oaisim export COMMON_UTILS_DIR = $(OPENAIR_DIR)/common/utils -export UE_NAS_DIR = $(OPENAIR_DIR)/openair-cn/NAS -export S1AP_DIR = $(OPENAIR_DIR)/openair-cn/S1AP +export UE_NAS_DIR = $(OPENAIR_DIR)/openair3/NAS +export S1AP_DIR = $(OPENAIR_DIR)/openair3/S1AP export X2AP_DIR = $(OPENAIR_DIR)/openair2/X2AP -export SCTP_DIR = $(OPENAIR_DIR)/openair-cn/SCTP -export UDP_DIR = $(OPENAIR_DIR)/openair-cn/UDP -export GTPV1U_DIR = $(OPENAIR_DIR)/openair-cn/GTPV1-U -export SECU_DIR = $(OPENAIR_DIR)/openair-cn/SECU +export SCTP_DIR = $(OPENAIR_DIR)/openair3/SCTP +export UDP_DIR = $(OPENAIR_DIR)/openair3/UDP +export GTPV1U_DIR = $(OPENAIR_DIR)/openair3/GTPV1-U +export SECU_DIR = $(OPENAIR_DIR)/openair3/SECU UE_NAS_OBJ_DIR = $(subst $(OPENAIR_DIR),$(OBJS_DIR),$(UE_NAS_DIR)) SECU_OBJ_DIR = $(subst $(OPENAIR_DIR),$(OBJS_DIR),$(SECU_DIR)) @@ -112,12 +112,12 @@ COMMON_CFLAGS += -DLOG_NO_THREAD openair_cn_available := $(shell if [ -d "$(UE_NAS_DIR)" ]; then echo "0" ; else echo "1" ; fi ) ifeq ($(openair_cn_available), 0) COMMON_CFLAGS += -DENABLE_NAS_UE_LOGGING -COMMON_CFLAGS += -I$(OPENAIR_DIR)/openair-cn/NAS/EURECOM-NAS/src/api/network -COMMON_CFLAGS += -I$(OPENAIR_DIR)/openair-cn/NAS/EURECOM-NAS/src/include -COMMON_CFLAGS += -I$(OPENAIR_DIR)/openair-cn/NAS/EURECOM-NAS/src/ies -COMMON_CFLAGS += -I$(OPENAIR_DIR)/openair-cn/NAS/EURECOM-NAS/src/emm/msg -COMMON_CFLAGS += -I$(OPENAIR_DIR)/openair-cn/NAS/EURECOM-NAS/src/esm/msg -COMMON_CFLAGS += -I$(OPENAIR_DIR)/openair-cn/NAS/EURECOM-NAS/src/util +COMMON_CFLAGS += -I$(OPENAIR_DIR)/openair3/NAS/EURECOM-NAS/src/api/network +COMMON_CFLAGS += -I$(OPENAIR_DIR)/openair3/NAS/EURECOM-NAS/src/include +COMMON_CFLAGS += -I$(OPENAIR_DIR)/openair3/NAS/EURECOM-NAS/src/ies +COMMON_CFLAGS += -I$(OPENAIR_DIR)/openair3/NAS/EURECOM-NAS/src/emm/msg +COMMON_CFLAGS += -I$(OPENAIR_DIR)/openair3/NAS/EURECOM-NAS/src/esm/msg +COMMON_CFLAGS += -I$(OPENAIR_DIR)/openair3/NAS/EURECOM-NAS/src/util endif UENAS_CFLAGS = $(COMMON_CFLAGS) @@ -125,8 +125,8 @@ UENAS_CFLAGS += -I$(SECU_DIR) export UENAS_CFLAGS SECU_CFLAGS = $(COMMON_CFLAGS) -SECU_CFLAGS += -I$(OPENAIR_DIR)/openair-cn/COMMON -SECU_CFLAGS += -I$(OPENAIR_DIR)/openair-cn/UTILS +SECU_CFLAGS += -I$(OPENAIR_DIR)/openair3/COMMON +SECU_CFLAGS += -I$(OPENAIR_DIR)/openair3/UTILS SECU_CFLAGS += -I$(SECU_DIR) export SECU_CFLAGS @@ -162,7 +162,7 @@ GTPV1U_CFLAGS += -I$(TOP_DIR) GTPV1U_CFLAGS += -I$(GTPV1U_DIR)/nw-gtpv1u/include GTPV1U_CFLAGS += -I$(GTPV1U_DIR)/nw-gtpv1u/shared GTPV1U_CFLAGS += -I$(OPENAIR_DIR)/openair2/ENB_APP -GTPV1U_CFLAGS += $(UTIL_incl) -I$(OPENAIRCN_DIR)/UTILS +GTPV1U_CFLAGS += $(UTIL_incl) -I$(OPENAIR3_DIR)/UTILS export GTPV1U_CFLAGS GTPV1U_ENB_CFLAGS = $(COMMON_CFLAGS) @@ -176,7 +176,7 @@ GTPV1U_ENB_CFLAGS += -I$(TOP_DIR) GTPV1U_ENB_CFLAGS += -I$(GTPV1U_DIR)/nw-gtpv1u/include GTPV1U_ENB_CFLAGS += -I$(GTPV1U_DIR)/nw-gtpv1u/shared GTPV1U_ENB_CFLAGS += -I$(OPENAIR_DIR)/openair2/ENB_APP -GTPV1U_ENB_CFLAGS += $(UTIL_incl) -I$(OPENAIRCN_DIR)/UTILS +GTPV1U_ENB_CFLAGS += $(UTIL_incl) -I$(OPENAIR3_DIR)/UTILS export GTPV1U_ENB_CFLAGS diff --git a/targets/PROJECTS/E-MBMS/utils.bash b/targets/PROJECTS/E-MBMS/utils.bash index 5410fc5818..e95fd9e5b6 100755 --- a/targets/PROJECTS/E-MBMS/utils.bash +++ b/targets/PROJECTS/E-MBMS/utils.bash @@ -178,7 +178,7 @@ set_openair() { declare -i index length_path=${#path} - for i in 'openair1' 'openair2' 'openair3' 'openair-cn' 'targets' + for i in 'openair1' 'openair2' 'openair3' 'openair3' 'targets' do index=`echo $path | grep -b -o $i | cut -d: -f1` #echo ${path%$token*} @@ -193,7 +193,7 @@ set_openair() { export OPENAIR1_DIR=$openair_path/openair1 export OPENAIR2_DIR=$openair_path/openair2 export OPENAIR3_DIR=$openair_path/openair3 - export OPENAIRCN_DIR=$openair_path/openair-cn + export OPENAIR3_DIR=$openair_path/openair3 export OPENAIR_TARGETS=$openair_path/targets return 0 fi @@ -367,7 +367,7 @@ declare -x OPENAIR_DIR="" declare -x OPENAIR1_DIR="" declare -x OPENAIR2_DIR="" declare -x OPENAIR3_DIR="" -declare -x OPENAIRCN_DIR="" +declare -x OPENAIR3_DIR="" declare -x OPENAIR_TARGETS="" ########################################################### @@ -377,5 +377,5 @@ cecho "OPENAIR_DIR = $OPENAIR_DIR" $green cecho "OPENAIR1_DIR = $OPENAIR1_DIR" $green cecho "OPENAIR2_DIR = $OPENAIR2_DIR" $green cecho "OPENAIR3_DIR = $OPENAIR3_DIR" $green -cecho "OPENAIRCN_DIR = $OPENAIRCN_DIR" $green +cecho "OPENAIR3_DIR = $OPENAIR3_DIR" $green cecho "OPENAIR_TARGETS = $OPENAIR_TARGETS" $green diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf index bd9014670e..21303ebc71 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf @@ -130,7 +130,7 @@ eNBs = }; ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.12.17"; + mme_ip_address = ( { ipv4 = "192.168.12.62"; ipv6 = "192:168:30::17"; active = "yes"; preference = "ipv4"; @@ -139,11 +139,11 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; - ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.213/24"; + ENB_INTERFACE_NAME_FOR_S1_MME = "eth1"; + ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.82/24"; - ENB_INTERFACE_NAME_FOR_S1U = "eth0"; - ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.213/24"; + ENB_INTERFACE_NAME_FOR_S1U = "eth1"; + ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.82/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/epc.generic.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/epc.generic.conf deleted file mode 100755 index 125468e5c7..0000000000 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/epc.generic.conf +++ /dev/null @@ -1,199 +0,0 @@ -# INTERNET GW 192.168.12.100 -# | -# | -# 192.168.12.175/24 | -# +-----------+----------------+---+--+---------------------------------------+ -# | HSS | | eth1 | | -# +-----------+ +---+--+ | -# | host "olympie" | | -# | | | -# | +-----+------+ | -# | |MASQUERADING| | 192.168.13.17 -# | +-----+------+ +----+ -# | +------------+ | |eth2+--x disconnected -# | | HSS | | +----+ -# | | | | | -# | | | | | -# | | | | | -# | +------------+ +---+--+ | -# | | eth3 | | -# +----------------------------+---+--+---------------------------------------+ -# 192.168.14.175/24 | -# | -# | x disconnected -# 192.168.14.17/24 | 192.168.12.175/24| -# +-----------+----------------+---+--+---------------------+---+--+----------+ -# | MME | | eth3 | | eth1 | | -# +-----------+ +------+ +------+ | -# | host "yang" | -# | | -# | +-----------------+ | -# | | MME | | -# | | S+P/GW | | -# | | | | -# | | | | -# | | | | -# | | | | -# | | | | -# | +-----------------+ | -# | | -# | | -# | +------+ | -# | | eth2 | | -# +----------------------------+---+--+---------------------------------------+ -# 192.168.13.17 | -# | -# | -# 192.168.13.82 | (S1-C, S1-U) -# +-----------+----------------+---+--+---------------------------------------+ -# | eNB | | eth0 | | -# +-----------+ +------+ | -# | host "calisson" | -# | | 192.168.12.82 -# | +----+ -# | |eth1+--internet via router -# | +----+ -# | | -# +---------------------------------+-----------------------------------------+ -# | -# O (RF antenna) - -MME : -{ - - GNU_DEBUGGER = "yes"; - REALM = "eur"; - # Define the limits of the system in terms of served eNB and served UE. - # When the limits will be reached, overload procedure will take place. - MAXENB = 10; - MAXUE = 100; - RELATIVE_CAPACITY = 10; - # Display statistics about whole system (expressed in seconds) - MME_STATISTIC_TIMER = 10; - EMERGENCY_ATTACH_SUPPORTED = "no"; - UNAUTHENTICATED_IMSI_SUPPORTED = "no"; - # VERBOSITY: none, info, annoying - VERBOSITY = "none"; - - - IP_CAPABILITY = "IPV4V6"; - - - INTERTASK_INTERFACE : - { - # max queue size per task - ITTI_QUEUE_SIZE = 2000000; - }; - - S6A : - { - # pwd=$OPENAIR_CN/objs - S6A_CONF = "./epc_s6a.conf"; - HSS_HOSTNAME = "to_do_here_put_your_hss_host_name"; - }; - - # ------- SCTP definitions - SCTP : - { - # Number of streams to use in input/output - SCTP_INSTREAMS = 32; - SCTP_OUTSTREAMS = 32; - }; - - # ------- S1AP definitions - S1AP : - { - # outcome drop timer value (seconds) - S1AP_OUTCOME_TIMER = 10; - }; - - # ------- MME served GUMMEI - GUMMEI : - { - # MME code DEFAULT = 0 - # size = 8 bits - # maximum of 256 values, comma separated - MME_CODE = [ 1, 30 , 31, 32, 33, 34, 35, 36, 56 , 29 , 8 ]; - - # MME GROUP ID DEFAULT = 0 - # size = 16 bits - # maximum of 65535 values, comma separated - MME_GID = [ 32768 , 4 , 5 , 30 , 8 , 9 , 50021 ]; - - # TA (mcc.mnc:tracking area code) DEFAULT = 208.92:1 - # max values = 999.999:65535 - # maximum of 32 values, comma separated - PLMN = ( - {MCC="208" ; MNC="92"; TAC = "1"; }, - {MCC="208" ; MNC="10"; TAC = "1"; }, - {MCC="209" ; MNC="130"; TAC = "4"; }, - {MCC="209" ; MNC="012"; TAC = "2"; }, - {MCC="208" ; MNC="35"; TAC = "8"; } - ); - }; - - NAS : - { - # 3GPP TS 33.401 section 7.2.4.3 Procedures for NAS algorithm selection - # decreasing preference goes from left to right - ORDERED_SUPPORTED_INTEGRITY_ALGORITHM_LIST = [ "EIA2" , "EIA1" , "EIA0" ]; - ORDERED_SUPPORTED_CIPHERING_ALGORITHM_LIST = [ "EEA0" , "EEA1" , "EEA2" ]; - }; - - NETWORK_INTERFACES : - { - MME_INTERFACE_NAME_FOR_S1_MME = "eth2"; - MME_IPV4_ADDRESS_FOR_S1_MME = "192.168.13.17/24"; - - MME_INTERFACE_NAME_FOR_S11_MME = "none"; - MME_IPV4_ADDRESS_FOR_S11_MME = "0.0.0.0/24"; - }; -}; - -S-GW : -{ - NETWORK_INTERFACES : - { - SGW_INTERFACE_NAME_FOR_S11 = "none"; - SGW_IPV4_ADDRESS_FOR_S11 = "0.0.0.0/24"; - - SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP = "eth2"; - SGW_IPV4_ADDRESS_FOR_S1U_S12_S4_UP = "192.168.13.17/24"; - SGW_INTERFACE_MTU_FOR_S1U_S12_S4_UP = 1564; - SGW_IPV4_PORT_FOR_S1U_S12_S4_UP = 2152; - - SGW_INTERFACE_NAME_FOR_S5_S8_UP = "none"; - SGW_IPV4_ADDRESS_FOR_S5_S8_UP = "0.0.0.0/24"; - }; -}; - -P-GW = -{ - NETWORK_INTERFACES : - { - PGW_INTERFACE_NAME_FOR_S5_S8 = "none"; - PGW_IPV4_ADDRESS_FOR_S5_S8 = "0.0.0.0/24"; - - PGW_INTERFACE_NAME_FOR_SGI = "eth3"; - PGW_IPV4_ADDRESS_FOR_SGI = "192.168.14.17/24"; - # Option available only if GTPU in kernel configured - PGW_MASQUERADE_SGI = "no"; - }; - - IP_ADDRESS_POOL : - { - IPV4_LIST = ( - "192.178.0.0/24", - "192.168.2.60", - "192.178.1.0/24" - ); - IPV6_LIST = ( - "2014:02:26::0/120" - ); - }; - #WARNING DNS ARE HARDCODED IN openair-cn/NAS/EURECOM-NAS/src/esm/msg/ActivateDefaultEpsBearerContextRequest.c:305 - DEFAULT_DNS_IPV4_ADDRESS = "192.168.12.100"; - DEFAULT_DNS_SEC_IPV4_ADDRESS = "192.168.106.12"; -}; - - diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/epc.on.enb.example.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/epc.on.enb.example.conf deleted file mode 100755 index e934b33a53..0000000000 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/epc.on.enb.example.conf +++ /dev/null @@ -1,173 +0,0 @@ -# Internet -# | -# 192.168.14.17/24 | -# +-----------+----------------+---+--+---------------------------------------+ -# |host "yang"| | eth3 | | -# +-----------+ +------+ | -# | | -# | +---------+ | -# | | HSS | | -# | +----+----+ | -# | | | -# | +---+--+ | -# | | eth1 | | -# +----------------------------+---+--+---------------------------------------+ -# 192.168.13.17 | -# | -# | -# 192.168.13.82 | -# +---------------+------------+---+--+---------------------------------------+ -# |host "calisson"| | eth0 | | -# +---------------+ +---+--+ | -# | | | -# | +------+----+ | -# | | MME+SP-GW | | -# | +-----------+ | -# | | eNB | | -# | +-------+---+ | -# +---------------------------------+-----------------------------------------+ -# | -# O (RF antenna) -MME : -{ - - REALM = "pft"; - # Define the limits of the system in terms of served eNB and served UE. - # When the limits will be reached, overload procedure will take place. - MAXENB = 10; - MAXUE = 100; - RELATIVE_CAPACITY = 10; - # Display statistics about whole system (expressed in seconds) - MME_STATISTIC_TIMER = 10; - EMERGENCY_ATTACH_SUPPORTED = "no"; - UNAUTHENTICATED_IMSI_SUPPORTED = "no"; - # VERBOSITY: none, info, annoying - VERBOSITY = "none"; - - - IP_CAPABILITY = "IPV4V6"; - - - INTERTASK_INTERFACE : - { - # max queue size per task - ITTI_QUEUE_SIZE = 2000000; - }; - - S6A : - { - # pwd=$OPENAIR_CN/objs - S6A_CONF = "./epc_s6a.conf"; - HSS_HOSTNAME = "to_do_here_put_your_hss_host_name"; - }; - - # ------- SCTP definitions - SCTP : - { - # Number of streams to use in input/output - SCTP_INSTREAMS = 32; - SCTP_OUTSTREAMS = 32; - }; - - # ------- S1AP definitions - S1AP : - { - # outcome drop timer value (seconds) - S1AP_OUTCOME_TIMER = 10; - }; - - # ------- MME served GUMMEI - GUMMEI : - { - # MME code DEFAULT = 0 - # size = 8 bits - # maximum of 256 values, comma separated - MME_CODE = [ 1, 30 , 31, 32, 33, 34, 35, 36, 56 , 29 , 8 ]; - - # MME GROUP ID DEFAULT = 0 - # size = 16 bits - # maximum of 65535 values, comma separated - MME_GID = [ 32768 , 4 , 5 , 30 , 8 , 9 , 50021 ]; - - # TA (mcc.mnc:tracking area code) DEFAULT = 208.92:1 - # max values = 999.999:65535 - # maximum of 32 values, comma separated - PLMN = ( - {MCC="208" ; MNC="92"; TAC = "1"; }, - {MCC="208" ; MNC="10"; TAC = "1"; }, - {MCC="209" ; MNC="130"; TAC = "4"; }, - {MCC="209" ; MNC="012"; TAC = "2"; }, - {MCC="208" ; MNC="35"; TAC = "8"; } - ); - }; - - NAS : - { - # 3GPP TS 33.401 section 7.2.4.3 Procedures for NAS algorithm selection - # decreasing preference goes from left to right - ORDERED_SUPPORTED_INTEGRITY_ALGORITHM_LIST = [ "EIA2" , "EIA1" , "EIA0" ]; - ORDERED_SUPPORTED_CIPHERING_ALGORITHM_LIST = [ "EEA0" , "EEA1" , "EEA2" ]; - }; - - NETWORK_INTERFACES : - { - MME_INTERFACE_NAME_FOR_S1_MME = "tun2"; - MME_IPV4_ADDRESS_FOR_S1_MME = "192.188.2.2/24"; - - MME_INTERFACE_NAME_FOR_S11_MME = "none"; - MME_IPV4_ADDRESS_FOR_S11_MME = "0.0.0.0/24"; - }; -}; - -S-GW : -{ - NETWORK_INTERFACES : - { - SGW_INTERFACE_NAME_FOR_S11 = "none"; - SGW_IPV4_ADDRESS_FOR_S11 = "0.0.0.0/24"; - - SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP = "tun3"; - SGW_INTERFACE_MTU_FOR_S1U_S12_S4_UP = 1564; - SGW_IPV4_ADDRESS_FOR_S1U_S12_S4_UP = "192.188.3.3/24"; - # TODO PORT NUMBER - SGW_IPV4_PORT_FOR_S1U_S12_S4_UP = 2152; - - SGW_INTERFACE_NAME_FOR_S5_S8_UP = "none"; - SGW_IPV4_ADDRESS_FOR_S5_S8_UP = "0.0.0.0/24"; - }; - # Only for tests - SGW_DROP_UPLINK_S1U_TRAFFIC = "no"; - # Only for tests - SGW_DROP_DOWNLINK_S1U_TRAFFIC = "no"; -}; - -P-GW = -{ - NETWORK_INTERFACES : - { - PGW_INTERFACE_NAME_FOR_S5_S8 = "none"; - PGW_IPV4_ADDRESS_FOR_S5_S8 = "0.0.0.0/24"; - - PGW_INTERFACE_NAME_FOR_SGI = "eth1"; - PGW_IPV4_ADDRESS_FOR_SGI = "192.168.13.82/24"; - # Option available only if GTPU in kernel configured - PGW_MASQUERADE_SGI = "yes"; - }; - - IP_ADDRESS_POOL : - { - IPV4_LIST = ( - "192.168.0.0/24", - "192.168.1.0/24" - ); - IPV6_LIST = ( - "2014:02:26::0/120" - ); - }; - - #WARNING DNS ARE HARDCODED IN openair-cn/NAS/EURECOM-NAS/src/esm/msg/ActivateDefaultEpsBearerContextRequest.c:305 - DEFAULT_DNS_IPV4_ADDRESS = "192.168.12.100"; - DEFAULT_DNS_SEC_IPV4_ADDRESS = "192.168.106.106"; -}; - - diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/interfaces.bash b/targets/PROJECTS/GENERIC-LTE-EPC/interfaces.bash index 83e2eb9aea..b6151fc677 100755 --- a/targets/PROJECTS/GENERIC-LTE-EPC/interfaces.bash +++ b/targets/PROJECTS/GENERIC-LTE-EPC/interfaces.bash @@ -21,7 +21,7 @@ # Contact Information # OpenAirInterface Admin: openair_admin@eurecom.fr # OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr +# OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr # # Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE # diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/networks.bash b/targets/PROJECTS/GENERIC-LTE-EPC/networks.bash index 4b4173e6cb..81c4b7b1a6 100755 --- a/targets/PROJECTS/GENERIC-LTE-EPC/networks.bash +++ b/targets/PROJECTS/GENERIC-LTE-EPC/networks.bash @@ -21,7 +21,7 @@ # Contact Information # OpenAirInterface Admin: openair_admin@eurecom.fr # OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr +# OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr # # Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE # diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/start_enb_and_ue_virt.bash b/targets/PROJECTS/GENERIC-LTE-EPC/start_enb_and_ue_virt.bash index e0e97d8145..3c58834f0f 100755 --- a/targets/PROJECTS/GENERIC-LTE-EPC/start_enb_and_ue_virt.bash +++ b/targets/PROJECTS/GENERIC-LTE-EPC/start_enb_and_ue_virt.bash @@ -22,7 +22,7 @@ # Contact Information # OpenAirInterface Admin: openair_admin@eurecom.fr # OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr +# OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr # # Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE # @@ -125,13 +125,13 @@ fi ####################################################### export NVRAM_DIR=$THIS_SCRIPT_PATH -if [ ! -f $OPENAIRCN_DIR/NAS/EURECOM-NAS/bin/ue_data ] || [ ! -f $OPENAIRCN_DIR/NAS/EURECOM-NAS/bin/usim_data ]; then +if [ ! -f $OPENAIR3_DIR/NAS/EURECOM-NAS/bin/ue_data ] || [ ! -f $OPENAIR3_DIR/NAS/EURECOM-NAS/bin/usim_data ]; then if [ ! -f /tmp/nas_cleaned ]; then - echo_success "make --directory=$OPENAIRCN_DIR/NAS/EURECOM-NAS veryveryclean" - make --directory=$OPENAIRCN_DIR/NAS/EURECOM-NAS veryveryclean + echo_success "make --directory=$OPENAIR3_DIR/NAS/EURECOM-NAS veryveryclean" + make --directory=$OPENAIR3_DIR/NAS/EURECOM-NAS veryveryclean fi - echo_success "make --directory=$OPENAIRCN_DIR/NAS/EURECOM-NAS -f Makefile PROCESS=UE all" - make -f Makefile --debug=b --directory=$OPENAIRCN_DIR/NAS/EURECOM-NAS PROCESS=UE all + echo_success "make --directory=$OPENAIR3_DIR/NAS/EURECOM-NAS -f Makefile PROCESS=UE all" + make -f Makefile --debug=b --directory=$OPENAIR3_DIR/NAS/EURECOM-NAS PROCESS=UE all rm .ue.nvram rm .usim.nvram touch /tmp/nas_cleaned @@ -139,15 +139,15 @@ fi if [ ! -f .ue.nvram ]; then echo_success "generate .ue_emm.nvram .ue.nvram" - $OPENAIRCN_DIR/NAS/EURECOM-NAS/bin/ue_data --gen + $OPENAIR3_DIR/NAS/EURECOM-NAS/bin/ue_data --gen fi if [ ! -f .usim.nvram ]; then echo_success "generate .usim.nvram" - $OPENAIRCN_DIR/NAS/EURECOM-NAS/bin/usim_data --gen + $OPENAIR3_DIR/NAS/EURECOM-NAS/bin/usim_data --gen fi -$OPENAIRCN_DIR/NAS/EURECOM-NAS/bin/ue_data --print -$OPENAIRCN_DIR/NAS/EURECOM-NAS/bin/usim_data --print +$OPENAIR3_DIR/NAS/EURECOM-NAS/bin/ue_data --print +$OPENAIR3_DIR/NAS/EURECOM-NAS/bin/usim_data --print ################################################## # LAUNCH eNB + UE executable @@ -226,7 +226,7 @@ cd $THIS_SCRIPT_PATH #nohup tshark -i $ENB_INTERFACE_NAME_FOR_S1_MME -i $ENB_INTERFACE_NAME_FOR_S1U -w OUTPUT/$HOSTNAME/tshark_enb_ue.$HOSTNAME.pcap & # To start NAS connectivity: AT+CFUN=1 -# nohup xterm -hold -e $OPENAIRCN_DIR/NAS/EURECOM-NAS/bin/UserProcess & +# nohup xterm -hold -e $OPENAIR3_DIR/NAS/EURECOM-NAS/bin/UserProcess & export MALLOC_TRACE=/tmp/malloc_trace.txt touch /tmp/malloc_trace.txt diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/start_ue.bash b/targets/PROJECTS/GENERIC-LTE-EPC/start_ue.bash index b76a267976..72a3a6fca1 100755 --- a/targets/PROJECTS/GENERIC-LTE-EPC/start_ue.bash +++ b/targets/PROJECTS/GENERIC-LTE-EPC/start_ue.bash @@ -22,7 +22,7 @@ # Contact Information # OpenAirInterface Admin: openair_admin@eurecom.fr # OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr +# OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr # # Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE # @@ -72,27 +72,27 @@ EMULATION_DEV_ADDRESS=`ifconfig $EMULATION_DEV_INTERFACE | grep 'inet addr:'| gr ####################################################### export NVRAM_DIR=$THIS_SCRIPT_PATH -if [ ! -f $OPENAIRCN_DIR/NAS/EURECOM-NAS/bin/ue_data ]; then - make --directory=$OPENAIRCN_DIR/NAS/EURECOM-NAS veryveryclean - make --directory=$OPENAIRCN_DIR/NAS/EURECOM-NAS PROCESS=UE +if [ ! -f $OPENAIR3_DIR/NAS/EURECOM-NAS/bin/ue_data ]; then + make --directory=$OPENAIR3_DIR/NAS/EURECOM-NAS veryveryclean + make --directory=$OPENAIR3_DIR/NAS/EURECOM-NAS PROCESS=UE rm .ue.nvram fi -if [ ! -f $OPENAIRCN_DIR/NAS/EURECOM-NAS/bin/usim_data ]; then - make --directory=$OPENAIRCN_DIR/NAS/EURECOM-NAS veryveryclean - make --directory=$OPENAIRCN_DIR/NAS/EURECOM-NAS PROCESS=UE +if [ ! -f $OPENAIR3_DIR/NAS/EURECOM-NAS/bin/usim_data ]; then + make --directory=$OPENAIR3_DIR/NAS/EURECOM-NAS veryveryclean + make --directory=$OPENAIR3_DIR/NAS/EURECOM-NAS PROCESS=UE rm .usim.nvram fi if [ ! -f .ue.nvram ]; then # generate .ue_emm.nvram .ue.nvram - $OPENAIRCN_DIR/NAS/EURECOM-NAS/bin/ue_data --gen + $OPENAIR3_DIR/NAS/EURECOM-NAS/bin/ue_data --gen fi if [ ! -f .usim.nvram ]; then # generate .usim.nvram - $OPENAIRCN_DIR/NAS/EURECOM-NAS/bin/usim_data --gen + $OPENAIR3_DIR/NAS/EURECOM-NAS/bin/usim_data --gen fi -$OPENAIRCN_DIR/NAS/EURECOM-NAS/bin/ue_data --print -$OPENAIRCN_DIR/NAS/EURECOM-NAS/bin/usim_data --print +$OPENAIR3_DIR/NAS/EURECOM-NAS/bin/ue_data --print +$OPENAIR3_DIR/NAS/EURECOM-NAS/bin/usim_data --print ################################################## # LAUNCH UE executable @@ -145,7 +145,7 @@ if [ x$hard_real_time != "xyes" ]; then cd $THIS_SCRIPT_PATH - nohup xterm -e $OPENAIRCN_DIR/NAS/EURECOM-NAS/bin/UserProcess & + nohup xterm -e $OPENAIR3_DIR/NAS/EURECOM-NAS/bin/UserProcess & cp $OPENAIR_TARGETS/SIMU/USER/oaisim $OPENAIR_TARGETS/SIMU/USER/oaisim_ue gdb --args $OPENAIR_TARGETS/SIMU/USER/oaisim_ue -a -l9 -u1 -b0 -M1 -p2 -g$EMULATION_MULTICAST_GROUP -D $EMULATION_DEV_ADDRESS -K $ITTI_LOG_FILE 2>&1 | tee $STDOUT_LOG_FILE diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/utils.bash b/targets/PROJECTS/GENERIC-LTE-EPC/utils.bash index 7664678290..0ba30cc504 100755 --- a/targets/PROJECTS/GENERIC-LTE-EPC/utils.bash +++ b/targets/PROJECTS/GENERIC-LTE-EPC/utils.bash @@ -21,7 +21,7 @@ # Contact Information # OpenAirInterface Admin: openair_admin@eurecom.fr # OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr +# OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr # # Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE # @@ -186,7 +186,7 @@ set_openair() { export OPENAIR1_DIR=$openair_path/openair1 export OPENAIR2_DIR=$openair_path/openair2 export OPENAIR3_DIR=$openair_path/openair3 - export OPENAIRCN_DIR=$openair_path/openair-cn + export OPENAIR3_DIR=$openair_path/openair3 export OPENAIR_TARGETS=$openair_path/targets export CDPATH=$CDPATH:$openair_path } @@ -302,7 +302,7 @@ start_openswitch_daemon() { bash_exec "insmod /lib/modules/`uname -r`/extra/openvswitch.ko" > /dev/null 2>&1 else echo_error "/lib/modules/`uname -r`/extra/openvswitch.ko not found" - bash $OPENAIRCN_DIR/SCRIPTS/install_openvswitch1.9.0.bash + bash $OPENAIR3_DIR/SCRIPTS/install_openvswitch1.9.0.bash fi is_process_started "ovsdb-server" if [ $? -ne 0 ] @@ -349,26 +349,26 @@ check_epc_s6a_certificate() { fi echo_error "MME S6A: Did not find valid certificate in /usr/local/etc/freeDiameter" echo_warning "MME S6A: generatting new certificate in /usr/local/etc/freeDiameter..." - cd $OPENAIRCN_DIR/S6A/freediameter + cd $OPENAIR3_DIR/S6A/freediameter ./make_certs.sh ${1:-'eur'} check_epc_s6a_certificate ${1:-'eur'} return 1 } check_hss_s6a_certificate() { - if [ -f $OPENAIRCN_DIR/OPENAIRHSS/conf/hss.cert.pem ] + if [ -f $OPENAIR3_DIR/OPENAIRHSS/conf/hss.cert.pem ] then - full_hostname=`cat $OPENAIRCN_DIR/OPENAIRHSS/conf/hss.cert.pem | grep "Subject" | grep "CN" | cut -d '=' -f6` + full_hostname=`cat $OPENAIR3_DIR/OPENAIRHSS/conf/hss.cert.pem | grep "Subject" | grep "CN" | cut -d '=' -f6` # we should replace 'hss' with hostname if [ a$full_hostname == ahss.${1:-'eur'} ] then - echo_success "HSS S6A: Found valid certificate in $OPENAIRCN_DIR/OPENAIRHSS/conf/" + echo_success "HSS S6A: Found valid certificate in $OPENAIR3_DIR/OPENAIRHSS/conf/" return 1 fi fi - echo_error "HSS S6A: Did not find valid certificate in $OPENAIRCN_DIR/OPENAIRHSS/conf" - echo_warning "HSS S6A: generatting new certificate in $OPENAIRCN_DIR/OPENAIRHSS/conf..." - cd $OPENAIRCN_DIR/OPENAIRHSS/conf + echo_error "HSS S6A: Did not find valid certificate in $OPENAIR3_DIR/OPENAIRHSS/conf" + echo_warning "HSS S6A: generatting new certificate in $OPENAIR3_DIR/OPENAIRHSS/conf..." + cd $OPENAIR3_DIR/OPENAIRHSS/conf ./make_certs.sh ${1:-'eur'} check_hss_s6a_certificate ${1:-'eur'} return 1 @@ -406,7 +406,7 @@ create_hss_database(){ echo_success "oai_db creation succeeded" fi - $MYSQL -u $1 --password=$2 oai_db < $OPENAIRCN_DIR/OPENAIRHSS/db/oai_db.sql + $MYSQL -u $1 --password=$2 oai_db < $OPENAIR3_DIR/OPENAIRHSS/db/oai_db.sql if [ $? -ne 0 ]; then echo_error "oai_db tables creation failed" else @@ -539,13 +539,13 @@ check_install_epc_software() { if [ ! -d /usr/local/etc/freeDiameter ] then # This script make certificates also - cd $OPENAIRCN_DIR/S6A/freediameter && ./install_freediameter.sh + cd $OPENAIR3_DIR/S6A/freediameter && ./install_freediameter.sh else echo_success "freediameter is installed" check_epc_s6a_certificate fi - test_command_install_script "asn1c" "$OPENAIRCN_DIR/SCRIPTS/install_asn1c_0.9.24.modified.bash" + test_command_install_script "asn1c" "$OPENAIR3_DIR/SCRIPTS/install_asn1c_0.9.24.modified.bash" # One mor check about version of asn1c ASN1C_COMPILER_REQUIRED_VERSION_MESSAGE="ASN.1 Compiler, v0.9.24" @@ -558,7 +558,7 @@ check_install_epc_software() { echo_error "$ASN1C_COMPILER_VERSION_MESSAGE" while read -r -n 1 -s answer; do if [[ $answer = [YyNn] ]]; then - [[ $answer = [Yy] ]] && $OPENAIRCN_DIR/SCRIPTS/install_asn1c_0.9.24.modified.bash + [[ $answer = [Yy] ]] && $OPENAIR3_DIR/SCRIPTS/install_asn1c_0.9.24.modified.bash [[ $answer = [Nn] ]] && echo_error "Version of asn1c is not the required one, exiting." && exit 1 break fi @@ -577,7 +577,7 @@ function cgrp() find $OPENAIR2_DIR -name *.c -exec grep --color=auto -Hni $1 {} \; find $OPENAIR1_DIR -name *.c -exec grep --color=auto -Hni $1 {} \; find $OPENAIR3_DIR -name *.c -exec grep --color=auto -Hni $1 {} \; - find $OPENAIRCN_DIR -name *.c -exec grep --color=auto -Hni $1 {} \; + find $OPENAIR3_DIR -name *.c -exec grep --color=auto -Hni $1 {} \; find $OPENAIR_TARGETS -name *.c -exec grep --color=auto -Hni $1 {} \; } @@ -591,7 +591,7 @@ function hgrp() find $OPENAIR2_DIR -name *.h -exec grep --color=auto -Hni $1 {} \; find $OPENAIR1_DIR -name *.h -exec grep --color=auto -Hni $1 {} \; find $OPENAIR3_DIR -name *.h -exec grep --color=auto -Hni $1 {} \; - find $OPENAIRCN_DIR -name *.h -exec grep --color=auto -Hni $1 {} \; + find $OPENAIR3_DIR -name *.h -exec grep --color=auto -Hni $1 {} \; find $OPENAIR_TARGETS -name *.h -exec grep --color=auto -Hni $1 {} \; } @@ -606,7 +606,7 @@ function svn_find_str_in_file_history() } compile_hss() { - cd $OPENAIRCN_DIR/OPENAIRHSS + cd $OPENAIR3_DIR/OPENAIRHSS OBJ_DIR=`find . -maxdepth 1 -type d -iname obj*` if [ ! -n "$OBJ_DIR" ] then @@ -646,7 +646,7 @@ compile_hss() { compile_epc() { - cd $OPENAIRCN_DIR + cd $OPENAIR3_DIR OBJ_DIR=`find . -maxdepth 1 -type d -iname obj*` if [ ! -n "$OBJ_DIR" ] then @@ -695,7 +695,7 @@ declare -x OPENAIR_DIR="" declare -x OPENAIR1_DIR="" declare -x OPENAIR2_DIR="" declare -x OPENAIR3_DIR="" -declare -x OPENAIRCN_DIR="" +declare -x OPENAIR3_DIR="" declare -x OPENAIR_TARGETS="" ########################################################### @@ -705,7 +705,7 @@ cecho "OPENAIR_DIR = $OPENAIR_DIR" $green cecho "OPENAIR1_DIR = $OPENAIR1_DIR" $green cecho "OPENAIR2_DIR = $OPENAIR2_DIR" $green cecho "OPENAIR3_DIR = $OPENAIR3_DIR" $green -cecho "OPENAIRCN_DIR = $OPENAIRCN_DIR" $green +cecho "OPENAIR3_DIR = $OPENAIR3_DIR" $green cecho "OPENAIR_TARGETS = $OPENAIR_TARGETS" $green export UTILS_ARCH=$(uname -m | sed 's/x86_//;s/i[3-6]86/32/') diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/virtual_box.bash b/targets/PROJECTS/GENERIC-LTE-EPC/virtual_box.bash index 57b935c0db..1fad3fe879 100755 --- a/targets/PROJECTS/GENERIC-LTE-EPC/virtual_box.bash +++ b/targets/PROJECTS/GENERIC-LTE-EPC/virtual_box.bash @@ -22,7 +22,7 @@ # Contact Information # OpenAirInterface Admin: openair_admin@eurecom.fr # OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr +# OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr # # Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE # diff --git a/targets/RT/USER/TOOLS/thread_ipc.c b/targets/RT/USER/TOOLS/thread_ipc.c index d6b86d2efb..36a61298ef 100644 --- a/targets/RT/USER/TOOLS/thread_ipc.c +++ b/targets/RT/USER/TOOLS/thread_ipc.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/RT/USER/TOOLS/thread_ipc.h b/targets/RT/USER/TOOLS/thread_ipc.h index 2a8fcc5185..99439b2b8d 100644 --- a/targets/RT/USER/TOOLS/thread_ipc.h +++ b/targets/RT/USER/TOOLS/thread_ipc.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/RT/USER/UE_transport_IQ.c b/targets/RT/USER/UE_transport_IQ.c index e986046d81..a52e3654ae 100644 --- a/targets/RT/USER/UE_transport_IQ.c +++ b/targets/RT/USER/UE_transport_IQ.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/RT/USER/condtest.c b/targets/RT/USER/condtest.c index 7244c47992..6ff2fe4516 100644 --- a/targets/RT/USER/condtest.c +++ b/targets/RT/USER/condtest.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/RT/USER/eNB_transport_IQ.c b/targets/RT/USER/eNB_transport_IQ.c index eaad2ebb24..07533ff59c 100644 --- a/targets/RT/USER/eNB_transport_IQ.c +++ b/targets/RT/USER/eNB_transport_IQ.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/RT/USER/emos-raw.c b/targets/RT/USER/emos-raw.c index 9e6861f1e6..b436e84502 100644 --- a/targets/RT/USER/emos-raw.c +++ b/targets/RT/USER/emos-raw.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c index 2faa4e796d..b96a7ae529 100644 --- a/targets/RT/USER/lte-softmodem.c +++ b/targets/RT/USER/lte-softmodem.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/RT/USER/lte-ue.c b/targets/RT/USER/lte-ue.c index 7c82b7976c..31701d877f 100644 --- a/targets/RT/USER/lte-ue.c +++ b/targets/RT/USER/lte-ue.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/RT/USER/msg_many.h b/targets/RT/USER/msg_many.h index f9d7e6a8d5..82e5eb1371 100644 --- a/targets/RT/USER/msg_many.h +++ b/targets/RT/USER/msg_many.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/RT/USER/rrh.c b/targets/RT/USER/rrh.c index ff4776754b..6da21190e5 100644 --- a/targets/RT/USER/rrh.c +++ b/targets/RT/USER/rrh.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/RT/USER/rrh_gw.c b/targets/RT/USER/rrh_gw.c index 2ff213b147..39b726ae07 100644 --- a/targets/RT/USER/rrh_gw.c +++ b/targets/RT/USER/rrh_gw.c @@ -22,7 +22,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/RT/USER/rrh_gw.h b/targets/RT/USER/rrh_gw.h index 37852c3b11..69546dbe07 100644 --- a/targets/RT/USER/rrh_gw.h +++ b/targets/RT/USER/rrh_gw.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/RT/USER/rrh_gw_externs.h b/targets/RT/USER/rrh_gw_externs.h index 47cb50605b..8d2d1d7e5e 100644 --- a/targets/RT/USER/rrh_gw_externs.h +++ b/targets/RT/USER/rrh_gw_externs.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/RT/USER/rt_wrapper.c b/targets/RT/USER/rt_wrapper.c index 62329d0f1b..0242dab3d8 100644 --- a/targets/RT/USER/rt_wrapper.c +++ b/targets/RT/USER/rt_wrapper.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/RT/USER/rt_wrapper.h b/targets/RT/USER/rt_wrapper.h index abe6e79a91..88a3d96efa 100644 --- a/targets/RT/USER/rt_wrapper.h +++ b/targets/RT/USER/rt_wrapper.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. diff --git a/targets/RT/USER/sched_dlsch.c b/targets/RT/USER/sched_dlsch.c index c13be0b7d4..d582e79310 100644 --- a/targets/RT/USER/sched_dlsch.c +++ b/targets/RT/USER/sched_dlsch.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/RT/USER/sched_rx_pdsch.c b/targets/RT/USER/sched_rx_pdsch.c index a32c4f2e59..be1ffbd752 100644 --- a/targets/RT/USER/sched_rx_pdsch.c +++ b/targets/RT/USER/sched_rx_pdsch.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/RT/USER/sched_ulsch.c b/targets/RT/USER/sched_ulsch.c index 2a698928ff..3ab0c312f5 100644 --- a/targets/RT/USER/sched_ulsch.c +++ b/targets/RT/USER/sched_ulsch.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/RT/USER/sleeptest.c b/targets/RT/USER/sleeptest.c index 694f9ddb4f..369f335307 100644 --- a/targets/RT/USER/sleeptest.c +++ b/targets/RT/USER/sleeptest.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/RT/USER/synctest.c b/targets/RT/USER/synctest.c index a4390640be..e365ad6728 100644 --- a/targets/RT/USER/synctest.c +++ b/targets/RT/USER/synctest.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/SCRIPTS/install_asn1c_0.9.24.modified.bash b/targets/SCRIPTS/install_asn1c_0.9.24.modified.bash index 3821d656c9..91281ec31a 100755 --- a/targets/SCRIPTS/install_asn1c_0.9.24.modified.bash +++ b/targets/SCRIPTS/install_asn1c_0.9.24.modified.bash @@ -22,7 +22,7 @@ # Contact Information # OpenAirInterface Admin: openair_admin@eurecom.fr # OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr +# OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr # # Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France. # @@ -32,7 +32,7 @@ $1 rm -Rf /usr/local/src/asn1c-r1516 $1 svn co https://github.com/vlm/asn1c/trunk /usr/local/src/asn1c-r1516 -r 1516 > /tmp/install_log.txt cd /usr/local/src/asn1c-r1516 -$1 patch -p0 < $OPENAIRCN_DIR/S1AP/MESSAGES/ASN1/asn1cpatch.p0 > /tmp/install_log.txt +$1 patch -p0 < $OPENAIR3_DIR/S1AP/MESSAGES/ASN1/asn1cpatch.p0 > /tmp/install_log.txt $1 ./configure > /tmp/install_log.txt $1 make > /tmp/install_log.txt $1 make install > /tmp/install_log.txt \ No newline at end of file diff --git a/targets/SIMU/PROC/Process.c b/targets/SIMU/PROC/Process.c index a2c6260848..28d4970cc0 100644 --- a/targets/SIMU/PROC/Process.c +++ b/targets/SIMU/PROC/Process.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/SIMU/PROC/Process.h b/targets/SIMU/PROC/Process.h index 1f8eb4358b..4bf6c7a739 100644 --- a/targets/SIMU/PROC/Process.h +++ b/targets/SIMU/PROC/Process.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/SIMU/PROC/Tsync.h b/targets/SIMU/PROC/Tsync.h index e87b4cc6fc..6488759440 100644 --- a/targets/SIMU/PROC/Tsync.h +++ b/targets/SIMU/PROC/Tsync.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/SIMU/PROC/channel_sim_proc.c b/targets/SIMU/PROC/channel_sim_proc.c index 2af7513781..334d3f5549 100644 --- a/targets/SIMU/PROC/channel_sim_proc.c +++ b/targets/SIMU/PROC/channel_sim_proc.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/SIMU/PROC/channel_sim_proc.h b/targets/SIMU/PROC/channel_sim_proc.h index 3d1ac4e8b0..49e732de98 100644 --- a/targets/SIMU/PROC/channel_sim_proc.h +++ b/targets/SIMU/PROC/channel_sim_proc.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/SIMU/PROC/interface.h b/targets/SIMU/PROC/interface.h index e24e97066a..0688226ca6 100644 --- a/targets/SIMU/PROC/interface.h +++ b/targets/SIMU/PROC/interface.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/SIMU/USER/channel_sim.c b/targets/SIMU/USER/channel_sim.c index 69f41841a2..aeddfaddbe 100644 --- a/targets/SIMU/USER/channel_sim.c +++ b/targets/SIMU/USER/channel_sim.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/SIMU/USER/cor_SF_sim.c b/targets/SIMU/USER/cor_SF_sim.c index 339a00ff69..73a6f023cc 100644 --- a/targets/SIMU/USER/cor_SF_sim.c +++ b/targets/SIMU/USER/cor_SF_sim.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/SIMU/USER/cor_SF_sim.h b/targets/SIMU/USER/cor_SF_sim.h index 2afd3e664f..193eef90f1 100644 --- a/targets/SIMU/USER/cor_SF_sim.h +++ b/targets/SIMU/USER/cor_SF_sim.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/SIMU/USER/event_handler.c b/targets/SIMU/USER/event_handler.c index 956f345550..4072c6bfe7 100644 --- a/targets/SIMU/USER/event_handler.c +++ b/targets/SIMU/USER/event_handler.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/SIMU/USER/event_handler.h b/targets/SIMU/USER/event_handler.h index 46136de751..748d4efc2c 100644 --- a/targets/SIMU/USER/event_handler.h +++ b/targets/SIMU/USER/event_handler.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/SIMU/USER/init_lte.c b/targets/SIMU/USER/init_lte.c index 33c70ed4c8..d798b0968a 100644 --- a/targets/SIMU/USER/init_lte.c +++ b/targets/SIMU/USER/init_lte.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/SIMU/USER/init_lte.h b/targets/SIMU/USER/init_lte.h index 83e58bc734..b00f1f8a3c 100644 --- a/targets/SIMU/USER/init_lte.h +++ b/targets/SIMU/USER/init_lte.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/SIMU/USER/oaisim.c b/targets/SIMU/USER/oaisim.c index cd87d30495..c1d4d64ef6 100644 --- a/targets/SIMU/USER/oaisim.c +++ b/targets/SIMU/USER/oaisim.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/SIMU/USER/oaisim.h b/targets/SIMU/USER/oaisim.h index 15eaebda26..216acaa653 100644 --- a/targets/SIMU/USER/oaisim.h +++ b/targets/SIMU/USER/oaisim.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/SIMU/USER/oaisim_config.c b/targets/SIMU/USER/oaisim_config.c index 92d14797fa..51a5a03eac 100644 --- a/targets/SIMU/USER/oaisim_config.c +++ b/targets/SIMU/USER/oaisim_config.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/SIMU/USER/oaisim_config.h b/targets/SIMU/USER/oaisim_config.h index 7d580bd237..a50a8d2426 100644 --- a/targets/SIMU/USER/oaisim_config.h +++ b/targets/SIMU/USER/oaisim_config.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/SIMU/USER/oaisim_functions.c b/targets/SIMU/USER/oaisim_functions.c index 54d7aca589..ebdb3c00d3 100644 --- a/targets/SIMU/USER/oaisim_functions.c +++ b/targets/SIMU/USER/oaisim_functions.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/SIMU/USER/oaisim_functions.h b/targets/SIMU/USER/oaisim_functions.h index 693272b688..346e95eaf8 100644 --- a/targets/SIMU/USER/oaisim_functions.h +++ b/targets/SIMU/USER/oaisim_functions.h @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/SIMU/USER/oaisim_pad.c b/targets/SIMU/USER/oaisim_pad.c index 1ab933b688..b54709b925 100644 --- a/targets/SIMU/USER/oaisim_pad.c +++ b/targets/SIMU/USER/oaisim_pad.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/SIMU/USER/sinr_sim.c b/targets/SIMU/USER/sinr_sim.c index ba57ec3344..8bdc4a5057 100644 --- a/targets/SIMU/USER/sinr_sim.c +++ b/targets/SIMU/USER/sinr_sim.c @@ -21,7 +21,7 @@ Contact Information OpenAirInterface Admin: openair_admin@eurecom.fr OpenAirInterface Tech : openair_tech@eurecom.fr - OpenAirInterface Dev : openair4g-devel@eurecom.fr + OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/TEST/OAI/case01.py b/targets/TEST/OAI/case01.py index 4a9594fdca..f2211bf6ac 100644 --- a/targets/TEST/OAI/case01.py +++ b/targets/TEST/OAI/case01.py @@ -22,7 +22,7 @@ # Contact Information # OpenAirInterface Admin: openair_admin@eurecom.fr # OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr +# OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr # Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/TEST/OAI/case02.py b/targets/TEST/OAI/case02.py index d3d9577c4e..e3a4849901 100644 --- a/targets/TEST/OAI/case02.py +++ b/targets/TEST/OAI/case02.py @@ -22,7 +22,7 @@ # Contact Information # OpenAirInterface Admin: openair_admin@eurecom.fr # OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr +# OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr # Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/TEST/OAI/case03.py b/targets/TEST/OAI/case03.py index e75b96a03f..ece67bcba0 100644 --- a/targets/TEST/OAI/case03.py +++ b/targets/TEST/OAI/case03.py @@ -22,7 +22,7 @@ # Contact Information # OpenAirInterface Admin: openair_admin@eurecom.fr # OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr +# OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr # Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/TEST/OAI/case04.py b/targets/TEST/OAI/case04.py index 8b17265970..857190313d 100644 --- a/targets/TEST/OAI/case04.py +++ b/targets/TEST/OAI/case04.py @@ -22,7 +22,7 @@ # Contact Information # OpenAirInterface Admin: openair_admin@eurecom.fr # OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr +# OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr # Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/TEST/OAI/case05.py b/targets/TEST/OAI/case05.py index 0d3fe0229f..c73ae969eb 100644 --- a/targets/TEST/OAI/case05.py +++ b/targets/TEST/OAI/case05.py @@ -22,7 +22,7 @@ # Contact Information # OpenAirInterface Admin: openair_admin@eurecom.fr # OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr +# OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr # Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/TEST/OAI/test01.py b/targets/TEST/OAI/test01.py index f1c048fdcf..c382dd5c71 100644 --- a/targets/TEST/OAI/test01.py +++ b/targets/TEST/OAI/test01.py @@ -23,7 +23,7 @@ # Contact Information # OpenAirInterface Admin: openair_admin@eurecom.fr # OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr +# OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr # Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE diff --git a/targets/build_helper.bash b/targets/build_helper.bash index c51a99bac8..bc5cd3fbed 100755 --- a/targets/build_helper.bash +++ b/targets/build_helper.bash @@ -21,7 +21,7 @@ # Contact Information # OpenAirInterface Admin: openair_admin@eurecom.fr # OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr +# OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr # # Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE # @@ -288,7 +288,7 @@ check_install_freediamter(){ $SUDO tar -xzf 1.1.5.tar.gz echo "Uncompressing freeDiameter archive" cd freeDiameter-1.1.5 - $SUDO patch -p1 < $OPENAIRCN_DIR/S6A/freediameter/freediameter-1.1.5.patch + $SUDO patch -p1 < $OPENAIR3_DIR/S6A/freediameter/freediameter-1.1.5.patch $SUDO mkdir build cd build $SUDO cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr ../ @@ -327,7 +327,7 @@ check_epc_s6a_certificate() { fi echo_error "EPC S6A: Did not find valid certificate in /usr/local/etc/freeDiameter" echo_warning "EPC S6A: generatting new certificate in /usr/local/etc/freeDiameter..." - cd $OPENAIRCN_DIR/S6A/freediameter + cd $OPENAIR3_DIR/S6A/freediameter ./make_certs.sh ${1:-'eur'} if [ $# -lt 2 ] ; then check_epc_s6a_certificate ${1:-'eur'} 2 @@ -353,7 +353,7 @@ check_hss_s6a_certificate() { fi echo_error "S6A: Did not find valid certificate in /usr/local/etc/freeDiameter" echo_warning "S6A: generatting new certificate in /usr/local/etc/freeDiameter..." - cd $OPENAIRCN_DIR/OPENAIRHSS/conf + cd $OPENAIR3_DIR/OPENAIRHSS/conf ./make_certs.sh ${1:-'eur'} if [ $# -lt 2 ] ; then check_hss_s6a_certificate ${1:-'eur'} 2 @@ -638,7 +638,7 @@ check_install_asn1c(){ # 2. compile ################################################ compile_hss() { - cd $OPENAIRCN_DIR/OPENAIRHSS + cd $OPENAIR3_DIR/OPENAIRHSS if [ "$1" -eq 1 ]; then echo_info "build a clean HSS" @@ -693,7 +693,7 @@ compile_hss() { compile_epc() { - cd $OPENAIRCN_DIR + cd $OPENAIR3_DIR if [ $1 = 1 ]; then echo_info "build a clean EPC" bash_exec "rm -rf objs" @@ -742,7 +742,7 @@ compile_epc() { return 1 fi - cd $OPENAIRCN_DIR/GTPV1-U/GTPUAH; + cd $OPENAIR3_DIR/GTPV1-U/GTPUAH; make if [ $? -ne 0 ]; then echo_error "Build GTPUAH module failed, exiting" @@ -752,7 +752,7 @@ compile_epc() { $SUDO cp -pfv ./Bin/*.ko $OPENAIR_TARGETS/bin fi - cd $OPENAIRCN_DIR/GTPV1-U/GTPURH; + cd $OPENAIR3_DIR/GTPV1-U/GTPURH; make if [ $? -ne 0 ]; then echo_error "Build GTPURH module failed, exiting" @@ -854,11 +854,11 @@ compile_nas_tools() { cd $NVRAM_DIR if [ ! -f /tmp/nas_cleaned ]; then - echo_success "make --directory=$OPENAIRCN_DIR/NAS/EURECOM-NAS/tools veryveryclean" - make --directory=$OPENAIRCN_DIR/NAS/EURECOM-NAS/tools veryveryclean + echo_success "make --directory=$OPENAIR3_DIR/NAS/EURECOM-NAS/tools veryveryclean" + make --directory=$OPENAIR3_DIR/NAS/EURECOM-NAS/tools veryveryclean fi - echo_success "make --directory=$OPENAIRCN_DIR/NAS/EURECOM-NAS/tools all" - make --directory=$OPENAIRCN_DIR/NAS/EURECOM-NAS/tools all + echo_success "make --directory=$OPENAIR3_DIR/NAS/EURECOM-NAS/tools all" + make --directory=$OPENAIR3_DIR/NAS/EURECOM-NAS/tools all rm .ue.nvram rm .usim.nvram touch /tmp/nas_cleaned @@ -882,21 +882,21 @@ check_for_ltesoftmodem_executable() { } check_for_epc_executable() { - if [ ! -f $OPENAIRCN_DIR/objs/OAI_EPC/oai_epc ]; then - echo_error "Cannot find oai_epc executable object in directory $OPENAIRCN_DIR/objs/OAI_EPC/" + if [ ! -f $OPENAIR3_DIR/objs/OAI_EPC/oai_epc ]; then + echo_error "Cannot find oai_epc executable object in directory $OPENAIR3_DIR/objs/OAI_EPC/" echo_fatal "Please make sure you have compiled OAI EPC with --enable-standalone-epc option" fi } check_for_hss_executable() { - if [ ! -f $OPENAIRCN_DIR/OPENAIRHSS/objs/openair-hss ]; then - echo_error "Cannot find openair-hss executable object in directory $OPENAIRCN_DIR/OPENAIRHSS/objs/" + if [ ! -f $OPENAIR3_DIR/OPENAIRHSS/objs/openair-hss ]; then + echo_error "Cannot find openair-hss executable object in directory $OPENAIR3_DIR/OPENAIRHSS/objs/" echo_fatal "Please make sure you have compiled OAI HSS" fi } check_for_sgw_executable() { - if [ ! -f $OPENAIRCN_DIR/objs/OAI_SGW/oai_sgw ]; then + if [ ! -f $OPENAIR3_DIR/objs/OAI_SGW/oai_sgw ]; then echo_error "Cannot find oai_sgw executable object in directory $OPENAIR3_DIR/OPENAIRMME/objs/OAI_SGW/" echo_fatal "Please make sure you have compiled OAI EPC without --enable-standalone-epc option" fi @@ -959,8 +959,8 @@ check_for_mbmssim_executable() { } check_for_nas_ue_executable() { - if [ ! -f $OPENAIRCN_DIR/NAS/EURECOM-NAS/bin/UserProcess ]; then - echo_error "Cannot find UserProcess executable object in directory $OPENAIRCN_DIR/NAS/EURECOM-NAS/bin" + if [ ! -f $OPENAIR3_DIR/NAS/EURECOM-NAS/bin/UserProcess ]; then + echo_error "Cannot find UserProcess executable object in directory $OPENAIR3_DIR/NAS/EURECOM-NAS/bin" echo_fatal "Check the compilation logs in bin/install_log.txt" fi } @@ -1036,15 +1036,15 @@ install_nas_tools() { cd $OPENAIR_TARGETS/bin if [ ! -f .ue.nvram ]; then echo_success "generate .ue_emm.nvram .ue.nvram" - $OPENAIRCN_DIR/NAS/EURECOM-NAS/bin/ue_data --gen + $OPENAIR3_DIR/NAS/EURECOM-NAS/bin/ue_data --gen fi if [ ! -f .usim.nvram ]; then echo_success "generate .usim.nvram" - $OPENAIRCN_DIR/NAS/EURECOM-NAS/bin/usim_data --gen + $OPENAIR3_DIR/NAS/EURECOM-NAS/bin/usim_data --gen fi - $OPENAIRCN_DIR/NAS/EURECOM-NAS/bin/ue_data --print - $OPENAIRCN_DIR/NAS/EURECOM-NAS/bin/usim_data --print + $OPENAIR3_DIR/NAS/EURECOM-NAS/bin/ue_data --print + $OPENAIR3_DIR/NAS/EURECOM-NAS/bin/usim_data --print } install_nasmesh(){ @@ -1106,7 +1106,7 @@ create_hss_database(){ mysql -u $3 --password=$4 -e "desc $5.users" > /dev/null 2>&1 if [ $? -eq 1 ]; then - $MYSQL -u $3 --password=$4 $5 < $OPENAIRCN_DIR/OPENAIRHSS/db/oai_db.sql + $MYSQL -u $3 --password=$4 $5 < $OPENAIR3_DIR/OPENAIRHSS/db/oai_db.sql if [ $? -ne 0 ]; then echo_error "$5 tables creation failed" return 1 @@ -1126,7 +1126,7 @@ set_openair_env(){ fullpath=`readlink -f $BASH_SOURCE` [ -f "/.$fullpath" ] || fullpath=`readlink -f $PWD/$fullpath` openair_path=${fullpath%/targets/*} - openair_path=${openair_path%/openair-cn/*} + openair_path=${openair_path%/openair3/*} openair_path=${openair_path%/openair[123]/*} export OPENAIR_DIR=$openair_path @@ -1134,7 +1134,7 @@ set_openair_env(){ export OPENAIR1_DIR=$openair_path/openair1 export OPENAIR2_DIR=$openair_path/openair2 export OPENAIR3_DIR=$openair_path/openair3 - export OPENAIRCN_DIR=$openair_path/openair-cn + export OPENAIR3_DIR=$openair_path/openair3 export OPENAIR_TARGETS=$openair_path/targets } diff --git a/targets/build_oai.bash b/targets/build_oai.bash index c6c7edd56a..5eb1845674 100755 --- a/targets/build_oai.bash +++ b/targets/build_oai.bash @@ -21,7 +21,7 @@ # Contact Information # OpenAirInterface Admin: openair_admin@eurecom.fr # OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr +# OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr # # Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE # @@ -301,7 +301,7 @@ cecho "OPENAIR_HOME = $OPENAIR_HOME" $green cecho "OPENAIR1_DIR = $OPENAIR1_DIR" $green cecho "OPENAIR2_DIR = $OPENAIR2_DIR" $green cecho "OPENAIR3_DIR = $OPENAIR3_DIR" $green -cecho "OPENAIRCN_DIR = $OPENAIRCN_DIR" $green +cecho "OPENAIR3_DIR = $OPENAIR3_DIR" $green cecho "OPENAIR_TARGETS = $OPENAIR_TARGETS" $green @@ -309,7 +309,7 @@ echo "OPENAIR_HOME = $OPENAIR_HOME" >> bin/${oai_build_date} echo "OPENAIR1_DIR = $OPENAIR1_DIR" >> bin/${oai_build_date} echo "OPENAIR2_DIR = $OPENAIR2_DIR" >> bin/${oai_build_date} echo "OPENAIR3_DIR = $OPENAIR3_DIR" >> bin/${oai_build_date} -echo "OPENAIRCN_DIR = $OPENAIRCN_DIR" >> bin/${oai_build_date} +echo "OPENAIR3_DIR = $OPENAIR3_DIR" >> bin/${oai_build_date} echo "OPENAIR_TARGETS = $OPENAIR_TARGETS" >> bin/${oai_build_date} @@ -607,7 +607,7 @@ build_epc(){ echo_success "target epc built and installed in the bin directory" echo "target epc built and installed in the bin directory" >> bin/${oai_build_date} cp -f $CONFIG_FILE $OPENAIR_TARGETS/bin - cp -f $OPENAIRCN_DIR/objs/UTILS/CONF/s6a.conf $OPENAIR_TARGETS/bin/epc_s6a.conf + cp -f $OPENAIR3_DIR/objs/UTILS/CONF/s6a.conf $OPENAIR_TARGETS/bin/epc_s6a.conf fi } @@ -648,10 +648,10 @@ build_hss(){ ###################################### TEMP_FILE=`tempfile` - cat $OPENAIRCN_DIR/OPENAIRHSS/conf/hss_fd.conf | grep -w "Identity" | tr -d " " | tr -d ";" > $TEMP_FILE - cat $OPENAIRCN_DIR/OPENAIRHSS/conf/hss.conf | grep -w "MYSQL_user" | tr -d " " | tr -d ";" >> $TEMP_FILE - cat $OPENAIRCN_DIR/OPENAIRHSS/conf/hss.conf | grep -w "MYSQL_pass" | tr -d " " | tr -d ";" >> $TEMP_FILE - cat $OPENAIRCN_DIR/OPENAIRHSS/conf/hss.conf | grep -w "MYSQL_db" | tr -d " " | tr -d ";" >> $TEMP_FILE + cat $OPENAIR3_DIR/OPENAIRHSS/conf/hss_fd.conf | grep -w "Identity" | tr -d " " | tr -d ";" > $TEMP_FILE + cat $OPENAIR3_DIR/OPENAIRHSS/conf/hss.conf | grep -w "MYSQL_user" | tr -d " " | tr -d ";" >> $TEMP_FILE + cat $OPENAIR3_DIR/OPENAIRHSS/conf/hss.conf | grep -w "MYSQL_pass" | tr -d " " | tr -d ";" >> $TEMP_FILE + cat $OPENAIR3_DIR/OPENAIRHSS/conf/hss.conf | grep -w "MYSQL_db" | tr -d " " | tr -d ";" >> $TEMP_FILE source $TEMP_FILE rm -f $TEMP_FILE @@ -664,7 +664,7 @@ build_hss(){ NEW_HOSTNAME=`hostname -s` if [ "x$HSS_HOSTNAME" != "x$NEW_HOSTNAME" ]; then echo_warning "Changing identity of HSS from <$HSS_HOSTNAME.$HSS_REALM> to <$NEW_HOSTNAME.$HSS_REALM>" - sed -ibak "s/$HSS_HOSTNAME/$NEW_HOSTNAME/" $OPENAIRCN_DIR/OPENAIRHSS/conf/hss_fd.conf + sed -ibak "s/$HSS_HOSTNAME/$NEW_HOSTNAME/" $OPENAIR3_DIR/OPENAIRHSS/conf/hss_fd.conf fi check_hss_s6a_certificate $HSS_REALM @@ -765,15 +765,15 @@ if [ $RUN -ne 0 ]; then # prepare NAS for UE if [ ! -f .ue.nvram ]; then echo_success "generate .ue_emm.nvram .ue.nvram" - $OPENAIRCN_DIR/NAS/EURECOM-NAS/bin/ue_data --gen + $OPENAIR3_DIR/NAS/EURECOM-NAS/bin/ue_data --gen fi if [ ! -f .usim.nvram ]; then echo_success "generate .usim.nvram" - $OPENAIRCN_DIR/NAS/EURECOM-NAS/bin/usim_data --gen + $OPENAIR3_DIR/NAS/EURECOM-NAS/bin/usim_data --gen fi - $OPENAIRCN_DIR/NAS/EURECOM-NAS/bin/ue_data --print - $OPENAIRCN_DIR/NAS/EURECOM-NAS/bin/usim_data --print + $OPENAIR3_DIR/NAS/EURECOM-NAS/bin/ue_data --print + $OPENAIR3_DIR/NAS/EURECOM-NAS/bin/usim_data --print insmod $OPENAIR2_DIR/NETWORK_DRIVER/UE_IP/ue_ip.ko @@ -813,7 +813,7 @@ if [ $RUN -ne 0 ]; then 'HSS') echo "############# running HSS #############" - cd $OPENAIRCN_DIR/OPENAIRHSS/objs + cd $OPENAIR3_DIR/OPENAIRHSS/objs if [ $RUN_GDB -eq 0 ]; then $SUDO exec ./openair-hss -c ./conf/hss.conf else diff --git a/targets/perf_oai.bash b/targets/perf_oai.bash index 57139cdb01..9379f7767c 100755 --- a/targets/perf_oai.bash +++ b/targets/perf_oai.bash @@ -21,7 +21,7 @@ # Contact Information # OpenAirInterface Admin: openair_admin@eurecom.fr # OpenAirInterface Tech : openair_tech@eurecom.fr -# OpenAirInterface Dev : openair4g-devel@eurecom.fr +# OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr # # Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE # @@ -167,7 +167,7 @@ cecho "OPENAIR_HOME = $OPENAIR_HOME" $green cecho "OPENAIR1_DIR = $OPENAIR1_DIR" $green cecho "OPENAIR2_DIR = $OPENAIR2_DIR" $green cecho "OPENAIR3_DIR = $OPENAIR3_DIR" $green -cecho "OPENAIRCN_DIR = $OPENAIRCN_DIR" $green +cecho "OPENAIR3_DIR = $OPENAIR3_DIR" $green cecho "OPENAIR_TARGETS = $OPENAIR_TARGETS" $green @@ -175,7 +175,7 @@ echo "OPENAIR_HOME = $OPENAIR_HOME" >> results/${oai_exp_date} echo "OPENAIR1_DIR = $OPENAIR1_DIR" >> results/${oai_exp_date} echo "OPENAIR2_DIR = $OPENAIR2_DIR" >> results/${oai_exp_date} echo "OPENAIR3_DIR = $OPENAIR3_DIR" >> results/${oai_exp_date} -echo "OPENAIRCN_DIR = $OPENAIRCN_DIR" >> results/${oai_exp_date} +echo "OPENAIR3_DIR = $OPENAIR3_DIR" >> results/${oai_exp_date} echo "OPENAIR_TARGETS = $OPENAIR_TARGETS" >> results/${oai_exp_date} ################################